18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (c) 2008-2011 Atheros Communications Inc.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
158c2ecf20Sopenharmony_ci */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/**
208c2ecf20Sopenharmony_ci * struct ath_rx_stats - RX Statistics
218c2ecf20Sopenharmony_ci * @rx_pkts_all:  No. of total frames received, including ones that
228c2ecf20Sopenharmony_ci	may have had errors.
238c2ecf20Sopenharmony_ci * @rx_bytes_all:  No. of total bytes received, including ones that
248c2ecf20Sopenharmony_ci	may have had errors.
258c2ecf20Sopenharmony_ci * @crc_err: No. of frames with incorrect CRC value
268c2ecf20Sopenharmony_ci * @decrypt_crc_err: No. of frames whose CRC check failed after
278c2ecf20Sopenharmony_ci	decryption process completed
288c2ecf20Sopenharmony_ci * @phy_err: No. of frames whose reception failed because the PHY
298c2ecf20Sopenharmony_ci	encountered an error
308c2ecf20Sopenharmony_ci * @mic_err: No. of frames with incorrect TKIP MIC verification failure
318c2ecf20Sopenharmony_ci * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections
328c2ecf20Sopenharmony_ci * @post_delim_crc_err: Post-Frame delimiter CRC error detections
338c2ecf20Sopenharmony_ci * @decrypt_busy_err: Decryption interruptions counter
348c2ecf20Sopenharmony_ci * @phy_err_stats: Individual PHY error statistics
358c2ecf20Sopenharmony_ci * @rx_len_err:  No. of frames discarded due to bad length.
368c2ecf20Sopenharmony_ci * @rx_oom_err:  No. of frames dropped due to OOM issues.
378c2ecf20Sopenharmony_ci * @rx_rate_err:  No. of frames dropped due to rate errors.
388c2ecf20Sopenharmony_ci * @rx_too_many_frags_err:  Frames dropped due to too-many-frags received.
398c2ecf20Sopenharmony_ci * @rx_beacons:  No. of beacons received.
408c2ecf20Sopenharmony_ci * @rx_frags:  No. of rx-fragements received.
418c2ecf20Sopenharmony_ci * @rx_spectral: No of spectral packets received.
428c2ecf20Sopenharmony_ci * @rx_spectral_sample_good: No. of good spectral samples
438c2ecf20Sopenharmony_ci * @rx_spectral_sample_err: No. of good spectral samples
448c2ecf20Sopenharmony_ci */
458c2ecf20Sopenharmony_cistruct ath_rx_stats {
468c2ecf20Sopenharmony_ci	u32 rx_pkts_all;
478c2ecf20Sopenharmony_ci	u32 rx_bytes_all;
488c2ecf20Sopenharmony_ci	u32 crc_err;
498c2ecf20Sopenharmony_ci	u32 decrypt_crc_err;
508c2ecf20Sopenharmony_ci	u32 phy_err;
518c2ecf20Sopenharmony_ci	u32 mic_err;
528c2ecf20Sopenharmony_ci	u32 pre_delim_crc_err;
538c2ecf20Sopenharmony_ci	u32 post_delim_crc_err;
548c2ecf20Sopenharmony_ci	u32 decrypt_busy_err;
558c2ecf20Sopenharmony_ci	u32 phy_err_stats[ATH9K_PHYERR_MAX];
568c2ecf20Sopenharmony_ci	u32 rx_len_err;
578c2ecf20Sopenharmony_ci	u32 rx_oom_err;
588c2ecf20Sopenharmony_ci	u32 rx_rate_err;
598c2ecf20Sopenharmony_ci	u32 rx_too_many_frags_err;
608c2ecf20Sopenharmony_ci	u32 rx_beacons;
618c2ecf20Sopenharmony_ci	u32 rx_frags;
628c2ecf20Sopenharmony_ci	u32 rx_spectral;
638c2ecf20Sopenharmony_ci	u32 rx_spectral_sample_good;
648c2ecf20Sopenharmony_ci	u32 rx_spectral_sample_err;
658c2ecf20Sopenharmony_ci};
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#ifdef CONFIG_ATH9K_COMMON_DEBUG
688c2ecf20Sopenharmony_civoid ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
698c2ecf20Sopenharmony_ci				  struct ath_hw *ah);
708c2ecf20Sopenharmony_civoid ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
718c2ecf20Sopenharmony_ci				 struct ath_hw *ah);
728c2ecf20Sopenharmony_civoid ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
738c2ecf20Sopenharmony_ci			     struct ath_rx_status *rs);
748c2ecf20Sopenharmony_civoid ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
758c2ecf20Sopenharmony_ci			  struct ath_rx_stats *rxstats);
768c2ecf20Sopenharmony_civoid ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
778c2ecf20Sopenharmony_ci			     struct ath_rx_stats *rxstats);
788c2ecf20Sopenharmony_ci#else
798c2ecf20Sopenharmony_cistatic inline void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
808c2ecf20Sopenharmony_ci						struct ath_hw *ah)
818c2ecf20Sopenharmony_ci{
828c2ecf20Sopenharmony_ci}
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_cistatic inline void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
858c2ecf20Sopenharmony_ci					       struct ath_hw *ah)
868c2ecf20Sopenharmony_ci{
878c2ecf20Sopenharmony_ci}
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_cistatic inline void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
908c2ecf20Sopenharmony_ci					   struct ath_rx_status *rs)
918c2ecf20Sopenharmony_ci{
928c2ecf20Sopenharmony_ci}
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_cistatic inline void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
958c2ecf20Sopenharmony_ci					struct ath_rx_stats *rxstats)
968c2ecf20Sopenharmony_ci{
978c2ecf20Sopenharmony_ci}
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_cistatic inline void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
1008c2ecf20Sopenharmony_ci					   struct ath_rx_stats *rxstats)
1018c2ecf20Sopenharmony_ci{
1028c2ecf20Sopenharmony_ci}
1038c2ecf20Sopenharmony_ci#endif /* CONFIG_ATH9K_COMMON_DEBUG */
104