diff options
author | adrian <adrian@FreeBSD.org> | 2015-09-22 02:44:59 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-09-22 02:44:59 +0000 |
commit | 5672e10cea195094b9e180a6fb22537a6f8f588e (patch) | |
tree | 3a012e5662121dbe0100d03ff4e42e00b0579eda /sys/dev/bwi/bwimac.c | |
parent | 238d4c1fe4883c2fa85330fb7b5b88d8b869e977 (diff) | |
download | FreeBSD-src-5672e10cea195094b9e180a6fb22537a6f8f588e.zip FreeBSD-src-5672e10cea195094b9e180a6fb22537a6f8f588e.tar.gz |
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
Diffstat (limited to 'sys/dev/bwi/bwimac.c')
-rw-r--r-- | sys/dev/bwi/bwimac.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/bwi/bwimac.c b/sys/dev/bwi/bwimac.c index baad7fe..54d2fde 100644 --- a/sys/dev/bwi/bwimac.c +++ b/sys/dev/bwi/bwimac.c @@ -1657,17 +1657,15 @@ bwi_mac_attach(struct bwi_softc *sc, int id, uint8_t rev) /* * Test whether the revision of this MAC is supported */ -#define N(arr) (int)(sizeof(arr) / sizeof(arr[0])) - for (i = 0; i < N(bwi_sup_macrev); ++i) { + for (i = 0; i < nitems(bwi_sup_macrev); ++i) { if (bwi_sup_macrev[i] == rev) break; } - if (i == N(bwi_sup_macrev)) { + if (i == nitems(bwi_sup_macrev)) { device_printf(sc->sc_dev, "MAC rev %u is " "not supported\n", rev); return ENXIO; } -#undef N BWI_CREATE_MAC(mac, sc, id, rev); sc->sc_nmac++; |