]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mac80211: fix warning on disconnect during failed ML reconf
authorJohannes Berg <johannes.berg@intel.com>
Sat, 8 Mar 2025 21:03:36 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:48 +0000 (11:12 +0200)
[ Upstream commit 0e104aa3676d020f6c442cd7fbaeb72adaaab6fc ]

If multi-link reconfiguration fails, we can disconnect with a local link
already allocated but the BSS entry not assigned yet, which leads to a
warning in cfg80211. Add a check to avoid the warning.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250308225541.699bd9cbabe5.I599d5ff69092a65e916e2acd25137ae9df8debe8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mlme.c

index 676274519cdfbf95e16b8cb1fe0dd8400b867c08..3f30c4c1f78bb592846744c2267fcb127512b64a 100644 (file)
@@ -4298,7 +4298,7 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata)
                        struct ieee80211_link_data *link;
 
                        link = sdata_dereference(sdata->link[link_id], sdata);
-                       if (!link)
+                       if (!link || !link->conf->bss)
                                continue;
                        cfg80211_unlink_bss(local->hw.wiphy, link->conf->bss);
                        link->conf->bss = NULL;