summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2015-03-05 19:24:42 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-07 01:12:02 (GMT)
commita39bd1f53c5cea79db22b37a59b75dbee6e36aa3 (patch)
tree40114ba1e65ffe113a897d5effe502ad08f44de2
parent2c177a8c7799651c1a62b007d16300e50688c287 (diff)
downloadlinux-a39bd1f53c5cea79db22b37a59b75dbee6e36aa3.tar.xz
staging: rtl8723au: odm.c: Use rtl8723au_{read, write}32() for 32 bit register access
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8723au/hal/odm.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c
index 7a5cff5..5220a0b 100644
--- a/drivers/staging/rtl8723au/hal/odm.c
+++ b/drivers/staging/rtl8723au/hal/odm.c
@@ -714,28 +714,25 @@ void odm_DIG23a(struct rtw_adapter *adapter)
void odm_FalseAlarmCounterStatistics23a(struct dm_odm_t *pDM_Odm)
{
- u32 ret_value;
+ struct rtw_adapter *adapter = pDM_Odm->Adapter;
struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt;
+ u32 ret_value;
/* hold ofdm counter */
- /* hold page C counter */
+ /* hold page C counter */
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_HOLDC_11N, BIT(31), 1);
/* hold page D counter */
ODM_SetBBReg(pDM_Odm, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 1);
- ret_value =
- ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE1_11N, bMaskDWord);
+ ret_value = rtl8723au_read32(adapter, ODM_REG_OFDM_FA_TYPE1_11N);
FalseAlmCnt->Cnt_Fast_Fsync = (ret_value&0xffff);
FalseAlmCnt->Cnt_SB_Search_fail = (ret_value & 0xffff0000)>>16;
- ret_value =
- ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE2_11N, bMaskDWord);
+ ret_value = rtl8723au_read32(adapter, ODM_REG_OFDM_FA_TYPE2_11N);
FalseAlmCnt->Cnt_OFDM_CCA = (ret_value&0xffff);
FalseAlmCnt->Cnt_Parity_Fail = (ret_value & 0xffff0000)>>16;
- ret_value =
- ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE3_11N, bMaskDWord);
+ ret_value = rtl8723au_read32(adapter, ODM_REG_OFDM_FA_TYPE3_11N);
FalseAlmCnt->Cnt_Rate_Illegal = (ret_value&0xffff);
FalseAlmCnt->Cnt_Crc8_fail = (ret_value & 0xffff0000)>>16;
- ret_value =
- ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE4_11N, bMaskDWord);
+ ret_value = rtl8723au_read32(adapter, ODM_REG_OFDM_FA_TYPE4_11N);
FalseAlmCnt->Cnt_Mcs_fail = (ret_value&0xffff);
FalseAlmCnt->Cnt_Ofdm_fail = FalseAlmCnt->Cnt_Parity_Fail +
@@ -753,7 +750,7 @@ void odm_FalseAlarmCounterStatistics23a(struct dm_odm_t *pDM_Odm)
ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_FA_MSB_11N, bMaskByte3);
FalseAlmCnt->Cnt_Cck_fail += (ret_value & 0xff) << 8;
- ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_CCK_CCA_CNT_11N, bMaskDWord);
+ ret_value = rtl8723au_read32(adapter, ODM_REG_CCK_CCA_CNT_11N);
FalseAlmCnt->Cnt_CCK_CCA =
((ret_value&0xFF)<<8) | ((ret_value&0xFF00)>>8);
@@ -881,19 +878,19 @@ void odm_DynamicBBPowerSaving23a(struct dm_odm_t *pDM_Odm)
void ODM_RF_Saving23a(struct dm_odm_t *pDM_Odm, u8 bForceInNormal)
{
struct dynamic_pwr_sav *pDM_PSTable = &pDM_Odm->DM_PSTable;
+ struct rtw_adapter *adapter = pDM_Odm->Adapter;
u8 Rssi_Up_bound = 30;
u8 Rssi_Low_bound = 25;
if (pDM_PSTable->initialize == 0) {
- pDM_PSTable->Reg874 = (ODM_GetBBReg(pDM_Odm, 0x874,
- bMaskDWord)&0x1CC000) >> 14;
+ pDM_PSTable->Reg874 =
+ (rtl8723au_read32(adapter, 0x874) & 0x1CC000) >> 14;
pDM_PSTable->RegC70 =
- (ODM_GetBBReg(pDM_Odm, 0xc70, bMaskDWord) & BIT(3)) >>3;
- pDM_PSTable->Reg85C = (ODM_GetBBReg(pDM_Odm, 0x85c,
- bMaskDWord)&0xFF000000)>>24;
- pDM_PSTable->RegA74 = (ODM_GetBBReg(pDM_Odm, 0xa74,
- bMaskDWord)&0xF000)>>12;
- /* Reg818 = PHY_QueryBBReg(pAdapter, 0x818, bMaskDWord); */
+ (rtl8723au_read32(adapter, 0xc70) & BIT(3)) >>3;
+ pDM_PSTable->Reg85C =
+ (rtl8723au_read32(adapter, 0x85c) & 0xFF000000) >> 24;
+ pDM_PSTable->RegA74 =
+ (rtl8723au_read32(adapter, 0xa74) & 0xF000) >> 12;
pDM_PSTable->initialize = 1;
}