aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-12-15 08:44:53 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-19 15:23:23 -0500
commitda027ca00a48715364da9a94d4b663029add528d (patch)
tree513ba51d4c4ad314f5ec2be8f021007f75bad1c8 /drivers/net/wireless/ath9k
parent8d6f658e211a3c6ff808f7fc6ebb30239457eabc (diff)
ath9k: Fix TX status reporting for retries and MCS index
The count field in struct ieee80211_tx_rate does not include the final successful attempt, so only report retries here. Fix the struct ieee80211_tx_rate::idx field when MCS was used. It is supposed to be the MCS index, not an internal index to the rate control algorithm table. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k')
-rw-r--r--drivers/net/wireless/ath9k/xmit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index f9c309ed3a2d..d6d402c18934 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -125,7 +125,15 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
125 tx_info->flags |= IEEE80211_TX_STAT_ACK; 125 tx_info->flags |= IEEE80211_TX_STAT_ACK;
126 } 126 }
127 127
128 tx_info->status.rates[0].count = tx_status->retries + 1; 128 tx_info->status.rates[0].count = tx_status->retries;
129 if (tx_info->status.rates[0].flags & IEEE80211_TX_RC_MCS) {
130 /* Change idx from internal table index to MCS index */
131 int idx = tx_info->status.rates[0].idx;
132 struct ath_rate_table *rate_table = sc->cur_rate_table;
133 if (idx >= 0 && idx < rate_table->rate_cnt)
134 tx_info->status.rates[0].idx =
135 rate_table->info[idx].ratecode & 0x7f;
136 }
129 137
130 ieee80211_tx_status(hw, skb); 138 ieee80211_tx_status(hw, skb);
131} 139}