Commit 3782d959 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: remove HW_VAR_DM_FUNC_CLR from SetHwReg8188EU()

Remove the HW_VAR_DM_FUNC_CLR case from SetHwReg8188EU() and move its
functionality to a static function. This is part of the ongoing effort
to get rid of SetHwReg8188EU().
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220709094458.9578-6-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8ad697c3
......@@ -6655,6 +6655,14 @@ static void rtw_reset_dm_func_flag(struct adapter *adapter)
odmpriv->SupportAbility = dmpriv->InitODMFlag;
}
static void rtw_clear_dm_func_flag(struct adapter *adapter)
{
struct hal_data_8188e *haldata = &adapter->haldata;
struct odm_dm_struct *odmpriv = &haldata->odmpriv;
odmpriv->SupportAbility = 0;
}
void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
{
struct sta_info *psta, *psta_bmc;
......@@ -7110,7 +7118,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_CLR, NULL);
rtw_clear_dm_func_flag(padapter);
/* cancel link timer */
_cancel_timer_ex(&pmlmeext->link_timer);
......@@ -7380,7 +7388,7 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
if ((pmlmeext->sitesurvey_res.state == SCAN_START) || (pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) {
/* disable dynamic functions, such as high power, DIG */
Save_DM_Func_Flag(padapter);
SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_CLR, NULL);
rtw_clear_dm_func_flag(padapter);
/* config the initial gain under scanning, need to write the BB registers */
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
......
......@@ -1061,8 +1061,6 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 *val)
void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
{
struct hal_data_8188e *haldata = &Adapter->haldata;
struct odm_dm_struct *podmpriv = &haldata->odmpriv;
u8 reg;
int res;
......@@ -1156,9 +1154,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
rtw_write32(Adapter, REG_RCR, reg32 | RCR_CBSSID_BCN);
}
break;
case HW_VAR_DM_FUNC_CLR:
podmpriv->SupportAbility = 0;
break;
default:
break;
}
......
......@@ -12,7 +12,6 @@ enum hw_variables {
HW_VAR_SET_OPMODE,
HW_VAR_CORRECT_TSF,
HW_VAR_MLME_SITESURVEY,
HW_VAR_DM_FUNC_CLR,
};
typedef s32 (*c2h_id_filter)(u8 id);
......
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