From 6725e52d22a4d99ea752fa0d0422a3a544545b03 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 5 Mar 2015 14:24:50 -0500 Subject: [PATCH] staging: rtl8723au: Eliminate ODM_SetBBReg() Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/odm.c | 33 +++++++++++-------- drivers/staging/rtl8723au/hal/odm_interface.c | 12 ------- .../staging/rtl8723au/include/odm_interface.h | 1 - 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index 7a01a8a7340a..428b2b308f27 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -909,13 +909,12 @@ void ODM_RF_Saving23a(struct dm_odm_t *pDM_Odm, u8 bForceInNormal) if (pDM_PSTable->initialize == 0) { pDM_PSTable->Reg874 = - (rtl8723au_read32(adapter, 0x874) & 0x1CC000) >> 14; + rtl8723au_read32(adapter, 0x874) & 0x1CC000; pDM_PSTable->RegC70 = - (rtl8723au_read32(adapter, 0xc70) & BIT(3)) >>3; + rtl8723au_read32(adapter, 0xc70) & BIT(3); pDM_PSTable->Reg85C = - (rtl8723au_read32(adapter, 0x85c) & 0xFF000000) >> 24; - pDM_PSTable->RegA74 = - (rtl8723au_read32(adapter, 0xa74) & 0xF000) >> 12; + rtl8723au_read32(adapter, 0x85c) & 0xFF000000; + pDM_PSTable->RegA74 = rtl8723au_read32(adapter, 0xa74) & 0xF000; pDM_PSTable->initialize = 1; } @@ -983,14 +982,22 @@ void ODM_RF_Saving23a(struct dm_odm_t *pDM_Odm, u8 bForceInNormal) val32 |= BIT(28); rtl8723au_write32(adapter, 0x818, val32); } else { - ODM_SetBBReg(pDM_Odm, 0x874, 0x1CC000, - pDM_PSTable->Reg874); - ODM_SetBBReg(pDM_Odm, 0xc70, BIT(3), - pDM_PSTable->RegC70); - ODM_SetBBReg(pDM_Odm, 0x85c, 0xFF000000, - pDM_PSTable->Reg85C); - ODM_SetBBReg(pDM_Odm, 0xa74, 0xF000, - pDM_PSTable->RegA74); + val32 = rtl8723au_read32(adapter, 0x874); + val32 |= pDM_PSTable->Reg874; + rtl8723au_write32(adapter, 0x874, val32); + + val32 = rtl8723au_read32(adapter, 0xc70); + val32 |= pDM_PSTable->RegC70; + rtl8723au_write32(adapter, 0xc70, val32); + + val32 = rtl8723au_read32(adapter, 0x85c); + val32 |= pDM_PSTable->Reg85C; + rtl8723au_write32(adapter, 0x85c, val32); + + val32 = rtl8723au_read32(adapter, 0xa74); + val32 |= pDM_PSTable->RegA74; + rtl8723au_write32(adapter, 0xa74, val32); + val32 = rtl8723au_read32(adapter, 0x818); val32 &= ~BIT(28); rtl8723au_write32(adapter, 0x818, val32); diff --git a/drivers/staging/rtl8723au/hal/odm_interface.c b/drivers/staging/rtl8723au/hal/odm_interface.c index e005bfa38944..d8f67902708e 100644 --- a/drivers/staging/rtl8723au/hal/odm_interface.c +++ b/drivers/staging/rtl8723au/hal/odm_interface.c @@ -23,18 +23,6 @@ /* */ #include -void ODM_SetBBReg( - struct dm_odm_t *pDM_Odm, - u32 RegAddr, - u32 BitMask, - u32 Data - ) -{ - struct rtw_adapter *Adapter = pDM_Odm->Adapter; - - PHY_SetBBReg(Adapter, RegAddr, BitMask, Data); -} - void ODM_SetRFReg( struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath, diff --git a/drivers/staging/rtl8723au/include/odm_interface.h b/drivers/staging/rtl8723au/include/odm_interface.h index b1d505dc9776..1d3bf03b59ea 100644 --- a/drivers/staging/rtl8723au/include/odm_interface.h +++ b/drivers/staging/rtl8723au/include/odm_interface.h @@ -54,7 +54,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(struct work_struct *pContext); /* =========== EXtern Function Prototype */ /* */ -void ODM_SetBBReg(struct dm_odm_t *pDM_Odm, u32 RegAddr, u32 BitMask, u32 Data); void ODM_SetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath, u32 RegAddr, u32 BitMask, u32 Data); u32 ODM_GetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath, -- 2.30.2