1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 21:34:37 +00:00

Fixed scan timeout interfering with normal scan

This commit is contained in:
kimocoder 2019-11-13 16:57:08 +01:00
parent 42cc12cc84
commit 017cc7d842

View File

@ -906,14 +906,14 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm)
u32 scan_timeout_ms;
pmlmepriv->scan_start_time = rtw_get_current_time();
#if 0 /* looking at other wlan drivers, they do not handle timeout. It is conflicting with long scans */
scan_timeout_ms = rtw_scan_timeout_decision(padapter);
mlme_set_scan_to_timer(pmlmepriv,scan_timeout_ms);
#endif
rtw_led_control(padapter, LED_CTL_SITE_SURVEY);
} else
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
return res;
}
@ -949,7 +949,6 @@ u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset)
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
return res;
}
@ -960,7 +959,6 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset)
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -981,11 +979,9 @@ u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset)
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
return res;
}
/*
unsigned char rtw_setphy_cmd(unsigned char *adapter)
@ -1002,7 +998,6 @@ u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch)
* struct registry_priv* pregistry_priv = &padapter->registrypriv; */
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -1018,7 +1013,6 @@ u8 rtw_setphy_cmd(_adapter *padapter, u8 modem, u8 ch)
init_h2fwcmd_w_parm_no_rsp(ph2c, psetphypara, _SetPhy_CMD_);
psetphypara->modem = modem;
psetphypara->rfchannel = ch;
@ -1162,7 +1156,6 @@ u8 rtw_getrfreg_cmd(_adapter *padapter, u8 offset, u8 *pval)
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -1189,7 +1182,6 @@ u8 rtw_getrfreg_cmd(_adapter *padapter, u8 offset, u8 *pval)
exit:
return res;
}
@ -1397,7 +1389,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
/* for IEs is fix buf size */
t_len = sizeof(WLAN_BSSID_EX);
/* for hidden ap to set fw_state here */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) != _TRUE) {
switch (ndis_network_mode) {
@ -1435,7 +1426,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
res = _FAIL;
goto exit;
}
@ -1466,7 +1456,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
psecnetwork->IELength += rtw_restruct_sec_ie(padapter, psecnetwork->IEs + psecnetwork->IELength);
pqospriv->qos_option = 0;
if (pregistrypriv->wmm_enable) {
@ -1563,7 +1552,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
exit:
return res;
}
@ -1614,11 +1602,9 @@ u8 rtw_disassoc_cmd(_adapter *padapter, u32 deauth_timeout_ms, int flags) /* for
exit:
return res;
}
u8 rtw_stop_ap_cmd(_adapter *adapter, u8 flags)
{
#ifdef CONFIG_AP_MODE
@ -1737,7 +1723,6 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
struct security_priv *psecuritypriv = &padapter->securitypriv;
u8 res = _SUCCESS;
psetstakey_para = (struct set_stakey_parm *)rtw_zmalloc(sizeof(struct set_stakey_parm));
if (psetstakey_para == NULL) {
res = _FAIL;
@ -1792,7 +1777,6 @@ u8 rtw_setstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 key_type, bool
}
exit:
return res;
}
@ -1852,7 +1836,6 @@ u8 rtw_clearstakey_cmd(_adapter *padapter, struct sta_info *sta, u8 enqueue)
exit:
return res;
}
@ -1963,7 +1946,6 @@ u8 rtw_setassocsta_cmd(_adapter *padapter, u8 *mac_addr)
exit:
return res;
}
@ -1975,7 +1957,6 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr)
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -2001,7 +1982,6 @@ u8 rtw_addbareq_cmd(_adapter *padapter, u8 tid, u8 *addr)
exit:
return res;
}
@ -2012,7 +1992,6 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u
struct addBaRsp_parm *paddBaRsp_parm;
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -2039,7 +2018,6 @@ u8 rtw_addbarsp_cmd(_adapter *padapter, u8 *addr, u16 tid, u8 status, u8 size, u
exit:
return res;
}
/* add for CONFIG_IEEE80211W, none 11w can use it */
@ -2050,7 +2028,6 @@ u8 rtw_reset_securitypriv_cmd(_adapter *padapter)
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -2071,13 +2048,11 @@ u8 rtw_reset_securitypriv_cmd(_adapter *padapter)
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
return res;
}
@ -2145,7 +2120,6 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter *padapter)
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
/* only primary padapter does this cmd */
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
@ -2167,13 +2141,11 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter *padapter)
pdrvextra_cmd_parm->pbuf = NULL;
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
return res;
}
@ -2186,7 +2158,6 @@ u8 rtw_set_chbw_cmd(_adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 flags)
struct submit_ctx sctx;
u8 res = _SUCCESS;
RTW_INFO(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%u\n",
FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset);
@ -2253,7 +2224,6 @@ u8 _rtw_set_chplan_cmd(_adapter *adapter, int flags, u8 chplan, const struct cou
struct submit_ctx sctx;
u8 res = _SUCCESS;
/* check if allow software config */
if (swconfig && rtw_hal_is_disable_sw_channel_plan(adapter) == _TRUE) {
res = _FAIL;
@ -2370,8 +2340,6 @@ u8 rtw_led_blink_cmd(_adapter *padapter, PVOID pLed)
u8 res = _SUCCESS;
pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (pcmdobj == NULL) {
res = _FAIL;
@ -2392,7 +2360,6 @@ u8 rtw_led_blink_cmd(_adapter *padapter, PVOID pLed)
exit:
return res;
}
@ -2458,7 +2425,6 @@ u8 rtw_enable_hw_update_tsf_cmd(_adapter *padapter)
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 res = _SUCCESS;
ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
if (ph2c == NULL) {
res = _FAIL;
@ -3111,7 +3077,6 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
}
BusyThreshold = BusyThresholdHigh;
/* */
/* Determine if our traffic is busy now */
/* */
@ -3220,7 +3185,6 @@ u8 traffic_status_watchdog(_adapter *padapter, u8 from_timer)
}
/* for 11n Logo 4.2.31/4.2.32 */
static void dynamic_update_bcn_check(_adapter *padapter)
{
@ -3306,7 +3270,6 @@ void rtw_iface_dynamic_chk_wk_hdl(_adapter *padapter)
rtw_cfgvendor_rssi_monitor_evt(padapter);
#endif
}
void rtw_dynamic_chk_wk_hdl(_adapter *padapter)
{
@ -3433,7 +3396,6 @@ u8 rtw_lps_ctrl_wk_cmd(_adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
/* struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); */
u8 res = _SUCCESS;
/* if(!pwrctrlpriv->bLeisurePs) */
/* return res; */
@ -3464,7 +3426,6 @@ u8 rtw_lps_ctrl_wk_cmd(_adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
exit:
return res;
}
@ -3626,7 +3587,6 @@ u8 rtw_rpt_timer_cfg_cmd(_adapter *padapter, u16 minRptTime)
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
return res;
}
@ -3683,7 +3643,6 @@ u8 rtw_antenna_select_cmd(_adapter *padapter, u8 antenna, u8 enqueue)
antenna_select_wk_hdl(padapter, antenna);
exit:
return res;
}
@ -3779,7 +3738,6 @@ u8 p2p_protocol_wk_cmd(_adapter *padapter, int intCmdType)
exit:
return res;
}
@ -3993,7 +3951,6 @@ u8 rtw_ps_cmd(_adapter *padapter)
exit:
return res;
}