On Wed, Oct 20, 2021 at 09:53:58PM +0200, Martin Kaiser wrote: > Type in struct odm_rate_adapt is always DM_Type_ByDriver. > Therefore, bUseRAMask is always true. > > Remove the constant components, unused defines and dead code. > > Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> > --- > drivers/staging/r8188eu/hal/odm.c | 9 --------- > drivers/staging/r8188eu/include/odm.h | 6 ------ > 2 files changed, 15 deletions(-) > > diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c > index 47d8cdf1c3e8..67cf8f7baba5 100644 > --- a/drivers/staging/r8188eu/hal/odm.c > +++ b/drivers/staging/r8188eu/hal/odm.c > @@ -669,12 +669,6 @@ void odm_RateAdaptiveMaskInit(struct odm_dm_struct *pDM_Odm) > { > struct odm_rate_adapt *pOdmRA = &pDM_Odm->RateAdaptive; > > - pOdmRA->Type = DM_Type_ByDriver; > - if (pOdmRA->Type == DM_Type_ByDriver) > - pDM_Odm->bUseRAMask = true; > - else > - pDM_Odm->bUseRAMask = false; > - > pOdmRA->RATRState = DM_RATR_STA_INIT; > pOdmRA->HighRSSIThresh = 50; > pOdmRA->LowRSSIThresh = 20; > @@ -755,9 +749,6 @@ void odm_RefreshRateAdaptiveMask(struct odm_dm_struct *pDM_Odm) > if (pAdapter->bDriverStopped) > return; > > - if (!pDM_Odm->bUseRAMask) > - return; > - > for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { > struct sta_info *pstat = pDM_Odm->pODM_StaInfo[i]; > if (IS_STA_VALID(pstat)) { > diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h > index 1fc90a8dc063..f08655208b32 100644 > --- a/drivers/staging/r8188eu/include/odm.h > +++ b/drivers/staging/r8188eu/include/odm.h > @@ -150,7 +150,6 @@ struct edca_turbo { > }; > > struct odm_rate_adapt { > - u8 Type; /* DM_Type_ByFW/DM_Type_ByDriver */ > u8 HighRSSIThresh; /* if RSSI > HighRSSIThresh => RATRState is DM_RATR_STA_HIGH */ > u8 LowRSSIThresh; /* if RSSI <= LowRSSIThresh => RATRState is DM_RATR_STA_LOW */ > u8 RATRState; /* Current RSSI level, DM_RATR_STA_HIGH/DM_RATR_STA_MIDDLE/DM_RATR_STA_LOW */ > @@ -165,8 +164,6 @@ struct odm_rate_adapt { > #define AVG_THERMAL_NUM 8 > #define IQK_Matrix_REG_NUM 8 > > -#define DM_Type_ByDriver 1 > - > struct odm_phy_dbg_info { > /* ODM Write,debug info */ > s8 RxSNRdB[MAX_PATH_NUM_92CS]; > @@ -586,9 +583,6 @@ struct odm_dm_struct { > bool bPSDinProcess; > bool bDMInitialGainEnable; > > - /* for rate adaptive, in fact, 88c/92c fw will handle this */ > - u8 bUseRAMask; > - > struct odm_rate_adapt RateAdaptive; > > struct odm_rf_cal RFCalibrateInfo; > -- > 2.20.1 > Looks good. Acked-by: Phillip Potter <phil@xxxxxxxxxxxxxxxx> Regards, Phil