common-debug.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. * struct ath_rx_stats - RX Statistics
  18. * @rx_pkts_all: No. of total frames received, including ones that
  19. may have had errors.
  20. * @rx_bytes_all: No. of total bytes received, including ones that
  21. may have had errors.
  22. * @crc_err: No. of frames with incorrect CRC value
  23. * @decrypt_crc_err: No. of frames whose CRC check failed after
  24. decryption process completed
  25. * @phy_err: No. of frames whose reception failed because the PHY
  26. encountered an error
  27. * @mic_err: No. of frames with incorrect TKIP MIC verification failure
  28. * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections
  29. * @post_delim_crc_err: Post-Frame delimiter CRC error detections
  30. * @decrypt_busy_err: Decryption interruptions counter
  31. * @phy_err_stats: Individual PHY error statistics
  32. * @rx_len_err: No. of frames discarded due to bad length.
  33. * @rx_oom_err: No. of frames dropped due to OOM issues.
  34. * @rx_rate_err: No. of frames dropped due to rate errors.
  35. * @rx_too_many_frags_err: Frames dropped due to too-many-frags received.
  36. * @rx_beacons: No. of beacons received.
  37. * @rx_frags: No. of rx-fragements received.
  38. * @rx_spectral: No of spectral packets received.
  39. */
  40. struct ath_rx_stats {
  41. u32 rx_pkts_all;
  42. u32 rx_bytes_all;
  43. u32 crc_err;
  44. u32 decrypt_crc_err;
  45. u32 phy_err;
  46. u32 mic_err;
  47. u32 pre_delim_crc_err;
  48. u32 post_delim_crc_err;
  49. u32 decrypt_busy_err;
  50. u32 phy_err_stats[ATH9K_PHYERR_MAX];
  51. u32 rx_len_err;
  52. u32 rx_oom_err;
  53. u32 rx_rate_err;
  54. u32 rx_too_many_frags_err;
  55. u32 rx_beacons;
  56. u32 rx_frags;
  57. u32 rx_spectral;
  58. };
  59. void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy,
  60. struct ath_hw *ah);
  61. void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy,
  62. struct ath_hw *ah);
  63. void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats,
  64. struct ath_rx_status *rs);
  65. void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
  66. struct ath_rx_stats *rxstats);
  67. void ath9k_cmn_debug_phy_err(struct dentry *debugfs_phy,
  68. struct ath_rx_stats *rxstats);