162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * Copyright (c) 2008-2011 Atheros Communications Inc.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
562306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
662306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
962306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1062306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1162306a36Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1262306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1362306a36Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1462306a36Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1562306a36Sopenharmony_ci */
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci/**
2062306a36Sopenharmony_ci * struct ath_rx_stats - RX Statistics
2162306a36Sopenharmony_ci * @rx_pkts_all:  No. of total frames received, including ones that
2262306a36Sopenharmony_ci	may have had errors.
2362306a36Sopenharmony_ci * @rx_bytes_all:  No. of total bytes received, including ones that
2462306a36Sopenharmony_ci	may have had errors.
2562306a36Sopenharmony_ci * @crc_err: No. of frames with incorrect CRC value
2662306a36Sopenharmony_ci * @decrypt_crc_err: No. of frames whose CRC check failed after
2762306a36Sopenharmony_ci	decryption process completed
2862306a36Sopenharmony_ci * @phy_err: No. of frames whose reception failed because the PHY
2962306a36Sopenharmony_ci	encountered an error
3062306a36Sopenharmony_ci * @mic_err: No. of frames with incorrect TKIP MIC verification failure
3162306a36Sopenharmony_ci * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections
3262306a36Sopenharmony_ci * @post_delim_crc_err: Post-Frame delimiter CRC error detections
3362306a36Sopenharmony_ci * @decrypt_busy_err: Decryption interruptions counter
3462306a36Sopenharmony_ci * @phy_err_stats: Individual PHY error statistics
3562306a36Sopenharmony_ci * @rx_len_err:  No. of frames discarded due to bad length.
3662306a36Sopenharmony_ci * @rx_oom_err:  No. of frames dropped due to OOM issues.
3762306a36Sopenharmony_ci * @rx_rate_err:  No. of frames dropped due to rate errors.
3862306a36Sopenharmony_ci * @rx_too_many_frags_err:  Frames dropped due to too-many-frags received.
3962306a36Sopenharmony_ci * @rx_beacons:  No. of beacons received.
4062306a36Sopenharmony_ci * @rx_frags:  No. of rx-fragements received.
4162306a36Sopenharmony_ci * @rx_spectral: No of spectral packets received.
4262306a36Sopenharmony_ci * @rx_spectral_sample_good: No. of good spectral samples
4362306a36Sopenharmony_ci * @rx_spectral_sample_err: No. of good spectral samples
4462306a36Sopenharmony_ci */
4562306a36Sopenharmony_cistruct ath_rx_stats {
4662306a36Sopenharmony_ci	u32 rx_pkts_all;
4762306a36Sopenharmony_ci	u32 rx_bytes_all;
4862306a36Sopenharmony_ci	u32 crc_err;
4962306a36Sopenharmony_ci	u32 decrypt_crc_err;
5062306a36Sopenharmony_ci	u32 phy_err;
5162306a36Sopenharmony_ci	u32 mic_err;
5262306a36Sopenharmony_ci	u32 pre_delim_crc_err;
5362306a36Sopenharmony_ci	u32 post_delim_crc_err;
5462306a36Sopenharmony_ci	u32 decrypt_busy_err;
5562306a36Sopenharmony_ci	u32 phy_err_stats[ATH9K_PHYERR_MAX];
5662306a36Sopenharmony_ci	u32 rx_len_err;
5762306a36Sopenharmony_ci	u32 rx_oom_err;
5862306a36Sopenharmony_ci	u32 rx_rate_err;
5962306a36Sopenharmony_ci	u32 rx_too_many_frags_err;
6062306a36Sopenharmony_ci	u32 rx_beacons;
6162306a36Sopenharmony_ci	u32 rx_frags;
6262306a36Sopenharmony_ci	u32 rx_spectral;
6362306a36Sopenharmony_ci	u32 rx_spectral_sample_good;
6462306a36Sopenharmony_ci	u32 rx_spectral_sample_err;
6562306a36Sopenharmony_ci};
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci#ifdef CONFIG_ATH9K_COMMON_DEBUG
6862306a36Sopenharmony_civoid ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
6962306a36Sopenharmony_ci				  struct ath_hw *ah);
7062306a36Sopenharmony_civoid ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
7162306a36Sopenharmony_ci				 struct ath_hw *ah);
7262306a36Sopenharmony_civoid ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
7362306a36Sopenharmony_ci			     struct ath_rx_status *rs);
7462306a36Sopenharmony_civoid ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
7562306a36Sopenharmony_ci			  struct ath_rx_stats *rxstats);
7662306a36Sopenharmony_civoid ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
7762306a36Sopenharmony_ci			     struct ath_rx_stats *rxstats);
7862306a36Sopenharmony_ci#else
7962306a36Sopenharmony_cistatic inline void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
8062306a36Sopenharmony_ci						struct ath_hw *ah)
8162306a36Sopenharmony_ci{
8262306a36Sopenharmony_ci}
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_cistatic inline void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
8562306a36Sopenharmony_ci					       struct ath_hw *ah)
8662306a36Sopenharmony_ci{
8762306a36Sopenharmony_ci}
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_cistatic inline void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
9062306a36Sopenharmony_ci					   struct ath_rx_status *rs)
9162306a36Sopenharmony_ci{
9262306a36Sopenharmony_ci}
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_cistatic inline void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
9562306a36Sopenharmony_ci					struct ath_rx_stats *rxstats)
9662306a36Sopenharmony_ci{
9762306a36Sopenharmony_ci}
9862306a36Sopenharmony_ci
9962306a36Sopenharmony_cistatic inline void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
10062306a36Sopenharmony_ci					   struct ath_rx_stats *rxstats)
10162306a36Sopenharmony_ci{
10262306a36Sopenharmony_ci}
10362306a36Sopenharmony_ci#endif /* CONFIG_ATH9K_COMMON_DEBUG */
104