ath9k: fix duration calculation for non-aggregated packets
authorFelix Fietkau <nbd@openwrt.org>
Thu, 5 Dec 2013 14:20:53 +0000 (15:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:48:58 +0000 (07:48 -0800)
commit7f79e506a4521b58fcba80b49cd40c2037de6d2b
tree1b89cbcdc5a36c6238e00124047412acd8bbe206
parent1c8eac0555fdfd33d0039ac27da9fdfb3ae775b1
ath9k: fix duration calculation for non-aggregated packets

commit bbf807bc0697e577c137a5fffb30fca7c6a45da1 upstream.

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.

Reported-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/xmit.c