summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2007-01-15 01:12:28 +0000
committersam <sam@FreeBSD.org>2007-01-15 01:12:28 +0000
commita3a275335d46831246b871b344c2737ae0cb4468 (patch)
treed73d0349b154f05d7b8dd12e7775dd3023714dc4 /sys/net80211/ieee80211_node.c
parent62b15d9b508f7c3085d34682b2b77ee3d8f2dbfe (diff)
downloadFreeBSD-src-a3a275335d46831246b871b344c2737ae0cb4468.zip
FreeBSD-src-a3a275335d46831246b871b344c2737ae0cb4468.tar.gz
Add initial support for 900MHz cards like the Ubiquiti SR9:
o add channel flag to enable freq <-> ieee channel # mapping (can go away in the future when ieee number is precomputed) o add mapping between 900mhz freq's and channel #'s that gives a unique channel # for each half/quarter/full width channel o remove assumptions that half/quarter rate channels on happen in 11a o remove assumptions that all 11g channels are full width o ensure ic_curchan is reset on mode change so changing the channel list (e.g. on countrycode change) doesn't leave curchan set to an invalid channel There is still an issue with switching rate sets; to be fixed separately. MFC after: 1 month
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 9c34c29..2be1003 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -453,17 +453,10 @@ ieee80211_create_ibss(struct ieee80211com* ic, struct ieee80211_channel *chan)
/*
* Do mode-specific rate setup.
*/
- if (ic->ic_curmode == IEEE80211_MODE_11G) {
- /*
- * Use a mixed 11b/11g rate set.
- */
- ieee80211_set11gbasicrates(&ni->ni_rates, IEEE80211_MODE_11G);
- } else if (ic->ic_curmode == IEEE80211_MODE_11B) {
- /*
- * Force pure 11b rate set.
- */
- ieee80211_set11gbasicrates(&ni->ni_rates, IEEE80211_MODE_11B);
- }
+ if (IEEE80211_IS_CHAN_FULL(chan) &&
+ (ic->ic_curmode == IEEE80211_MODE_11G ||
+ ic->ic_curmode == IEEE80211_MODE_11B))
+ ieee80211_set11gbasicrates(&ni->ni_rates, ic->ic_curmode);
(void) ieee80211_sta_join(ic, ieee80211_ref_node(ni));
}
@@ -2097,7 +2090,8 @@ ieee80211_node_join(struct ieee80211com *ic, struct ieee80211_node *ni, int resp
IEEE80211_AID_SET(ni->ni_associd, ic->ic_aid_bitmap);
ic->ic_sta_assoc++;
newassoc = 1;
- if (ic->ic_curmode == IEEE80211_MODE_11G)
+ if (ic->ic_curmode == IEEE80211_MODE_11G &&
+ IEEE80211_IS_CHAN_FULL(ni->ni_chan))
ieee80211_node_join_11g(ic, ni);
} else
newassoc = 0;
@@ -2222,7 +2216,8 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
ni->ni_associd = 0;
ic->ic_sta_assoc--;
- if (ic->ic_curmode == IEEE80211_MODE_11G)
+ if (ic->ic_curmode == IEEE80211_MODE_11G &&
+ IEEE80211_IS_CHAN_FULL(ni->ni_chan))
ieee80211_node_leave_11g(ic, ni);
/*
* Cleanup station state. In particular clear various
OpenPOWER on IntegriCloud