Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 May 2011 11:05:17 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221596 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 ar9002
Message-ID:  <201105071105.p47B5Hnk095870@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat May  7 11:05:16 2011
New Revision: 221596
URL: http://svn.freebsd.org/changeset/base/221596

Log:
  Read in the extended regulatory domain flags so future code can use them.
  
  These describe FCC/Japan channel and DFS behaviour.
  
  The AR9285 and later chips don't set these bits in the eeprom, the correct
  behaviour is to just assume all five bits are enabled.

Modified:
  head/sys/dev/ath/ath_hal/ah_internal.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
  head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c

Modified: head/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_internal.h	Sat May  7 11:04:36 2011	(r221595)
+++ head/sys/dev/ath/ath_hal/ah_internal.h	Sat May  7 11:05:16 2011	(r221596)
@@ -298,6 +298,7 @@ struct ath_hal_private {
 	 * State for regulatory domain handling.
 	 */
 	HAL_REG_DOMAIN	ah_currentRD;		/* EEPROM regulatory domain */
+	HAL_REG_DOMAIN	ah_currentRDext;	/* EEPROM extended regdomain flags */
 	HAL_CHANNEL_INTERNAL ah_channels[AH_MAXCHAN]; /* private chan state */
 	u_int		ah_nchan;		/* valid items in ah_channels */
 	const struct regDomain *ah_rd2GHz;	/* reg state for 2G band */

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Sat May  7 11:04:36 2011	(r221595)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Sat May  7 11:05:16 2011	(r221596)
@@ -371,6 +371,8 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s
 	/* Read Reg Domain */
 	AH_PRIVATE(ah)->ah_currentRD =
 	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL);
+	AH_PRIVATE(ah)->ah_currentRDext =
+	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL);
 
 	/*
 	 * ah_miscMode is populated by ar5416FillCapabilityInfo()

Modified: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c	Sat May  7 11:04:36 2011	(r221595)
+++ head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c	Sat May  7 11:05:16 2011	(r221596)
@@ -236,6 +236,9 @@ ar9130Attach(uint16_t devid, HAL_SOFTC s
 	/* Read Reg Domain */
 	AH_PRIVATE(ah)->ah_currentRD =
 	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL);
+	AH_PRIVATE(ah)->ah_currentRDext =
+	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL);
+
 
 	/*
 	 * ah_miscMode is populated by ar5416FillCapabilityInfo()

Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c	Sat May  7 11:04:36 2011	(r221595)
+++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c	Sat May  7 11:05:16 2011	(r221596)
@@ -241,6 +241,8 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s
 	/* Read Reg Domain */
 	AH_PRIVATE(ah)->ah_currentRD =
 	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL);
+	AH_PRIVATE(ah)->ah_currentRDext =
+	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL);
 
 	/*
 	 * ah_miscMode is populated by ar5416FillCapabilityInfo()

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c	Sat May  7 11:04:36 2011	(r221595)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c	Sat May  7 11:05:16 2011	(r221596)
@@ -325,6 +325,8 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s
 	/* Read Reg Domain */
 	AH_PRIVATE(ah)->ah_currentRD =
 	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL);
+	AH_PRIVATE(ah)->ah_currentRDext =
+	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL);
 
 	/*
 	 * ah_miscMode is populated by ar5416FillCapabilityInfo()

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c	Sat May  7 11:04:36 2011	(r221595)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c	Sat May  7 11:05:16 2011	(r221596)
@@ -284,6 +284,11 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s
 	/* Read Reg Domain */
 	AH_PRIVATE(ah)->ah_currentRD =
 	    ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL);
+	/*
+         * For Kite and later chipsets, the following bits are not
+	 * programmed in EEPROM and so are set as enabled always.
+	 */
+	AH_PRIVATE(ah)->ah_currentRDext = AR9285_RDEXT_DEFAULT;
 
 	/*
 	 * ah_miscMode is populated by ar5416FillCapabilityInfo()



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