summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-11-13 05:35:07 +0000
committersam <sam@FreeBSD.org>2003-11-13 05:35:07 +0000
commite8341ffbdf71a3aeba7845d00d247a7ffcd7c1b6 (patch)
treeca630cb0d4689646a9054ba72ea2db79ec7b4cf5 /sys/dev/ath
parent5bdb94b83897181357935dfd40c365aa2a5300ac (diff)
downloadFreeBSD-src-e8341ffbdf71a3aeba7845d00d247a7ffcd7c1b6.zip
FreeBSD-src-e8341ffbdf71a3aeba7845d00d247a7ffcd7c1b6.tar.gz
Don't count PHY errors as input errors. This is important for
5212-based devices because PHY errors are used to collect data on environmental noise that and doesn't truly reflect the state of the communications media. The result is confused users. Folks that want to watch PHY errors can still get the statistics through the device ioctl (used by athstats).
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index f1f8154..402f967 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -1633,7 +1633,6 @@ ath_rx_proc(void *arg, int npending)
break;
TAILQ_REMOVE(&sc->sc_rxbuf, bf, bf_list);
if (ds->ds_rxstat.rs_status != 0) {
- ifp->if_ierrors++;
if (ds->ds_rxstat.rs_status & HAL_RXERR_CRC)
sc->sc_stats.ast_rx_crcerr++;
if (ds->ds_rxstat.rs_status & HAL_RXERR_FIFO)
@@ -1644,6 +1643,15 @@ ath_rx_proc(void *arg, int npending)
sc->sc_stats.ast_rx_phyerr++;
phyerr = ds->ds_rxstat.rs_phyerr & 0x1f;
sc->sc_stats.ast_rx_phy[phyerr]++;
+ } else {
+ /*
+ * NB: don't count PHY errors as input errors;
+ * we enable them on the 5212 to collect info
+ * about environmental noise and, in that
+ * setting, they don't really reflect tx/rx
+ * errors.
+ */
+ ifp->if_ierrors++;
}
goto rx_next;
}
OpenPOWER on IntegriCloud