summaryrefslogtreecommitdiffstats
path: root/sys/dev/tl
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-18 20:03:45 +0000
committerglebius <glebius@FreeBSD.org>2014-09-18 20:03:45 +0000
commita041b8fd721460f37fd448d0cf5fab627bfb38e7 (patch)
treefdb2fcce628a7367a70b80b251829628bc8f7997 /sys/dev/tl
parent7ce047b163097b79f6e4df095a1d464b32798a00 (diff)
downloadFreeBSD-src-a041b8fd721460f37fd448d0cf5fab627bfb38e7.zip
FreeBSD-src-a041b8fd721460f37fd448d0cf5fab627bfb38e7.tar.gz
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/dev/tl')
-rw-r--r--sys/dev/tl/if_tl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/tl/if_tl.c b/sys/dev/tl/if_tl.c
index 754c945..8535b04 100644
--- a/sys/dev/tl/if_tl.c
+++ b/sys/dev/tl/if_tl.c
@@ -1430,7 +1430,7 @@ tl_intvec_rxeof(xsc, type)
total_len = cur_rx->tl_ptr->tlist_frsize;
if (tl_newbuf(sc, cur_rx) == ENOBUFS) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
cur_rx->tl_ptr->tlist_frsize = MCLBYTES;
cur_rx->tl_ptr->tlist_cstat = TL_CSTAT_READY;
cur_rx->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES;
@@ -1726,13 +1726,13 @@ tl_stats_update(xsc)
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
*p++ = CSR_READ_4(sc, TL_DIO_DATA);
- ifp->if_opackets += tl_tx_goodframes(tl_stats);
- ifp->if_collisions += tl_stats.tl_tx_single_collision +
- tl_stats.tl_tx_multi_collision;
- ifp->if_ipackets += tl_rx_goodframes(tl_stats);
- ifp->if_ierrors += tl_stats.tl_crc_errors + tl_stats.tl_code_errors +
- tl_rx_overrun(tl_stats);
- ifp->if_oerrors += tl_tx_underrun(tl_stats);
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, tl_tx_goodframes(tl_stats));
+ if_inc_counter(ifp, IFCOUNTER_COLLISIONS,
+ tl_stats.tl_tx_single_collision + tl_stats.tl_tx_multi_collision);
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, tl_rx_goodframes(tl_stats));
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, tl_stats.tl_crc_errors +
+ tl_stats.tl_code_errors + tl_rx_overrun(tl_stats));
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, tl_tx_underrun(tl_stats));
if (tl_tx_underrun(tl_stats)) {
u_int8_t tx_thresh;
@@ -2186,7 +2186,7 @@ tl_watchdog(sc)
if_printf(ifp, "device timeout\n");
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
tl_softreset(sc, 1);
tl_init_locked(sc);
OpenPOWER on IntegriCloud