aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorHu Wang <huw@qti.qualcomm.com>2016-04-06 08:14:34 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-06 08:14:34 (GMT)
commit3560b32ca34f0ac20e4883cd2a0ad21a20502dfc (patch)
tree31dd007a61b8533b44997de1a72b0dabde2f5305 /wpa_supplicant/events.c
parent85c0f01dd85768236afe56ad600d2221a7efd063 (diff)
downloadhostap-3560b32ca34f0ac20e4883cd2a0ad21a20502dfc.zip
hostap-3560b32ca34f0ac20e4883cd2a0ad21a20502dfc.tar.gz
hostap-3560b32ca34f0ac20e4883cd2a0ad21a20502dfc.tar.bz2
Fix race condition with PNO stop followed immediately by PNO start
Commit dd271857a5b501cd88143efe8ca0f0dce4519a91 ('Skip normal scan when PNO is already in progress') fixed issues with normal scans getting rejected by the driver when PNO scan is already running. The part about skipping such a scan request is fine, but the part about clearing wpa_s->pno back to 0 in EVENT_SCHED_SCAN_STOPPED handler is problematic. If PNO is stopped ("SET pno 0") and then restarted ("SET pno 1") immediately, it is possible for the EVENT_SCHED_SCAN_STOPPED event from the stopping part to be received only after the new PNO instance has been started. This would have resulted in clearing wpa_s->pno and the driver and wpa_supplicant getting out of sync. This would then prevent PNO from being stopped with "SET pno 0" (that fails if wpa_s->pno == 0). Fix this race condition by reverting the wpa_s->pno = 0 addition from the EVENT_SCHED_SCAN_STOPPED handler. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e7ff150..eb330dd 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3959,7 +3959,6 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->driver_gtk_rekey.replay_ctr);
break;
case EVENT_SCHED_SCAN_STOPPED:
- wpa_s->pno = 0;
wpa_s->sched_scanning = 0;
resched = wpa_s->scanning && wpas_scan_scheduled(wpa_s);
wpa_supplicant_notify_scanning(wpa_s, 0);