svn commit: r188795 - in projects/vap7/sys: . contrib/pf dev
dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210
dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212
dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Sam Leffler
sam at FreeBSD.org
Wed Feb 18 21:49:32 PST 2009
Author: sam
Date: Thu Feb 19 05:49:31 2009
New Revision: 188795
URL: http://svn.freebsd.org/changeset/base/188795
Log:
merge r188778: Change country ie construction
Modified:
projects/vap7/sys/ (props changed)
projects/vap7/sys/contrib/pf/ (props changed)
projects/vap7/sys/dev/ (props changed)
projects/vap7/sys/dev/ath/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed)
projects/vap7/sys/dev/cxgb/ (props changed)
projects/vap7/sys/dev/usb2/ (props changed)
projects/vap7/sys/i386/conf/USB2 (props changed)
projects/vap7/sys/modules/usb2/ (props changed)
projects/vap7/sys/net80211/ (props changed)
projects/vap7/sys/net80211/ieee80211_regdomain.c
Modified: projects/vap7/sys/net80211/ieee80211_regdomain.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_regdomain.c Thu Feb 19 05:48:59 2009 (r188794)
+++ projects/vap7/sys/net80211/ieee80211_regdomain.c Thu Feb 19 05:49:31 2009 (r188795)
@@ -216,17 +216,19 @@ ieee80211_alloc_countryie(struct ieee802
/* XXX what about auto? */
/* flag set of channels to be excluded */
static const int skipflags[IEEE80211_MODE_MAX] = {
- CHAN_UNINTERESTING, /* MODE_AUTO */
- CHAN_UNINTERESTING | IEEE80211_CHAN_2GHZ, /* MODE_11A */
- CHAN_UNINTERESTING | IEEE80211_CHAN_5GHZ, /* MODE_11B */
- CHAN_UNINTERESTING | IEEE80211_CHAN_5GHZ, /* MODE_11G */
- CHAN_UNINTERESTING | IEEE80211_CHAN_OFDM | /* MODE_FH */
- IEEE80211_CHAN_CCK | IEEE80211_CHAN_DYN,
- CHAN_UNINTERESTING | IEEE80211_CHAN_2GHZ, /* MODE_TURBO_A */
- CHAN_UNINTERESTING | IEEE80211_CHAN_5GHZ, /* MODE_TURBO_G */
- CHAN_UNINTERESTING | IEEE80211_CHAN_2GHZ, /* MODE_STURBO_A */
- CHAN_UNINTERESTING | IEEE80211_CHAN_2GHZ, /* MODE_11NA */
- CHAN_UNINTERESTING | IEEE80211_CHAN_5GHZ, /* MODE_11NG */
+ [IEEE80211_MODE_AUTO] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_11A] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_11B] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_11G] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_FH] = CHAN_UNINTERESTING
+ | IEEE80211_CHAN_OFDM
+ | IEEE80211_CHAN_CCK
+ | IEEE80211_CHAN_DYN,
+ [IEEE80211_MODE_TURBO_A] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_TURBO_G] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_STURBO_A] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_11NA] = CHAN_UNINTERESTING,
+ [IEEE80211_MODE_11NG] = CHAN_UNINTERESTING,
};
const struct ieee80211_regdomain *rd = &ic->ic_regdomain;
uint8_t nextchan, chans[IEEE80211_CHAN_BYTES], *frm;
@@ -268,6 +270,10 @@ ieee80211_alloc_countryie(struct ieee802
nruns = 0;
memset(chans, 0, sizeof(chans));
skip = skipflags[ieee80211_chan2mode(ic->ic_bsschan)];
+ if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bsschan))
+ skip |= IEEE80211_CHAN_2GHZ;
+ else if (IEEE80211_IS_CHAN_2GHZ(ic->ic_bsschan))
+ skip |= IEEE80211_CHAN_5GHZ;
for (i = 0; i < ic->ic_nchans; i++) {
const struct ieee80211_channel *c = &ic->ic_channels[i];
More information about the svn-src-projects
mailing list