aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-04-03 12:18:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:55 -0400
commit150721894e3613a228e212615909ade14964235c (patch)
treec285334a7bc99999fa9b972727e17b9f0bddd9cc /drivers/net/wireless/ath/ath9k/debug.c
parenta5a0bca1d81b18699885bce532d2b3e0ab3b30c0 (diff)
ath9k: Add more recv stats.
This adds counters in various places that can drop packets on rx without otherwise incrementing a counter. It also counts some non-error cases, such as becons and fragments received. Should help with figuring out where packets are (and are not) dropped. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 9078279fab0c..244723a3ed41 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -916,6 +916,21 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
916 len += snprintf(buf + len, size - len, 916 len += snprintf(buf + len, size - len,
917 "%22s : %10u\n", "DECRYPT BUSY ERR", 917 "%22s : %10u\n", "DECRYPT BUSY ERR",
918 sc->debug.stats.rxstats.decrypt_busy_err); 918 sc->debug.stats.rxstats.decrypt_busy_err);
919 len += snprintf(buf + len, size - len,
920 "%22s : %10u\n", "RX-LENGTH-ERR",
921 sc->debug.stats.rxstats.rx_len_err);
922 len += snprintf(buf + len, size - len,
923 "%22s : %10u\n", "RX-OOM-ERR",
924 sc->debug.stats.rxstats.rx_oom_err);
925 len += snprintf(buf + len, size - len,
926 "%22s : %10u\n", "RX-RATE-ERR",
927 sc->debug.stats.rxstats.rx_rate_err);
928 len += snprintf(buf + len, size - len,
929 "%22s : %10u\n", "RX-DROP-RXFLUSH",
930 sc->debug.stats.rxstats.rx_drop_rxflush);
931 len += snprintf(buf + len, size - len,
932 "%22s : %10u\n", "RX-TOO-MANY-FRAGS",
933 sc->debug.stats.rxstats.rx_too_many_frags_err);
919 934
920 PHY_ERR("UNDERRUN ERR", ATH9K_PHYERR_UNDERRUN); 935 PHY_ERR("UNDERRUN ERR", ATH9K_PHYERR_UNDERRUN);
921 PHY_ERR("TIMING ERR", ATH9K_PHYERR_TIMING); 936 PHY_ERR("TIMING ERR", ATH9K_PHYERR_TIMING);
@@ -950,6 +965,12 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
950 len += snprintf(buf + len, size - len, 965 len += snprintf(buf + len, size - len,
951 "%22s : %10u\n", "RX-Bytes-All", 966 "%22s : %10u\n", "RX-Bytes-All",
952 sc->debug.stats.rxstats.rx_bytes_all); 967 sc->debug.stats.rxstats.rx_bytes_all);
968 len += snprintf(buf + len, size - len,
969 "%22s : %10u\n", "RX-Beacons",
970 sc->debug.stats.rxstats.rx_beacons);
971 len += snprintf(buf + len, size - len,
972 "%22s : %10u\n", "RX-Frags",
973 sc->debug.stats.rxstats.rx_frags);
953 974
954 if (len > size) 975 if (len > size)
955 len = size; 976 len = size;
@@ -964,7 +985,6 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
964 985
965void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) 986void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
966{ 987{
967#define RX_STAT_INC(c) sc->debug.stats.rxstats.c++
968#define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++ 988#define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++
969#define RX_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].rs\ 989#define RX_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].rs\
970 [sc->debug.rsidx].c) 990 [sc->debug.rsidx].c)
@@ -1010,7 +1030,6 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
1010 1030
1011#endif 1031#endif
1012 1032
1013#undef RX_STAT_INC
1014#undef RX_PHY_ERR_INC 1033#undef RX_PHY_ERR_INC
1015#undef RX_SAMP_DBG 1034#undef RX_SAMP_DBG
1016} 1035}