Commit 6e28b38b authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: remove HW_VAR_BCN_FUNC

The HW_VAR_BCN_FUNC case in SetHwReg8188EU() just calls
hw_var_set_bcn_func(). Remove HW_VAR_BCN_FUNC from SetHwReg8188EU(),
remove hw_var_set_bcn_func() and call rtw_write8() directly.

Since hw_var_set_bcn_func() was always called with value 0, we only
need to keep the else arm of the if statement that checks the value.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130190321.7172-11-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b82f0b57
......@@ -7626,8 +7626,8 @@ u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) {
/* Stop BCN */
val8 = 0;
SetHwReg8188EU(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8));
val8 = rtw_read8(padapter, REG_BCN_CTRL);
rtw_write8(padapter, REG_BCN_CTRL, val8 & (~(EN_BCN_FUNCTION | EN_TXBCN_RPT)));
}
/* set MSR to no link state -> infra. mode */
......
......@@ -1049,18 +1049,6 @@ static void hw_var_set_bssid(struct adapter *Adapter, u8 *val)
rtw_write8(Adapter, (reg_bssid + idx), val[idx]);
}
static void hw_var_set_bcn_func(struct adapter *Adapter, u8 *val)
{
u32 bcn_ctrl_reg;
bcn_ctrl_reg = REG_BCN_CTRL;
if (*((u8 *)val))
rtw_write8(Adapter, bcn_ctrl_reg, (EN_BCN_FUNCTION | EN_TXBCN_RPT));
else
rtw_write8(Adapter, bcn_ctrl_reg, rtw_read8(Adapter, bcn_ctrl_reg) & (~(EN_BCN_FUNCTION | EN_TXBCN_RPT)));
}
void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
{
struct hal_data_8188e *haldata = &Adapter->haldata;
......@@ -1109,9 +1097,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
rtw_write8(Adapter, REG_INIRTS_RATE_SEL, RateIndex);
}
break;
case HW_VAR_BCN_FUNC:
hw_var_set_bcn_func(Adapter, val);
break;
case HW_VAR_CORRECT_TSF:
{
u64 tsf;
......
......@@ -13,7 +13,6 @@ enum hw_variables {
HW_VAR_BSSID,
HW_VAR_INIT_RTS_RATE,
HW_VAR_BASIC_RATE,
HW_VAR_BCN_FUNC,
HW_VAR_CORRECT_TSF,
HW_VAR_CHECK_BSSID,
HW_VAR_MLME_DISCONNECT,
......
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