summaryrefslogtreecommitdiff
path: root/sys/dev/ral/rt2860.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ral/rt2860.c')
-rw-r--r--sys/dev/ral/rt2860.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index 944797612a2f3..8bfb00d816228 100644
--- a/sys/dev/ral/rt2860.c
+++ b/sys/dev/ral/rt2860.c
@@ -232,8 +232,8 @@ 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)];
int error, ntries, qid;
- uint8_t bands;
sc->sc_dev = dev;
sc->sc_debug = 0;
@@ -319,12 +319,12 @@ rt2860_attach(device_t dev, int id)
| IEEE80211_C_WME /* 802.11e */
;
- bands = 0;
- setbit(&bands, IEEE80211_MODE_11B);
- setbit(&bands, IEEE80211_MODE_11G);
+ memset(bands, 0, sizeof(bands));
+ setbit(bands, IEEE80211_MODE_11B);
+ setbit(bands, IEEE80211_MODE_11G);
if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850)
- setbit(&bands, IEEE80211_MODE_11A);
- ieee80211_init_channels(ic, NULL, &bands);
+ setbit(bands, IEEE80211_MODE_11A);
+ ieee80211_init_channels(ic, NULL, bands);
ieee80211_ifattach(ic);