diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2020-12-08 17:27:24 +0000 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2020-12-08 17:27:24 +0000 |
| commit | 68545bc4334146efe59fb03d2fe69ca6e611885d (patch) | |
| tree | a7b44aa6259ed577223e22c50fe40e67a22fb158 /sys/dev | |
| parent | 2511069a3f78bfa126b2a32eaf6c2589bb57aa61 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ath/if_ath_rx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index f8e13b32ab57..58da21f09638 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -706,8 +706,11 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, ath_dfs_process_phy_err(sc, m, rstamp, rs); } - /* Be suitably paranoid about receiving phy errors out of the stats array bounds */ - if (rs->rs_phyerr < 64) + /* + * Be suitably paranoid about receiving phy errors + * out of the stats array bounds + */ + if (rs->rs_phyerr < ATH_IOCTL_STATS_NUM_RX_PHYERR) sc->sc_stats.ast_rx_phy[rs->rs_phyerr]++; goto rx_error; /* NB: don't count in ierrors */ } @@ -835,7 +838,7 @@ rx_accept: * the majority of the statistics are only valid * for the last frame in an aggregate. */ - if (rs->rs_antenna > 7) { + if (rs->rs_antenna >= ATH_IOCTL_STATS_NUM_RX_ANTENNA) { device_printf(sc->sc_dev, "%s: rs_antenna > 7 (%d)\n", __func__, rs->rs_antenna); #ifdef ATH_DEBUG |
