1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-08 20:25:11 +00:00

Fix connection error on resume

This commit is contained in:
kimocoder 2019-11-11 03:02:26 +01:00
parent ad32b0d9a8
commit dbc8d10201

View File

@ -1232,10 +1232,14 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally
rtw_cfg80211_connect_result(pwdev, NULL, NULL, 0, NULL, 0, rtw_cfg80211_connect_result(pwdev, NULL, NULL, 0, NULL, 0,
reason, GFP_ATOMIC); reason, GFP_ATOMIC);
} else { } else {
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_disconnected\n", FUNC_ADPT_ARG(padapter)); RTW_INFO(FUNC_ADPT_FMT" call cfg80211_disconnected\n", FUNC_ADPT_ARG(padapter));
rtw_cfg80211_disconnected(pwdev, reason, NULL, 0, locally_generated, GFP_ATOMIC); rtw_cfg80211_disconnected(pwdev, reason, NULL, 0, locally_generated, GFP_ATOMIC);
cfg80211_connect_result(padapter->pnetdev, NULL, NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_ATOMIC);
} }
#endif #endif
} }
rtw_wdev_free_connect_req(pwdev_priv); rtw_wdev_free_connect_req(pwdev_priv);
@ -8840,13 +8844,13 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
//rtw_sitesurvey_cmd(padapter, NULL); //rtw_sitesurvey_cmd(padapter, NULL);
rtw_sitesurvey_cmd(padapter, &parm); rtw_sitesurvey_cmd(padapter, &parm);
_exit_critical_bh(&pmlmepriv->lock, &irqL); _exit_critical_bh(&pmlmepriv->lock, &irqL);
for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) { for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) {
if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE) if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE)
break; break;
rtw_msleep_os(1000); rtw_msleep_os(1000);
} }
_enter_critical_bh(&pmlmepriv->lock, &irqL); _enter_critical_bh(&pmlmepriv->lock, &irqL);
cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy); cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy);
_exit_critical_bh(&pmlmepriv->lock, &irqL); _exit_critical_bh(&pmlmepriv->lock, &irqL);
@ -8854,7 +8858,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
} }
RTW_DBG("<== %s\n",__func__); RTW_DBG("<== %s\n",__func__);
return 0; return 0;
} }
#endif /* CONFIG_PNO_SUPPORT */ #endif /* CONFIG_PNO_SUPPORT */