Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2009 19:07:21 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r187231 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5211
Message-ID:  <200901141907.n0EJ7LKI051360@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901141907.n0EJ7LKI051360>