debug.c (29bf801e04514929aeec768d237c62ae37564041) debug.c (b5a0c86a56e4494eab84b142ab5501eb62685150)
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

--- 984 unchanged lines hidden (view full) ---

993
994 return retval;
995
996#undef RXS_ERR
997}
998
999void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
1000{
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

--- 984 unchanged lines hidden (view full) ---

993
994 return retval;
995
996#undef RXS_ERR
997}
998
999void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
1000{
1001#define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++
1002
1003 RX_STAT_INC(rx_pkts_all);
1004 sc->debug.stats.rxstats.rx_bytes_all += rs->rs_datalen;
1005
1006 if (rs->rs_status & ATH9K_RXERR_CRC)
1007 RX_STAT_INC(crc_err);
1008 if (rs->rs_status & ATH9K_RXERR_DECRYPT)
1009 RX_STAT_INC(decrypt_crc_err);
1010 if (rs->rs_status & ATH9K_RXERR_MIC)
1011 RX_STAT_INC(mic_err);
1012 if (rs->rs_status & ATH9K_RX_DELIM_CRC_PRE)
1013 RX_STAT_INC(pre_delim_crc_err);
1014 if (rs->rs_status & ATH9K_RX_DELIM_CRC_POST)
1015 RX_STAT_INC(post_delim_crc_err);
1016 if (rs->rs_status & ATH9K_RX_DECRYPT_BUSY)
1017 RX_STAT_INC(decrypt_busy_err);
1018
1019 if (rs->rs_status & ATH9K_RXERR_PHY) {
1020 RX_STAT_INC(phy_err);
1021 if (rs->rs_phyerr < ATH9K_PHYERR_MAX)
1022 RX_PHY_ERR_INC(rs->rs_phyerr);
1023 }
1024
1025#undef RX_PHY_ERR_INC
1001 ath9k_cmn_debug_stat_rx(&sc->debug.stats.rxstats, rs);
1026}
1027
1028static const struct file_operations fops_recv = {
1029 .read = read_file_recv,
1030 .open = simple_open,
1031 .owner = THIS_MODULE,
1032 .llseek = default_llseek,
1033};

--- 479 unchanged lines hidden ---
1002}
1003
1004static const struct file_operations fops_recv = {
1005 .read = read_file_recv,
1006 .open = simple_open,
1007 .owner = THIS_MODULE,
1008 .llseek = default_llseek,
1009};

--- 479 unchanged lines hidden ---