diff options
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r-- | sys/dev/ppbus/if_plip.c | 22 |
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); } |