From: Jes Sorensen Date: Sat, 31 May 2014 16:05:16 +0000 (+0200) Subject: staging: rtl8723au: Remmove buddy-adapter linking X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e3916153ea15f97a343e463c4b69bd819229d41a;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: Remmove buddy-adapter linking This sort of stuff should be handled by the bonding driver Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c index dbd01b652e02..7dc7c90eba0e 100644 --- a/drivers/staging/rtl8723au/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723au/core/rtw_pwrctrl.c @@ -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_, diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index 67fb7ece7e35..a9fa109ed1d0 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -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; -} diff --git a/drivers/staging/rtl8723au/include/drv_types.h b/drivers/staging/rtl8723au/include/drv_types.h index a94857df2def..3ef9d7a045f2 100644 --- a/drivers/staging/rtl8723au/include/drv_types.h +++ b/drivers/staging/rtl8723au/include/drv_types.h @@ -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; diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c index 1fb34386a4e5..ee3d62cc1ab0 100644 --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c @@ -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; } diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c index 8b25c1aa2025..d0a3a1e6f5aa 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_intf.c +++ b/drivers/staging/rtl8723au/os_dep/usb_intf.c @@ -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);