diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-09-19 03:51:26 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-09-19 03:51:26 +0000 |
commit | c8dfaf382fa6df9dc6fd1e1c3356e0c8bf607e6a (patch) | |
tree | 6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/le/am7990.c | |
parent | d3c24fcffe1e1fab13dd9763580f96fac214e36d (diff) |
Notes
Diffstat (limited to 'sys/dev/le/am7990.c')
-rw-r--r-- | sys/dev/le/am7990.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/le/am7990.c b/sys/dev/le/am7990.c index d74d3b8362649..a21be28a4c13b 100644 --- a/sys/dev/le/am7990.c +++ b/sys/dev/le/am7990.c @@ -272,7 +272,7 @@ am7990_rint(struct lance_softc *sc) bix = 0; if (m != NULL) { - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #ifdef LANCE_REVC_BUG /* @@ -296,7 +296,7 @@ am7990_rint(struct lance_softc *sc) (*ifp->if_input)(ifp, m); LE_LOCK(sc); } else - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); } sc->sc_last_rd = bix; @@ -352,22 +352,22 @@ am7990_tint(struct lance_softc *sc) if_printf(ifp, "lost carrier\n"); } if (tmd.tmd3 & LE_T3_LCOL) - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); if (tmd.tmd3 & LE_T3_RTRY) { #ifdef LEDEBUG if_printf(ifp, "excessive collisions, tdr %d\n", tmd.tmd3 & LE_T3_TDR_MASK); #endif - ifp->if_collisions += 16; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 16); } - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } else { if (tmd.tmd1_bits & LE_T1_ONE) - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); else if (tmd.tmd1_bits & LE_T1_MORE) /* Real number is unknown. */ - ifp->if_collisions += 2; - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 2); + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); } if (++bix == sc->sc_ntbuf) @@ -394,7 +394,7 @@ am7990_intr(void *arg) LE_LOCK(sc); if (sc->sc_hwintr && (*sc->sc_hwintr)(sc) == -1) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); lance_init_locked(sc); LE_UNLOCK(sc); return; @@ -426,19 +426,19 @@ am7990_intr(void *arg) #ifdef LEDEBUG if_printf(ifp, "babble\n"); #endif - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } #if 0 if (isr & LE_C0_CERR) { if_printf(ifp, "collision error\n"); - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); } #endif if (isr & LE_C0_MISS) { #ifdef LEDEBUG if_printf(ifp, "missed packet\n"); #endif - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); } if (isr & LE_C0_MERR) { if_printf(ifp, "memory error\n"); @@ -450,14 +450,14 @@ am7990_intr(void *arg) if ((isr & LE_C0_RXON) == 0) { if_printf(ifp, "receiver disabled\n"); - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); lance_init_locked(sc); LE_UNLOCK(sc); return; } if ((isr & LE_C0_TXON) == 0) { if_printf(ifp, "transmitter disabled\n"); - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); lance_init_locked(sc); LE_UNLOCK(sc); return; |