diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-11-21 18:13:11 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-21 14:16:03 -0500 |
commit | 78ef731ce549dd9baf6eba8cf52f61727613690a (patch) | |
tree | 7ea204e511e1fc1d95f6036b4a7374fbc5ae41ed /drivers/net/wireless/ath/ath9k/debug.h | |
parent | bea843c73854becf998047a83af22a90de3fd19b (diff) |
ath9k: Fix the 'xmit' debugfs file
The 'xmit' debugfs file has become big and unwieldy, fix
multiple issues with its usage:
* Store TX counters/statistics only for the 4 Access Categories.
Use IEEE80211_NUM_ACS instead of ATH9K_NUM_TX_QUEUES.
* Move various utility macros to debug.h, they can be reused
elsewhere.
* Remove tx_complete_poll_work_seen.
* Remove code that accesses various internal queue-specific
variables without any locking whatsoever. HW/SW queue details
will be handled in a subsequent patch.
* Do not print internal values like txq_headidx and txq_headidx.
They were mostly unused anyway, considering code like:
PRX("txq_tailidx: ", txq_headidx);
* Handle 'txprocdesc' for EDMA too.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index 61341cda131..f9bee18de5a 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h @@ -179,6 +179,21 @@ struct ath_tx_stats { u32 txfailed; }; +/* + * Various utility macros to print TX/Queue counters. + */ +#define PR_QNUM(_n) sc->tx.txq_map[_n]->axq_qnum +#define TXSTATS sc->debug.stats.txstats +#define PR(str, elem) \ + do { \ + len += snprintf(buf + len, size - len, \ + "%s%13u%11u%10u%10u\n", str, \ + TXSTATS[PR_QNUM(IEEE80211_AC_BE)].elem, \ + TXSTATS[PR_QNUM(IEEE80211_AC_BK)].elem, \ + TXSTATS[PR_QNUM(IEEE80211_AC_VI)].elem, \ + TXSTATS[PR_QNUM(IEEE80211_AC_VO)].elem); \ + } while(0) + #define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++) /** @@ -227,7 +242,7 @@ struct ath_rx_stats { struct ath_stats { struct ath_interrupt_stats istats; - struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; + struct ath_tx_stats txstats[IEEE80211_NUM_ACS]; struct ath_rx_stats rxstats; struct ath_dfs_stats dfs_stats; u32 reset[__RESET_TYPE_MAX]; |