summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/net/if_axge.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-09-18 21:09:22 +0000
committerglebius <glebius@FreeBSD.org>2014-09-18 21:09:22 +0000
commit4ca46ec7951f4cc68b89e628cff8f8cf635e1583 (patch)
tree31b5d7e2001c7e6dc8165d6f0b9a1dcf19a73e2e /sys/dev/usb/net/if_axge.c
parent5a08a4309baf81fd52f456bedab9bb8ab3db02c3 (diff)
downloadFreeBSD-src-4ca46ec7951f4cc68b89e628cff8f8cf635e1583.zip
FreeBSD-src-4ca46ec7951f4cc68b89e628cff8f8cf635e1583.tar.gz
Mechanically convert to if_inc_counter().
Diffstat (limited to 'sys/dev/usb/net/if_axge.c')
-rw-r--r--sys/dev/usb/net/if_axge.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/usb/net/if_axge.c b/sys/dev/usb/net/if_axge.c
index 17fd4d81..e262a5d 100644
--- a/sys/dev/usb/net/if_axge.c
+++ b/sys/dev/usb/net/if_axge.c
@@ -681,7 +681,7 @@ tr_setup:
* multiple writes into single one if there is
* room in TX buffer of controller.
*/
- ifp->if_opackets++;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
/*
* if there's a BPF listener, bounce a copy
@@ -702,7 +702,7 @@ tr_setup:
return;
/* NOTREACHED */
default:
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
if (error != USB_ERR_CANCELLED) {
@@ -962,7 +962,7 @@ axge_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen)
pktlen = (pkt_hdr >> 16) & 0x1fff;
if (pkt_hdr & (AXGE_RXHDR_CRC_ERR | AXGE_RXHDR_DROP_ERR)) {
DPRINTF("Dropped a packet\n");
- ue->ue_ifp->if_ierrors++;
+ if_inc_counter(ue->ue_ifp, IFCOUNTER_IERRORS, 1);
}
if (pktlen >= 6 && (int)(pos + pktlen) <= actlen) {
axge_rxeof(ue, pc, pos + 2, pktlen - 6, pkt_hdr);
@@ -984,13 +984,13 @@ axge_rxeof(struct usb_ether *ue, struct usb_page_cache *pc,
ifp = ue->ue_ifp;
if (len < ETHER_HDR_LEN || len > MCLBYTES - ETHER_ALIGN) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
return;
}
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
- ifp->if_iqdrops++;
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
return;
}
m->m_pkthdr.rcvif = ifp;
@@ -999,7 +999,7 @@ axge_rxeof(struct usb_ether *ue, struct usb_page_cache *pc,
usbd_copy_out(pc, offset, mtod(m, uint8_t *), len);
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
if ((pkt_hdr & (AXGE_RXHDR_L4CSUM_ERR | AXGE_RXHDR_L3CSUM_ERR)) == 0) {
if ((pkt_hdr & AXGE_RXHDR_L4_TYPE_MASK) ==
OpenPOWER on IntegriCloud