void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, struct ath_htc_rx_status *rxs) { #define RX_PHY_ERR_INC(c) priv->debug.rx_stats.err_phy_stats[c]++ if (rxs->rs_status & ATH9K_RXERR_CRC) priv->debug.rx_stats.err_crc++; if (rxs->rs_status & ATH9K_RXERR_DECRYPT) priv->debug.rx_stats.err_decrypt_crc++; if (rxs->rs_status & ATH9K_RXERR_MIC) priv->debug.rx_stats.err_mic++; if (rxs->rs_status & ATH9K_RX_DELIM_CRC_PRE) priv->debug.rx_stats.err_pre_delim++; if (rxs->rs_status & ATH9K_RX_DELIM_CRC_POST) priv->debug.rx_stats.err_post_delim++; if (rxs->rs_status & ATH9K_RX_DECRYPT_BUSY) priv->debug.rx_stats.err_decrypt_busy++; if (rxs->rs_status & ATH9K_RXERR_PHY) { priv->debug.rx_stats.err_phy++; if (rxs->rs_phyerr < ATH9K_PHYERR_MAX) RX_PHY_ERR_INC(rxs->rs_phyerr); } #undef RX_PHY_ERR_INC }
void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) { #define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++ RX_STAT_INC(rx_pkts_all); sc->debug.stats.rxstats.rx_bytes_all += rs->rs_datalen; if (rs->rs_status & ATH9K_RXERR_CRC) RX_STAT_INC(crc_err); if (rs->rs_status & ATH9K_RXERR_DECRYPT) RX_STAT_INC(decrypt_crc_err); if (rs->rs_status & ATH9K_RXERR_MIC) RX_STAT_INC(mic_err); if (rs->rs_status & ATH9K_RX_DELIM_CRC_PRE) RX_STAT_INC(pre_delim_crc_err); if (rs->rs_status & ATH9K_RX_DELIM_CRC_POST) RX_STAT_INC(post_delim_crc_err); if (rs->rs_status & ATH9K_RX_DECRYPT_BUSY) RX_STAT_INC(decrypt_busy_err); if (rs->rs_status & ATH9K_RXERR_PHY) { RX_STAT_INC(phy_err); if (rs->rs_phyerr < ATH9K_PHYERR_MAX) RX_PHY_ERR_INC(rs->rs_phyerr); } #undef RX_PHY_ERR_INC }
void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats, struct ath_rx_status *rs) { #define RX_PHY_ERR_INC(c) rxstats->phy_err_stats[c]++ #define RX_CMN_STAT_INC(c) (rxstats->c++) RX_CMN_STAT_INC(rx_pkts_all); rxstats->rx_bytes_all += rs->rs_datalen; if (rs->rs_status & ATH9K_RXERR_CRC) RX_CMN_STAT_INC(crc_err); if (rs->rs_status & ATH9K_RXERR_DECRYPT) RX_CMN_STAT_INC(decrypt_crc_err); if (rs->rs_status & ATH9K_RXERR_MIC) RX_CMN_STAT_INC(mic_err); if (rs->rs_status & ATH9K_RX_DELIM_CRC_PRE) RX_CMN_STAT_INC(pre_delim_crc_err); if (rs->rs_status & ATH9K_RX_DELIM_CRC_POST) RX_CMN_STAT_INC(post_delim_crc_err); if (rs->rs_status & ATH9K_RX_DECRYPT_BUSY) RX_CMN_STAT_INC(decrypt_busy_err); if (rs->rs_status & ATH9K_RXERR_PHY) { RX_CMN_STAT_INC(phy_err); if (rs->rs_phyerr < ATH9K_PHYERR_MAX) RX_PHY_ERR_INC(rs->rs_phyerr); } #undef RX_CMN_STAT_INC #undef RX_PHY_ERR_INC }
void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) { #define RX_STAT_INC(c) sc->debug.stats.rxstats.c++ #define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++ u32 phyerr; if (rs->rs_status & ATH9K_RXERR_CRC) RX_STAT_INC(crc_err); if (rs->rs_status & ATH9K_RXERR_DECRYPT) RX_STAT_INC(decrypt_crc_err); if (rs->rs_status & ATH9K_RXERR_MIC) RX_STAT_INC(mic_err); if (rs->rs_status & ATH9K_RX_DELIM_CRC_PRE) RX_STAT_INC(pre_delim_crc_err); if (rs->rs_status & ATH9K_RX_DELIM_CRC_POST) RX_STAT_INC(post_delim_crc_err); if (rs->rs_status & ATH9K_RX_DECRYPT_BUSY) RX_STAT_INC(decrypt_busy_err); if (rs->rs_status & ATH9K_RXERR_PHY) { RX_STAT_INC(phy_err); phyerr = rs->rs_phyerr & 0x24; RX_PHY_ERR_INC(phyerr); } #undef RX_STAT_INC #undef RX_PHY_ERR_INC }