diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2015-09-22 02:48:59 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2015-09-22 02:48:59 +0000 |
commit | 82e8c646b4afc25a0ddb4a773425bdf113bb1b37 (patch) | |
tree | b207c6a0a67a9a7e82beeb4f4960064a74f7baa7 /sys/dev/usb/wlan/if_uath.c | |
parent | d6166def28d0af3917cb08ae9f7c4974927e3cbe (diff) | |
download | src-82e8c646b4afc25a0ddb4a773425bdf113bb1b37.tar.gz src-82e8c646b4afc25a0ddb4a773425bdf113bb1b37.zip |
net80211 & wireless drivers: remove duplicate defines (noop)
- IEEE80211_DIR_DSTODS(wh) -> IEEE80211_IS_DSTODS(wh).
- N(a) -> nitems(a).
- Remove LE_READ_2(p)/LE_READ_4(p) definitions (and include ieee80211_input.h instead).
- <drvname>_TXOP_TO_US(txop) -> IEEE80211_TXOP_TO_US(txop).
- Put IEEE80211_RV(v) into ieee80211_proto.h and remove local RV(v) definitions.
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3705
Notes
Notes:
svn path=/head/; revision=288088
Diffstat (limited to 'sys/dev/usb/wlan/if_uath.c')
-rw-r--r-- | sys/dev/usb/wlan/if_uath.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 04e092040c14..39fa71b28638 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -102,6 +102,7 @@ __FBSDID("$FreeBSD$"); #endif #include <net80211/ieee80211_var.h> +#include <net80211/ieee80211_input.h> #include <net80211/ieee80211_regdomain.h> #include <net80211/ieee80211_radiotap.h> @@ -156,15 +157,6 @@ enum { } while (0) #endif -/* unaligned little endian access */ -#define LE_READ_2(p) \ - ((u_int16_t) \ - ((((u_int8_t *)(p))[0] ) | (((u_int8_t *)(p))[1] << 8))) -#define LE_READ_4(p) \ - ((u_int32_t) \ - ((((u_int8_t *)(p))[0] ) | (((u_int8_t *)(p))[1] << 8) | \ - (((u_int8_t *)(p))[2] << 16) | (((u_int8_t *)(p))[3] << 24))) - /* recognized device vendors/products */ static const STRUCT_USB_HOST_ID uath_devs[] = { #define UATH_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } @@ -599,7 +591,6 @@ uath_dump_cmd(const uint8_t *buf, int len, char prefix) static const char * uath_codename(int code) { -#define N(a) (sizeof(a)/sizeof(a[0])) static const char *names[] = { "0x00", "HOST_AVAILABLE", @@ -662,13 +653,12 @@ uath_codename(int code) }; static char buf[8]; - if (code < N(names)) + if (code < nitems(names)) return names[code]; if (code == WDCMSG_SET_DEFAULT_KEY) return "SET_DEFAULT_KEY"; snprintf(buf, sizeof(buf), "0x%02x", code); return buf; -#undef N } #endif @@ -1486,7 +1476,7 @@ uath_wme_init(struct uath_softc *sc) qinfo.attr.aifs = htobe32(uath_wme_11g[ac].aifsn); qinfo.attr.logcwmin = htobe32(uath_wme_11g[ac].logcwmin); qinfo.attr.logcwmax = htobe32(uath_wme_11g[ac].logcwmax); - qinfo.attr.bursttime = htobe32(UATH_TXOP_TO_US( + qinfo.attr.bursttime = htobe32(IEEE80211_TXOP_TO_US( uath_wme_11g[ac].txop)); qinfo.attr.mode = htobe32(uath_wme_11g[ac].acm);/*XXX? */ qinfo.attr.qflags = htobe32(1); /* XXX? */ |