Commit ff32b450 authored by Benjamin Berg's avatar Benjamin Berg Committed by Johannes Berg

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: default avatarBenjamin Berg <benjamin.berg@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 065563b2
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment