aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-10 21:25:45 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:45:32 -0500
commit20ad19d0ac7389b04b566ebf3e0e497974f63ffa (patch)
treeaf1a3d93f6f16f20f514fb940003dd0a85aef196 /net/mac80211/rx.c
parent8b1c814d65ae3219ee19d39ad6097f3d5249c23d (diff)
mac80211: fix RX aggregation timeouts
The values are in TUs (1.024ms), not ms. 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.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5a733c52f88..f34cc66d3f4 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1673,11 +1673,9 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx)
start_seq_num = le16_to_cpu(bar->start_seq_num) >> 4;
/* reset session timer */
- if (tid_agg_rx->timeout) {
- unsigned long expires =
- jiffies + (tid_agg_rx->timeout / 1000) * HZ;
- mod_timer(&tid_agg_rx->session_timer, expires);
- }
+ if (tid_agg_rx->timeout)
+ mod_timer(&tid_agg_rx->session_timer,
+ TU_TO_EXP_TIME(tid_agg_rx->timeout));
/* manage reordering buffer according to requested */
/* sequence number */
@@ -2414,11 +2412,9 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local,
/* new un-ordered ampdu frame - process it */
/* reset session timer */
- if (tid_agg_rx->timeout) {
- unsigned long expires =
- jiffies + (tid_agg_rx->timeout / 1000) * HZ;
- mod_timer(&tid_agg_rx->session_timer, expires);
- }
+ if (tid_agg_rx->timeout)
+ mod_timer(&tid_agg_rx->session_timer,
+ TU_TO_EXP_TIME(tid_agg_rx->timeout));
/* if this mpdu is fragmented - terminate rx aggregation session */
sc = le16_to_cpu(hdr->seq_ctrl);