From owner-svn-src-user@FreeBSD.ORG Wed Jan 14 19:07:21 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE3C106566B; Wed, 14 Jan 2009 19:07:21 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9DF8FC20; Wed, 14 Jan 2009 19:07:21 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0EJ7LLR051364; Wed, 14 Jan 2009 19:07:21 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0EJ7LKI051360; Wed, 14 Jan 2009 19:07:21 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901141907.n0EJ7LKI051360@svn.freebsd.org> From: Sam Leffler Date: Wed, 14 Jan 2009 19:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187231 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2009 19:07:22 -0000 Author: sam Date: Wed Jan 14 19:07:20 2009 New Revision: 187231 URL: http://svn.freebsd.org/changeset/base/187231 Log: Eliminate regDmnFlags from the internal channel structure; it was used only to hold the "need noise floor check" attribute for 5211 parts operating in MKK regdomains. Store this information in the privFlags field instead (usurp CHANNEL_DFS_CLEAR which was part of the old dfs code that's long gone) With this change ath_hal_getnfcheckrequired is not needed; remove it. Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.h Wed Jan 14 18:54:53 2009 (r187230) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.h Wed Jan 14 19:07:20 2009 (r187231) @@ -396,7 +396,7 @@ typedef struct { interference detection */ #define CHANNEL_DFS 0x02 /* DFS required on channel */ #define CHANNEL_4MS_LIMIT 0x04 /* 4msec packet limit on this channel */ -#define CHANNEL_DFS_CLEAR 0x08 /* if channel has been checked for DFS */ +#define CHANNEL_NFCREQUIRED 0x08 /* channel requires noise floor check */ #define CHANNEL_A (CHANNEL_5GHZ|CHANNEL_OFDM) #define CHANNEL_B (CHANNEL_2GHZ|CHANNEL_CCK) Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Wed Jan 14 18:54:53 2009 (r187230) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Wed Jan 14 19:07:20 2009 (r187231) @@ -127,7 +127,6 @@ typedef struct { int16_t rawNoiseFloor; int16_t noiseFloorAdjust; uint16_t mainSpur; /* cached spur value for this cahnnel */ - uint32_t regDmnFlags; /* Flags for channel use in reg */ uint32_t conformanceTestLimit; /* conformance test limit from reg domain */ int8_t antennaMax; } HAL_CHANNEL_INTERNAL; @@ -499,12 +498,6 @@ extern u_int ath_hal_getantennareduction * the current regulator domain. */ extern u_int ath_hal_getctl(struct ath_hal *, HAL_CHANNEL *); -/* - * Return whether or not a noise floor check is required - * based on the current regulatory domain for the specified - * channel. - */ -extern u_int ath_hal_getnfcheckrequired(struct ath_hal *, HAL_CHANNEL *); /* * Map a public channel definition to the corresponding Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Wed Jan 14 18:54:53 2009 (r187230) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Wed Jan 14 19:07:20 2009 (r187231) @@ -2623,7 +2623,6 @@ ath_hal_init_channels(struct ath_hal *ah icv.channelFlags = cm->flags; icv.maxRegTxPower = fband->powerDfs; icv.antennaMax = fband->antennaMax; - icv.regDmnFlags = rd->flags; icv.conformanceTestLimit = ctl; if (fband->usePassScan & rd->pscan) icv.channelFlags |= CHANNEL_PASSIVE; @@ -2640,6 +2639,8 @@ ath_hal_init_channels(struct ath_hal *ah icv.privFlags = 0; if (rd->flags & LIMIT_FRAME_4MS) icv.privFlags |= CHANNEL_4MS_LIMIT; + if (rd->flags & NEED_NFC) + icv.privFlags |= CHANNEL_NFCREQUIRED; ichans[next++] = icv; } @@ -2818,20 +2819,6 @@ ath_hal_getctl(struct ath_hal *ah, HAL_C } /* - * Return whether or not a noise floor check is required in - * the current regulatory domain for the specified channel. - */ -HAL_BOOL -ath_hal_getnfcheckrequired(struct ath_hal *ah, HAL_CHANNEL *chan) -{ - HAL_CHANNEL_INTERNAL *ichan; - - if ((ichan = ath_hal_checkchannel(ah, chan)) != AH_NULL) - return ((ichan->regDmnFlags & NEED_NFC) ? AH_TRUE : AH_FALSE); - return AH_FALSE; -} - -/* * Insertion sort. */ #define swap(_a, _b, _size) { \ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Wed Jan 14 18:54:53 2009 (r187230) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Wed Jan 14 19:07:20 2009 (r187231) @@ -985,7 +985,7 @@ ar5211CalNoiseFloor(struct ath_hal *ah, #define N(a) (sizeof (a) / sizeof (a[0])) /* Check for Carrier Wave interference in MKK regulatory zone */ if (AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_OAHU && - ath_hal_getnfcheckrequired(ah, (HAL_CHANNEL *) chan)) { + (chan->privFlags & CHANNEL_NFCREQUIRED)) { static const uint8_t runtime[3] = { 0, 2, 7 }; int16_t nf, nfThresh; int i;