aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/altera
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-09-19 03:51:26 +0000
commitc8dfaf382fa6df9dc6fd1e1c3356e0c8bf607e6a (patch)
tree6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/altera
parentd3c24fcffe1e1fab13dd9763580f96fac214e36d (diff)
Notes
Diffstat (limited to 'sys/dev/altera')
-rw-r--r--sys/dev/altera/atse/if_atse.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/altera/atse/if_atse.c b/sys/dev/altera/atse/if_atse.c
index c3708918cc6a..1c55fbc9666b 100644
--- a/sys/dev/altera/atse/if_atse.c
+++ b/sys/dev/altera/atse/if_atse.c
@@ -1159,7 +1159,7 @@ atse_watchdog(struct atse_softc *sc)
return;
device_printf(sc->atse_dev, "watchdog timeout\n");
- sc->atse_ifp->if_oerrors++;
+ if_inc_counter(sc->atse_ifp, IFCOUNTER_OERRORS, 1);
atse_intr_debug(sc, "poll");
@@ -1263,7 +1263,7 @@ outer:
atse_update_rx_err(sc, ((meta &
A_ONCHIP_FIFO_MEM_CORE_ERROR_MASK) >>
A_ONCHIP_FIFO_MEM_CORE_ERROR_SHIFT) & 0xff);
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
sc->atse_rx_buf_len = 0;
/*
* Should still read till EOP or next SOP.
@@ -1292,7 +1292,7 @@ outer:
"without empty buffer: %u\n",
__func__, sc->atse_rx_buf_len);
/* XXX-BZ any better counter? */
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
}
if ((sc->atse_flags & ATSE_FLAGS_SOP_SEEN) == 0)
@@ -1311,7 +1311,7 @@ outer:
* XXX-BZ Error. We need more mbufs and are
* not setup for this yet.
*/
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
sc->atse_flags |= ATSE_FLAGS_ERROR;
}
if ((sc->atse_flags & ATSE_FLAGS_ERROR) == 0)
@@ -1330,7 +1330,7 @@ outer:
A_ONCHIP_FIFO_MEM_CORE_EMPTY_SHIFT;
sc->atse_rx_buf_len += (4 - empty);
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
rx_npkts++;
m = sc->atse_rx_m;
@@ -1414,7 +1414,7 @@ atse_rx_intr(void *arg)
atse_update_rx_err(sc, ((rxe &
A_ONCHIP_FIFO_MEM_CORE_ERROR_MASK) >>
A_ONCHIP_FIFO_MEM_CORE_ERROR_SHIFT) & 0xff);
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
}
/*
@@ -1469,7 +1469,7 @@ atse_tx_intr(void *arg)
if (txe & (A_ONCHIP_FIFO_MEM_CORE_EVENT_OVERFLOW|
A_ONCHIP_FIFO_MEM_CORE_EVENT_UNDERFLOW)) {
/* XXX-BZ ERROR HANDLING. */
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
}
/*
@@ -1527,12 +1527,12 @@ atse_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
atse_update_rx_err(sc, ((rx &
A_ONCHIP_FIFO_MEM_CORE_ERROR_MASK) >>
A_ONCHIP_FIFO_MEM_CORE_ERROR_SHIFT) & 0xff);
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
}
if (tx & (A_ONCHIP_FIFO_MEM_CORE_EVENT_OVERFLOW|
A_ONCHIP_FIFO_MEM_CORE_EVENT_UNDERFLOW)) {
/* XXX-BZ ERROR HANDLING. */
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
}
if (ATSE_TX_READ_FILL_LEVEL(sc) == 0)
sc->atse_watchdog_timer = 0;