From dbdcd36b2e8c23d4abb871993754878086cec920 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Wed, 9 Apr 2014 23:20:17 +0200 Subject: [PATCH] staging: rtl8723au: Eliminate HW_VAR_SET_OPMODE usage Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 16 ++++------------ .../staging/rtl8723au/hal/rtl8723a_hal_init.c | 6 +----- drivers/staging/rtl8723au/include/hal_intf.h | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 28750eb4169e..d91e88e0f955 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -9189,27 +9189,19 @@ u8 setopmode_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct setopmode_parm *psetop = (struct setopmode_parm *)pbuf; - if (psetop->mode == Ndis802_11APMode) - { + if (psetop->mode == Ndis802_11APMode) { pmlmeinfo->state = WIFI_FW_AP_STATE; 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 |= WIFI_FW_STATION_STATE;/* set to STATION_STATE */ type = _HW_STATE_STATION_; - } - else if (psetop->mode == Ndis802_11IBSS) - { + } else if (psetop->mode == Ndis802_11IBSS) type = _HW_STATE_ADHOC_; - } else - { 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); */ return H2C_SUCCESS; diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index d6afc049548f..eebd01cea138 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -2935,7 +2935,7 @@ void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, 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; @@ -3135,10 +3135,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) u32 *val32 = (u32 *)val; switch (variable) { - case HW_VAR_SET_OPMODE: - hw_var_set_opmode(padapter, *val); - break; - case HW_VAR_MAC_ADDR: hw_var_set_macaddr(padapter, val); break; diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index c4a1869527e7..ee3315ec7d77 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -36,7 +36,6 @@ enum _CHIP_TYPE { }; enum HW_VARIABLES { - HW_VAR_SET_OPMODE, HW_VAR_MAC_ADDR, HW_VAR_BSSID, HW_VAR_INIT_RTS_RATE, @@ -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); void hw_var_set_correct_tsf(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__ */ -- 2.30.2