ath9k: Dont update rate control for every AMPDU
authorVasanthakumar Thiagarajan <vasanth@atheros.com>
Thu, 20 Nov 2008 06:21:18 +0000 (11:51 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 26 Nov 2008 14:47:40 +0000 (09:47 -0500)
Update the rate control only with the tx status of first
AMPDU of an aggregation. This patch fixes frequent drops
in throughput.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/rc.c
drivers/net/wireless/ath9k/rc.h
drivers/net/wireless/ath9k/xmit.c

index e118824625baead87a37500b4bdd4dec413ac4c7..7d1913d48d312b2a6297294da530ef087e02828d 100644 (file)
@@ -1413,7 +1413,8 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
        an = (struct ath_node *)sta->drv_priv;
        final_ts_idx = tx_info_priv->tx.ts_rateindex;
 
-       if (!an || !priv_sta || !ieee80211_is_data(fc))
+       if (!an || !priv_sta || !ieee80211_is_data(fc) ||
+           !tx_info_priv->update_rc)
                goto exit;
 
        if (tx_info_priv->tx.ts_status & ATH9K_TXERR_FILT)
index 297dff96c3a1c59068dedb0981a0bffa4dfd37b3..97c60d12e8aa51cbfc7e34cff14869a556888908 100644 (file)
@@ -188,6 +188,7 @@ struct ath_tx_info_priv {
        struct ath_tx_status tx;
        int n_frames;
        int n_bad_frames;
+       bool update_rc;
 };
 
 #define ATH_TX_INFO_PRIV(tx_info) \
index 50d4105ee4b375e993f6145b588a6a849db5bc97..dad81a9df152f6a12b86a6f98206fd0c07fdec11 100644 (file)
@@ -950,6 +950,7 @@ static void ath_tx_rc_status(struct ath_buf *bf, struct ath_desc *ds, int nbad)
        struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
        struct ath_tx_info_priv *tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
 
+       tx_info_priv->update_rc = false;
        if (ds->ds_txstat.ts_status & ATH9K_TXERR_FILT)
                tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
 
@@ -960,6 +961,7 @@ static void ath_tx_rc_status(struct ath_buf *bf, struct ath_desc *ds, int nbad)
                               sizeof(tx_info_priv->tx));
                        tx_info_priv->n_frames = bf->bf_nframes;
                        tx_info_priv->n_bad_frames = nbad;
+                       tx_info_priv->update_rc = true;
                }
        }
 }