Cancel pending scan request on DISCONNECT command

Previously, a pending scan request could be left running when processing
DISCONNECT command from control interface. This can result in unexpected
scan, so cancel the request to avoid this.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-06-26 19:57:03 +03:00
parent 992189991c
commit d7ded75832

View file

@ -4242,6 +4242,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
wpa_s->reassociate = 0; wpa_s->reassociate = 0;
wpa_s->disconnected = 1; wpa_s->disconnected = 1;
wpa_supplicant_cancel_sched_scan(wpa_s); wpa_supplicant_cancel_sched_scan(wpa_s);
wpa_supplicant_cancel_scan(wpa_s);
wpa_supplicant_deauthenticate(wpa_s, wpa_supplicant_deauthenticate(wpa_s,
WLAN_REASON_DEAUTH_LEAVING); WLAN_REASON_DEAUTH_LEAVING);
} else if (os_strcmp(buf, "SCAN") == 0) { } else if (os_strcmp(buf, "SCAN") == 0) {