diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-09-19 09:20:16 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-09-19 09:20:16 +0000 |
commit | 6625a4852535031ec9a9d3ae8049f8d8af177a5b (patch) | |
tree | 26bfad385bcbaefac7dd237672fa8bff341dee03 /sys/arm/xscale | |
parent | d8cc52c9a1c282e6c358c588974656cb0414f731 (diff) | |
download | src-6625a4852535031ec9a9d3ae8049f8d8af177a5b.tar.gz src-6625a4852535031ec9a9d3ae8049f8d8af177a5b.zip |
Mechanically convert to if_inc_counter().
Notes
Notes:
svn path=/head/; revision=271859
Diffstat (limited to 'sys/arm/xscale')
-rw-r--r-- | sys/arm/xscale/ixp425/if_npe.c | 32 |
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 d031de674230..d6db7e6134fd 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); } |