diff options
Diffstat (limited to 'sys/dev/usb/wlan/if_rum.c')
-rw-r--r-- | sys/dev/usb/wlan/if_rum.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index a3dc562..e1e8f2e 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include <net/bpf.h> #include <net/if.h> -#include <net/if_var.h> #include <net/if_arp.h> #include <net/ethernet.h> #include <net/if_dl.h> @@ -82,7 +81,7 @@ __FBSDID("$FreeBSD$"); static int rum_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum"); -SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RWTUN, &rum_debug, 0, +SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RW, &rum_debug, 0, "Debug level"); #endif @@ -797,7 +796,7 @@ rum_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) rum_tx_free(data, 0); usbd_xfer_set_priv(xfer, NULL); - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + ifp->if_opackets++; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; /* FALLTHROUGH */ @@ -851,7 +850,7 @@ tr_setup: DPRINTFN(11, "transfer error, %s\n", usbd_errstr(error)); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_oerrors++; data = usbd_xfer_get_priv(xfer); if (data != NULL) { rum_tx_free(data, error); @@ -897,7 +896,7 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) if (len < (int)(RT2573_RX_DESC_SIZE + IEEE80211_MIN_LEN)) { DPRINTF("%s: xfer too short %d\n", device_get_nameunit(sc->sc_dev), len); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + ifp->if_ierrors++; goto tr_setup; } @@ -914,14 +913,14 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) * filled RUM_TXRX_CSR2: */ DPRINTFN(5, "PHY or CRC error\n"); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + ifp->if_ierrors++; goto tr_setup; } m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { DPRINTF("could not allocate mbuf\n"); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + ifp->if_ierrors++; goto tr_setup; } usbd_copy_out(pc, RT2573_RX_DESC_SIZE, @@ -1321,7 +1320,7 @@ rum_start(struct ifnet *ifp) ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (rum_tx_data(sc, m, ni) != 0) { ieee80211_free_node(ni); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_oerrors++; break; } } @@ -2205,7 +2204,7 @@ rum_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, return EIO; } - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + ifp->if_opackets++; if (params == NULL) { /* @@ -2226,7 +2225,7 @@ rum_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, return 0; bad: - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_oerrors++; RUM_UNLOCK(sc); ieee80211_free_node(ni); return EIO; @@ -2281,7 +2280,7 @@ rum_ratectl_task(void *arg, int pending) (void) ieee80211_ratectl_rate(ni, NULL, 0); ieee80211_free_node(ni); - if_inc_counter(ifp, IFCOUNTER_OERRORS, fail); /* count TX retry-fail as Tx errors */ + ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */ usb_callout_reset(&rvp->ratectl_ch, hz, rum_ratectl_timeout, rvp); RUM_UNLOCK(sc); |