Commit e3916153 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Remmove buddy-adapter linking

This sort of stuff should be handled by the bonding driver
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a665bcc2
......@@ -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_,
......
......@@ -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;
}
......@@ -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;
......
......@@ -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;
}
......
......@@ -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 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment