diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-07-27 02:38:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-29 15:46:09 -0400 |
commit | fec247c0d5bfbaa0861774ce31d515bbd48f7fce (patch) | |
tree | cb1ca3defc39851cecaa44bbf47e8bfb39b093c9 /drivers/net/wireless/ath/ath9k/debug.h | |
parent | 0ee9c13c7c92581ab005d80795cf65897213b249 (diff) |
ath9k: Add debug counters for TX
Location: ath9k/phy#/xmit
Signed-off-by: Sujith <Sujith.Manoharan@atheros.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 | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index edda15bf2c15..5e56b79d0cb0 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h | |||
@@ -35,6 +35,15 @@ enum ATH_DEBUG { | |||
35 | 35 | ||
36 | #define DBG_DEFAULT (ATH_DBG_FATAL) | 36 | #define DBG_DEFAULT (ATH_DBG_FATAL) |
37 | 37 | ||
38 | struct ath_txq; | ||
39 | struct ath_buf; | ||
40 | |||
41 | #ifdef CONFIG_ATH9K_DEBUG | ||
42 | #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++ | ||
43 | #else | ||
44 | #define TX_STAT_INC(q, c) do { } while (0) | ||
45 | #endif | ||
46 | |||
38 | #ifdef CONFIG_ATH9K_DEBUG | 47 | #ifdef CONFIG_ATH9K_DEBUG |
39 | 48 | ||
40 | /** | 49 | /** |
@@ -87,9 +96,45 @@ struct ath_rc_stats { | |||
87 | u8 per; | 96 | u8 per; |
88 | }; | 97 | }; |
89 | 98 | ||
99 | /** | ||
100 | * struct ath_tx_stats - Statistics about TX | ||
101 | * @queued: Total MPDUs (non-aggr) queued | ||
102 | * @completed: Total MPDUs (non-aggr) completed | ||
103 | * @a_aggr: Total no. of aggregates queued | ||
104 | * @a_queued: Total AMPDUs queued | ||
105 | * @a_completed: Total AMPDUs completed | ||
106 | * @a_retries: No. of AMPDUs retried (SW) | ||
107 | * @a_xretries: No. of AMPDUs dropped due to xretries | ||
108 | * @fifo_underrun: FIFO underrun occurrences | ||
109 | Valid only for: | ||
110 | - non-aggregate condition. | ||
111 | - first packet of aggregate. | ||
112 | * @xtxop: No. of frames filtered because of TXOP limit | ||
113 | * @timer_exp: Transmit timer expiry | ||
114 | * @desc_cfg_err: Descriptor configuration errors | ||
115 | * @data_urn: TX data underrun errors | ||
116 | * @delim_urn: TX delimiter underrun errors | ||
117 | */ | ||
118 | struct ath_tx_stats { | ||
119 | u32 queued; | ||
120 | u32 completed; | ||
121 | u32 a_aggr; | ||
122 | u32 a_queued; | ||
123 | u32 a_completed; | ||
124 | u32 a_retries; | ||
125 | u32 a_xretries; | ||
126 | u32 fifo_underrun; | ||
127 | u32 xtxop; | ||
128 | u32 timer_exp; | ||
129 | u32 desc_cfg_err; | ||
130 | u32 data_underrun; | ||
131 | u32 delim_underrun; | ||
132 | }; | ||
133 | |||
90 | struct ath_stats { | 134 | struct ath_stats { |
91 | struct ath_interrupt_stats istats; | 135 | struct ath_interrupt_stats istats; |
92 | struct ath_rc_stats rcstats[RATE_TABLE_SIZE]; | 136 | struct ath_rc_stats rcstats[RATE_TABLE_SIZE]; |
137 | struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; | ||
93 | }; | 138 | }; |
94 | 139 | ||
95 | struct ath9k_debug { | 140 | struct ath9k_debug { |
@@ -100,6 +145,7 @@ struct ath9k_debug { | |||
100 | struct dentry *debugfs_interrupt; | 145 | struct dentry *debugfs_interrupt; |
101 | struct dentry *debugfs_rcstat; | 146 | struct dentry *debugfs_rcstat; |
102 | struct dentry *debugfs_wiphy; | 147 | struct dentry *debugfs_wiphy; |
148 | struct dentry *debugfs_xmit; | ||
103 | struct ath_stats stats; | 149 | struct ath_stats stats; |
104 | }; | 150 | }; |
105 | 151 | ||
@@ -110,6 +156,8 @@ int ath9k_debug_create_root(void); | |||
110 | void ath9k_debug_remove_root(void); | 156 | void ath9k_debug_remove_root(void); |
111 | void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); | 157 | void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); |
112 | void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb); | 158 | void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb); |
159 | void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq, | ||
160 | struct ath_buf *bf); | ||
113 | void ath_debug_stat_retries(struct ath_softc *sc, int rix, | 161 | void ath_debug_stat_retries(struct ath_softc *sc, int rix, |
114 | int xretries, int retries, u8 per); | 162 | int xretries, int retries, u8 per); |
115 | 163 | ||
@@ -148,6 +196,12 @@ static inline void ath_debug_stat_rc(struct ath_softc *sc, | |||
148 | { | 196 | { |
149 | } | 197 | } |
150 | 198 | ||
199 | static inline void ath_debug_stat_tx(struct ath_softc *sc, | ||
200 | struct ath_txq *txq, | ||
201 | struct ath_buf *bf) | ||
202 | { | ||
203 | } | ||
204 | |||
151 | static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix, | 205 | static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix, |
152 | int xretries, int retries, u8 per) | 206 | int xretries, int retries, u8 per) |
153 | { | 207 | { |