aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ral
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/ral
parent9030be4bad005c75a8a2df81f7e4b1a33913876e (diff)
Notes
Diffstat (limited to 'sys/dev/ral')
-rw-r--r--sys/dev/ral/rt2560.c12
-rw-r--r--sys/dev/ral/rt2661.c12
-rw-r--r--sys/dev/ral/rt2860.c12
3 files changed, 18 insertions, 18 deletions
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index d62c470c82fe..1ba2791a9c21 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -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;
+ uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
int error;
sc->sc_dev = dev;
@@ -278,12 +278,12 @@ rt2560_attach(device_t dev, int id)
#endif
;
- 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 == RT2560_RF_5222)
- 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);
ic->ic_raw_xmit = rt2560_raw_xmit;
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index a2e955ced04b..a53d509bcf3d 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -199,8 +199,8 @@ 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)];
int error, ac, ntries;
- uint8_t bands;
sc->sc_id = id;
sc->sc_dev = dev;
@@ -279,12 +279,12 @@ rt2661_attach(device_t dev, int id)
#endif
;
- 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 == RT2661_RF_5225 || sc->rf_rev == RT2661_RF_5325)
- 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);
#if 0
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index 944797612a2f..8bfb00d81622 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);