diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-01-12 20:59:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-13 14:50:05 -0500 |
commit | 350e2dcb4647d144000db1505c94d586fcd57919 (patch) | |
tree | 42a54da4d37b0bf4985e87476ff0e71ff7255b5d /drivers/net/wireless/ath/ath9k/debug.h | |
parent | c3b9f9e86b178fd3e94e2d6dd6da84ab38fa2ba7 (diff) |
ath9k: Add a debugfs file "node_recv"
This would be useful when debugging RX performance issues.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.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 | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index ec02d38ea8ea..b01b8c3ec570 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h | |||
@@ -27,11 +27,13 @@ struct fft_sample_tlv; | |||
27 | 27 | ||
28 | #ifdef CONFIG_ATH9K_DEBUGFS | 28 | #ifdef CONFIG_ATH9K_DEBUGFS |
29 | #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++ | 29 | #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++ |
30 | #define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++) | ||
30 | #define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++ | 31 | #define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++ |
31 | #define ANT_STAT_INC(i, c) sc->debug.stats.ant_stats[i].c++ | 32 | #define ANT_STAT_INC(i, c) sc->debug.stats.ant_stats[i].c++ |
32 | #define ANT_LNA_INC(i, c) sc->debug.stats.ant_stats[i].lna_recv_cnt[c]++; | 33 | #define ANT_LNA_INC(i, c) sc->debug.stats.ant_stats[i].lna_recv_cnt[c]++; |
33 | #else | 34 | #else |
34 | #define TX_STAT_INC(q, c) do { } while (0) | 35 | #define TX_STAT_INC(q, c) do { } while (0) |
36 | #define RX_STAT_INC(c) | ||
35 | #define RESET_STAT_INC(sc, type) do { } while (0) | 37 | #define RESET_STAT_INC(sc, type) do { } while (0) |
36 | #define ANT_STAT_INC(i, c) do { } while (0) | 38 | #define ANT_STAT_INC(i, c) do { } while (0) |
37 | #define ANT_LNA_INC(i, c) do { } while (0) | 39 | #define ANT_LNA_INC(i, c) do { } while (0) |
@@ -201,7 +203,23 @@ struct ath_tx_stats { | |||
201 | TXSTATS[PR_QNUM(IEEE80211_AC_VO)].elem); \ | 203 | TXSTATS[PR_QNUM(IEEE80211_AC_VO)].elem); \ |
202 | } while(0) | 204 | } while(0) |
203 | 205 | ||
204 | #define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++) | 206 | struct ath_rx_rate_stats { |
207 | struct { | ||
208 | u32 ht20_cnt; | ||
209 | u32 ht40_cnt; | ||
210 | u32 sgi_cnt; | ||
211 | u32 lgi_cnt; | ||
212 | } ht_stats[24]; | ||
213 | |||
214 | struct { | ||
215 | u32 ofdm_cnt; | ||
216 | } ofdm_stats[8]; | ||
217 | |||
218 | struct { | ||
219 | u32 cck_lp_cnt; | ||
220 | u32 cck_sp_cnt; | ||
221 | } cck_stats[4]; | ||
222 | }; | ||
205 | 223 | ||
206 | /** | 224 | /** |
207 | * struct ath_rx_stats - RX Statistics | 225 | * struct ath_rx_stats - RX Statistics |
@@ -299,8 +317,6 @@ void ath9k_debug_sync_cause(struct ath_softc *sc, u32 sync_cause); | |||
299 | 317 | ||
300 | #else | 318 | #else |
301 | 319 | ||
302 | #define RX_STAT_INC(c) /* NOP */ | ||
303 | |||
304 | static inline int ath9k_init_debug(struct ath_hw *ah) | 320 | static inline int ath9k_init_debug(struct ath_hw *ah) |
305 | { | 321 | { |
306 | return 0; | 322 | return 0; |
@@ -338,4 +354,16 @@ ath9k_debug_sync_cause(struct ath_softc *sc, u32 sync_cause) | |||
338 | 354 | ||
339 | #endif /* CONFIG_ATH9K_DEBUGFS */ | 355 | #endif /* CONFIG_ATH9K_DEBUGFS */ |
340 | 356 | ||
357 | #ifdef CONFIG_ATH9K_STATION_STATISTICS | ||
358 | void ath_debug_rate_stats(struct ath_softc *sc, | ||
359 | struct ath_rx_status *rs, | ||
360 | struct sk_buff *skb); | ||
361 | #else | ||
362 | static inline void ath_debug_rate_stats(struct ath_softc *sc, | ||
363 | struct ath_rx_status *rs, | ||
364 | struct sk_buff *skb) | ||
365 | { | ||
366 | } | ||
367 | #endif /* CONFIG_ATH9K_STATION_STATISTICS */ | ||
368 | |||
341 | #endif /* DEBUG_H */ | 369 | #endif /* DEBUG_H */ |