ath9k: Remove unnecessary AMPDU check at tx status
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Mon, 26 Sep 2011 16:18:39 +0000 (21:48 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 30 Sep 2011 19:56:57 +0000 (15:56 -0400)
Fill the ampdu_[ack]_len for both aggregation and normal frames.
So that we could avoid unnecesary conditional at tx status.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/rc.c
drivers/net/wireless/ath/ath9k/xmit.c

index 4f1301881137ee29f6a09b0823ed9a87912f4b6d..8448281dd0691f53cfa41fb260ff7e60f83e64e0 100644 (file)
@@ -1362,12 +1362,6 @@ 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 (!(tx_info->flags & IEEE80211_TX_STAT_ACK))
                tx_status = 1;
 
index fa3dcfdf71743255771dd4c6f314687ff2ca0b0b..f5d4764888b910ce83a1104a9d6c3b2e74c555c9 100644 (file)
@@ -2043,10 +2043,9 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
                tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
 
                BUG_ON(nbad > nframes);
-
-               tx_info->status.ampdu_len = nframes;
-               tx_info->status.ampdu_ack_len = nframes - nbad;
        }
+       tx_info->status.ampdu_len = nframes;
+       tx_info->status.ampdu_ack_len = nframes - nbad;
 
        if ((ts->ts_status & ATH9K_TXERR_FILT) == 0 &&
            (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) == 0) {