ath9k: built-in rate control A-MPDU fix
authorBjörn Smedman <bjorn.smedman@venatech.se>
Sun, 10 Oct 2010 20:51:54 +0000 (22:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Oct 2010 19:04:24 +0000 (15:04 -0400)
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.

Cc: <stable@kernel.org>
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>
drivers/net/wireless/ath/ath9k/rc.c

index ce1cd6d858474f76f6ceebe20af14416346f29ed..13f9e88e1187386b7d0870c24369e90a2bb513f2 100644 (file)
@@ -1375,6 +1375,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,