path: root/wpa_supplicant/events.c
diff options
authorLoic Poulain <loicx.poulain@intel.com>2013-05-31 10:15:56 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-24 09:47:30 (GMT)
commit1245503188621df81d98801987471f2dabe1b382 (patch)
tree96660aedce68e5e3f51419b93032e0cb4a56edbd /wpa_supplicant/events.c
parentbdec7ee5c9bb51dbecebbb8c3cb20bc9adcd2ebe (diff)
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>
Diffstat (limited to 'wpa_supplicant/events.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 35712e5..2894af5 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -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;