diff options
Diffstat (limited to 'sys/dev/le')
| -rw-r--r-- | sys/dev/le/am7990.c | 28 | ||||
| -rw-r--r-- | sys/dev/le/am79900.c | 28 | ||||
| -rw-r--r-- | sys/dev/le/lance.c | 2 |
3 files changed, 29 insertions, 29 deletions
diff --git a/sys/dev/le/am7990.c b/sys/dev/le/am7990.c index d74d3b836264..a21be28a4c13 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; diff --git a/sys/dev/le/am79900.c b/sys/dev/le/am79900.c index 08449e5991c9..5ea82284535c 100644 --- a/sys/dev/le/am79900.c +++ b/sys/dev/le/am79900.c @@ -313,7 +313,7 @@ am79900_rint(struct lance_softc *sc) bix = 0; if (m != NULL) { - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if defined(__i386__) && !defined(PC98) /* @@ -333,7 +333,7 @@ am79900_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; @@ -391,21 +391,21 @@ am79900_tint(struct lance_softc *sc) if_printf(ifp, "lost carrier\n"); } if (tmd2 & LE_T2_LCOL) - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); if (tmd2 & LE_T2_RTRY) { #ifdef LEDEBUG if_printf(ifp, "excessive collisions\n"); #endif - ifp->if_collisions += 16; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 16); } - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } else { if (tmd1 & LE_T1_ONE) - ifp->if_collisions++; + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1); else if (tmd1 & 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) @@ -432,7 +432,7 @@ am79900_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; @@ -464,19 +464,19 @@ am79900_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"); @@ -488,14 +488,14 @@ am79900_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; diff --git a/sys/dev/le/lance.c b/sys/dev/le/lance.c index 2a2b0e0fa956..38be317aa577 100644 --- a/sys/dev/le/lance.c +++ b/sys/dev/le/lance.c @@ -446,7 +446,7 @@ lance_watchdog(void *xsc) } if_printf(ifp, "device timeout\n"); - ++ifp->if_oerrors; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); lance_init_locked(sc); } |
