aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2011-11-21 15:34:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-28 14:36:21 -0500
commit6674f210e9dbf30e592ccd85b0cf90bd8d1d2d28 (patch)
tree511ac1f57e551b0cfcbe683630a21a39113fcfdb /net/mac80211
parentb53be7920bd9bb1bb99fecc2ff537bc79d24082f (diff)
mac80211: fix duration calculation for QoS NOACK frames
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 205fdcb70fff..a5ff02fbda8c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -151,11 +151,15 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
151 rate = mrate; 151 rate = mrate;
152 } 152 }
153 153
154 /* Time needed to transmit ACK 154 /* Don't calculate ACKs for QoS Frames with NoAck Policy set */
155 * (10 bytes + 4-byte FCS = 112 bits) plus SIFS; rounded up 155 if (ieee80211_is_data_qos(hdr->frame_control) &&
156 * to closest integer */ 156 *(ieee80211_get_qos_ctl(hdr)) | IEEE80211_QOS_CTL_ACK_POLICY_NOACK)
157 157 dur = 0;
158 dur = ieee80211_frame_duration(local, 10, rate, erp, 158 else
159 /* Time needed to transmit ACK
160 * (10 bytes + 4-byte FCS = 112 bits) plus SIFS; rounded up
161 * to closest integer */
162 dur = ieee80211_frame_duration(local, 10, rate, erp,
159 tx->sdata->vif.bss_conf.use_short_preamble); 163 tx->sdata->vif.bss_conf.use_short_preamble);
160 164
161 if (next_frag_len) { 165 if (next_frag_len) {