diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-03 15:17:03 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:51:38 -0500 |
commit | 5baec7422c8c8f70c62b9493acf31d4854b09070 (patch) | |
tree | 79d9ed2bddab4b13a421bf62184d957a4942994c /drivers/net/wireless/ath/ath9k/debug.h | |
parent | 9c083af8683808e486c20ca1f36da520d82e5981 (diff) | |
download | op-kernel-dev-5baec7422c8c8f70c62b9493acf31d4854b09070.zip op-kernel-dev-5baec7422c8c8f70c62b9493acf31d4854b09070.tar.gz |
ath9k: make MAC sample statistics optional
They're more expensive than some of the other debug options and only used
in very rare situations, so it sometimes makes sense to disable them while
leaving in debugfs support.
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.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index 776a24a..7a51958 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h @@ -235,16 +235,17 @@ struct ath9k_debug { struct dentry *debugfs_phy; u32 regidx; struct ath_stats stats; +#ifdef CONFIG_ATH9K_MAC_DEBUG spinlock_t samp_lock; struct ath_dbg_bb_mac_samp bb_mac_samp[ATH_DBG_MAX_SAMPLES]; u8 sampidx; u8 tsidx; u8 rsidx; +#endif }; int ath9k_init_debug(struct ath_hw *ah); -void ath9k_debug_samp_bb_mac(struct ath_softc *sc); void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, struct ath_tx_status *ts, struct ath_txq *txq, @@ -258,10 +259,6 @@ static inline int ath9k_init_debug(struct ath_hw *ah) return 0; } -static inline void ath9k_debug_samp_bb_mac(struct ath_softc *sc) -{ -} - static inline void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) { @@ -282,4 +279,17 @@ static inline void ath_debug_stat_rx(struct ath_softc *sc, #endif /* CONFIG_ATH9K_DEBUGFS */ +#ifdef CONFIG_ATH9K_MAC_DEBUG + +void ath9k_debug_samp_bb_mac(struct ath_softc *sc); + +#else + +static inline void ath9k_debug_samp_bb_mac(struct ath_softc *sc) +{ +} + +#endif + + #endif /* DEBUG_H */ |