diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-12 16:16:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-12 16:16:02 -0700 |
commit | a7e70158884629898d79709622a66b8ef99e4018 (patch) | |
tree | bd0cd03816f85f5bcef84000e01b0f9701f063ed /net/mac80211/status.c | |
parent | 24743537d3f784a8b3014e934fad0a9c45e4e789 (diff) | |
parent | 252f4bf400df1712408fe83ba199a66a1b57ab1d (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index b936dd29e92b..3ed3c835fbbf 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -189,16 +189,19 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) bool acked; for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { - /* the HW cannot have attempted that rate */ - if (i >= hw->max_report_rates) { + if (info->status.rates[i].idx < 0) { + break; + } else if (i >= hw->max_report_rates) { + /* the HW cannot have attempted that rate */ info->status.rates[i].idx = -1; info->status.rates[i].count = 0; - } else if (info->status.rates[i].idx >= 0) { - rates_idx = i; + break; } retry_count += info->status.rates[i].count; } + rates_idx = i - 1; + if (retry_count < 0) retry_count = 0; |