]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ath9k: fix retry count for A-MPDU rate control status reports
authorFelix Fietkau <nbd@openwrt.org>
Thu, 24 Jun 2010 23:26:16 +0000 (01:26 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 17 Apr 2011 20:15:32 +0000 (16:15 -0400)
commit88fe50e62b5327f0ab16aace289015cbb94982bd
tree407d2c5698f9797e8b618e0feae96f69fce4f2be
parent6f9a8e4c3a3d9539ee5fb2254c6865eea172321c
ath9k: fix retry count for A-MPDU rate control status reports

commit 78c4653a2274479547e259e1f416d2b3d04c42a8 upstream.

The 'bf_retries' field of the ath_buf structure was used for both
software retries (AMPDU subframes) and hardware retries (legacy
frames). This led to a wrong retry count being reported for the A-MPDU
rate control stats.
This patch changes the code to no longer use bf_retries for reporting
retry counts, but instead always using the real on-chip retry count
from the ath_tx_status.
Additionally, if the first subframe of an A-MPDU was not acked, the tx
status report is submitted along with the first acked subframe, which
may not contain the correct rates in the tx info.
This is easily corrected by saving the tx rate info before looping over
subframes, and then copying it back once the A-MPDU status report is
submitted.
In my tests this change improves throughput visibly.

[PG: 34 doesnt have ts as an alias for ds->ds_txstat, so change accordingly]

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Björn Smedman <bjorn.smedman@venatech.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/wireless/ath/ath9k/xmit.c