Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (c) 2008-2011 Atheros Communications Inc.
0003  *
0004  * Permission to use, copy, modify, and/or distribute this software for any
0005  * purpose with or without fee is hereby granted, provided that the above
0006  * copyright notice and this permission notice appear in all copies.
0007  *
0008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0011  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0013  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0014  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0015  */
0016 
0017 
0018 
0019 /**
0020  * struct ath_rx_stats - RX Statistics
0021  * @rx_pkts_all:  No. of total frames received, including ones that
0022     may have had errors.
0023  * @rx_bytes_all:  No. of total bytes received, including ones that
0024     may have had errors.
0025  * @crc_err: No. of frames with incorrect CRC value
0026  * @decrypt_crc_err: No. of frames whose CRC check failed after
0027     decryption process completed
0028  * @phy_err: No. of frames whose reception failed because the PHY
0029     encountered an error
0030  * @mic_err: No. of frames with incorrect TKIP MIC verification failure
0031  * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections
0032  * @post_delim_crc_err: Post-Frame delimiter CRC error detections
0033  * @decrypt_busy_err: Decryption interruptions counter
0034  * @phy_err_stats: Individual PHY error statistics
0035  * @rx_len_err:  No. of frames discarded due to bad length.
0036  * @rx_oom_err:  No. of frames dropped due to OOM issues.
0037  * @rx_rate_err:  No. of frames dropped due to rate errors.
0038  * @rx_too_many_frags_err:  Frames dropped due to too-many-frags received.
0039  * @rx_beacons:  No. of beacons received.
0040  * @rx_frags:  No. of rx-fragements received.
0041  * @rx_spectral: No of spectral packets received.
0042  * @rx_spectral_sample_good: No. of good spectral samples
0043  * @rx_spectral_sample_err: No. of good spectral samples
0044  */
0045 struct ath_rx_stats {
0046     u32 rx_pkts_all;
0047     u32 rx_bytes_all;
0048     u32 crc_err;
0049     u32 decrypt_crc_err;
0050     u32 phy_err;
0051     u32 mic_err;
0052     u32 pre_delim_crc_err;
0053     u32 post_delim_crc_err;
0054     u32 decrypt_busy_err;
0055     u32 phy_err_stats[ATH9K_PHYERR_MAX];
0056     u32 rx_len_err;
0057     u32 rx_oom_err;
0058     u32 rx_rate_err;
0059     u32 rx_too_many_frags_err;
0060     u32 rx_beacons;
0061     u32 rx_frags;
0062     u32 rx_spectral;
0063     u32 rx_spectral_sample_good;
0064     u32 rx_spectral_sample_err;
0065 };
0066 
0067 #ifdef CONFIG_ATH9K_COMMON_DEBUG
0068 void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
0069                   struct ath_hw *ah);
0070 void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
0071                  struct ath_hw *ah);
0072 void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
0073                  struct ath_rx_status *rs);
0074 void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
0075               struct ath_rx_stats *rxstats);
0076 void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
0077                  struct ath_rx_stats *rxstats);
0078 #else
0079 static inline void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
0080                         struct ath_hw *ah)
0081 {
0082 }
0083 
0084 static inline void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
0085                            struct ath_hw *ah)
0086 {
0087 }
0088 
0089 static inline void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
0090                        struct ath_rx_status *rs)
0091 {
0092 }
0093 
0094 static inline void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
0095                     struct ath_rx_stats *rxstats)
0096 {
0097 }
0098 
0099 static inline void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
0100                        struct ath_rx_stats *rxstats)
0101 {
0102 }
0103 #endif /* CONFIG_ATH9K_COMMON_DEBUG */