aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-11-25 06:05:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-05 09:32:11 -0500
commit8e268e47b8ca5bddd189320884c3cc7d9ae489f4 (patch)
tree76a5b177e5782ea662a7b9b4b03fbd1a6e87f364 /net/mac80211/mlme.c
parente327b847e67051ece8d121f9aebeb4d736c36a02 (diff)
mac80211: disassociate prior to unlinking AP/station
This patch reorders calls during disassociation in ieee80211_set_disassoc function. Since sta_info_unlink calls sta_notify(REMOVE) it will remove the station representing AP from the driver before it has disassociated from it using bss_info_changed callback. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7600ac9b87fe..806d3ded98bd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -855,16 +855,26 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
855 if (self_disconnected || reason == WLAN_REASON_DISASSOC_STA_HAS_LEFT) 855 if (self_disconnected || reason == WLAN_REASON_DISASSOC_STA_HAS_LEFT)
856 ifsta->state = IEEE80211_STA_MLME_DISABLED; 856 ifsta->state = IEEE80211_STA_MLME_DISABLED;
857 857
858 sta_info_unlink(&sta);
859
860 rcu_read_unlock(); 858 rcu_read_unlock();
861 859
862 sta_info_destroy(sta);
863
864 local->hw.conf.ht.enabled = false; 860 local->hw.conf.ht.enabled = false;
865 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT); 861 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
866 862
867 ieee80211_bss_info_change_notify(sdata, changed); 863 ieee80211_bss_info_change_notify(sdata, changed);
864
865 rcu_read_lock();
866
867 sta = sta_info_get(local, ifsta->bssid);
868 if (!sta) {
869 rcu_read_unlock();
870 return;
871 }
872
873 sta_info_unlink(&sta);
874
875 rcu_read_unlock();
876
877 sta_info_destroy(sta);
868} 878}
869 879
870static int ieee80211_sta_wep_configured(struct ieee80211_sub_if_data *sdata) 880static int ieee80211_sta_wep_configured(struct ieee80211_sub_if_data *sdata)