Commit 8ad697c3 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: remove HW_VAR_DM_FUNC_RESET from SetHwReg8188EU()

Remove the HW_VAR_DM_FUNC_RESET 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-5-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f18ab26f
...@@ -6646,6 +6646,15 @@ void update_sta_info(struct adapter *padapter, struct sta_info *psta) ...@@ -6646,6 +6646,15 @@ void update_sta_info(struct adapter *padapter, struct sta_info *psta)
psta->state = _FW_LINKED; psta->state = _FW_LINKED;
} }
static void rtw_reset_dm_func_flag(struct adapter *adapter)
{
struct hal_data_8188e *haldata = &adapter->haldata;
struct dm_priv *dmpriv = &haldata->dmpriv;
struct odm_dm_struct *odmpriv = &haldata->odmpriv;
odmpriv->SupportAbility = dmpriv->InitODMFlag;
}
void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res) void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
{ {
struct sta_info *psta, *psta_bmc; struct sta_info *psta, *psta_bmc;
...@@ -6676,7 +6685,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res) ...@@ -6676,7 +6685,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
} }
/* turn on dynamic functions */ /* turn on dynamic functions */
SetHwReg8188EU(padapter, HW_VAR_DM_FUNC_RESET, NULL); rtw_reset_dm_func_flag(padapter);
/* update IOT-releated issue */ /* update IOT-releated issue */
update_IOT_info(padapter); update_IOT_info(padapter);
......
...@@ -1062,7 +1062,6 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 *val) ...@@ -1062,7 +1062,6 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 *val)
void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
{ {
struct hal_data_8188e *haldata = &Adapter->haldata; struct hal_data_8188e *haldata = &Adapter->haldata;
struct dm_priv *pdmpriv = &haldata->dmpriv;
struct odm_dm_struct *podmpriv = &haldata->odmpriv; struct odm_dm_struct *podmpriv = &haldata->odmpriv;
u8 reg; u8 reg;
int res; int res;
...@@ -1157,9 +1156,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) ...@@ -1157,9 +1156,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
rtw_write32(Adapter, REG_RCR, reg32 | RCR_CBSSID_BCN); rtw_write32(Adapter, REG_RCR, reg32 | RCR_CBSSID_BCN);
} }
break; break;
case HW_VAR_DM_FUNC_RESET:
podmpriv->SupportAbility = pdmpriv->InitODMFlag;
break;
case HW_VAR_DM_FUNC_CLR: case HW_VAR_DM_FUNC_CLR:
podmpriv->SupportAbility = 0; podmpriv->SupportAbility = 0;
break; break;
......
...@@ -12,7 +12,6 @@ enum hw_variables { ...@@ -12,7 +12,6 @@ enum hw_variables {
HW_VAR_SET_OPMODE, HW_VAR_SET_OPMODE,
HW_VAR_CORRECT_TSF, HW_VAR_CORRECT_TSF,
HW_VAR_MLME_SITESURVEY, HW_VAR_MLME_SITESURVEY,
HW_VAR_DM_FUNC_RESET,
HW_VAR_DM_FUNC_CLR, HW_VAR_DM_FUNC_CLR,
}; };
......
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