summaryrefslogtreecommitdiff
path: root/sys/dev/ed
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
commitc8dfaf382fa6df9dc6fd1e1c3356e0c8bf607e6a (patch)
tree6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/ed
parentd3c24fcffe1e1fab13dd9763580f96fac214e36d (diff)
Notes
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index eec895488843..46524dd9d6b8 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -485,7 +485,7 @@ ed_watchdog(struct ed_softc *sc)
ifp = sc->ifp;
log(LOG_ERR, "%s: device timeout\n", ifp->if_xname);
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
ed_reset(ifp);
}
@@ -900,7 +900,7 @@ ed_rint(struct ed_softc *sc)
*/
ed_get_packet(sc, packet_ptr + sizeof(struct ed_ring),
len - sizeof(struct ed_ring));
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
} else {
/*
* Really BAD. The ring pointers are corrupted.
@@ -908,7 +908,7 @@ ed_rint(struct ed_softc *sc)
log(LOG_ERR,
"%s: NIC memory corrupt - invalid packet length %d\n",
ifp->if_xname, len);
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
ed_reset(ifp);
return;
}
@@ -1055,14 +1055,14 @@ edintr(void *arg)
/*
* update output errors counter
*/
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
} else {
/*
* Update total number of successfully
* transmitted packets.
*/
- ifp->if_opackets++;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
}
/*
@@ -1080,7 +1080,7 @@ edintr(void *arg)
* Add in total number of collisions on last
* transmission.
*/
- ifp->if_collisions += collisions;
+ if_inc_counter(ifp, IFCOUNTER_COLLISIONS, collisions);
switch(collisions) {
case 0:
case 16:
@@ -1123,7 +1123,7 @@ edintr(void *arg)
* fixed in later revs. -DG
*/
if (isr & ED_ISR_OVW) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
#ifdef DIAGNOSTIC
log(LOG_WARNING,
"%s: warning - receiver ring buffer overrun\n",
@@ -1150,7 +1150,7 @@ edintr(void *arg)
sc->mibdata.dot3StatsAlignmentErrors++;
if (rsr & ED_RSR_FO)
sc->mibdata.dot3StatsInternalMacReceiveErrors++;
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
#ifdef ED_DEBUG
if_printf(ifp, "receive error %x\n",
ed_nic_inb(sc, ED_P0_RSR));