aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-03-03 09:04:38 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-03 09:04:38 (GMT)
commitbef5e9a8620128a23c32d4253099b1449d4864aa (patch)
treea9d3263eba17e5b15684fe4808aa96dfe1a78fbc /wpa_supplicant/events.c
parent29b508e7dc7df01cf99474afcd36d3cbba281db9 (diff)
downloadhostap-bef5e9a8620128a23c32d4253099b1449d4864aa.zip
hostap-bef5e9a8620128a23c32d4253099b1449d4864aa.tar.gz
hostap-bef5e9a8620128a23c32d4253099b1449d4864aa.tar.bz2
Fix scan rescheduling from wpas_stop_pno to check postponed case
Commit 02e122a995dea947a2ad2c0d85190d709f9128b7 ('Reschedule scan from wpas_stop_pno if it was postponed') uses wpa_s->scanning as the only condition for automatically starting a postponed scan request from EVENT_SCHED_SCAN_STOPPED event handler. However, wpa_s->scanning may be set for sched_scan and as such, this can result in unexpected extra scans without there having been any real postponed request. Make this more accurate by verifying that there really is a pending request for a scan before speeding up its start. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 318aad7..db00515 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3927,7 +3927,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
case EVENT_SCHED_SCAN_STOPPED:
wpa_s->pno = 0;
wpa_s->sched_scanning = 0;
- resched = wpa_s->scanning;
+ resched = wpa_s->scanning && wpas_scan_scheduled(wpa_s);
wpa_supplicant_notify_scanning(wpa_s, 0);
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)