diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 84f44269de4..06f1fcfb03e 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -257,14 +257,17 @@ static const struct file_operations fops_interrupt = { | |||
257 | 257 | ||
258 | void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb) | 258 | void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb) |
259 | { | 259 | { |
260 | struct ath_tx_info_priv *tx_info_priv = NULL; | ||
261 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 260 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
262 | struct ieee80211_tx_rate *rates = tx_info->status.rates; | 261 | struct ieee80211_tx_rate *rates = tx_info->status.rates; |
263 | int final_ts_idx, idx; | 262 | int final_ts_idx = 0, idx, i; |
264 | struct ath_rc_stats *stats; | 263 | struct ath_rc_stats *stats; |
265 | 264 | ||
266 | tx_info_priv = ATH_TX_INFO_PRIV(tx_info); | 265 | for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { |
267 | final_ts_idx = tx_info_priv->tx.ts_rateindex; | 266 | if (!rates[i].count) |
267 | break; | ||
268 | |||
269 | final_ts_idx = i; | ||
270 | } | ||
268 | idx = rates[final_ts_idx].idx; | 271 | idx = rates[final_ts_idx].idx; |
269 | stats = &sc->debug.stats.rcstats[idx]; | 272 | stats = &sc->debug.stats.rcstats[idx]; |
270 | stats->success++; | 273 | stats->success++; |