diff options
author | Michael Straube <straube.linux@gmail.com> | 2022-02-20 11:02:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-21 18:11:03 +0100 |
commit | f474a4546feb3836e229df220bd45c92994fa12b (patch) | |
tree | bb4c0c384091d9476216770f6c1e538a115fe4c8 | |
parent | c16be3c61dc99d1f8364f0074645339d8a8a6628 (diff) | |
download | linux-f474a4546feb3836e229df220bd45c92994fa12b.tar.bz2 |
staging: r8188eu: remove ODM_CmnInfoUpdate()
Each case in ODM_CmnInfoUpdate() just sets a single variable. Set the
variables directly and remove ODM_CmnInfoUpdate().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/r8188eu/hal/odm.c | 21 | ||||
-rw-r--r-- | drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 | ||||
-rw-r--r-- | drivers/staging/r8188eu/include/odm.h | 7 |
3 files changed, 3 insertions, 29 deletions
diff --git a/drivers/staging/r8188eu/hal/odm.c b/drivers/staging/r8188eu/hal/odm.c index 5d2f934d78ae..94f9b125d860 100644 --- a/drivers/staging/r8188eu/hal/odm.c +++ b/drivers/staging/r8188eu/hal/odm.c @@ -464,7 +464,7 @@ static void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm) pdmpriv->EntryMinUndecoratedSmoothedPWDB = 0; FindMinimumRSSI(Adapter); - ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); + pHalData->odmpriv.RSSI_Min = pdmpriv->MinUndecoratedPWDBForDM; } static void odm_TXPowerTrackingThermalMeterInit(struct odm_dm_struct *pDM_Odm) @@ -639,25 +639,6 @@ void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn pDM_Odm->BbSwingFlagOfdm = false; } -/* Update Band/CHannel/.. The values are dynamic but non-per-packet. */ -void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value) -{ - /* */ - /* This init variable may be changed in run time. */ - /* */ - switch (CmnInfo) { - case ODM_CMNINFO_ABILITY: - pDM_Odm->SupportAbility = (u32)Value; - break; - case ODM_CMNINFO_LINK: - pDM_Odm->bLinked = (bool)Value; - break; - case ODM_CMNINFO_RSSI_MIN: - pDM_Odm->RSSI_Min = (u8)Value; - break; - } -} - void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI) { struct rtw_dig *pDM_DigTable = &pDM_Odm->DM_DigTable; diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c index df0b412c52eb..6d28e3dc0d26 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c @@ -36,7 +36,7 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter) if (hal_data->AntDivCfg) pdmpriv->InitODMFlag |= ODM_BB_ANT_DIV; - ODM_CmnInfoUpdate(dm_odm, ODM_CMNINFO_ABILITY, pdmpriv->InitODMFlag); + dm_odm->SupportAbility = pdmpriv->InitODMFlag; dm_odm->pWirelessMode = &pmlmeext->cur_wireless_mode; dm_odm->pSecChOffset = &hal_data->nCur40MhzPrimeSC; @@ -80,7 +80,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter) bLinked = true; } - ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked); + hal_data->odmpriv.bLinked = bLinked; ODM_DMWatchdog(&hal_data->odmpriv); } diff --git a/drivers/staging/r8188eu/include/odm.h b/drivers/staging/r8188eu/include/odm.h index 7d923403288c..1902aa48a255 100644 --- a/drivers/staging/r8188eu/include/odm.h +++ b/drivers/staging/r8188eu/include/odm.h @@ -120,19 +120,14 @@ enum odm_common_info_def { /* Fixed value: */ /* HOOK BEFORE REG INIT----------- */ - ODM_CMNINFO_ABILITY, /* ODM_ABILITY_E */ ODM_CMNINFO_MP_TEST_CHIP, /* HOOK BEFORE REG INIT----------- */ /* CALL BY VALUE------------- */ - ODM_CMNINFO_LINK, - ODM_CMNINFO_RSSI_MIN, ODM_CMNINFO_RF_ANTENNA_TYPE, /* u8 */ /* CALL BY VALUE-------------*/ }; -/* 2011/10/20 MH Define ODM support ability. ODM_CMNINFO_ABILITY */ - enum odm_ability_def { /* BB ODM section BIT 0-15 */ ODM_BB_RSSI_MONITOR = BIT(4), @@ -453,6 +448,4 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm); void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def CmnInfo, u32 Value); -void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value); - #endif |