From 7ffcbd08cf0fd250ace88e4935cc2b29179368e5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 11 Jan 2022 18:02:53 +0200 Subject: [PATCH] Clear roam/BSS TM in progress flags for additional cases 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 --- wpa_supplicant/wpa_supplicant.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 1785f88ab..d18059b32 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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 */ }