aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2015-03-30 20:44:11 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-01 15:21:36 (GMT)
commit02e122a995dea947a2ad2c0d85190d709f9128b7 (patch)
treeccb8711a4e931cc887648449b04270ad5915d8b6 /wpa_supplicant/events.c
parent80fd9c35762c381bef43d37958c1f26d38287c72 (diff)
downloadhostap-02e122a995dea947a2ad2c0d85190d709f9128b7.zip
hostap-02e122a995dea947a2ad2c0d85190d709f9128b7.tar.gz
hostap-02e122a995dea947a2ad2c0d85190d709f9128b7.tar.bz2
Reschedule scan from wpas_stop_pno if it was postponed
This reschedules the postponed scan request (if such a request is pending) from EVENT_SCHED_SCAN_STOPPED event handler to speed up scanning after PNO/sched_scan stop has been requested. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f5f3032..a81cead 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3164,6 +3164,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
union wpa_event_data *data)
{
struct wpa_supplicant *wpa_s = ctx;
+ int resched;
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED &&
event != EVENT_INTERFACE_ENABLED &&
@@ -3730,6 +3731,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;
wpa_supplicant_notify_scanning(wpa_s, 0);
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
@@ -3744,6 +3746,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
} else if (wpa_s->pno_sched_pending) {
wpa_s->pno_sched_pending = 0;
wpas_start_pno(wpa_s);
+ } else if (resched) {
+ wpa_supplicant_req_scan(wpa_s, 0, 0);
}
break;