summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/core.h
diff options
context:
space:
mode:
authorSujith2008-12-07 17:12:44 +0100
committerJohn W. Linville2008-12-12 19:48:24 +0100
commit817e11de2d3392041a70c80a6d5b353ad210f276 (patch)
tree7e5d98d03cd40236bb87fe82f486d3a0fa7d4d08 /drivers/net/wireless/ath9k/core.h
parentath9k: Maintain rate table choice after association (diff)
downloadkernel-qcow2-linux-817e11de2d3392041a70c80a6d5b353ad210f276.tar.gz
kernel-qcow2-linux-817e11de2d3392041a70c80a6d5b353ad210f276.tar.xz
kernel-qcow2-linux-817e11de2d3392041a70c80a6d5b353ad210f276.zip
ath9k: Add a debugfs file to show interrupt statistics
Location: ath9k/<phy>/interrupt Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/core.h')
-rw-r--r--drivers/net/wireless/ath9k/core.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
index 23844e02eff1..9abdbd8686e7 100644
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -88,16 +88,66 @@ enum ATH_DEBUG {
#ifdef CONFIG_ATH9K_DEBUG
+/**
+ * struct ath_interrupt_stats - Contains statistics about interrupts
+ * @total: Total no. of interrupts generated so far
+ * @rxok: RX with no errors
+ * @rxeol: RX with no more RXDESC available
+ * @rxorn: RX FIFO overrun
+ * @txok: TX completed at the requested rate
+ * @txurn: TX FIFO underrun
+ * @mib: MIB regs reaching its threshold
+ * @rxphyerr: RX with phy errors
+ * @rx_keycache_miss: RX with key cache misses
+ * @swba: Software Beacon Alert
+ * @bmiss: Beacon Miss
+ * @bnr: Beacon Not Ready
+ * @cst: Carrier Sense TImeout
+ * @gtt: Global TX Timeout
+ * @tim: RX beacon TIM occurrence
+ * @cabend: RX End of CAB traffic
+ * @dtimsync: DTIM sync lossage
+ * @dtim: RX Beacon with DTIM
+ */
+struct ath_interrupt_stats {
+ u32 total;
+ u32 rxok;
+ u32 rxeol;
+ u32 rxorn;
+ u32 txok;
+ u32 txeol;
+ u32 txurn;
+ u32 mib;
+ u32 rxphyerr;
+ u32 rx_keycache_miss;
+ u32 swba;
+ u32 bmiss;
+ u32 bnr;
+ u32 cst;
+ u32 gtt;
+ u32 tim;
+ u32 cabend;
+ u32 dtimsync;
+ u32 dtim;
+};
+
+struct ath_stats {
+ struct ath_interrupt_stats istats;
+};
+
struct ath9k_debug {
int debug_mask;
struct dentry *debugfs_root;
struct dentry *debugfs_phy;
struct dentry *debugfs_dma;
+ struct dentry *debugfs_interrupt;
+ struct ath_stats stats;
};
void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...);
int ath9k_init_debug(struct ath_softc *sc);
void ath9k_exit_debug(struct ath_softc *sc);
+void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
#else
@@ -115,6 +165,11 @@ static inline void ath9k_exit_debug(struct ath_softc *sc)
{
}
+static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
+ enum ath9k_int status)
+{
+}
+
#endif /* CONFIG_ATH9K_DEBUG */
struct ath_config {