svn commit: r187621 - user/sam/wifi/sys/dev/ath/ath_hal
Sam Leffler
sam at FreeBSD.org
Thu Jan 22 23:48:29 PST 2009
Author: sam
Date: Fri Jan 23 07:48:28 2009
New Revision: 187621
URL: http://svn.freebsd.org/changeset/base/187621
Log:
o fix check for disallowing HT40 w/ DFS
o remove useless code to strip IEEE80211_CHAN_PASSIVE; the flag is never set
o fix turbo check (disallow both static and dynamic turbo)
o make debug msg more consistent
Modified:
user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c
Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c
==============================================================================
--- user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Fri Jan 23 07:00:33 2009 (r187620)
+++ user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Fri Jan 23 07:48:28 2009 (r187621)
@@ -2102,7 +2102,14 @@ getchannels(struct ath_hal *ah,
if ((fband->usePassScan & IS_ECM_CHAN) &&
!enableExtendedChannels) {
HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
- "Skipping ecm channel\n");
+ "skip ecm channel\n");
+ continue;
+ }
+ if ((fband->useDfs & dfsMask) &&
+ (cm->flags & IEEE80211_CHAN_HT40)) {
+ /* NB: DFS and HT40 don't mix */
+ HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
+ "skip HT40 chan, DFS required\n");
continue;
}
/*
@@ -2112,6 +2119,7 @@ getchannels(struct ath_hal *ah,
if (lastc && channelSep &&
(c-lastc) < channelSep)
continue;
+ lastc = c;
OS_MEMZERO(ic, sizeof(*ic));
ic->ic_freq = c;
@@ -2121,17 +2129,12 @@ getchannels(struct ath_hal *ah,
ic->ic_maxantgain = fband->antennaMax;
if (fband->usePassScan & pscan)
ic->ic_flags |= IEEE80211_CHAN_PASSIVE;
- else
- ic->ic_flags &= ~IEEE80211_CHAN_PASSIVE;
- lastc = c;
- /* NB: DFS and HT40 don't mix */
- if ((fband->useDfs & dfsMask) &&
- !IEEE80211_IS_CHAN_HT40(ic))
+ if (fband->useDfs & dfsMask)
ic->ic_flags |= IEEE80211_CHAN_DFS;
if (IEEE80211_IS_CHAN_5GHZ(ic) &&
(rdflags & DISALLOW_ADHOC_11A))
ic->ic_flags |= IEEE80211_CHAN_NOADHOC;
- if (IEEE80211_IS_CHAN_STURBO(ic) &&
+ if (IEEE80211_IS_CHAN_TURBO(ic) &&
(rdflags & DISALLOW_ADHOC_11A_TURB))
ic->ic_flags |= IEEE80211_CHAN_NOADHOC;
if (rdflags & NO_HOSTAP)
More information about the svn-src-user
mailing list