summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-02-19 04:33:36 +0000
committersam <sam@FreeBSD.org>2009-02-19 04:33:36 +0000
commit8f46eec09092317db7590d5595fb47dec500f9d3 (patch)
tree7f6e90612bc97937ed66ef8c3c399cfcd76e3eb6 /sys/net80211/ieee80211.c
parentdc72869d2fbbf60110d97662d2fa8e1c5aa8457f (diff)
downloadFreeBSD-src-8f46eec09092317db7590d5595fb47dec500f9d3.zip
FreeBSD-src-8f46eec09092317db7590d5595fb47dec500f9d3.tar.gz
instead of special casing lookups for the 11na/g legacy rate set, just
install the rates once when creating the com structure
Diffstat (limited to 'sys/net80211/ieee80211.c')
-rw-r--r--sys/net80211/ieee80211.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index 6de00ae..0a1c256 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -185,6 +185,8 @@ ieee80211_chan_init(struct ieee80211com *ic)
DEFAULTRATES(IEEE80211_MODE_TURBO_A, ieee80211_rateset_11a);
DEFAULTRATES(IEEE80211_MODE_TURBO_G, ieee80211_rateset_11g);
DEFAULTRATES(IEEE80211_MODE_STURBO_A, ieee80211_rateset_11a);
+ DEFAULTRATES(IEEE80211_MODE_11NA, ieee80211_rateset_11a);
+ DEFAULTRATES(IEEE80211_MODE_11NG, ieee80211_rateset_11g);
/*
* Set auto mode to reset active channel state and any desired channel.
@@ -1011,12 +1013,7 @@ ieee80211_get_suprates(struct ieee80211com *ic, const struct ieee80211_channel *
return &ieee80211_rateset_half;
if (IEEE80211_IS_CHAN_QUARTER(c))
return &ieee80211_rateset_quarter;
- if (IEEE80211_IS_CHAN_HTA(c))
- return &ic->ic_sup_rates[IEEE80211_MODE_11A];
- if (IEEE80211_IS_CHAN_HTG(c)) {
- /* XXX does this work for basic rates? */
- return &ic->ic_sup_rates[IEEE80211_MODE_11G];
- }
+ /* XXX does this work for 11ng basic rates? */
return &ic->ic_sup_rates[ieee80211_chan2mode(c)];
}
OpenPOWER on IntegriCloud