summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
committerglebius <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
commitb3b337a80e78f4cc2d0c75f98e4685bee9c749c9 (patch)
tree6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/ppbus
parent094cca2b36ac9809749d6a0b76bcd37556939c00 (diff)
downloadFreeBSD-src-b3b337a80e78f4cc2d0c75f98e4685bee9c749c9.zip
FreeBSD-src-b3b337a80e78f4cc2d0c75f98e4685bee9c749c9.tar.gz
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r--sys/dev/ppbus/if_plip.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index dbc5183..93a0da1 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -576,8 +576,8 @@ lp_intr(void *arg)
sc->sc_iferrs = 0;
len -= CLPIPHDRLEN;
- sc->sc_ifp->if_ipackets++;
- sc->sc_ifp->if_ibytes += len;
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_IPACKETS, 1);
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_IBYTES, len);
top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, sc->sc_ifp,
0);
if (top) {
@@ -630,8 +630,8 @@ lp_intr(void *arg)
sc->sc_iferrs = 0;
len -= LPIPHDRLEN;
- sc->sc_ifp->if_ipackets++;
- sc->sc_ifp->if_ibytes += len;
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_IPACKETS, 1);
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_IBYTES, len);
top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, sc->sc_ifp,
0);
if (top) {
@@ -651,7 +651,7 @@ lp_intr(void *arg)
err:
ppb_wdtr(ppbus, 0);
lprintf("R");
- sc->sc_ifp->if_ierrors++;
+ if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1);
sc->sc_iferrs++;
/*
@@ -768,11 +768,11 @@ lpoutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
nend:
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
if (err) { /* if we didn't timeout... */
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
lprintf("X");
} else {
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+ if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len);
if (bpf_peers_present(ifp->if_bpf))
lptap(ifp, m);
}
@@ -814,11 +814,11 @@ end:
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
if (err) { /* if we didn't timeout... */
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
lprintf("X");
} else {
- ifp->if_opackets++;
- ifp->if_obytes += m->m_pkthdr.len;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+ if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len);
if (bpf_peers_present(ifp->if_bpf))
lptap(ifp, m);
}
OpenPOWER on IntegriCloud