summaryrefslogtreecommitdiff
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-03-18 15:00:32 -0700
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:57 -0400
commit85249e5fab13edb89258fa6d551cd4a3a4f0d569 (patch)
tree793767bc2d889127b2713fefa440aa3928a305d6 /net/mac80211/ieee80211_sta.c
parent7b9d44cd6b393cb1032ce201307ae87e5677bfa7 (diff)
mac80211: tear down of block ack sessions
This patch adds a clean tear down for all block ack sessions if interface goes down or if a deauthentication is done. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 9beedb655896..fc73ca4abc08 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -467,8 +467,8 @@ static void ieee80211_set_associated(struct net_device *dev,
memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN);
ieee80211_sta_send_associnfo(dev, ifsta);
} else {
+ ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid);
ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
-
netif_carrier_off(dev);
ieee80211_reset_erp_info(dev);
memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
@@ -1518,6 +1518,19 @@ void sta_rx_agg_session_timer_expired(unsigned long data)
WLAN_REASON_QSTA_TIMEOUT);
}
+void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr)
+{
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ int i;
+
+ for (i = 0; i < STA_TID_NUM; i++) {
+ ieee80211_stop_tx_ba_session(&local->hw, addr, i,
+ WLAN_BACK_INITIATOR);
+ ieee80211_sta_stop_rx_ba_session(dev, addr, i,
+ WLAN_BACK_RECIPIENT,
+ WLAN_REASON_QSTA_LEAVE_QBSS);
+ }
+}
static void ieee80211_rx_mgmt_auth(struct net_device *dev,
struct ieee80211_if_sta *ifsta,