]> err.no Git - linux-2.6/commitdiff
ath9k: Fix TX status reporting
authorJouni Malinen <jouni.malinen@atheros.com>
Mon, 11 Aug 2008 11:01:49 +0000 (14:01 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 3 Sep 2008 19:18:20 +0000 (15:18 -0400)
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/main.c

index 95b337149484d07978eff5ff7d12b51dac8504e8..c5107f269f24f2e250563814e800cdccad725538 100644 (file)
@@ -1067,8 +1067,16 @@ void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
                tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
                tx_status->flags &= ~ATH_TX_BAR;
        }
-       if (tx_status->flags)
-               tx_info->status.excessive_retries = 1;
+
+       if (tx_status->flags & (ATH_TX_ERROR | ATH_TX_XRETRY)) {
+               if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {
+                       /* Frame was not ACKed, but an ACK was expected */
+                       tx_info->status.excessive_retries = 1;
+               }
+       } else {
+               /* Frame was ACKed */
+               tx_info->flags |= IEEE80211_TX_STAT_ACK;
+       }
 
        tx_info->status.retry_count = tx_status->retries;