Process EVENT_SCHED_SCAN_STOPPED partially if interface is disabled

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>
This commit is contained in:
Jouni Malinen 2011-12-21 13:36:58 +02:00 committed by Jouni Malinen
parent 4551dd9060
commit 9b6f44cb63

View 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.