mac80211: disassociate prior to unlinking AP/sta
RFC PATCH 1/1 mac80211: disassociate prior to unlinking AP/sta
This patch reorders calls during disassociation in ieee80211_set_disassoc func.
Since sta_info_unlink calls sta_notify(REMOVE) it will remove the AP from the driver before it has disassociated from it (bss_info_changed).
Signed-off-by Tomas Winkler <[email protected]>
--- net/mac80211/mlme.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-)
net/mac80211/mlme.c +14 -4
@@ -857,16 +857,26 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,if (self_disconnected) ifsta->state =IEEE80211_STA_MLME_DISABLED ; -sta_info_unlink (&sta); -rcu_read_unlock (); -sta_info_destroy (sta); - local->hw.conf.ht.enabled = false;ieee80211_hw_config (local,IEEE80211_CONF_CHANGE_HT );ieee80211_bss_info_change_notify (sdata, changed); + +rcu_read_lock (); + + sta =sta_info_get (local, ifsta->bssid); +if (!sta) { +rcu_read_unlock (); +return ; + } + +sta_info_unlink (&sta); + +rcu_read_unlock (); + +sta_info_destroy (sta); }static int ieee80211_sta_wep_configured (struct ieee80211_sub_if_data *sdata)
Signature · 9 lines
1.5.4.3 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.