21
ATH_DBG_RESET = 0x00000001,
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
38
#define DBG_DEFAULT (ATH_DBG_FATAL)
43
#ifdef CONFIG_ATH9K_DEBUG
26
#ifdef CONFIG_ATH9K_DEBUGFS
44
27
#define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
46
29
#define TX_STAT_INC(q, c) do { } while (0)
49
#ifdef CONFIG_ATH9K_DEBUG
32
#ifdef CONFIG_ATH9K_DEBUGFS
52
35
* struct ath_interrupt_stats - Contains statistics about interrupts
53
36
* @total: Total no. of interrupts generated so far
54
37
* @rxok: RX with no errors
38
* @rxlp: RX with low priority RX
39
* @rxhp: RX with high priority, uapsd only
55
40
* @rxeol: RX with no more RXDESC available
56
41
* @rxorn: RX FIFO overrun
57
42
* @txok: TX completed at the requested rate
133
121
u32 delim_underrun;
125
* struct ath_rx_stats - RX Statistics
126
* @rx_pkts_all: No. of total frames received, including ones that
128
* @rx_bytes_all: No. of total bytes received, including ones that
130
* @crc_err: No. of frames with incorrect CRC value
131
* @decrypt_crc_err: No. of frames whose CRC check failed after
132
decryption process completed
133
* @phy_err: No. of frames whose reception failed because the PHY
135
* @mic_err: No. of frames with incorrect TKIP MIC verification failure
136
* @pre_delim_crc_err: Pre-Frame delimiter CRC error detections
137
* @post_delim_crc_err: Post-Frame delimiter CRC error detections
138
* @decrypt_busy_err: Decryption interruptions counter
139
* @phy_err_stats: Individual PHY error statistics
141
struct ath_rx_stats {
148
u32 pre_delim_crc_err;
149
u32 post_delim_crc_err;
150
u32 decrypt_busy_err;
151
u32 phy_err_stats[ATH9K_PHYERR_MAX];
136
154
struct ath_stats {
137
155
struct ath_interrupt_stats istats;
138
struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
139
156
struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
157
struct ath_rx_stats rxstats;
142
160
struct ath9k_debug {
144
161
struct dentry *debugfs_phy;
145
struct dentry *debugfs_debug;
146
struct dentry *debugfs_dma;
147
struct dentry *debugfs_interrupt;
148
struct dentry *debugfs_rcstat;
149
struct dentry *debugfs_wiphy;
150
struct dentry *debugfs_xmit;
151
163
struct ath_stats stats;
154
void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...);
155
int ath9k_init_debug(struct ath_softc *sc);
156
void ath9k_exit_debug(struct ath_softc *sc);
157
int ath9k_debug_create_root(void);
158
void ath9k_debug_remove_root(void);
166
int ath9k_init_debug(struct ath_hw *ah);
159
168
void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
160
void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb);
161
void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq,
163
void ath_debug_stat_retries(struct ath_softc *sc, int rix,
164
int xretries, int retries, u8 per);
169
void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
170
struct ath_tx_status *ts);
171
void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs);
168
static inline void DPRINTF(struct ath_softc *sc, int dbg_mask,
169
const char *fmt, ...)
173
static inline int ath9k_init_debug(struct ath_softc *sc)
178
static inline void ath9k_exit_debug(struct ath_softc *sc)
182
static inline int ath9k_debug_create_root(void)
187
static inline void ath9k_debug_remove_root(void)
175
static inline int ath9k_init_debug(struct ath_hw *ah)
191
180
static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
196
static inline void ath_debug_stat_rc(struct ath_softc *sc,
201
185
static inline void ath_debug_stat_tx(struct ath_softc *sc,
207
static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix,
208
int xretries, int retries, u8 per)
212
#endif /* CONFIG_ATH9K_DEBUG */
187
struct ath_tx_status *ts)
191
static inline void ath_debug_stat_rx(struct ath_softc *sc,
192
struct ath_rx_status *rs)
196
#endif /* CONFIG_ATH9K_DEBUGFS */
214
198
#endif /* DEBUG_H */