summaryrefslogtreecommitdiffstats
path: root/sys/dev/nfe/if_nfe.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2013-10-04 02:21:39 +0000
committeryongari <yongari@FreeBSD.org>2013-10-04 02:21:39 +0000
commite1fc8db7f4a9e657f4a1f9a4ea365414aee5f4e3 (patch)
treebab53d2e311ddc5806d3859bd20c9a4490d71773 /sys/dev/nfe/if_nfe.c
parent6b64ef7266faf590b6c21b48b942940be4dca877 (diff)
downloadFreeBSD-src-e1fc8db7f4a9e657f4a1f9a4ea365414aee5f4e3.zip
FreeBSD-src-e1fc8db7f4a9e657f4a1f9a4ea365414aee5f4e3.tar.gz
Fix clearing MAC stats registers. Previously it cleared every
fourth register. Submitted by: Paul A. Patience <paul-a.patience@polymtl.ca> Approved by: re (gjb)
Diffstat (limited to 'sys/dev/nfe/if_nfe.c')
-rw-r--r--sys/dev/nfe/if_nfe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/nfe/if_nfe.c b/sys/dev/nfe/if_nfe.c
index 3bcda25..6c87a2a 100644
--- a/sys/dev/nfe/if_nfe.c
+++ b/sys/dev/nfe/if_nfe.c
@@ -3205,8 +3205,8 @@ nfe_stats_clear(struct nfe_softc *sc)
else
return;
- for (i = 0; i < mib_cnt; i += sizeof(uint32_t))
- NFE_READ(sc, NFE_TX_OCTET + i);
+ for (i = 0; i < mib_cnt; i++)
+ NFE_READ(sc, NFE_TX_OCTET + i * sizeof(uint32_t));
if ((sc->nfe_flags & NFE_MIB_V3) != 0) {
NFE_READ(sc, NFE_TX_UNICAST);
OpenPOWER on IntegriCloud