Commit 20ad19d0ac7389b04b566ebf3e0e497974f63ffa
Committed by
John W. Linville
1 parent
8b1c814d65
Exists in
master
and in
7 other branches
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>
Showing 4 changed files with 9 additions and 12 deletions Side-by-side Diff
net/mac80211/ieee80211_i.h
net/mac80211/mesh_hwmp.c
... | ... | @@ -58,7 +58,6 @@ |
58 | 58 | #define PERR_IE_DST_ADDR(x) (x + 2) |
59 | 59 | #define PERR_IE_DST_DSN(x) u32_field_get(x, 8, 0); |
60 | 60 | |
61 | -#define TU_TO_EXP_TIME(x) (jiffies + msecs_to_jiffies(x * 1024 / 1000)) | |
62 | 61 | #define MSEC_TO_TU(x) (x*1000/1024) |
63 | 62 | #define DSN_GT(x, y) ((long) (y) - (long) (x) < 0) |
64 | 63 | #define DSN_LT(x, y) ((long) (x) - (long) (y) < 0) |
net/mac80211/rx.c
... | ... | @@ -1673,11 +1673,9 @@ |
1673 | 1673 | start_seq_num = le16_to_cpu(bar->start_seq_num) >> 4; |
1674 | 1674 | |
1675 | 1675 | /* reset session timer */ |
1676 | - if (tid_agg_rx->timeout) { | |
1677 | - unsigned long expires = | |
1678 | - jiffies + (tid_agg_rx->timeout / 1000) * HZ; | |
1679 | - mod_timer(&tid_agg_rx->session_timer, expires); | |
1680 | - } | |
1676 | + if (tid_agg_rx->timeout) | |
1677 | + mod_timer(&tid_agg_rx->session_timer, | |
1678 | + TU_TO_EXP_TIME(tid_agg_rx->timeout)); | |
1681 | 1679 | |
1682 | 1680 | /* manage reordering buffer according to requested */ |
1683 | 1681 | /* sequence number */ |
... | ... | @@ -2414,11 +2412,9 @@ |
2414 | 2412 | /* new un-ordered ampdu frame - process it */ |
2415 | 2413 | |
2416 | 2414 | /* reset session timer */ |
2417 | - if (tid_agg_rx->timeout) { | |
2418 | - unsigned long expires = | |
2419 | - jiffies + (tid_agg_rx->timeout / 1000) * HZ; | |
2420 | - mod_timer(&tid_agg_rx->session_timer, expires); | |
2421 | - } | |
2415 | + if (tid_agg_rx->timeout) | |
2416 | + mod_timer(&tid_agg_rx->session_timer, | |
2417 | + TU_TO_EXP_TIME(tid_agg_rx->timeout)); | |
2422 | 2418 | |
2423 | 2419 | /* if this mpdu is fragmented - terminate rx aggregation session */ |
2424 | 2420 | sc = le16_to_cpu(hdr->seq_ctrl); |
net/mac80211/sta_info.h
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | * @stored_mpdu_num: number of MPDUs in reordering buffer |
89 | 89 | * @ssn: Starting Sequence Number expected to be aggregated. |
90 | 90 | * @buf_size: buffer size for incoming A-MPDUs |
91 | - * @timeout: reset timer value. | |
91 | + * @timeout: reset timer value (in TUs). | |
92 | 92 | * @dialog_token: dialog token for aggregation session |
93 | 93 | */ |
94 | 94 | struct tid_ampdu_rx { |