aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-04-06 05:18:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-07 14:38:05 -0400
commit098a607091426e79178b9a6c318d993fea131791 (patch)
treed62c9993e49f90ca962cd763b096911d22d7e051 /net/mac80211/rx.c
parent618f356b95e37ca0c30b3b513898fda54abd52a6 (diff)
mac80211: clean up/fix aggregation code
The aggregation code has a number of quirks, like inventing an unneeded WLAN_BACK_TIMER value and leaking memory under certain circumstances during station destruction. Fix these issues by using the regular aggregation session teardown code and blocking new aggregation sessions, all before the station is really destructed. As a side effect, this gets rid of the long code block to destroy aggregation safely. Additionally, rename tid_state_rx which can only have the values IDLE and OPERATIONAL to tid_active_rx to make it easier to understand that there is no bitwise stuff going on on the RX side -- the TX side remains because it needs to keep track of the driver and peer states. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c02e43b50ac3..62053fa711f3 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -720,7 +720,7 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx,
720 720
721 tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK; 721 tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK;
722 722
723 if (sta->ampdu_mlme.tid_state_rx[tid] != HT_AGG_STATE_OPERATIONAL) 723 if (!sta->ampdu_mlme.tid_active_rx[tid])
724 goto dont_reorder; 724 goto dont_reorder;
725 725
726 tid_agg_rx = sta->ampdu_mlme.tid_rx[tid]; 726 tid_agg_rx = sta->ampdu_mlme.tid_rx[tid];
@@ -1805,8 +1805,7 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames)
1805 if (!rx->sta) 1805 if (!rx->sta)
1806 return RX_DROP_MONITOR; 1806 return RX_DROP_MONITOR;
1807 tid = le16_to_cpu(bar->control) >> 12; 1807 tid = le16_to_cpu(bar->control) >> 12;
1808 if (rx->sta->ampdu_mlme.tid_state_rx[tid] 1808 if (!rx->sta->ampdu_mlme.tid_active_rx[tid])
1809 != HT_AGG_STATE_OPERATIONAL)
1810 return RX_DROP_MONITOR; 1809 return RX_DROP_MONITOR;
1811 tid_agg_rx = rx->sta->ampdu_mlme.tid_rx[tid]; 1810 tid_agg_rx = rx->sta->ampdu_mlme.tid_rx[tid];
1812 1811