[PATCH 02/12] staging: r8188eu: ODM_BB_FA_CNT is always set

From: Martin Kaiser
Date: Sat Jan 08 2022 - 07:50:43 EST


The ODM_BB_FA_CNT flag is always set.

Remove the flag and the code to check if ODM_BB_FA_CNT is not set.

Signed-off-by: Martin Kaiser <martin@xxxxxxxxx>
---
drivers/staging/r8188eu/hal/odm.c | 8 +-------
drivers/staging/r8188eu/hal/rtl8188e_dm.c | 3 +--
drivers/staging/r8188eu/include/odm.h | 1 -
3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c
index 77ece1950b63..7cc9ab4b1a59 100644
--- a/drivers/staging/r8188eu/hal/odm.c
+++ b/drivers/staging/r8188eu/hal/odm.c
@@ -169,9 +169,6 @@ static void odm_DIG(struct odm_dm_struct *pDM_Odm)
u8 dm_dig_max, dm_dig_min;
u8 CurrentIGI = pDM_DigTable->CurIGValue;

- if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT))
- return;
-
if (*pDM_Odm->pbScanInProcess)
return;

@@ -367,9 +364,6 @@ static void odm_FalseAlarmCounterStatistics(struct odm_dm_struct *pDM_Odm)
struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt;
struct adapter *adapter = pDM_Odm->Adapter;

- if (!(pDM_Odm->SupportAbility & ODM_BB_FA_CNT))
- return;
-
/* hold ofdm counter */
rtl8188e_PHY_SetBBReg(adapter, ODM_REG_OFDM_FA_HOLDC_11N, BIT(31), 1); /* hold page C counter */
rtl8188e_PHY_SetBBReg(adapter, ODM_REG_OFDM_FA_RSTD_11N, BIT(31), 1); /* hold page D counter */
@@ -422,7 +416,7 @@ static void odm_CCKPacketDetectionThresh(struct odm_dm_struct *pDM_Odm)
u8 CurCCK_CCAThres;
struct false_alarm_stats *FalseAlmCnt = &pDM_Odm->FalseAlmCnt;

- if (!(pDM_Odm->SupportAbility & (ODM_BB_CCK_PD | ODM_BB_FA_CNT)))
+ if (!(pDM_Odm->SupportAbility & ODM_BB_CCK_PD))
return;
if (pDM_Odm->bLinked) {
if (pDM_Odm->RSSI_Min > 25) {
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
index 5118d0e3045b..2ff9c7d84dbf 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
@@ -53,8 +53,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
struct dm_priv *pdmpriv = &hal_data->dmpriv;
int i;

- pdmpriv->InitODMFlag = ODM_BB_FA_CNT |
- ODM_BB_RSSI_MONITOR |
+ pdmpriv->InitODMFlag = ODM_BB_RSSI_MONITOR |
ODM_BB_CCK_PD |
ODM_RF_CALIBRATION |
ODM_RF_TX_PWR_TRACK;
diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h
index 616a862180b2..664e75c3a7c2 100644
--- a/drivers/staging/r8188eu/include/odm.h
+++ b/drivers/staging/r8188eu/include/odm.h
@@ -148,7 +148,6 @@ enum odm_common_info_def {

enum odm_ability_def {
/* BB ODM section BIT 0-15 */
- ODM_BB_FA_CNT = BIT(3),
ODM_BB_RSSI_MONITOR = BIT(4),
ODM_BB_CCK_PD = BIT(5),
ODM_BB_ANT_DIV = BIT(6),
--
2.30.2