1 --- a/drivers/net/wireless/ath/ath5k/base.c
2 +++ b/drivers/net/wireless/ath/ath5k/base.c
3 @@ -1580,21 +1580,14 @@ ath5k_tx_frame_completed(struct ath5k_so
4 info = IEEE80211_SKB_CB(skb);
6 ieee80211_tx_info_clear_status(info);
7 - for (i = 0; i < 4; i++) {
8 + for (i = 0; i <= ts->ts_final_idx; i++) {
9 struct ieee80211_tx_rate *r =
10 &info->status.rates[i];
12 - if (ts->ts_rate[i]) {
13 - r->idx = ath5k_hw_to_driver_rix(sc, ts->ts_rate[i]);
14 - r->count = ts->ts_retry[i];
19 + r->count = ts->ts_retry[i];
22 - /* count the successful attempt as well */
23 - info->status.rates[ts->ts_final_idx].count++;
24 + info->status.rates[ts->ts_final_idx + 1].idx = -1;
26 if (unlikely(ts->ts_status)) {
28 @@ -1609,6 +1602,9 @@ ath5k_tx_frame_completed(struct ath5k_so
30 info->flags |= IEEE80211_TX_STAT_ACK;
31 info->status.ack_signal = ts->ts_rssi;
33 + /* count the successful attempt as well */
34 + info->status.rates[ts->ts_final_idx].count++;