summaryrefslogtreecommitdiffstats
path: root/sys/arm/xscale
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-19 09:20:16 +0000
committerglebius <glebius@FreeBSD.org>2014-09-19 09:20:16 +0000
commit38c3245a7b8abf2b897f119629d4ea64718cc058 (patch)
tree26bfad385bcbaefac7dd237672fa8bff341dee03 /sys/arm/xscale
parent375a1fa081404668444c555c04bcfb9fb8e988ff (diff)
downloadFreeBSD-src-38c3245a7b8abf2b897f119629d4ea64718cc058.zip
FreeBSD-src-38c3245a7b8abf2b897f119629d4ea64718cc058.tar.gz
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/arm/xscale')
-rw-r--r--sys/arm/xscale/ixp425/if_npe.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/sys/arm/xscale/ixp425/if_npe.c b/sys/arm/xscale/ixp425/if_npe.c
index d031de6..d6db7e6 100644
--- a/sys/arm/xscale/ixp425/if_npe.c
+++ b/sys/arm/xscale/ixp425/if_npe.c
@@ -906,20 +906,18 @@ npe_addstats(struct npe_softc *sc)
be32toh(ns->RxOverrunDiscards)
+ be32toh(ns->RxUnderflowEntryDiscards);
- ifp->if_oerrors +=
- be32toh(ns->dot3StatsInternalMacTransmitErrors)
- + be32toh(ns->dot3StatsCarrierSenseErrors)
- + be32toh(ns->TxVLANIdFilterDiscards)
- ;
- ifp->if_ierrors += be32toh(ns->dot3StatsFCSErrors)
- + be32toh(ns->dot3StatsInternalMacReceiveErrors)
- + be32toh(ns->RxOverrunDiscards)
- + be32toh(ns->RxUnderflowEntryDiscards)
- ;
- ifp->if_collisions +=
- be32toh(ns->dot3StatsSingleCollisionFrames)
- + be32toh(ns->dot3StatsMultipleCollisionFrames)
- ;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS,
+ be32toh(ns->dot3StatsInternalMacTransmitErrors) +
+ be32toh(ns->dot3StatsCarrierSenseErrors) +
+ be32toh(ns->TxVLANIdFilterDiscards));
+ if_inc_counter(ifp, IFCOUNTER_IERRORS,
+ be32toh(ns->dot3StatsFCSErrors) +
+ be32toh(ns->dot3StatsInternalMacReceiveErrors) +
+ be32toh(ns->RxOverrunDiscards) +
+ be32toh(ns->RxUnderflowEntryDiscards));
+ if_inc_counter(ifp, IFCOUNTER_COLLISIONS,
+ be32toh(ns->dot3StatsSingleCollisionFrames) +
+ be32toh(ns->dot3StatsMultipleCollisionFrames));
#undef NPEADD
#undef MIBADD
}
@@ -999,7 +997,7 @@ npe_txdone_finish(struct npe_softc *sc, const struct txdone *td)
* We're no longer busy, so clear the busy flag and call the
* start routine to xmit more packets.
*/
- ifp->if_opackets += td->count;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, td->count);
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
sc->npe_watchdog_timer = 0;
npestart_locked(ifp);
@@ -1138,7 +1136,7 @@ npe_rxdone(int qid, void *arg)
mrx->m_pkthdr.len = mrx->m_len;
mrx->m_pkthdr.rcvif = ifp;
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
ifp->if_input(ifp, mrx);
rx_npkts++;
} else {
@@ -1467,7 +1465,7 @@ npewatchdog(struct npe_softc *sc)
return;
device_printf(sc->sc_dev, "watchdog timeout\n");
- sc->sc_ifp->if_oerrors++;
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1);
npeinit_locked(sc);
}
OpenPOWER on IntegriCloud