diff options
| author | Andriy Voskoboinyk <avos@FreeBSD.org> | 2016-01-07 18:41:03 +0000 |
|---|---|---|
| committer | Andriy Voskoboinyk <avos@FreeBSD.org> | 2016-01-07 18:41:03 +0000 |
| commit | 0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e (patch) | |
| tree | 29432600c74c3421aff456667f70f13cde56fddc /sys/dev/otus | |
| parent | 9030be4bad005c75a8a2df81f7e4b1a33913876e (diff) | |
Notes
Diffstat (limited to 'sys/dev/otus')
| -rw-r--r-- | sys/dev/otus/if_otus.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index 160b05e7abb7..daa96266353a 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -624,8 +624,8 @@ 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)]; int error; - uint8_t bands; /* Not locked */ error = otus_load_firmware(sc, "otusfw_init", AR_FW_INIT_ADDR); @@ -743,19 +743,19 @@ otus_attachhook(struct otus_softc *sc) otus_get_chanlist(sc); #else /* Set supported .11b and .11g rates. */ - bands = 0; + memset(bands, 0, sizeof(bands)); if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11G) { - setbit(&bands, IEEE80211_MODE_11B); - setbit(&bands, IEEE80211_MODE_11G); + setbit(bands, IEEE80211_MODE_11B); + setbit(bands, IEEE80211_MODE_11G); } if (sc->eeprom.baseEepHeader.opCapFlags & AR5416_OPFLAGS_11A) { - setbit(&bands, IEEE80211_MODE_11A); + setbit(bands, IEEE80211_MODE_11A); } #if 0 if (sc->sc_ht) - setbit(&bands, IEEE80211_MODE_11NG); + setbit(bands, IEEE80211_MODE_11NG); #endif - ieee80211_init_channels(ic, NULL, &bands); + ieee80211_init_channels(ic, NULL, bands); #endif ieee80211_ifattach(ic); |
