staging: rtl8723au: Move rtw_do_join23a() to rtw_mlme.c and declare it static
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 9 Jun 2014 13:17:00 +0000 (15:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 21:04:23 +0000 (14:04 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_ioctl_set.c
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/include/rtw_ioctl_set.h

index 4f6d7f5429535b9b7128fed8f7d3a9981471ca7b..77835fc80a5243845921ec4c7db8c9426f89bef7 100644 (file)
 #include <usb_ops.h>
 #include <linux/ieee80211.h>
 
-int rtw_do_join23a(struct rtw_adapter *padapter)
-{
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       int ret;
-
-       pmlmepriv->cur_network.join_res = -2;
-
-       set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
-
-       pmlmepriv->to_join = true;
-
-       ret = rtw_select_and_join_from_scanned_queue23a(pmlmepriv);
-       if (ret == _SUCCESS) {
-               pmlmepriv->to_join = false;
-       } else {
-               if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
-                       /* switch to ADHOC_MASTER */
-                       ret = rtw_do_join_adhoc(padapter);
-                       if (ret != _SUCCESS)
-                               goto exit;
-               } else {
-                       /*  can't associate ; reset under-linking */
-                       _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
-
-                       ret = _FAIL;
-                       pmlmepriv->to_join = false;
-               }
-       }
-
-exit:
-       return ret;
-}
-
 int rtw_set_802_11_bssid23a_list_scan(struct rtw_adapter *padapter,
                                      struct cfg80211_ssid *pssid,
                                      int ssid_max_num)
index 1557088f8cee119317be5ce9c71deea9547cc945..bdebde784f167cc4f90f05ebe53a1bbeb461d5a2 100644 (file)
@@ -29,6 +29,7 @@
 
 static struct wlan_network *
 rtw_select_candidate_from_queue(struct mlme_priv *pmlmepriv);
+static int rtw_do_join(struct rtw_adapter *padapter);
 
 static void rtw_init_mlme_timer(struct rtw_adapter *padapter)
 {
@@ -280,7 +281,7 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
                pmlmepriv->assoc_by_bssid = false;
 
                while (1) {
-                       do_join_r = rtw_do_join23a(padapter);
+                       do_join_r = rtw_do_join(padapter);
                        if (do_join_r == _SUCCESS)
                                break;
                        else {
@@ -1489,7 +1490,7 @@ void rtw23a_join_to_handler (unsigned long data)
                        if (adapter->mlmepriv.to_roaming != 0) {
                                /* try another */
                                DBG_8723A("%s try another roaming\n", __func__);
-                               do_join_r = rtw_do_join23a(adapter);
+                               do_join_r = rtw_do_join(adapter);
                                if (do_join_r != _SUCCESS) {
                                        DBG_8723A("%s roaming do_join return "
                                                  "%d\n", __func__ , do_join_r);
@@ -1688,6 +1689,39 @@ pmlmepriv->lock
 
 */
 
+static int rtw_do_join(struct rtw_adapter *padapter)
+{
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+       int ret;
+
+       pmlmepriv->cur_network.join_res = -2;
+
+       set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
+
+       pmlmepriv->to_join = true;
+
+       ret = rtw_select_and_join_from_scanned_queue23a(pmlmepriv);
+       if (ret == _SUCCESS) {
+               pmlmepriv->to_join = false;
+       } else {
+               if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+                       /* switch to ADHOC_MASTER */
+                       ret = rtw_do_join_adhoc(padapter);
+                       if (ret != _SUCCESS)
+                               goto exit;
+               } else {
+                       /*  can't associate ; reset under-linking */
+                       _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
+
+                       ret = _FAIL;
+                       pmlmepriv->to_join = false;
+               }
+       }
+
+exit:
+       return ret;
+}
+
 static struct wlan_network *
 rtw_select_candidate_from_queue(struct mlme_priv *pmlmepriv)
 {
index 14a36f5049dfc7551ee611338c32f6b0af44cbd6..e84a422864007595f74929472e7b32e8d47ed42f 100644 (file)
@@ -23,6 +23,5 @@ int rtw_set_802_11_bssid23a_list_scan(struct rtw_adapter *padapter,
 
 u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter);
 s32 FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
-int rtw_do_join23a(struct rtw_adapter *padapter);
 
 #endif