Commit dbdcd36b authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Eliminate HW_VAR_SET_OPMODE usage

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 03aa3ec0
...@@ -9189,27 +9189,19 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) ...@@ -9189,27 +9189,19 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct setopmode_parm *psetop = (struct setopmode_parm *)pbuf; struct setopmode_parm *psetop = (struct setopmode_parm *)pbuf;
if (psetop->mode == Ndis802_11APMode) if (psetop->mode == Ndis802_11APMode) {
{
pmlmeinfo->state = WIFI_FW_AP_STATE; pmlmeinfo->state = WIFI_FW_AP_STATE;
type = _HW_STATE_AP_; type = _HW_STATE_AP_;
} } else if (psetop->mode == Ndis802_11Infrastructure) {
else if (psetop->mode == Ndis802_11Infrastructure)
{
pmlmeinfo->state &= ~(BIT(0)|BIT(1));/* clear state */ pmlmeinfo->state &= ~(BIT(0)|BIT(1));/* clear state */
pmlmeinfo->state |= WIFI_FW_STATION_STATE;/* set to STATION_STATE */ pmlmeinfo->state |= WIFI_FW_STATION_STATE;/* set to STATION_STATE */
type = _HW_STATE_STATION_; type = _HW_STATE_STATION_;
} } else if (psetop->mode == Ndis802_11IBSS)
else if (psetop->mode == Ndis802_11IBSS)
{
type = _HW_STATE_ADHOC_; type = _HW_STATE_ADHOC_;
}
else else
{
type = _HW_STATE_NOLINK_; type = _HW_STATE_NOLINK_;
}
rtw_hal_set_hwreg23a(padapter, HW_VAR_SET_OPMODE, (u8 *)(&type)); hw_var_set_opmode(padapter, type);
/* Set_NETYPE0_MSR(padapter, type); */ /* Set_NETYPE0_MSR(padapter, type); */
return H2C_SUCCESS; return H2C_SUCCESS;
......
...@@ -2935,7 +2935,7 @@ void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, ...@@ -2935,7 +2935,7 @@ void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc,
rtl8723a_cal_txdesc_chksum(ptxdesc); rtl8723a_cal_txdesc_chksum(ptxdesc);
} }
static void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode) void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode)
{ {
u8 val8; u8 val8;
...@@ -3135,10 +3135,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) ...@@ -3135,10 +3135,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
u32 *val32 = (u32 *)val; u32 *val32 = (u32 *)val;
switch (variable) { switch (variable) {
case HW_VAR_SET_OPMODE:
hw_var_set_opmode(padapter, *val);
break;
case HW_VAR_MAC_ADDR: case HW_VAR_MAC_ADDR:
hw_var_set_macaddr(padapter, val); hw_var_set_macaddr(padapter, val);
break; break;
......
...@@ -36,7 +36,6 @@ enum _CHIP_TYPE { ...@@ -36,7 +36,6 @@ enum _CHIP_TYPE {
}; };
enum HW_VARIABLES { enum HW_VARIABLES {
HW_VAR_SET_OPMODE,
HW_VAR_MAC_ADDR, HW_VAR_MAC_ADDR,
HW_VAR_BSSID, HW_VAR_BSSID,
HW_VAR_INIT_RTS_RATE, HW_VAR_INIT_RTS_RATE,
...@@ -381,5 +380,6 @@ s32 rtw_hal_c2h_handler23a(struct rtw_adapter *adapter, struct c2h_evt_hdr *c2h_ ...@@ -381,5 +380,6 @@ s32 rtw_hal_c2h_handler23a(struct rtw_adapter *adapter, struct c2h_evt_hdr *c2h_
c2h_id_filter rtw_hal_c2h_id_filter_ccx23a(struct rtw_adapter *adapter); c2h_id_filter rtw_hal_c2h_id_filter_ccx23a(struct rtw_adapter *adapter);
void hw_var_set_correct_tsf(struct rtw_adapter *padapter); void hw_var_set_correct_tsf(struct rtw_adapter *padapter);
void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter); void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter);
void hw_var_set_opmode(struct rtw_adapter *padapter, u8 mode);
#endif /* __HAL_INTF_H__ */ #endif /* __HAL_INTF_H__ */
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