aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/malo
diff options
context:
space:
mode:
authorAndriy Voskoboinyk <avos@FreeBSD.org>2016-01-07 18:41:03 +0000
committerAndriy Voskoboinyk <avos@FreeBSD.org>2016-01-07 18:41:03 +0000
commit0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e (patch)
tree29432600c74c3421aff456667f70f13cde56fddc /sys/dev/malo
parent9030be4bad005c75a8a2df81f7e4b1a33913876e (diff)
Notes
Diffstat (limited to 'sys/dev/malo')
-rw-r--r--sys/dev/malo/if_malo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index d02b6d5e2475..ff487082e708 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -173,7 +173,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;
+ uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
MALO_LOCK_INIT(sc);
callout_init_mtx(&sc->malo_watchdog_timer, &sc->malo_mtx, 0);
@@ -222,10 +222,10 @@ malo_attach(uint16_t devid, struct malo_softc *sc)
sc->malo_hwspecs.wcbbase[2], sc->malo_hwspecs.wcbbase[3]);
/* NB: firmware looks that it does not export regdomain info API. */
- bands = 0;
- setbit(&bands, IEEE80211_MODE_11B);
- setbit(&bands, IEEE80211_MODE_11G);
- ieee80211_init_channels(ic, NULL, &bands);
+ memset(bands, 0, sizeof(bands));
+ setbit(bands, IEEE80211_MODE_11B);
+ setbit(bands, IEEE80211_MODE_11G);
+ ieee80211_init_channels(ic, NULL, bands);
sc->malo_txantenna = 0x2; /* h/w default */
sc->malo_rxantenna = 0xffff; /* h/w default */