]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mac80211: ibss: mark IBSS left before leaving
authorJohannes Berg <johannes.berg@intel.com>
Thu, 2 Jan 2025 14:20:08 +0000 (16:20 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 14:34:10 +0000 (15:34 +0100)
Mark that we left the IBSS before actually leaving (which
requires calling the driver). Otherwise, it's possible to
have the driver do some work flushing etc. while leaving,
and then get into the work trying to join again while all
data is being destroyed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250102161730.81a6c12b304c.I8484f768371e128152a84aa164854cca9ec1066b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ibss.c

index dfa125219e472a5ba70c6e4c0c8d021e6b712259..05a945df3259aafa970c9d6264f50b53aa75fd61 100644 (file)
@@ -1827,8 +1827,8 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
 {
        struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
 
-       ieee80211_ibss_disconnect(sdata);
        ifibss->ssid_len = 0;
+       ieee80211_ibss_disconnect(sdata);
        eth_zero_addr(ifibss->bssid);
 
        /* remove beacon */