summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2013-12-05 15:20:53 +0100
committerJohn W. Linville2013-12-09 20:59:13 +0100
commitbbf807bc0697e577c137a5fffb30fca7c6a45da1 (patch)
tree4f33c739754088bd7583048f6abfb8a68d986fd5
parentMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber... (diff)
downloadkernel-qcow2-linux-bbf807bc0697e577c137a5fffb30fca7c6a45da1.tar.gz
kernel-qcow2-linux-bbf807bc0697e577c137a5fffb30fca7c6a45da1.tar.xz
kernel-qcow2-linux-bbf807bc0697e577c137a5fffb30fca7c6a45da1.zip
ath9k: fix duration calculation for non-aggregated packets
When not aggregating packets, fi->framelen should be passed in as length to calculate the duration. Before the tx path rework, ath_tx_fill_desc was called for either one aggregate, or one single frame, with the length of the packet or the aggregate as a parameter. After the rework, ath_tx_sched_aggr can pass a burst of single frames to ath_tx_fill_desc and sets len=0. Fix broken duration calculation by overriding the length in ath_tx_fill_desc before passing it to ath_buf_set_rate. Cc: stable@vger.kernel.org Reported-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 09cdbcd09739..b5a19e098f2d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1276,6 +1276,10 @@ static void ath_tx_fill_desc(struct ath_softc *sc, struct ath_buf *bf,
if (!rts_thresh || (len > rts_thresh))
rts = true;
}
+
+ if (!aggr)
+ len = fi->framelen;
+
ath_buf_set_rate(sc, bf, &info, len, rts);
}