staging: rtl8723au: Move rtw23a_roaming() so we can declare _rtw_roaming() static
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 15 Apr 2014 17:44:50 +0000 (19:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2014 18:04:09 +0000 (11: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_mlme.c
drivers/staging/rtl8723au/include/rtw_mlme.h

index 0a2141bd32d9d5f587f96bd17fcd137b200b2447..fcb1add545bfe9d6d68c8492a495dc709997bf88 100644 (file)
@@ -271,6 +271,61 @@ void rtw_generate_random_ibss23a(u8* pibss)
        return;
 }
 
+static void _rtw_roaming(struct rtw_adapter *padapter,
+                        struct wlan_network *tgt_network)
+{
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+       struct wlan_network *pnetwork;
+       int do_join_r;
+
+       if (tgt_network)
+               pnetwork = tgt_network;
+       else
+               pnetwork = &pmlmepriv->cur_network;
+
+       if (padapter->mlmepriv.to_roaming > 0) {
+               DBG_8723A("roaming from %s("MAC_FMT"), length:%d\n",
+                         pnetwork->network.Ssid.ssid,
+                         MAC_ARG(pnetwork->network.MacAddress),
+                         pnetwork->network.Ssid.ssid_len);
+               memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid,
+                      sizeof(struct cfg80211_ssid));
+
+               pmlmepriv->assoc_by_bssid = false;
+
+               while (1) {
+                       do_join_r = rtw_do_join23a(padapter);
+                       if (do_join_r == _SUCCESS)
+                               break;
+                       else {
+                               DBG_8723A("roaming do_join return %d\n",
+                                         do_join_r);
+                               pmlmepriv->to_roaming--;
+
+                               if (padapter->mlmepriv.to_roaming > 0)
+                                       continue;
+                               else {
+                                       DBG_8723A("%s(%d) -to roaming fail, "
+                                                 "indicate_disconnect\n",
+                                                 __func__, __LINE__);
+                                       rtw_indicate_disconnect23a(padapter);
+                                       break;
+                               }
+                       }
+               }
+       }
+}
+
+void rtw23a_roaming(struct rtw_adapter *padapter,
+                   struct wlan_network *tgt_network)
+{
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+
+       spin_lock_bh(&pmlmepriv->lock);
+       _rtw_roaming(padapter, tgt_network);
+       spin_unlock_bh(&pmlmepriv->lock);
+}
+
 u8 *rtw_get_capability23a_from_ie(u8 *ie)
 {
        return ie + 8 + 2;
@@ -1475,7 +1530,7 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, u8 *pbuf)
                }
                spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
 
-               _rtw23a_roaming(adapter, tgt_network);
+               _rtw_roaming(adapter, tgt_network);
        }
 
        if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
@@ -2464,60 +2519,6 @@ inline void rtw_set_roaming(struct rtw_adapter *adapter, u8 to_roaming)
        adapter->mlmepriv.to_roaming = to_roaming;
 }
 
-void rtw23a_roaming(struct rtw_adapter *padapter,
-                   struct wlan_network *tgt_network)
-{
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
-       spin_lock_bh(&pmlmepriv->lock);
-       _rtw23a_roaming(padapter, tgt_network);
-       spin_unlock_bh(&pmlmepriv->lock);
-}
-void _rtw23a_roaming(struct rtw_adapter *padapter,
-                    struct wlan_network *tgt_network)
-{
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct wlan_network *pnetwork;
-       int do_join_r;
-
-       if (tgt_network)
-               pnetwork = tgt_network;
-       else
-               pnetwork = &pmlmepriv->cur_network;
-
-       if (padapter->mlmepriv.to_roaming > 0) {
-               DBG_8723A("roaming from %s("MAC_FMT"), length:%d\n",
-                         pnetwork->network.Ssid.ssid,
-                         MAC_ARG(pnetwork->network.MacAddress),
-                         pnetwork->network.Ssid.ssid_len);
-               memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid,
-                      sizeof(struct cfg80211_ssid));
-
-               pmlmepriv->assoc_by_bssid = false;
-
-               while (1) {
-                       do_join_r = rtw_do_join23a(padapter);
-                       if (do_join_r == _SUCCESS)
-                               break;
-                       else {
-                               DBG_8723A("roaming do_join return %d\n",
-                                         do_join_r);
-                               pmlmepriv->to_roaming--;
-
-                               if (padapter->mlmepriv.to_roaming > 0)
-                                       continue;
-                               else {
-                                       DBG_8723A("%s(%d) -to roaming fail, "
-                                                 "indicate_disconnect\n",
-                                                 __func__, __LINE__);
-                                       rtw_indicate_disconnect23a(padapter);
-                                       break;
-                               }
-                       }
-               }
-       }
-}
-
 int rtw_linked_check(struct rtw_adapter *padapter)
 {
        if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) ||
index 0af91d02976fa07d17f041ff49366701050aff04..6036503c00ea42d30a8ac9e88b58f5f8676fac2e 100644 (file)
@@ -488,8 +488,6 @@ int rtw_is_same_ibss23a(struct rtw_adapter *adapter,
                     struct wlan_network *pnetwork);
 int is_same_network23a(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst);
 
-void _rtw23a_roaming(struct rtw_adapter *adapter,
-                 struct wlan_network *tgt_network);
 void rtw23a_roaming(struct rtw_adapter *adapter,
                 struct wlan_network *tgt_network);
 void rtw_set_roaming(struct rtw_adapter *adapter, u8 to_roaming);