aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/ath/ath9k/debug.h
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.h79
1 files changed, 44 insertions, 35 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 7241f4748338..86780e68b31e 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -17,36 +17,19 @@
17#ifndef DEBUG_H 17#ifndef DEBUG_H
18#define DEBUG_H 18#define DEBUG_H
19 19
20enum ATH_DEBUG { 20#include "hw.h"
21 ATH_DBG_RESET = 0x00000001, 21#include "rc.h"
22 ATH_DBG_QUEUE = 0x00000002,
23 ATH_DBG_EEPROM = 0x00000004,
24 ATH_DBG_CALIBRATE = 0x00000008,
25 ATH_DBG_INTERRUPT = 0x00000010,
26 ATH_DBG_REGULATORY = 0x00000020,
27 ATH_DBG_ANI = 0x00000040,
28 ATH_DBG_XMIT = 0x00000080,
29 ATH_DBG_BEACON = 0x00000100,
30 ATH_DBG_CONFIG = 0x00000200,
31 ATH_DBG_FATAL = 0x00000400,
32 ATH_DBG_PS = 0x00000800,
33 ATH_DBG_HWTIMER = 0x00001000,
34 ATH_DBG_BTCOEX = 0x00002000,
35 ATH_DBG_ANY = 0xffffffff
36};
37
38#define DBG_DEFAULT (ATH_DBG_FATAL)
39 22
40struct ath_txq; 23struct ath_txq;
41struct ath_buf; 24struct ath_buf;
42 25
43#ifdef CONFIG_ATH9K_DEBUG 26#ifdef CONFIG_ATH9K_DEBUGFS
44#define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++ 27#define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
45#else 28#else
46#define TX_STAT_INC(q, c) do { } while (0) 29#define TX_STAT_INC(q, c) do { } while (0)
47#endif 30#endif
48 31
49#ifdef CONFIG_ATH9K_DEBUG 32#ifdef CONFIG_ATH9K_DEBUGFS
50 33
51/** 34/**
52 * struct ath_interrupt_stats - Contains statistics about interrupts 35 * struct ath_interrupt_stats - Contains statistics about interrupts
@@ -133,14 +116,38 @@ struct ath_tx_stats {
133 u32 delim_underrun; 116 u32 delim_underrun;
134}; 117};
135 118
119/**
120 * struct ath_rx_stats - RX Statistics
121 * @crc_err: No. of frames with incorrect CRC value
122 * @decrypt_crc_err: No. of frames whose CRC check failed after
123 decryption process completed
124 * @phy_err: No. of frames whose reception failed because the PHY
125 encountered an error
126 * @mic_err: No. of frames with incorrect TKIP MIC verification failure
127 * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections
128 * @post_delim_crc_err: Post-Frame delimiter CRC error detections
129 * @decrypt_busy_err: Decryption interruptions counter
130 * @phy_err_stats: Individual PHY error statistics
131 */
132struct ath_rx_stats {
133 u32 crc_err;
134 u32 decrypt_crc_err;
135 u32 phy_err;
136 u32 mic_err;
137 u32 pre_delim_crc_err;
138 u32 post_delim_crc_err;
139 u32 decrypt_busy_err;
140 u32 phy_err_stats[ATH9K_PHYERR_MAX];
141};
142
136struct ath_stats { 143struct ath_stats {
137 struct ath_interrupt_stats istats; 144 struct ath_interrupt_stats istats;
138 struct ath_rc_stats rcstats[RATE_TABLE_SIZE]; 145 struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
139 struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; 146 struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
147 struct ath_rx_stats rxstats;
140}; 148};
141 149
142struct ath9k_debug { 150struct ath9k_debug {
143 int debug_mask;
144 struct dentry *debugfs_phy; 151 struct dentry *debugfs_phy;
145 struct dentry *debugfs_debug; 152 struct dentry *debugfs_debug;
146 struct dentry *debugfs_dma; 153 struct dentry *debugfs_dma;
@@ -148,34 +155,31 @@ struct ath9k_debug {
148 struct dentry *debugfs_rcstat; 155 struct dentry *debugfs_rcstat;
149 struct dentry *debugfs_wiphy; 156 struct dentry *debugfs_wiphy;
150 struct dentry *debugfs_xmit; 157 struct dentry *debugfs_xmit;
158 struct dentry *debugfs_recv;
151 struct ath_stats stats; 159 struct ath_stats stats;
152}; 160};
153 161
154void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...); 162int ath9k_init_debug(struct ath_hw *ah);
155int ath9k_init_debug(struct ath_softc *sc); 163void ath9k_exit_debug(struct ath_hw *ah);
156void ath9k_exit_debug(struct ath_softc *sc); 164
157int ath9k_debug_create_root(void); 165int ath9k_debug_create_root(void);
158void ath9k_debug_remove_root(void); 166void ath9k_debug_remove_root(void);
159void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); 167void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
160void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb); 168void ath_debug_stat_rc(struct ath_softc *sc, int final_rate);
161void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq, 169void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq,
162 struct ath_buf *bf); 170 struct ath_buf *bf);
171void ath_debug_stat_rx(struct ath_softc *sc, struct ath_buf *bf);
163void ath_debug_stat_retries(struct ath_softc *sc, int rix, 172void ath_debug_stat_retries(struct ath_softc *sc, int rix,
164 int xretries, int retries, u8 per); 173 int xretries, int retries, u8 per);
165 174
166#else 175#else
167 176
168static inline void DPRINTF(struct ath_softc *sc, int dbg_mask, 177static inline int ath9k_init_debug(struct ath_hw *ah)
169 const char *fmt, ...)
170{
171}
172
173static inline int ath9k_init_debug(struct ath_softc *sc)
174{ 178{
175 return 0; 179 return 0;
176} 180}
177 181
178static inline void ath9k_exit_debug(struct ath_softc *sc) 182static inline void ath9k_exit_debug(struct ath_hw *ah)
179{ 183{
180} 184}
181 185
@@ -194,7 +198,7 @@ static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
194} 198}
195 199
196static inline void ath_debug_stat_rc(struct ath_softc *sc, 200static inline void ath_debug_stat_rc(struct ath_softc *sc,
197 struct sk_buff *skb) 201 int final_rate)
198{ 202{
199} 203}
200 204
@@ -204,11 +208,16 @@ static inline void ath_debug_stat_tx(struct ath_softc *sc,
204{ 208{
205} 209}
206 210
211static inline void ath_debug_stat_rx(struct ath_softc *sc,
212 struct ath_buf *bf)
213{
214}
215
207static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix, 216static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix,
208 int xretries, int retries, u8 per) 217 int xretries, int retries, u8 per)
209{ 218{
210} 219}
211 220
212#endif /* CONFIG_ATH9K_DEBUG */ 221#endif /* CONFIG_ATH9K_DEBUGFS */
213 222
214#endif /* DEBUG_H */ 223#endif /* DEBUG_H */