diff options
author | sam <sam@FreeBSD.org> | 2007-03-11 22:43:35 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-03-11 22:43:35 +0000 |
commit | 44a133f2e813fcb90c74f699b232eb1c17e9ccc4 (patch) | |
tree | 3d26f0909d11e82cb6cfb7f7eaa3434470f7441a /sys/dev/ral/rt2661.c | |
parent | 36b44d59ffb7e5797a4f184a293e085b813f4220 (diff) | |
download | FreeBSD-src-44a133f2e813fcb90c74f699b232eb1c17e9ccc4.zip FreeBSD-src-44a133f2e813fcb90c74f699b232eb1c17e9ccc4.tar.gz |
allow net80211 to fillin rate sets
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ral/rt2661.c')
-rw-r--r-- | sys/dev/ral/rt2661.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index c780edb..8f13eb6 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -159,18 +159,6 @@ static int rt2661_prepare_beacon(struct rt2661_softc *); static void rt2661_enable_tsf_sync(struct rt2661_softc *); static int rt2661_get_rssi(struct rt2661_softc *, uint8_t); -/* - * Supported rates for 802.11a/b/g modes (in 500Kbps unit). - */ -static const struct ieee80211_rateset rt2661_rateset_11a = - { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } }; - -static const struct ieee80211_rateset rt2661_rateset_11b = - { 4, { 2, 4, 11, 22 } }; - -static const struct ieee80211_rateset rt2661_rateset_11g = - { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; - static const struct { uint32_t reg; uint32_t val; @@ -317,9 +305,6 @@ rt2661_attach(device_t dev, int id) IEEE80211_C_WPA; /* 802.11i */ if (sc->rf_rev == RT2661_RF_5225 || sc->rf_rev == RT2661_RF_5325) { - /* set supported .11a rates */ - ic->ic_sup_rates[IEEE80211_MODE_11A] = rt2661_rateset_11a; - /* set supported .11a channels */ for (i = 36; i <= 64; i += 4) { ic->ic_channels[i].ic_freq = @@ -338,10 +323,6 @@ rt2661_attach(device_t dev, int id) } } - /* set supported .11b and .11g rates */ - ic->ic_sup_rates[IEEE80211_MODE_11B] = rt2661_rateset_11b; - ic->ic_sup_rates[IEEE80211_MODE_11G] = rt2661_rateset_11g; - /* set supported .11b and .11g channels (1 through 14) */ for (i = 1; i <= 14; i++) { ic->ic_channels[i].ic_freq = @@ -2090,6 +2071,7 @@ rt2661_set_basicrates(struct rt2661_softc *sc, const struct ieee80211_rateset *rs) { #define RV(r) ((r) & IEEE80211_RATE_VAL) + struct ieee80211com *ic = &sc->sc_ic; uint32_t mask = 0; uint8_t rate; int i, j; @@ -2104,7 +2086,7 @@ rt2661_set_basicrates(struct rt2661_softc *sc, * Find h/w rate index. We know it exists because the rate * set has already been negotiated. */ - for (j = 0; rt2661_rateset_11g.rs_rates[j] != RV(rate); j++); + for (j = 0; ic->ic_sup_rates[IEEE80211_MODE_11G].rs_rates[j] != RV(rate); j++); mask |= 1 << j; } |