staging: rtl8723au: Remmove buddy-adapter linking
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sat, 31 May 2014 16:05:16 +0000 (18:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 19:35:40 +0000 (12:35 -0700)
This sort of stuff should be handled by the bonding driver

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c
drivers/staging/rtl8723au/include/drv_types.h
drivers/staging/rtl8723au/os_dep/os_intfs.c
drivers/staging/rtl8723au/os_dep/usb_intf.c

index dbd01b652e0261f06f58b16aa29e3b5cdfafd75a..7dc7c90eba0ea727e049b508b998355308b614b3 100644 (file)
@@ -114,7 +114,6 @@ int ips_leave23a(struct rtw_adapter * padapter)
 
 static bool rtw_pwr_unassociated_idle(struct rtw_adapter *adapter)
 {
-       struct rtw_adapter *buddy = adapter->pbuddy_adapter;
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        struct xmit_priv *pxmit_priv = &adapter->xmitpriv;
 
@@ -130,21 +129,6 @@ static bool rtw_pwr_unassociated_idle(struct rtw_adapter *adapter)
                goto exit;
        }
 
-       /* consider buddy, if exist */
-       if (buddy) {
-               struct mlme_priv *b_pmlmepriv = &buddy->mlmepriv;
-
-               if (check_fwstate(b_pmlmepriv,
-                                 WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
-                   check_fwstate(b_pmlmepriv,
-                                 WIFI_UNDER_LINKING|WIFI_UNDER_WPS) ||
-                   check_fwstate(b_pmlmepriv, WIFI_AP_STATE) ||
-                   check_fwstate(b_pmlmepriv,
-                                 WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE)) {
-                       goto exit;
-               }
-       }
-
        if (pxmit_priv->free_xmitbuf_cnt != NR_XMITBUFF ||
                pxmit_priv->free_xmit_extbuf_cnt != NR_XMIT_EXTBUFF) {
                DBG_8723A_LEVEL(_drv_always_,
index 67fb7ece7e35a7a204e0fe61d1bc61da9a300934..a9fa109ed1d0112b5bdd430947c24f9d49117f53 100644 (file)
@@ -1644,28 +1644,3 @@ void process_addba_req23a(struct rtw_adapter *padapter,
                        true : false;
        }
 }
-
-static struct rtw_adapter *pbuddy_padapter;
-
-int rtw_handle_dualmac23a(struct rtw_adapter *adapter, bool init)
-{
-       int status = _SUCCESS;
-
-       if (init) {
-               if (pbuddy_padapter == NULL) {
-                       pbuddy_padapter = adapter;
-                       DBG_8723A("%s(): pbuddy_padapter == NULL, "
-                                 "Set pbuddy_padapter\n", __func__);
-               } else {
-                       adapter->pbuddy_adapter = pbuddy_padapter;
-                       pbuddy_padapter->pbuddy_adapter = adapter;
-                       /*  clear global value */
-                       pbuddy_padapter = NULL;
-                       DBG_8723A("%s(): pbuddy_padapter exist, "
-                                 "Exchange Information\n", __func__);
-               }
-       } else
-               pbuddy_padapter = NULL;
-
-       return status;
-}
index a94857df2def0a6ca930ac925440c82c9e9a8355..3ef9d7a045f2295f570d6fc1d1fbc4f971121156 100644 (file)
@@ -259,7 +259,6 @@ struct rtw_adapter {
        u8 bWritePortCancel;
        /* The driver will show the desired chan nor when this flag is 1. */
        u8 bNotifyChannelChange;
-       struct rtw_adapter *pbuddy_adapter;
 
        /* extend to support multi interface */
        /* IFACE_ID0 is equals to PRIMARY_ADAPTER */
@@ -269,8 +268,6 @@ struct rtw_adapter {
 
 #define adapter_to_dvobj(adapter) (adapter->dvobj)
 
-int rtw_handle_dualmac23a(struct rtw_adapter *adapter, bool init);
-
 static inline u8 *myid(struct eeprom_priv *peepriv)
 {
        return peepriv->mac_addr;
index 1fb34386a4e544adc6af572c6515af9255d0caf3..ee3d62cc1ab0aee87a4491779cdabbebb6c7de5f 100644 (file)
@@ -584,11 +584,6 @@ int rtw_free_drv_sw23a(struct rtw_adapter *padapter)
        kfree(padapter->HalData);
        padapter->HalData = NULL;
 
-       RT_TRACE(_module_os_intfs_c_, _drv_info_, ("<== rtw_free_drv_sw23a\n"));
-
-       /*  clear pbuddy_adapter to avoid access wrong pointer. */
-       if (padapter->pbuddy_adapter != NULL)
-               padapter->pbuddy_adapter->pbuddy_adapter = NULL;
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw23a\n"));
        return _SUCCESS;
 }
index 8b25c1aa2025c785f5a57fae0a15923629ef96ea..d0a3a1e6f5aae9b0bbbf24a23ef39a09f1dba964 100644 (file)
@@ -572,7 +572,7 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 
        pnetdev = rtw_init_netdev23a(padapter);
        if (!pnetdev)
-               goto handle_dualmac;
+               goto free_adapter;
        padapter = netdev_priv(pnetdev);
 
        padapter->dvobj = dvobj;
@@ -583,13 +583,10 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 
        rtl8723au_set_hw_type(padapter);
 
-       if (rtw_handle_dualmac23a(padapter, 1) != _SUCCESS)
-               goto free_adapter;
-
        SET_NETDEV_DEV(pnetdev, dvobj_to_dev(dvobj));
 
        if (rtw_wdev_alloc(padapter, dvobj_to_dev(dvobj)))
-               goto handle_dualmac;
+               goto free_adapter;
 
        /* step 2. allocate HalData */
        padapter->HalData = kzalloc(sizeof(struct hal_data_8723a), GFP_KERNEL);
@@ -650,9 +647,6 @@ free_wdev:
                rtw_wdev_unregister(padapter->rtw_wdev);
                rtw_wdev_free(padapter->rtw_wdev);
        }
-handle_dualmac:
-       if (status != _SUCCESS)
-               rtw_handle_dualmac23a(padapter, 0);
 free_adapter:
        if (status != _SUCCESS) {
                if (pnetdev)
@@ -684,8 +678,6 @@ static void rtw_usb_if1_deinit(struct rtw_adapter *if1)
        DBG_8723A("+r871xu_dev_remove, hw_init_completed =%d\n",
                  if1->hw_init_completed);
 
-       rtw_handle_dualmac23a(if1, 0);
-
        if (if1->rtw_wdev) {
                rtw_wdev_unregister(if1->rtw_wdev);
                rtw_wdev_free(if1->rtw_wdev);