aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-03 09:17:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 13:51:38 -0500
commit5baec7422c8c8f70c62b9493acf31d4854b09070 (patch)
tree79d9ed2bddab4b13a421bf62184d957a4942994c /drivers/net/wireless/ath/ath9k/debug.h
parent9c083af8683808e486c20ca1f36da520d82e5981 (diff)
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.h20
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 776a24ada600..7a519582232a 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -235,16 +235,17 @@ struct ath9k_debug {
235 struct dentry *debugfs_phy; 235 struct dentry *debugfs_phy;
236 u32 regidx; 236 u32 regidx;
237 struct ath_stats stats; 237 struct ath_stats stats;
238#ifdef CONFIG_ATH9K_MAC_DEBUG
238 spinlock_t samp_lock; 239 spinlock_t samp_lock;
239 struct ath_dbg_bb_mac_samp bb_mac_samp[ATH_DBG_MAX_SAMPLES]; 240 struct ath_dbg_bb_mac_samp bb_mac_samp[ATH_DBG_MAX_SAMPLES];
240 u8 sampidx; 241 u8 sampidx;
241 u8 tsidx; 242 u8 tsidx;
242 u8 rsidx; 243 u8 rsidx;
244#endif
243}; 245};
244 246
245int ath9k_init_debug(struct ath_hw *ah); 247int ath9k_init_debug(struct ath_hw *ah);
246 248
247void ath9k_debug_samp_bb_mac(struct ath_softc *sc);
248void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); 249void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
249void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, 250void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
250 struct ath_tx_status *ts, struct ath_txq *txq, 251 struct ath_tx_status *ts, struct ath_txq *txq,
@@ -258,10 +259,6 @@ static inline int ath9k_init_debug(struct ath_hw *ah)
258 return 0; 259 return 0;
259} 260}
260 261
261static inline void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
262{
263}
264
265static inline void ath_debug_stat_interrupt(struct ath_softc *sc, 262static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
266 enum ath9k_int status) 263 enum ath9k_int status)
267{ 264{
@@ -282,4 +279,17 @@ static inline void ath_debug_stat_rx(struct ath_softc *sc,
282 279
283#endif /* CONFIG_ATH9K_DEBUGFS */ 280#endif /* CONFIG_ATH9K_DEBUGFS */
284 281
282#ifdef CONFIG_ATH9K_MAC_DEBUG
283
284void ath9k_debug_samp_bb_mac(struct ath_softc *sc);
285
286#else
287
288static inline void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
289{
290}
291
292#endif
293
294
285#endif /* DEBUG_H */ 295#endif /* DEBUG_H */