aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorVivek Natarajan <vnatarajan@atheros.com>2008-11-22 01:19:50 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-26 09:47:42 -0500
commit5925d976fbe99859d636e7075e5304625503c5fe (patch)
tree59c48003fd58f771460b99abdc0029f8a8cc8276 /net/mac80211
parente2f367f269fe19375f10e63efe0f2a6d3ddef8e6 (diff)
mac80211: Look out for some other AP when disassoc is received.
When a disassoc packet is received from the AP with a reason code of 'leaving the BSS', mac80211 should go into DISABLED state just as it would do if the AP suddenly went away for some reason, as that is what will happen shortly after the AP leaves anyway. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 30adaddeed27..7600ac9b87fe 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -802,6 +802,10 @@ static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata,
802 mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT); 802 mod_timer(&ifsta->timer, jiffies + IEEE80211_AUTH_TIMEOUT);
803} 803}
804 804
805/*
806 * The disassoc 'reason' argument can be either our own reason
807 * if self disconnected or a reason code from the AP.
808 */
805static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, 809static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
806 struct ieee80211_if_sta *ifsta, bool deauth, 810 struct ieee80211_if_sta *ifsta, bool deauth,
807 bool self_disconnected, u16 reason) 811 bool self_disconnected, u16 reason)
@@ -848,7 +852,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
848 852
849 ieee80211_sta_send_apinfo(sdata, ifsta); 853 ieee80211_sta_send_apinfo(sdata, ifsta);
850 854
851 if (self_disconnected) 855 if (self_disconnected || reason == WLAN_REASON_DISASSOC_STA_HAS_LEFT)
852 ifsta->state = IEEE80211_STA_MLME_DISABLED; 856 ifsta->state = IEEE80211_STA_MLME_DISABLED;
853 857
854 sta_info_unlink(&sta); 858 sta_info_unlink(&sta);
@@ -1163,7 +1167,7 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
1163 IEEE80211_RETRY_AUTH_INTERVAL); 1167 IEEE80211_RETRY_AUTH_INTERVAL);
1164 } 1168 }
1165 1169
1166 ieee80211_set_disassoc(sdata, ifsta, false, false, 0); 1170 ieee80211_set_disassoc(sdata, ifsta, false, false, reason_code);
1167} 1171}
1168 1172
1169 1173