]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: rtl8723au: Eliminate HW_VAR_CHECK_BSSID and HW_VAR_MLME_JOIN
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:22 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:01 +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_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_sreset.c
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h

index ef0a829e365a8b23ecd07603e1c06f2fb51cb6a6..bed8829b00bdb4fbe349ee04805a798b7d93dd2f 100644 (file)
@@ -7969,7 +7969,6 @@ void start_create_ibss23a(struct rtw_adapter* padapter)
 {
        unsigned short  caps;
        u8      val8;
-       u8      join_type;
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
@@ -8008,8 +8007,7 @@ void start_create_ibss23a(struct rtw_adapter* padapter)
                else
                {
                        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));
+                       hw_var_set_mlme_join(padapter, 0);
 
                        report_join_res23a(padapter, 1);
                        pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS;
@@ -8690,17 +8688,15 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
        struct sta_priv         *pstapriv = &padapter->stapriv;
-       u8      join_type;
        u16 media_status;
 
-       if (join_res < 0)
-       {
-               join_type = 1;
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
+       if (join_res < 0) {
+               hw_var_set_mlme_join(padapter, 1);
                hw_var_set_bssid(padapter, null_addr);
 
                /* restore to initial setting. */
-               update_tx_basic_rate23a(padapter, padapter->registrypriv.wireless_mode);
+               update_tx_basic_rate23a(padapter,
+                                       padapter->registrypriv.wireless_mode);
 
                goto exit_mlmeext_joinbss_event_callback23a;
        }
@@ -8756,11 +8752,9 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re
                rtw_hal_set_hwreg23a(padapter, HW_VAR_H2C_MEDIA_STATUS_RPT, (u8 *)&media_status);
        }
 
-       join_type = 2;
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
+       hw_var_set_mlme_join(padapter, 2);
 
-       if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
-       {
+       if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) {
                /*  correcting TSF */
                correct_TSF23a(padapter, pmlmeext);
 
@@ -8777,7 +8771,6 @@ void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter, struct sta_
 {
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       u8      join_type;
 
        DBG_8723A("%s\n", __func__);
 
@@ -8809,8 +8802,7 @@ void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter, struct sta_
 
                }
 
-               join_type = 2;
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
+               hw_var_set_mlme_join(padapter, 2);
        }
 
        pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta;
@@ -9266,7 +9258,6 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
 
 u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
 {
-       u8      join_type;
        struct ndis_802_11_var_ies *    pIE;
        struct registry_priv    *pregpriv = &padapter->registrypriv;
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
@@ -9386,8 +9377,7 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
           (u8 *)(&initialgain)); */
 
        hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
-       join_type = 0;
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
+       hw_var_set_mlme_join(padapter, 0);
 
        /* cancel link timer */
        del_timer_sync(&pmlmeext->link_timer);
index 625760d2a67b5c5c3d08176c41c14539bf5a41d8..e3c189556794df7937c05dc0cdcd549dc1b10e63 100644 (file)
@@ -143,11 +143,7 @@ static void sreset_restore_network_station(struct rtw_adapter *padapter)
        /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */
 
        hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
-
-       {
-               u8      join_type = 0;
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
-       }
+       hw_var_set_mlme_join(padapter, 0);
 
        Set_MSR23a(padapter, (pmlmeinfo->state & 0x3));
 
index e4496c840b4d2cccd4cf3e8e431b6b0c774df06c..5ff540e8241c56f38b13a466cb12175e50079c29 100644 (file)
@@ -3944,7 +3944,6 @@ bthci_CmdAMPTestEnd(struct rtw_adapter *padapter,
        enum hci_status status = HCI_STATUS_SUCCESS;
        struct bt_30info *pBTInfo = GET_BT_INFO(padapter);
        struct bt_hci_info *pBtHciInfo = &pBTInfo->BtHciInfo;
-       u8 bFilterOutNonAssociatedBSSID = true;
 
        if (!pBtHciInfo->bInTestMode) {
                RTPRINT(FIOCTL, (IOCTL_BT_EVENT|IOCTL_BT_LOGO), ("Not in Test mode, return status = HCI_STATUS_CMD_DISALLOW\n"));
@@ -3956,7 +3955,7 @@ bthci_CmdAMPTestEnd(struct rtw_adapter *padapter,
 
        del_timer_sync(&pBTInfo->BTTestSendPacketTimer);
 
-       rtw_hal_set_hwreg23a(padapter, HW_VAR_CHECK_BSSID, (u8 *)(&bFilterOutNonAssociatedBSSID));
+       rtl8723a_check_bssid(padapter, true);
 
        /* send command complete event here when all data are received. */
        {
@@ -4057,8 +4056,7 @@ bthci_CmdAMPTestCommand(struct rtw_adapter *padapter,
                          jiffies + msecs_to_jiffies(50));
                RTPRINT(FIOCTL, (IOCTL_BT_EVENT|IOCTL_BT_LOGO), ("TX Single Test \n"));
        } else if (pBtHciInfo->TestScenario == 0x02) {
-               u8 bFilterOutNonAssociatedBSSID = false;
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_CHECK_BSSID, (u8 *)(&bFilterOutNonAssociatedBSSID));
+               rtl8723a_check_bssid(padapter, false);
                RTPRINT(FIOCTL, (IOCTL_BT_EVENT|IOCTL_BT_LOGO), ("Receive Frame Test \n"));
        }
 
index bcf400dcb82387fb7b0e4a66257c04fd6d71b8a5..ac64815861aa877ecb4f2cd2597c560aeccc16e5 100644 (file)
@@ -3067,7 +3067,7 @@ void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter)
        SetBcnCtrlReg23a(padapter, DIS_TSF_UDT, 0);
 }
 
-static void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type)
+void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type)
 {
        u8 RetryLimit = 0x30;
 
@@ -3143,14 +3143,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
                rtl8723a_set_bcn_func(padapter, *val);
                break;
 
-       case HW_VAR_CHECK_BSSID:
-               rtl8723a_check_bssid(padapter, *val);
-               break;
-
-       case HW_VAR_MLME_JOIN:
-               hw_var_set_mlme_join(padapter, *val);
-               break;
-
        case HW_VAR_BEACON_INTERVAL:
                rtl8723a_set_beacon_interval(padapter, *((u16 *) val));
                break;
index 163743190625e663aac84e0cdfb5e1dbc6431e81..2ca5713b0232221b9ab519b270ca522628c2f9c9 100644 (file)
@@ -39,8 +39,6 @@ enum HW_VARIABLES {
        HW_VAR_INIT_RTS_RATE,
        HW_VAR_TXPAUSE,
        HW_VAR_BCN_FUNC,
-       HW_VAR_CHECK_BSSID,
-       HW_VAR_MLME_JOIN,
        HW_VAR_BEACON_INTERVAL,
        HW_VAR_SLOT_TIME,
        HW_VAR_RESP_SIFS,
@@ -379,5 +377,6 @@ 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);
+void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type);
 
 #endif /* __HAL_INTF_H__ */