Commit 3f9cb6a0 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Eliminate ODM_GetBBReg()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 53de9947
...@@ -379,13 +379,18 @@ void ODM_CmnInfoUpdate23a(struct dm_odm_t *pDM_Odm, u32 CmnInfo, u64 Value) ...@@ -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 = u32 val32;
(bool) ODM_GetBBReg(pDM_Odm, rFPGA0_XA_HSSIParameter2, BIT(9));
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 = pDM_Odm->RFPathRxEnable =
(u8) ODM_GetBBReg(pDM_Odm, rOFDM0_TRxPathEnable, 0x0F); rtl8723au_read32(pDM_Odm->Adapter, rOFDM0_TRxPathEnable) & 0x0F;
ODM_InitDebugSetting23a(pDM_Odm); ODM_InitDebugSetting23a(pDM_Odm);
} }
...@@ -504,10 +509,11 @@ void odm_DIG23abyRSSI_LPS(struct dm_odm_t *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) void odm_DIG23aInit(struct dm_odm_t *pDM_Odm)
{ {
struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable; 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->RssiLowThresh = DM_DIG_THRESH_LOW;
pDM_DigTable->RssiHighThresh = DM_DIG_THRESH_HIGH; pDM_DigTable->RssiHighThresh = DM_DIG_THRESH_HIGH;
pDM_DigTable->FALowThresh = DM_FALSEALARM_THRESH_LOW; pDM_DigTable->FALowThresh = DM_FALSEALARM_THRESH_LOW;
...@@ -745,10 +751,10 @@ void odm_FalseAlarmCounterStatistics23a(struct dm_odm_t *pDM_Odm) ...@@ -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(12), 1);
ODM_SetBBReg(pDM_Odm, ODM_REG_CCK_FA_RST_11N, BIT(14), 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; FalseAlmCnt->Cnt_Cck_fail = ret_value;
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_MSB_11N, bMaskByte3); ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_FA_MSB_11N) >> 16;
FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff) << 8; FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff00);
ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_CCA_CNT_11N); ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_CCA_CNT_11N);
FalseAlmCnt->Cnt_CCK_CCA = FalseAlmCnt->Cnt_CCK_CCA =
......
...@@ -35,17 +35,6 @@ void ODM_SetBBReg( ...@@ -35,17 +35,6 @@ void ODM_SetBBReg(
PHY_SetBBReg(Adapter, RegAddr, BitMask, Data); 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( void ODM_SetRFReg(
struct dm_odm_t *pDM_Odm, struct dm_odm_t *pDM_Odm,
enum RF_RADIO_PATH eRFPath, enum RF_RADIO_PATH eRFPath,
......
...@@ -55,7 +55,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(struct work_struct *pContext); ...@@ -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); 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, void ODM_SetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath,
u32 RegAddr, u32 BitMask, u32 Data); u32 RegAddr, u32 BitMask, u32 Data);
u32 ODM_GetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath, u32 ODM_GetRFReg(struct dm_odm_t *pDM_Odm, enum RF_RADIO_PATH eRFPath,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment