Restore scan_req if sta scan is rescheduled in the scan results event
authorLoic Poulain <loicx.poulain@intel.com>
Fri, 31 May 2013 10:15:56 +0000 (12:15 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Nov 2013 09:47:30 +0000 (11:47 +0200)
commit1245503188621df81d98801987471f2dabe1b382
tree96660aedce68e5e3f51419b93032e0cb4a56edbd
parentbdec7ee5c9bb51dbecebbb8c3cb20bc9adcd2ebe
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>
wpa_supplicant/events.c
wpa_supplicant/scan.c
wpa_supplicant/wpa_supplicant_i.h