Restore scan_req if sta scan is rescheduled in the scan results event
On scan results event if a concurrent P2P scan was triggered previously, scan results processing is canceled, p2p_find executed, and a new sta scan is triggered (pending scan). However, this new sta scan does not restore the scan_req value of the previous scan (whose scan result has been canceled). If we are currently connected to an AP and use ap_scan=2, the new triggered scan will cause an associtation-without-scan in wpa_supplicant_scan: (ap_scan == 2 & scan_req != MANUAL_SCAN_REQ) => wpa_supplicant_assoc_try() causing an association error and a disconnection. This patch fixes this issue by restoring the previous scan_req value. Signed-off-by: Loic Poulain <loicx.poulain@intel.com>
This commit is contained in:
parent
bdec7ee5c9
commit
1245503188
3 changed files with 10 additions and 7 deletions
|
@ -1203,6 +1203,7 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
|
|||
if (p2p_other_scan_completed(wpa_s->global->p2p) == 1) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Pending P2P operation "
|
||||
"stopped scan processing");
|
||||
wpa_s->scan_req = wpa_s->last_scan_req;
|
||||
wpa_s->sta_scan_pending = 1;
|
||||
wpa_supplicant_req_scan(wpa_s, 5, 0);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue