staging: rtl8723au: Eliminate ODM_GetBBReg()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 5 Mar 2015 19:24:48 +0000 (14:24 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 01:14:44 +0000 (17:14 -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 59af7bcdb64782052445ab28b0e3d48faa834179..20499d2b2945dd695255d3de340b2ce13a226b14 100644 (file)
@@ -379,13 +379,18 @@ void ODM_CmnInfoUpdate23a(struct dm_odm_t *pDM_Odm, u32 CmnInfo, u64 Value)
 
 }
 
-void odm_CommonInfoSelfInit23a(struct dm_odm_t *pDM_Odm
-       )
+void odm_CommonInfoSelfInit23a(struct dm_odm_t *pDM_Odm)
 {
-       pDM_Odm->bCckHighPower =
-               (bool) ODM_GetBBReg(pDM_Odm, rFPGA0_XA_HSSIParameter2, BIT(9));
+       u32 val32;
+
+       val32 = rtl8723au_read32(pDM_Odm->Adapter, rFPGA0_XA_HSSIParameter2);
+       if (val32 & BIT(9))
+               pDM_Odm->bCckHighPower = true;
+       else
+               pDM_Odm->bCckHighPower = false;
+               
        pDM_Odm->RFPathRxEnable =
-               (u8) ODM_GetBBReg(pDM_Odm, rOFDM0_TRxPathEnable, 0x0F);
+               rtl8723au_read32(pDM_Odm->Adapter, rOFDM0_TRxPathEnable) & 0x0F;
 
        ODM_InitDebugSetting23a(pDM_Odm);
 }
@@ -504,10 +509,11 @@ void odm_DIG23abyRSSI_LPS(struct dm_odm_t *pDM_Odm)
 void odm_DIG23aInit(struct dm_odm_t *pDM_Odm)
 {
        struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
+       u32 val32;
+
+       val32 = rtl8723au_read32(pDM_Odm->Adapter, ODM_REG_IGI_A_11N);
+       pDM_DigTable->CurIGValue = val32 & ODM_BIT_IGI_11N;
 
-       pDM_DigTable->CurIGValue = (u8) ODM_GetBBReg(pDM_Odm,
-                                                    ODM_REG(IGI_A, pDM_Odm),
-                                                    ODM_BIT(IGI, pDM_Odm));
        pDM_DigTable->RssiLowThresh     = DM_DIG_THRESH_LOW;
        pDM_DigTable->RssiHighThresh    = DM_DIG_THRESH_HIGH;
        pDM_DigTable->FALowThresh       = DM_FALSEALARM_THRESH_LOW;
@@ -745,10 +751,10 @@ void odm_FalseAlarmCounterStatistics23a(struct dm_odm_t *pDM_Odm)
        ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(12), 1);
        ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(14), 1);
 
-       ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_LSB_11N, bMaskByte0);
+       ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_FA_LSB_11N) & 0xff;
        FalseAlmCnt->Cnt_Cck_fail = ret_value;
-       ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_MSB_11N, bMaskByte3);
-       FalseAlmCnt->Cnt_Cck_fail +=  (ret_value & 0xff) << 8;
+       ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_FA_MSB_11N) >> 16;
+       FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff00);
 
        ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_CCA_CNT_11N);
        FalseAlmCnt->Cnt_CCK_CCA =
index 5b57641d0c00bf1852a351bddebeb6da6902984e..e005bfa389444d2f5cb2210d68c6c6bedacc0c39 100644 (file)
@@ -35,17 +35,6 @@ void ODM_SetBBReg(
        PHY_SetBBReg(Adapter, RegAddr, BitMask, Data);
 }
 
-u32 ODM_GetBBReg(
-       struct dm_odm_t *pDM_Odm,
-       u32             RegAddr,
-       u32             BitMask
-       )
-{
-       struct rtw_adapter *Adapter = pDM_Odm->Adapter;
-
-       return PHY_QueryBBReg(Adapter, RegAddr, BitMask);
-}
-
 void ODM_SetRFReg(
        struct dm_odm_t *pDM_Odm,
        enum RF_RADIO_PATH      eRFPath,
index 62a46c03e98b2ac3da8566a9ef4bad328c3df334..b1d505dc9776824aeef53dd1ad1e10cba74f55ec 100644 (file)
@@ -55,7 +55,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(struct work_struct *pContext);
 /*  */
 
 void ODM_SetBBReg(struct dm_odm_t *pDM_Odm, u32 RegAddr, u32 BitMask, u32 Data);
-u32 ODM_GetBBReg(struct dm_odm_t *pDM_Odm, u32 RegAddr, u32 BitMask);
 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,