summaryrefslogtreecommitdiffstats
path: root/sys/mips/idt/if_kr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/mips/idt/if_kr.c')
-rw-r--r--sys/mips/idt/if_kr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/mips/idt/if_kr.c b/sys/mips/idt/if_kr.c
index fdd60ea..4b5d3bf 100644
--- a/sys/mips/idt/if_kr.c
+++ b/sys/mips/idt/if_kr.c
@@ -1395,13 +1395,13 @@ kr_tx(struct kr_softc *sc)
txd = &sc->kr_cdata.kr_txdesc[cons];
if (devcs & KR_DMATX_DEVCS_TOK)
- ifp->if_opackets++;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
else {
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
/* collisions: medium busy, late collision */
if ((devcs & KR_DMATX_DEVCS_EC) ||
(devcs & KR_DMATX_DEVCS_LC))
- ifp->if_collisions++;
+ if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
}
bus_dmamap_sync(sc->kr_cdata.kr_tx_tag, txd->tx_dmamap,
@@ -1460,11 +1460,11 @@ kr_rx(struct kr_softc *sc)
error = 1;
if (packet_len != count)
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
else if (count < 64)
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
else if ((cur_rx->kr_devcs & KR_DMARX_DEVCS_LD) == 0)
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
else if ((cur_rx->kr_devcs & KR_DMARX_DEVCS_ROK) != 0) {
error = 0;
bus_dmamap_sync(sc->kr_cdata.kr_rx_tag, rxd->rx_dmamap,
@@ -1474,7 +1474,7 @@ kr_rx(struct kr_softc *sc)
m->m_pkthdr.rcvif = ifp;
/* Skip 4 bytes of CRC */
m->m_pkthdr.len = m->m_len = packet_len - ETHER_CRC_LEN;
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
KR_UNLOCK(sc);
(*ifp->if_input)(ifp, m);
OpenPOWER on IntegriCloud