diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-22 14:40:56 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-22 14:40:56 -0300 |
commit | 0a3437aa52c010dc2ab10b9778a383fef436382c (patch) | |
tree | b2f879569f9d9deb23e4d7accb103d30a64e1527 /sys/dev/usb/wlan/if_ural.c | |
parent | 6a0f7868a911546f7be04cc546e99cc803686af3 (diff) | |
download | FreeBSD-src-0a3437aa52c010dc2ab10b9778a383fef436382c.zip FreeBSD-src-0a3437aa52c010dc2ab10b9778a383fef436382c.tar.gz |
Revert "Importing pfSense patches net80211HEAD.tgz and conf.file.ieee80211.diff"
This reverts commit 6ee75bdd7bf7c20359dd6e38c243586cb062edea.
Diffstat (limited to 'sys/dev/usb/wlan/if_ural.c')
-rw-r--r-- | sys/dev/usb/wlan/if_ural.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index c81b708..69b41dd 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -49,7 +49,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> @@ -83,7 +82,7 @@ __FBSDID("$FreeBSD$"); static int ural_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ural, CTLFLAG_RW, 0, "USB ural"); -SYSCTL_INT(_hw_usb_ural, OID_AUTO, debug, CTLFLAG_RWTUN, &ural_debug, 0, +SYSCTL_INT(_hw_usb_ural, OID_AUTO, debug, CTLFLAG_RW, &ural_debug, 0, "Debug level"); #endif @@ -805,7 +804,7 @@ ural_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) ural_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 */ @@ -859,7 +858,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) { ural_tx_free(data, error); @@ -900,7 +899,7 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) if (len < (int)(RAL_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; } @@ -919,14 +918,14 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) * filled RAL_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, 0, mtod(m, uint8_t *), len); @@ -1370,7 +1369,7 @@ ural_start(struct ifnet *ifp) ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (ural_tx_data(sc, m, ni) != 0) { ieee80211_free_node(ni); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_oerrors++; break; } } @@ -2210,7 +2209,7 @@ ural_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, return EIO; } - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + ifp->if_opackets++; if (params == NULL) { /* @@ -2230,7 +2229,7 @@ ural_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, RAL_UNLOCK(sc); return 0; bad: - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_oerrors++; RAL_UNLOCK(sc); ieee80211_free_node(ni); return EIO; /* XXX */ @@ -2284,7 +2283,7 @@ ural_ratectl_task(void *arg, int pending) ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt); (void) ieee80211_ratectl_rate(ni, NULL, 0); - 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(&uvp->ratectl_ch, hz, ural_ratectl_timeout, uvp); RAL_UNLOCK(sc); |