From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:05:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F8C9106566B; Sat, 7 May 2011 11:05:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55A418FC17; Sat, 7 May 2011 11:05:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47B5Hk1095877; Sat, 7 May 2011 11:05:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47B5Hnk095870; Sat, 7 May 2011 11:05:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105071105.p47B5Hnk095870@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 11:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221596 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:05:17 -0000 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()