Date: Thu, 19 Feb 2009 05:49:32 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: 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... Message-ID: <200902190549.n1J5nWur086445@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902190549.n1J5nWur086445>