summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBjörn Smedman <bjorn.smedman@venatech.se>2010-10-10 22:51:54 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 13:31:57 -0800
commit4311bba0072a3eec01b0b8927310af1ebf6f91dc (patch)
tree042e1261b1e87d69632a87204f09b212c7c6ca0c /drivers
parentd1ae7bcad808ed455954829e33d4263b19011476 (diff)
ath9k: built-in rate control A-MPDU fix
commit a8909cfb1832ac623142898df2a9374722cfe68f upstream. This patch attempts to ensure that ath9k's built-in rate control algorithm does not rely on the value of the ampdu_len and ampdu_ack_len tx status fields unless the IEEE80211_TX_STAT_AMPDU flag is set. This patch has not been tested. Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index e49be733d546..5dd233803c40 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1359,6 +1359,12 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
if (tx_info->flags & IEEE80211_TX_STAT_TX_FILTERED)
return;
+ if (!(tx_info->flags & IEEE80211_TX_STAT_AMPDU)) {
+ tx_info->status.ampdu_ack_len =
+ (tx_info->flags & IEEE80211_TX_STAT_ACK ? 1 : 0);
+ tx_info->status.ampdu_len = 1;
+ }
+
/*
* If an underrun error is seen assume it as an excessive retry only
* if max frame trigger level has been reached (2 KB for singel stream,