aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/net/if_urndis.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-09-18 21:09:22 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-09-18 21:09:22 +0000
commitecc70d3f9ec7355c71a81d9b55165e9a10b9d4a1 (patch)
tree31b5d7e2001c7e6dc8165d6f0b9a1dcf19a73e2e /sys/dev/usb/net/if_urndis.c
parentf98131f8818089dccaeacd18e0b9c5343f500cd6 (diff)
downloadsrc-ecc70d3f9ec7355c71a81d9b55165e9a10b9d4a1.tar.gz
src-ecc70d3f9ec7355c71a81d9b55165e9a10b9d4a1.zip
Mechanically convert to if_inc_counter().
Notes
Notes: svn path=/head/; revision=271832
Diffstat (limited to 'sys/dev/usb/net/if_urndis.c')
-rw-r--r--sys/dev/usb/net/if_urndis.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/net/if_urndis.c b/sys/dev/usb/net/if_urndis.c
index 5b4f8ac046b1..5d45395d46c6 100644
--- a/sys/dev/usb/net/if_urndis.c
+++ b/sys/dev/usb/net/if_urndis.c
@@ -844,12 +844,12 @@ urndis_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
rm_dataoffset), actlen);
goto tr_setup;
} else if (msg.rm_datalen < (uint32_t)sizeof(struct ether_header)) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
DPRINTF("invalid ethernet size "
"%u < %u\n", msg.rm_datalen, (unsigned)sizeof(struct ether_header));
goto tr_setup;
} else if (msg.rm_datalen > (uint32_t)MCLBYTES) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
DPRINTF("invalid ethernet size "
"%u > %u\n",
msg.rm_datalen, (unsigned)MCLBYTES);
@@ -871,7 +871,7 @@ urndis_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error)
/* enqueue */
uether_rxmbuf(&sc->sc_ue, m, msg.rm_datalen);
} else {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
}
offset += msg.rm_len;
actlen -= msg.rm_len;
@@ -917,7 +917,7 @@ urndis_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_TRANSFERRED:
DPRINTFN(11, "%u bytes in %u frames\n", actlen, aframes);
- ifp->if_opackets++;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
/* FALLTHROUGH */
case USB_ST_SETUP:
@@ -937,7 +937,7 @@ tr_setup:
if ((m->m_pkthdr.len + sizeof(msg)) > RNDIS_TX_MAXLEN) {
DPRINTF("Too big packet\n");
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
/* Free buffer */
m_freem(m);
@@ -973,7 +973,7 @@ tr_setup:
DPRINTFN(11, "transfer error, %s\n", usbd_errstr(error));
/* count output errors */
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
if (error != USB_ERR_CANCELLED) {
/* try to clear stall first */