net80211 + drivers: hide size of 'bands' array behind a macro.
Auto-replace 'howmany(IEEE80211_MODE_MAX, 8)' with 'IEEE80211_MODE_BYTES'. No functional changes.
This commit is contained in:
parent
31b6732008
commit
a061fea6ee
@ -356,7 +356,7 @@ bwi_attach(struct bwi_softc *sc)
|
||||
device_t dev = sc->sc_dev;
|
||||
struct bwi_mac *mac;
|
||||
struct bwi_phy *phy;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int i, error;
|
||||
|
||||
BWI_LOCK_INIT(sc);
|
||||
|
@ -725,7 +725,7 @@ ndis_80211attach(struct ndis_softc *sc)
|
||||
struct ndis_80211_nettype_list *ntl;
|
||||
uint32_t arg;
|
||||
int mode, i, r, len, nonettypes = 1;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)] = { 0 };
|
||||
uint8_t bands[IEEE80211_MODE_BYTES] = { 0 };
|
||||
|
||||
callout_init(&sc->ndis_scan_callout, 1);
|
||||
|
||||
|
@ -271,7 +271,7 @@ iwi_attach(device_t dev)
|
||||
struct iwi_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint16_t val;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int i, error;
|
||||
|
||||
sc->sc_dev = dev;
|
||||
|
@ -174,7 +174,7 @@ malo_attach(uint16_t devid, struct malo_softc *sc)
|
||||
struct ieee80211com *ic = &sc->malo_ic;
|
||||
struct malo_hal *mh;
|
||||
int error;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
|
||||
MALO_LOCK_INIT(sc);
|
||||
callout_init_mtx(&sc->malo_watchdog_timer, &sc->malo_mtx, 0);
|
||||
|
@ -624,7 +624,7 @@ otus_attachhook(struct otus_softc *sc)
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
usb_device_request_t req;
|
||||
uint32_t in, out;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int error;
|
||||
|
||||
/* Not locked */
|
||||
|
@ -199,7 +199,7 @@ rt2560_attach(device_t dev, int id)
|
||||
{
|
||||
struct rt2560_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int error;
|
||||
|
||||
sc->sc_dev = dev;
|
||||
|
@ -199,7 +199,7 @@ rt2661_attach(device_t dev, int id)
|
||||
struct rt2661_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint32_t val;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int error, ac, ntries;
|
||||
|
||||
sc->sc_id = id;
|
||||
|
@ -232,7 +232,7 @@ rt2860_attach(device_t dev, int id)
|
||||
struct rt2860_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint32_t tmp;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int error, ntries, qid;
|
||||
|
||||
sc->sc_dev = dev;
|
||||
|
@ -251,7 +251,7 @@ rtwn_attach(device_t dev)
|
||||
struct rtwn_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint32_t lcsr;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int i, count, error, rid;
|
||||
|
||||
sc->sc_dev = dev;
|
||||
|
@ -490,7 +490,7 @@ urtwn_attach(device_t self)
|
||||
struct usb_attach_arg *uaa = device_get_ivars(self);
|
||||
struct urtwn_softc *sc = device_get_softc(self);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
int error;
|
||||
|
||||
device_set_usb_desc(self);
|
||||
|
@ -404,7 +404,7 @@ rsu_attach(device_t self)
|
||||
struct rsu_softc *sc = device_get_softc(self);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
int error;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index;
|
||||
struct usb_interface *iface;
|
||||
const char *rft;
|
||||
|
@ -477,7 +477,7 @@ rum_attach(device_t self)
|
||||
struct rum_softc *sc = device_get_softc(self);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint32_t tmp;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index;
|
||||
int error, ntries;
|
||||
|
||||
|
@ -704,7 +704,7 @@ run_attach(device_t self)
|
||||
struct usb_attach_arg *uaa = device_get_ivars(self);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint32_t ver;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index;
|
||||
int ntries, error;
|
||||
|
||||
|
@ -328,7 +328,7 @@ uath_attach(device_t dev)
|
||||
struct uath_softc *sc = device_get_softc(dev);
|
||||
struct usb_attach_arg *uaa = device_get_ivars(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index = UATH_IFACE_INDEX; /* XXX */
|
||||
usb_error_t error;
|
||||
|
||||
|
@ -243,7 +243,7 @@ upgt_attach(device_t dev)
|
||||
struct upgt_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct usb_attach_arg *uaa = device_get_ivars(dev);
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index = UPGT_IFACE_INDEX;
|
||||
int error;
|
||||
|
||||
|
@ -424,7 +424,7 @@ ural_attach(device_t self)
|
||||
struct usb_attach_arg *uaa = device_get_ivars(self);
|
||||
struct ural_softc *sc = device_get_softc(self);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index;
|
||||
int error;
|
||||
|
||||
|
@ -785,7 +785,7 @@ urtw_attach(device_t dev)
|
||||
struct urtw_softc *sc = device_get_softc(dev);
|
||||
struct usb_attach_arg *uaa = device_get_ivars(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index = URTW_IFACE_INDEX; /* XXX */
|
||||
uint16_t n_setup;
|
||||
uint32_t data;
|
||||
|
@ -334,7 +334,7 @@ zyd_attach(device_t dev)
|
||||
struct usb_attach_arg *uaa = device_get_ivars(dev);
|
||||
struct zyd_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
|
||||
uint8_t bands[IEEE80211_MODE_BYTES];
|
||||
uint8_t iface_index;
|
||||
int error;
|
||||
|
||||
|
@ -70,6 +70,7 @@ enum ieee80211_phymode {
|
||||
IEEE80211_MODE_QUARTER = 11, /* OFDM, 1/4x clock */
|
||||
};
|
||||
#define IEEE80211_MODE_MAX (IEEE80211_MODE_QUARTER+1)
|
||||
#define IEEE80211_MODE_BYTES 2 /* howmany(IEEE80211_MODE_MAX, NBBY) */
|
||||
|
||||
/*
|
||||
* Operating mode. Devices do not necessarily support
|
||||
|
Loading…
Reference in New Issue
Block a user