staging: r8188eu: remove HW_VAR_SLOT_TIME from SetHwReg8188EU()

In order to get rid of the function SetHwReg8188EU() remove the
HW_VAR_SLOT_TIME case from that function and move the functionality
into a static function in rtw_wlan_util.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220606064055.12565-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Straube 2022-06-06 08:40:55 +02:00 committed by Greg Kroah-Hartman
parent e2b925edc5
commit 18697b4793
3 changed files with 25 additions and 26 deletions

View file

@ -1348,6 +1348,30 @@ static void set_ack_preamble(struct adapter *adapter, bool short_preamble)
rtw_write8(adapter, REG_RRSR + 2, val8);
};
static void set_slot_time(struct adapter *adapter, u8 slot_time)
{
u8 u1bAIFS, aSifsTime;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
rtw_write8(adapter, REG_SLOT, slot_time);
if (pmlmeinfo->WMM_enable == 0) {
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
aSifsTime = 10;
else
aSifsTime = 16;
u1bAIFS = aSifsTime + (2 * pmlmeinfo->slotTime);
/* <Roger_EXP> Temporary removed, 2008.06.20. */
rtw_write8(adapter, REG_EDCA_VO_PARAM, u1bAIFS);
rtw_write8(adapter, REG_EDCA_VI_PARAM, u1bAIFS);
rtw_write8(adapter, REG_EDCA_BE_PARAM, u1bAIFS);
rtw_write8(adapter, REG_EDCA_BK_PARAM, u1bAIFS);
}
}
void update_capinfo(struct adapter *Adapter, u16 updateCap)
{
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
@ -1386,7 +1410,7 @@ void update_capinfo(struct adapter *Adapter, u16 updateCap)
}
}
SetHwReg8188EU(Adapter, HW_VAR_SLOT_TIME, &pmlmeinfo->slotTime);
set_slot_time(Adapter, pmlmeinfo->slotTime);
}
void update_wireless_mode(struct adapter *padapter)

View file

@ -1036,30 +1036,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_BCN);
}
break;
case HW_VAR_SLOT_TIME:
{
u8 u1bAIFS, aSifsTime;
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
rtw_write8(Adapter, REG_SLOT, val[0]);
if (pmlmeinfo->WMM_enable == 0) {
if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
aSifsTime = 10;
else
aSifsTime = 16;
u1bAIFS = aSifsTime + (2 * pmlmeinfo->slotTime);
/* <Roger_EXP> Temporary removed, 2008.06.20. */
rtw_write8(Adapter, REG_EDCA_VO_PARAM, u1bAIFS);
rtw_write8(Adapter, REG_EDCA_VI_PARAM, u1bAIFS);
rtw_write8(Adapter, REG_EDCA_BE_PARAM, u1bAIFS);
rtw_write8(Adapter, REG_EDCA_BK_PARAM, u1bAIFS);
}
}
break;
case HW_VAR_DM_FLAG:
podmpriv->SupportAbility = *((u8 *)val);
break;

View file

@ -13,7 +13,6 @@ enum hw_variables {
HW_VAR_BASIC_RATE,
HW_VAR_CORRECT_TSF,
HW_VAR_MLME_SITESURVEY,
HW_VAR_SLOT_TIME,
HW_VAR_DM_FLAG,
HW_VAR_DM_FUNC_OP,
HW_VAR_DM_FUNC_RESET,