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;
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_,
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;
-}
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 */
#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;
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;
}
pnetdev = rtw_init_netdev23a(padapter);
if (!pnetdev)
- goto handle_dualmac;
+ goto free_adapter;
padapter = netdev_priv(pnetdev);
padapter->dvobj = 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);
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)
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);