diff options
author | glebius <glebius@FreeBSD.org> | 2014-09-18 20:43:17 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-09-18 20:43:17 +0000 |
commit | 64731c3f2e5956e995917ed30dba6740cd3f6ef7 (patch) | |
tree | fcffe2ce42dcf20a67dc8215216ede8f84d08d9b /sys/dev/snc | |
parent | baa1e8e7cc94c844af439a8aee76247791276b37 (diff) | |
download | FreeBSD-src-64731c3f2e5956e995917ed30dba6740cd3f6ef7.zip FreeBSD-src-64731c3f2e5956e995917ed30dba6740cd3f6ef7.tar.gz |
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/dev/snc')
-rw-r--r-- | sys/dev/snc/dp83932.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c index 6178977..d4e062a 100644 --- a/sys/dev/snc/dp83932.c +++ b/sys/dev/snc/dp83932.c @@ -369,7 +369,7 @@ outloop: sc->mtd_prev = sc->mtd_free; sc->mtd_free = mtd_next; - ifp->if_opackets++; /* # of pkts */ + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); /* # of pkts */ /* Jump back for possibly more punishment. */ goto outloop; @@ -935,11 +935,12 @@ sonictxint(struct snc_softc *sc) txp_status = SRO(sc, txp, TXP_STATUS); - ifp->if_collisions += (txp_status & TCR_EXC) ? 16 : - ((txp_status & TCR_NC) >> 12); + if_inc_counter(ifp, IFCOUNTER_COLLISIONS, + (txp_status & TCR_EXC) ? 16 : + ((txp_status & TCR_NC) >> 12)); if ((txp_status & TCR_PTX) == 0) { - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); device_printf(sc->sc_dev, "Tx packet status=0x%x\n", txp_status); @@ -989,11 +990,11 @@ sonicrxint(struct snc_softc *sc) u_int32_t pkt = sc->rbuf[orra & RBAMASK] + (rxpkt_ptr & PAGE_MASK); if (sonic_read(sc, pkt, len)) - sc->sc_ifp->if_ipackets++; + if_inc_counter(sc->sc_ifp, IFCOUNTER_IPACKETS, 1); else - sc->sc_ifp->if_ierrors++; + if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1); } else - sc->sc_ifp->if_ierrors++; + if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1); /* * give receive buffer area back to chip. |