staging: rtl8723au: Eliminate ODM_SetBBReg()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 5 Mar 2015 19:24:50 +0000 (14:24 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 01:22:44 +0000 (17:22 -0800)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/odm.c
drivers/staging/rtl8723au/hal/odm_interface.c
drivers/staging/rtl8723au/include/odm_interface.h

index 7a01a8a7340a0fad5b6655c84e6616b14026a729..428b2b308f27386141c288549291212dac3865f7 100644 (file)
@@ -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);
index e005bfa389444d2f5cb2210d68c6c6bedacc0c39..d8f67902708e70955957f9a26da38c9c11de31dc 100644 (file)
 /*  */
 #include <usb_ops_linux.h>
 
-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,
index b1d505dc9776824aeef53dd1ad1e10cba74f55ec..1d3bf03b59ea7a40a4a100a8587702c4ebfebc3a 100644 (file)
@@ -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,