]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Clear roam/BSS TM in progress flags for additional cases
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 11 Jan 2022 16:02:53 +0000 (18:02 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 11 Jan 2022 16:02:53 +0000 (18:02 +0200)
It looks like the recently added roam_in_progress and
bss_trans_mgmt_in_progress flags could end up getting set, but not
cleared, in some cases. Make sure these get cleared on explicit
disconnection request and also in case the SME-in-driver path is used
(while that path does not really use these flags yet, it is better to
not allow them to be forgotten to be set should it be extended to cover
similar functionality).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/wpa_supplicant.c

index 1785f88ab73d3068ebd2c1c4f99c5b2cc0856d55..d18059b3281a82893ac231da1431c97c3fb5759d 100644 (file)
@@ -3621,6 +3621,11 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
        struct ieee80211_vht_capabilities vhtcaps_mask;
 #endif /* CONFIG_VHT_OVERRIDES */
 
+       wpa_s->roam_in_progress = false;
+#ifdef CONFIG_WNM
+       wpa_s->bss_trans_mgmt_in_progress = false;
+#endif /* CONFIG_WNM */
+
        if (deinit) {
                if (work->started) {
                        wpa_s->connect_work = NULL;
@@ -8180,6 +8185,10 @@ void wpas_request_disconnection(struct wpa_supplicant *wpa_s)
        eloop_cancel_timeout(wpas_network_reenabled, wpa_s, NULL);
        radio_remove_works(wpa_s, "connect", 0);
        radio_remove_works(wpa_s, "sme-connect", 0);
+       wpa_s->roam_in_progress = false;
+#ifdef CONFIG_WNM
+       wpa_s->bss_trans_mgmt_in_progress = false;
+#endif /* CONFIG_WNM */
 }