diff options
author | glebius <glebius@FreeBSD.org> | 2014-09-19 03:51:26 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-09-19 03:51:26 +0000 |
commit | b3b337a80e78f4cc2d0c75f98e4685bee9c749c9 (patch) | |
tree | 6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/sbni | |
parent | 094cca2b36ac9809749d6a0b76bcd37556939c00 (diff) | |
download | FreeBSD-src-b3b337a80e78f4cc2d0c75f98e4685bee9c749c9.zip FreeBSD-src-b3b337a80e78f4cc2d0c75f98e4685bee9c749c9.tar.gz |
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/dev/sbni')
-rw-r--r-- | sys/dev/sbni/if_sbni.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/sbni/if_sbni.c b/sys/dev/sbni/if_sbni.c index 8a4ce2e..c459ded 100644 --- a/sys/dev/sbni/if_sbni.c +++ b/sys/dev/sbni/if_sbni.c @@ -612,7 +612,7 @@ upload_data(struct sbni_softc *sc, u_int framelen, u_int frameno, } else if ((frame_ok = skip_tail(sc, framelen, crc)) != 0) { sc->wait_frameno = 0; sc->inppos = 0; - sc->ifp->if_ierrors++; + if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); /* now skip all frames until is_first != 0 */ } } else @@ -624,7 +624,7 @@ upload_data(struct sbni_softc *sc, u_int framelen, u_int frameno, * is_first already... Drop entire packet. */ sc->wait_frameno = 0; - sc->ifp->if_ierrors++; + if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); } return (frame_ok); @@ -638,7 +638,7 @@ send_complete(struct sbni_softc *sc) { m_freem(sc->tx_buf_p); sc->tx_buf_p = NULL; - sc->ifp->if_opackets++; + if_inc_counter(sc->ifp, IFCOUNTER_OPACKETS, 1); } @@ -689,7 +689,7 @@ append_frame_to_pkt(struct sbni_softc *sc, u_int framelen, u_int32_t crc) sc->inppos += framelen - 4; if (--sc->wait_frameno == 0) { /* last frame received */ indicate_pkt(sc); - sc->ifp->if_ipackets++; + if_inc_counter(sc->ifp, IFCOUNTER_IPACKETS, 1); } return (1); @@ -755,7 +755,7 @@ drop_xmit_queue(struct sbni_softc *sc) if (sc->tx_buf_p) { m_freem(sc->tx_buf_p); sc->tx_buf_p = NULL; - sc->ifp->if_oerrors++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); } for (;;) { @@ -763,7 +763,7 @@ drop_xmit_queue(struct sbni_softc *sc) if (m == NULL) break; m_freem(m); - sc->ifp->if_oerrors++; + if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, 1); } sc->tx_frameno = 0; |