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

index 95311bd8fe76cafaed6c01afea35c5d60517a34b..5b89c206928e950d68e1aefc1b0ab1919fd24f71 100644 (file)
@@ -695,7 +695,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        Set_MSR23a(padapter, _HW_STATE_AP_);
 
        /* Set BSSID REG */
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, pnetwork->MacAddress);
+       hw_var_set_bssid(padapter, pnetwork->MacAddress);
 
        /* Set EDCA param reg */
        acparm = 0x002F3217; /*  VO */
index 36b8a732824a7955819d6b494a38c78b79b050de..87e4df63b28354d546733e63d2611f6042168375 100644 (file)
@@ -8008,7 +8008,7 @@ void start_create_ibss23a(struct rtw_adapter* padapter)
                }
                else
                {
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, padapter->registrypriv.dev_network.MacAddress);
+                       hw_var_set_bssid(padapter, padapter->registrypriv.dev_network.MacAddress);
                        join_type = 0;
                        rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
 
@@ -8698,7 +8698,7 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re
        {
                join_type = 1;
                rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, null_addr);
+               hw_var_set_bssid(padapter, null_addr);
 
                /* restore to initial setting. */
                update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode);
@@ -8833,7 +8833,7 @@ void mlmeext_sta_del_event_callback23a(struct rtw_adapter *padapter)
                /* set_opmode_cmd(padapter, infra_client_with_mlme); */
 
                hw_var_set_mlme_disconnect(padapter);
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, null_addr);
+               hw_var_set_bssid(padapter, null_addr);
 
                /* restore to initial setting. */
                update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode);
@@ -9386,8 +9386,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
        /* rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN,
           (u8 *)(&initialgain)); */
 
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID,
-                         pmlmeinfo->network.MacAddress);
+       hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
        join_type = 0;
        rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
 
@@ -9417,7 +9416,7 @@ u8 disconnect_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf)
        /* pmlmeinfo->state = WIFI_FW_NULL_STATE; */
 
        hw_var_set_mlme_disconnect(padapter);
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, null_addr);
+       hw_var_set_bssid(padapter, null_addr);
 
        /* restore to initial setting. */
        update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode);
index 4f745920339083bdb2190dd53e44f0b0b006ad9b..625760d2a67b5c5c3d08176c41c14539bf5a41d8 100644 (file)
@@ -142,7 +142,7 @@ static void sreset_restore_network_station(struct rtw_adapter *padapter)
        /* disable dynamic functions, such as high power, DIG */
        /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */
 
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
+       hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
 
        {
                u8      join_type = 0;
index 0eccf5304c6779c6a62ccfe51419769126da1bce..0c1eaed9d44a38b27ddbfc5afb0c2b0a21dc0443 100644 (file)
@@ -3007,7 +3007,7 @@ void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val)
                rtw_write8(padapter, (reg_macid + idx), val[idx]);
 }
 
-static void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val)
+void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val)
 {
        u8 idx = 0;
        u32 reg_bssid;
@@ -3135,10 +3135,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
        u32 *val32 = (u32 *)val;
 
        switch (variable) {
-       case HW_VAR_BSSID:
-               hw_var_set_bssid(padapter, val);
-               break;
-
        case HW_VAR_TXPAUSE:
                rtl8723a_set_tx_pause(padapter, *val);
                break;
index 8334ab0840470c12fe2eeb0f581f48667e0a5884..eb011360cc0ea8e1c39cf131eec14a5193aadb0a 100644 (file)
@@ -36,7 +36,6 @@ enum _CHIP_TYPE {
 };
 
 enum HW_VARIABLES {
-       HW_VAR_BSSID,
        HW_VAR_INIT_RTS_RATE,
        HW_VAR_TXPAUSE,
        HW_VAR_BCN_FUNC,
@@ -380,5 +379,6 @@ 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);
 void hw_var_set_macaddr(struct rtw_adapter *padapter, u8 *val);
+void hw_var_set_bssid(struct rtw_adapter *padapter, u8 *val);
 
 #endif /* __HAL_INTF_H__ */