diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-03-18 18:00:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:57 -0400 |
commit | 85249e5fab13edb89258fa6d551cd4a3a4f0d569 (patch) | |
tree | 793767bc2d889127b2713fefa440aa3928a305d6 /net/mac80211 | |
parent | 7b9d44cd6b393cb1032ce201307ae87e5677bfa7 (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')
-rw-r--r-- | net/mac80211/ieee80211.c | 7 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 15 |
3 files changed, 17 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 55b63712e48c..616ce10d2a38 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -386,7 +386,6 @@ static int ieee80211_stop(struct net_device *dev) | |||
386 | struct ieee80211_local *local = sdata->local; | 386 | struct ieee80211_local *local = sdata->local; |
387 | struct ieee80211_if_init_conf conf; | 387 | struct ieee80211_if_init_conf conf; |
388 | struct sta_info *sta; | 388 | struct sta_info *sta; |
389 | int i; | ||
390 | 389 | ||
391 | /* | 390 | /* |
392 | * Stop TX on this interface first. | 391 | * Stop TX on this interface first. |
@@ -400,11 +399,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
400 | 399 | ||
401 | list_for_each_entry_rcu(sta, &local->sta_list, list) { | 400 | list_for_each_entry_rcu(sta, &local->sta_list, list) { |
402 | if (sta->sdata == sdata) | 401 | if (sta->sdata == sdata) |
403 | for (i = 0; i < STA_TID_NUM; i++) | 402 | ieee80211_sta_tear_down_BA_sessions(dev, sta->addr); |
404 | ieee80211_sta_stop_rx_ba_session(sdata->dev, | ||
405 | sta->addr, i, | ||
406 | WLAN_BACK_RECIPIENT, | ||
407 | WLAN_REASON_QSTA_LEAVE_QBSS); | ||
408 | } | 403 | } |
409 | 404 | ||
410 | rcu_read_unlock(); | 405 | rcu_read_unlock(); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 7f10ff5d4a0b..a6485f01b3c8 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -928,10 +928,12 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da, | |||
928 | u16 agg_size, u16 timeout); | 928 | u16 agg_size, u16 timeout); |
929 | void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, | 929 | void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, |
930 | u16 initiator, u16 reason_code); | 930 | u16 initiator, u16 reason_code); |
931 | |||
931 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da, | 932 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da, |
932 | u16 tid, u16 initiator, u16 reason); | 933 | u16 tid, u16 initiator, u16 reason); |
933 | void sta_rx_agg_session_timer_expired(unsigned long data); | 934 | void sta_rx_agg_session_timer_expired(unsigned long data); |
934 | void sta_addba_resp_timer_expired(unsigned long data); | 935 | void sta_addba_resp_timer_expired(unsigned long data); |
936 | void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr); | ||
935 | u64 ieee80211_sta_get_rates(struct ieee80211_local *local, | 937 | u64 ieee80211_sta_get_rates(struct ieee80211_local *local, |
936 | struct ieee802_11_elems *elems, | 938 | struct ieee802_11_elems *elems, |
937 | enum ieee80211_band band); | 939 | enum ieee80211_band band); |
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, | |||
467 | memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); | 467 | memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); |
468 | ieee80211_sta_send_associnfo(dev, ifsta); | 468 | ieee80211_sta_send_associnfo(dev, ifsta); |
469 | } else { | 469 | } else { |
470 | ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); | ||
470 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; | 471 | ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; |
471 | |||
472 | netif_carrier_off(dev); | 472 | netif_carrier_off(dev); |
473 | ieee80211_reset_erp_info(dev); | 473 | ieee80211_reset_erp_info(dev); |
474 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); | 474 | memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); |
@@ -1518,6 +1518,19 @@ void sta_rx_agg_session_timer_expired(unsigned long data) | |||
1518 | WLAN_REASON_QSTA_TIMEOUT); | 1518 | WLAN_REASON_QSTA_TIMEOUT); |
1519 | } | 1519 | } |
1520 | 1520 | ||
1521 | void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr) | ||
1522 | { | ||
1523 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
1524 | int i; | ||
1525 | |||
1526 | for (i = 0; i < STA_TID_NUM; i++) { | ||
1527 | ieee80211_stop_tx_ba_session(&local->hw, addr, i, | ||
1528 | WLAN_BACK_INITIATOR); | ||
1529 | ieee80211_sta_stop_rx_ba_session(dev, addr, i, | ||
1530 | WLAN_BACK_RECIPIENT, | ||
1531 | WLAN_REASON_QSTA_LEAVE_QBSS); | ||
1532 | } | ||
1533 | } | ||
1521 | 1534 | ||
1522 | static void ieee80211_rx_mgmt_auth(struct net_device *dev, | 1535 | static void ieee80211_rx_mgmt_auth(struct net_device *dev, |
1523 | struct ieee80211_if_sta *ifsta, | 1536 | struct ieee80211_if_sta *ifsta, |