diff options
author | Benjamin Berg <benjamin.berg@intel.com> | 2023-06-06 17:43:26 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-06-19 13:11:25 +0200 |
commit | ff32b4506f3ef2228aab601f6d4b37840d05ffaf (patch) | |
tree | 1d4f52a66b2863710196cf9718aba9636d7f4b2a /net/mac80211/mlme.c | |
parent | wifi: cfg80211/nl80211: Add support to indicate STA MLD setup links removal (diff) | |
download | linux-ff32b4506f3ef2228aab601f6d4b37840d05ffaf.tar.xz linux-ff32b4506f3ef2228aab601f6d4b37840d05ffaf.zip |
wifi: mac80211: add ___ieee80211_disconnect variant not locking sdata
There are cases where keeping sdata locked for an operation. Add a
variant that does not take sdata lock to permit these usecases.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 30588703ffd3..5c881d14b1a2 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3353,18 +3353,15 @@ static void ieee80211_report_disconnect(struct ieee80211_sub_if_data *sdata, drv_event_callback(sdata->local, sdata, &event); } -static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata) +static void ___ieee80211_disconnect(struct ieee80211_sub_if_data *sdata) { struct ieee80211_local *local = sdata->local; struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; bool tx; - sdata_lock(sdata); - if (!ifmgd->associated) { - sdata_unlock(sdata); + if (!ifmgd->associated) return; - } /* in MLO assume we have a link where we can TX the frame */ tx = ieee80211_vif_is_mld(&sdata->vif) || @@ -3413,7 +3410,12 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata) WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, ifmgd->reconnect); ifmgd->reconnect = false; +} +static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata) +{ + sdata_lock(sdata); + ___ieee80211_disconnect(sdata); sdata_unlock(sdata); } |