staging: rtl8723au: Eliminate HW_VAR_SET_OPMODE usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:17 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:28:59 +0000 (08:28 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h

index 28750eb4169ee44db39c1011b97a72e1521b8969..d91e88e0f955df16fd8fde181e1f7e3baecd2381 100644 (file)
@@ -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;
index d6afc049548fb79fc3d63d60f95a0fa0a7f203db..eebd01cea1388b086a0d63e94a7cb465f5afa12b 100644 (file)
@@ -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;
index c4a1869527e752e52f8aadc14903794c8bbd9282..ee3315ec7d77929a2c9f9ab90ac52d1b3b9725f5 100644 (file)
@@ -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__ */