diff options
-rw-r--r-- | net/mac80211/mlme.c | 8 |
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 | */ | ||
805 | static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | 809 | static 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 | ||