]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Process EVENT_SCHED_SCAN_STOPPED partially if interface is disabled
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 21 Dec 2011 11:36:58 +0000 (13:36 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 21 Dec 2011 11:36:58 +0000 (13:36 +0200)
The internal sched_scanning state needs to be cleared on this event
even if the events happen to get ordered in a way that the interface
gets disabled just prior to EVENT_SCHED_SCAN_STOPPED event.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/events.c

index fd04ad2e75116a7795f112e9e3e20831f9fcabd8..89c9c8d039f6de128b0b2ba7121393cbed5e7ba9 100644 (file)
@@ -1990,7 +1990,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 
        if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED &&
            event != EVENT_INTERFACE_ENABLED &&
-           event != EVENT_INTERFACE_STATUS) {
+           event != EVENT_INTERFACE_STATUS &&
+           event != EVENT_SCHED_SCAN_STOPPED) {
                wpa_dbg(wpa_s, MSG_DEBUG,
                        "Ignore event %s (%d) while interface is disabled",
                        event_to_string(event), event);
@@ -2524,6 +2525,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                wpa_s->sched_scanning = 0;
                wpa_supplicant_notify_scanning(wpa_s, 0);
 
+               if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
+                       break;
+
                /*
                 * If we timed out, start a new sched scan to continue
                 * searching for more SSIDs.