summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/fxp/if_fxp.c')
-rw-r--r--sys/dev/fxp/if_fxp.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 4b288bc9..48bf8e9 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -2012,7 +2012,7 @@ fxp_intr_body(struct fxp_softc *sc, if_t ifp, uint8_t statack,
return (rx_npkts);
} else {
/* Reuse RFA and loaded DMA map. */
- if_inciqdrops(ifp, 1);
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
fxp_discard_rfabuf(sc, rxp);
}
fxp_add_rfabuf(sc, rxp);
@@ -2070,10 +2070,12 @@ fxp_update_stats(struct fxp_softc *sc)
hsp->tx_tco += le16toh(sp->tx_tco);
hsp->rx_tco += le16toh(sp->rx_tco);
- if_incopackets(ifp, le32toh(sp->tx_good));
- if_inccollisions(ifp, le32toh(sp->tx_total_collisions));
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, le32toh(sp->tx_good));
+ if_inc_counter(ifp, IFCOUNTER_COLLISIONS,
+ le32toh(sp->tx_total_collisions));
if (sp->rx_good) {
- if_incipackets(ifp, le32toh(sp->rx_good));
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS,
+ le32toh(sp->rx_good));
sc->rx_idle_secs = 0;
} else if (sc->flags & FXP_FLAG_RXBUG) {
/*
@@ -2081,7 +2083,7 @@ fxp_update_stats(struct fxp_softc *sc)
*/
sc->rx_idle_secs++;
}
- if_incierrors(ifp,
+ if_inc_counter(ifp, IFCOUNTER_IERRORS,
le32toh(sp->rx_crc_errors) +
le32toh(sp->rx_alignment_errors) +
le32toh(sp->rx_rnr_errors) +
@@ -2091,7 +2093,8 @@ fxp_update_stats(struct fxp_softc *sc)
* threshold by another 512 bytes (64 * 8).
*/
if (sp->tx_underruns) {
- if_incoerrors(ifp, le32toh(sp->tx_underruns));
+ if_inc_counter(ifp, IFCOUNTER_OERRORS,
+ le32toh(sp->tx_underruns));
if (tx_threshold < 192)
tx_threshold += 64;
}
@@ -2244,7 +2247,7 @@ fxp_watchdog(struct fxp_softc *sc)
return;
device_printf(sc->dev, "device timeout\n");
- if_incoerrors(ifp, 1);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING);
fxp_init_body(sc, 1);
OpenPOWER on IntegriCloud