]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mac80211: cancel multi-link reconf work on disconnect
authorJohannes Berg <johannes.berg@intel.com>
Mon, 6 May 2024 19:10:33 +0000 (21:10 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 23 May 2024 09:44:12 +0000 (11:44 +0200)
This work shouldn't run after we're disconnecting. Cancel it earlier
(and then don't cancel it in stop later.)

Fixes: 8eb8dd2ffbbb ("wifi: mac80211: Support link removal using Reconfiguration ML element")
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240506211034.ac754794279f.Ib9fbb1dab50c6b67f6de9be09a6c452ce89bbd50@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index a29c4a4deb0b560f9baa450e5d365a248f427afe..ab6b379d522b3a14278b2d2402c35f22e793f567 100644 (file)
@@ -3694,6 +3694,11 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 
        wiphy_delayed_work_cancel(sdata->local->hw.wiphy,
                                  &ifmgd->neg_ttlm_timeout_work);
+
+       sdata->u.mgd.removed_links = 0;
+       wiphy_delayed_work_cancel(sdata->local->hw.wiphy,
+                                 &sdata->u.mgd.ml_reconf_work);
+
        ieee80211_vif_set_links(sdata, 0, 0);
 
        ifmgd->mcast_seq_last = IEEE80211_SN_MODULO;
@@ -9211,8 +9216,6 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata)
                          &ifmgd->teardown_ttlm_work);
        wiphy_delayed_work_cancel(sdata->local->hw.wiphy,
                                  &ifmgd->tdls_peer_del_work);
-       wiphy_delayed_work_cancel(sdata->local->hw.wiphy,
-                                 &ifmgd->ml_reconf_work);
        wiphy_delayed_work_cancel(sdata->local->hw.wiphy, &ifmgd->ttlm_work);
        wiphy_delayed_work_cancel(sdata->local->hw.wiphy,
                                  &ifmgd->neg_ttlm_timeout_work);