]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Abort ongoing scan on DISCONNECT
authorChaitanya Tata <chaitanya.mgit@gmail.com>
Mon, 17 Jul 2023 19:51:37 +0000 (01:21 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 28 Oct 2023 15:24:42 +0000 (18:24 +0300)
Along with canceling queued scan, abort ongoing scan if any, this
ensures Wi-Fi interface is in usable state after disconnect is issued,
else subsequent scan after disconnect might fail with EBUSY.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
wpa_supplicant/wpa_supplicant.c

index ba68e819836c67026965bedc6c2ac3d8b14de296..5faf58aa35a2acc64ccbe921ca14bbc0458789a5 100644 (file)
@@ -8712,6 +8712,7 @@ void wpas_request_disconnection(struct wpa_supplicant *wpa_s)
        wpa_s->disconnected = 1;
        wpa_supplicant_cancel_sched_scan(wpa_s);
        wpa_supplicant_cancel_scan(wpa_s);
+       wpas_abort_ongoing_scan(wpa_s);
        wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
        eloop_cancel_timeout(wpas_network_reenabled, wpa_s, NULL);
        radio_remove_works(wpa_s, "connect", 0);