diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-09-19 03:51:26 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-09-19 03:51:26 +0000 |
| commit | c8dfaf382fa6df9dc6fd1e1c3356e0c8bf607e6a (patch) | |
| tree | 6899fa7510de1719ea0a76790446b61cd2d300fe /sys/dev/cx | |
| parent | d3c24fcffe1e1fab13dd9763580f96fac214e36d (diff) | |
Notes
Diffstat (limited to 'sys/dev/cx')
| -rw-r--r-- | sys/dev/cx/if_cx.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 83cac320530a..5ec4b8e9aaf9 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -1251,7 +1251,7 @@ static void cx_transmit (cx_chan_t *c, void *attachment, int len) } d->timeout = 0; #ifndef NETGRAPH - ++d->ifp->if_opackets; + if_inc_counter(d->ifp, IFCOUNTER_OPACKETS, 1); d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; #endif cx_start (d); @@ -1304,7 +1304,7 @@ static void cx_receive (cx_chan_t *c, char *data, int len) if (! m) { CX_DEBUG (d, ("no memory for packet\n")); #ifndef NETGRAPH - ++d->ifp->if_iqdrops; + if_inc_counter(d->ifp, IFCOUNTER_IQDROPS, 1); #endif return; } @@ -1314,7 +1314,7 @@ static void cx_receive (cx_chan_t *c, char *data, int len) m->m_pkthdr.rcvif = 0; NG_SEND_DATA_ONLY (error, d->hook, m); #else - ++d->ifp->if_ipackets; + if_inc_counter(d->ifp, IFCOUNTER_IPACKETS, 1); m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ @@ -1357,7 +1357,7 @@ static void cx_error (cx_chan_t *c, int data) } #ifndef NETGRAPH else - ++d->ifp->if_ierrors; + if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1); #endif break; case CX_CRC: @@ -1374,7 +1374,7 @@ static void cx_error (cx_chan_t *c, int data) } #ifndef NETGRAPH else - ++d->ifp->if_ierrors; + if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1); #endif break; case CX_OVERRUN: @@ -1391,8 +1391,8 @@ static void cx_error (cx_chan_t *c, int data) #endif #ifndef NETGRAPH else { - ++d->ifp->if_collisions; - ++d->ifp->if_ierrors; + if_inc_counter(d->ifp, IFCOUNTER_COLLISIONS, 1); + if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1); } #endif break; @@ -1400,7 +1400,7 @@ static void cx_error (cx_chan_t *c, int data) CX_DEBUG (d, ("overflow error\n")); #ifndef NETGRAPH if (c->mode != M_ASYNC) - ++d->ifp->if_ierrors; + if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1); #endif break; case CX_UNDERRUN: @@ -1408,7 +1408,7 @@ static void cx_error (cx_chan_t *c, int data) if (c->mode != M_ASYNC) { d->timeout = 0; #ifndef NETGRAPH - ++d->ifp->if_oerrors; + if_inc_counter(d->ifp, IFCOUNTER_OERRORS, 1); d->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; #endif cx_start (d); @@ -1427,7 +1427,7 @@ static void cx_error (cx_chan_t *c, int data) } #ifndef NETGRAPH else - ++d->ifp->if_ierrors; + if_inc_counter(d->ifp, IFCOUNTER_IERRORS, 1); #endif break; default: |
