summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-11-15 23:09:25 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:11 -0500
commit827e69bf6734193d7a6f47f0435db7ebef1b636e (patch)
tree0e574b60dded8971a0527dbf6f2f1cbf4deb91aa /drivers/net/wireless/ath/ath9k/debug.c
parent599bf6a4d64d8399e99514e0e1ef02e97e43238f (diff)
ath9k: get rid of tx_info_priv
This patch removes the need for separately allocated private tx info data in ath9k and brings the driver one small step closer to using the mac80211 rate control API properly. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c11
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 84f44269de47..06f1fcfb03e9 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 = {
void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb)
{
- struct ath_tx_info_priv *tx_info_priv = NULL;
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
struct ieee80211_tx_rate *rates = tx_info->status.rates;
- int final_ts_idx, idx;
+ int final_ts_idx = 0, idx, i;
struct ath_rc_stats *stats;
- tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
- final_ts_idx = tx_info_priv->tx.ts_rateindex;
+ for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
+ if (!rates[i].count)
+ break;
+
+ final_ts_idx = i;
+ }
idx = rates[final_ts_idx].idx;
stats = &sc->debug.stats.rcstats[idx];
stats->success++;