1 | /* |
2 | * Copyright (c) 2008-2011 Atheros Communications Inc. |
3 | * |
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 |
6 | * copyright notice and this permission notice appear in all copies. |
7 | * |
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ |
16 | |
17 | |
18 | |
19 | /** |
20 | * struct ath_rx_stats - RX Statistics |
21 | * @rx_pkts_all: No. of total frames received, including ones that |
22 | may have had errors. |
23 | * @rx_bytes_all: No. of total bytes received, including ones that |
24 | may have had errors. |
25 | * @crc_err: No. of frames with incorrect CRC value |
26 | * @decrypt_crc_err: No. of frames whose CRC check failed after |
27 | decryption process completed |
28 | * @phy_err: No. of frames whose reception failed because the PHY |
29 | encountered an error |
30 | * @mic_err: No. of frames with incorrect TKIP MIC verification failure |
31 | * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections |
32 | * @post_delim_crc_err: Post-Frame delimiter CRC error detections |
33 | * @decrypt_busy_err: Decryption interruptions counter |
34 | * @phy_err_stats: Individual PHY error statistics |
35 | * @rx_len_err: No. of frames discarded due to bad length. |
36 | * @rx_oom_err: No. of frames dropped due to OOM issues. |
37 | * @rx_rate_err: No. of frames dropped due to rate errors. |
38 | * @rx_too_many_frags_err: Frames dropped due to too-many-frags received. |
39 | * @rx_beacons: No. of beacons received. |
40 | * @rx_frags: No. of rx-fragements received. |
41 | * @rx_spectral: No of spectral packets received. |
42 | * @rx_spectral_sample_good: No. of good spectral samples |
43 | * @rx_spectral_sample_err: No. of good spectral samples |
44 | */ |
45 | struct ath_rx_stats { |
46 | u32 rx_pkts_all; |
47 | u32 rx_bytes_all; |
48 | u32 crc_err; |
49 | u32 decrypt_crc_err; |
50 | u32 phy_err; |
51 | u32 mic_err; |
52 | u32 pre_delim_crc_err; |
53 | u32 post_delim_crc_err; |
54 | u32 decrypt_busy_err; |
55 | u32 phy_err_stats[ATH9K_PHYERR_MAX]; |
56 | u32 rx_len_err; |
57 | u32 rx_oom_err; |
58 | u32 rx_rate_err; |
59 | u32 rx_too_many_frags_err; |
60 | u32 rx_beacons; |
61 | u32 rx_frags; |
62 | u32 rx_spectral; |
63 | u32 rx_spectral_sample_good; |
64 | u32 rx_spectral_sample_err; |
65 | }; |
66 | |
67 | #ifdef CONFIG_ATH9K_COMMON_DEBUG |
68 | void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy, |
69 | struct ath_hw *ah); |
70 | void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy, |
71 | struct ath_hw *ah); |
72 | void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats, |
73 | struct ath_rx_status *rs); |
74 | void ath9k_cmn_debug_recv(struct dentry *debugfs_phy, |
75 | struct ath_rx_stats *rxstats); |
76 | void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy, |
77 | struct ath_rx_stats *rxstats); |
78 | #else |
79 | static inline void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy, |
80 | struct ath_hw *ah) |
81 | { |
82 | } |
83 | |
84 | static inline void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy, |
85 | struct ath_hw *ah) |
86 | { |
87 | } |
88 | |
89 | static inline void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats, |
90 | struct ath_rx_status *rs) |
91 | { |
92 | } |
93 | |
94 | static inline void ath9k_cmn_debug_recv(struct dentry *debugfs_phy, |
95 | struct ath_rx_stats *rxstats) |
96 | { |
97 | } |
98 | |
99 | static inline void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy, |
100 | struct ath_rx_stats *rxstats) |
101 | { |
102 | } |
103 | #endif /* CONFIG_ATH9K_COMMON_DEBUG */ |
104 | |