aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.h82
1 files changed, 38 insertions, 44 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 5d21704e87ff..8ce6ad80f4e2 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2008-2009 Atheros Communications Inc. 2 * Copyright (c) 2008-2011 Atheros Communications Inc.
3 * 3 *
4 * Permission to use, copy, modify, and/or distribute this software for any 4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above 5 * purpose with or without fee is hereby granted, provided that the above
@@ -54,6 +54,9 @@ struct ath_buf;
54 * @dtimsync: DTIM sync lossage 54 * @dtimsync: DTIM sync lossage
55 * @dtim: RX Beacon with DTIM 55 * @dtim: RX Beacon with DTIM
56 * @bb_watchdog: Baseband watchdog 56 * @bb_watchdog: Baseband watchdog
57 * @tsfoor: TSF out of range, indicates that the corrected TSF received
58 * from a beacon differs from the PCU's internal TSF by more than a
59 * (programmable) threshold
57 */ 60 */
58struct ath_interrupt_stats { 61struct ath_interrupt_stats {
59 u32 total; 62 u32 total;
@@ -78,21 +81,20 @@ struct ath_interrupt_stats {
78 u32 dtimsync; 81 u32 dtimsync;
79 u32 dtim; 82 u32 dtim;
80 u32 bb_watchdog; 83 u32 bb_watchdog;
81}; 84 u32 tsfoor;
82
83struct ath_rc_stats {
84 u32 success;
85 u32 retries;
86 u32 xretries;
87 u8 per;
88}; 85};
89 86
90/** 87/**
91 * struct ath_tx_stats - Statistics about TX 88 * struct ath_tx_stats - Statistics about TX
89 * @tx_pkts_all: No. of total frames transmitted, including ones that
90 may have had errors.
91 * @tx_bytes_all: No. of total bytes transmitted, including ones that
92 may have had errors.
92 * @queued: Total MPDUs (non-aggr) queued 93 * @queued: Total MPDUs (non-aggr) queued
93 * @completed: Total MPDUs (non-aggr) completed 94 * @completed: Total MPDUs (non-aggr) completed
94 * @a_aggr: Total no. of aggregates queued 95 * @a_aggr: Total no. of aggregates queued
95 * @a_queued: Total AMPDUs queued 96 * @a_queued_hw: Total AMPDUs queued to hardware
97 * @a_queued_sw: Total AMPDUs queued to software queues
96 * @a_completed: Total AMPDUs completed 98 * @a_completed: Total AMPDUs completed
97 * @a_retries: No. of AMPDUs retried (SW) 99 * @a_retries: No. of AMPDUs retried (SW)
98 * @a_xretries: No. of AMPDUs dropped due to xretries 100 * @a_xretries: No. of AMPDUs dropped due to xretries
@@ -105,12 +107,18 @@ struct ath_rc_stats {
105 * @desc_cfg_err: Descriptor configuration errors 107 * @desc_cfg_err: Descriptor configuration errors
106 * @data_urn: TX data underrun errors 108 * @data_urn: TX data underrun errors
107 * @delim_urn: TX delimiter underrun errors 109 * @delim_urn: TX delimiter underrun errors
110 * @puttxbuf: Number of times hardware was given txbuf to write.
111 * @txstart: Number of times hardware was told to start tx.
112 * @txprocdesc: Number of times tx descriptor was processed
108 */ 113 */
109struct ath_tx_stats { 114struct ath_tx_stats {
115 u32 tx_pkts_all;
116 u32 tx_bytes_all;
110 u32 queued; 117 u32 queued;
111 u32 completed; 118 u32 completed;
112 u32 a_aggr; 119 u32 a_aggr;
113 u32 a_queued; 120 u32 a_queued_hw;
121 u32 a_queued_sw;
114 u32 a_completed; 122 u32 a_completed;
115 u32 a_retries; 123 u32 a_retries;
116 u32 a_xretries; 124 u32 a_xretries;
@@ -120,10 +128,17 @@ struct ath_tx_stats {
120 u32 desc_cfg_err; 128 u32 desc_cfg_err;
121 u32 data_underrun; 129 u32 data_underrun;
122 u32 delim_underrun; 130 u32 delim_underrun;
131 u32 puttxbuf;
132 u32 txstart;
133 u32 txprocdesc;
123}; 134};
124 135
125/** 136/**
126 * struct ath_rx_stats - RX Statistics 137 * struct ath_rx_stats - RX Statistics
138 * @rx_pkts_all: No. of total frames received, including ones that
139 may have had errors.
140 * @rx_bytes_all: No. of total bytes received, including ones that
141 may have had errors.
127 * @crc_err: No. of frames with incorrect CRC value 142 * @crc_err: No. of frames with incorrect CRC value
128 * @decrypt_crc_err: No. of frames whose CRC check failed after 143 * @decrypt_crc_err: No. of frames whose CRC check failed after
129 decryption process completed 144 decryption process completed
@@ -136,6 +151,8 @@ struct ath_tx_stats {
136 * @phy_err_stats: Individual PHY error statistics 151 * @phy_err_stats: Individual PHY error statistics
137 */ 152 */
138struct ath_rx_stats { 153struct ath_rx_stats {
154 u32 rx_pkts_all;
155 u32 rx_bytes_all;
139 u32 crc_err; 156 u32 crc_err;
140 u32 decrypt_crc_err; 157 u32 decrypt_crc_err;
141 u32 phy_err; 158 u32 phy_err;
@@ -144,11 +161,17 @@ struct ath_rx_stats {
144 u32 post_delim_crc_err; 161 u32 post_delim_crc_err;
145 u32 decrypt_busy_err; 162 u32 decrypt_busy_err;
146 u32 phy_err_stats[ATH9K_PHYERR_MAX]; 163 u32 phy_err_stats[ATH9K_PHYERR_MAX];
164 int8_t rs_rssi_ctl0;
165 int8_t rs_rssi_ctl1;
166 int8_t rs_rssi_ctl2;
167 int8_t rs_rssi_ext0;
168 int8_t rs_rssi_ext1;
169 int8_t rs_rssi_ext2;
170 u8 rs_antenna;
147}; 171};
148 172
149struct ath_stats { 173struct ath_stats {
150 struct ath_interrupt_stats istats; 174 struct ath_interrupt_stats istats;
151 struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
152 struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES]; 175 struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
153 struct ath_rx_stats rxstats; 176 struct ath_rx_stats rxstats;
154}; 177};
@@ -160,17 +183,11 @@ struct ath9k_debug {
160}; 183};
161 184
162int ath9k_init_debug(struct ath_hw *ah); 185int ath9k_init_debug(struct ath_hw *ah);
163void ath9k_exit_debug(struct ath_hw *ah);
164 186
165int ath9k_debug_create_root(void);
166void ath9k_debug_remove_root(void);
167void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); 187void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
168void ath_debug_stat_rc(struct ath_softc *sc, int final_rate); 188void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
169void ath_debug_stat_tx(struct ath_softc *sc, struct ath_txq *txq, 189 struct ath_tx_status *ts, struct ath_txq *txq);
170 struct ath_buf *bf, struct ath_tx_status *ts);
171void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs); 190void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs);
172void ath_debug_stat_retries(struct ath_softc *sc, int rix,
173 int xretries, int retries, u8 per);
174 191
175#else 192#else
176 193
@@ -179,33 +196,15 @@ static inline int ath9k_init_debug(struct ath_hw *ah)
179 return 0; 196 return 0;
180} 197}
181 198
182static inline void ath9k_exit_debug(struct ath_hw *ah)
183{
184}
185
186static inline int ath9k_debug_create_root(void)
187{
188 return 0;
189}
190
191static inline void ath9k_debug_remove_root(void)
192{
193}
194
195static inline void ath_debug_stat_interrupt(struct ath_softc *sc, 199static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
196 enum ath9k_int status) 200 enum ath9k_int status)
197{ 201{
198} 202}
199 203
200static inline void ath_debug_stat_rc(struct ath_softc *sc,
201 int final_rate)
202{
203}
204
205static inline void ath_debug_stat_tx(struct ath_softc *sc, 204static inline void ath_debug_stat_tx(struct ath_softc *sc,
206 struct ath_txq *txq,
207 struct ath_buf *bf, 205 struct ath_buf *bf,
208 struct ath_tx_status *ts) 206 struct ath_tx_status *ts,
207 struct ath_txq *txq)
209{ 208{
210} 209}
211 210
@@ -214,11 +213,6 @@ static inline void ath_debug_stat_rx(struct ath_softc *sc,
214{ 213{
215} 214}
216 215
217static inline void ath_debug_stat_retries(struct ath_softc *sc, int rix,
218 int xretries, int retries, u8 per)
219{
220}
221
222#endif /* CONFIG_ATH9K_DEBUGFS */ 216#endif /* CONFIG_ATH9K_DEBUGFS */
223 217
224#endif /* DEBUG_H */ 218#endif /* DEBUG_H */