diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-05-17 06:58:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-17 14:31:08 -0400 |
commit | 0c585dda3574e40f562c362eaa326a98b1e49d02 (patch) | |
tree | 42683f5e869fbfecf00542df65f78aa2842bf666 | |
parent | 16e23428024e4dc6b5ba5f6d36c57c49d33fe85b (diff) |
ath9k: fix rate handling/reporting
This patch fixes some issues introduced in the rate control API rework.
When not running aggregation, copy bf->rates into info->control.rates
before applying the rate control status to it.
In ath_lookup_rate, the rates need to be pulled from bf->rates, not the
tx info.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index a47bf6924efd..ad6e0b306c37 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -630,6 +630,7 @@ static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq, | |||
630 | struct ath_tx_status *ts, struct ath_buf *bf, | 630 | struct ath_tx_status *ts, struct ath_buf *bf, |
631 | struct list_head *bf_head) | 631 | struct list_head *bf_head) |
632 | { | 632 | { |
633 | struct ieee80211_tx_info *info; | ||
633 | bool txok, flush; | 634 | bool txok, flush; |
634 | 635 | ||
635 | txok = !(ts->ts_status & ATH9K_TXERR_MASK); | 636 | txok = !(ts->ts_status & ATH9K_TXERR_MASK); |
@@ -641,8 +642,12 @@ static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq, | |||
641 | txq->axq_ampdu_depth--; | 642 | txq->axq_ampdu_depth--; |
642 | 643 | ||
643 | if (!bf_isampdu(bf)) { | 644 | if (!bf_isampdu(bf)) { |
644 | if (!flush) | 645 | if (!flush) { |
646 | info = IEEE80211_SKB_CB(bf->bf_mpdu); | ||
647 | memcpy(info->control.rates, bf->rates, | ||
648 | sizeof(info->control.rates)); | ||
645 | ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok); | 649 | ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok); |
650 | } | ||
646 | ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok); | 651 | ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok); |
647 | } else | 652 | } else |
648 | ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok); | 653 | ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok); |
@@ -686,7 +691,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
686 | 691 | ||
687 | skb = bf->bf_mpdu; | 692 | skb = bf->bf_mpdu; |
688 | tx_info = IEEE80211_SKB_CB(skb); | 693 | tx_info = IEEE80211_SKB_CB(skb); |
689 | rates = tx_info->control.rates; | 694 | rates = bf->rates; |
690 | 695 | ||
691 | /* | 696 | /* |
692 | * Find the lowest frame length among the rate series that will have a | 697 | * Find the lowest frame length among the rate series that will have a |