From owner-svn-src-all@FreeBSD.ORG Fri Feb 10 10:10:41 2012 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 E0A38106564A; Fri, 10 Feb 2012 10:10:41 +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 CF3698FC0A; Fri, 10 Feb 2012 10:10:41 +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 q1AAAf2r066065; Fri, 10 Feb 2012 10:10:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1AAAfal066063; Fri, 10 Feb 2012 10:10:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201202101010.q1AAAfal066063@svn.freebsd.org> From: Adrian Chadd Date: Fri, 10 Feb 2012 10:10:41 +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: r231371 - head/sys/dev/ath/ath_hal/ar5416 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: Fri, 10 Feb 2012 10:10:42 -0000 Author: adrian Date: Fri Feb 10 10:10:41 2012 New Revision: 231371 URL: http://svn.freebsd.org/changeset/base/231371 Log: Enforce the hardware chainmask when allowing the user to override the chainmask. This way a disabled radio chain can't be enabled by a user. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Feb 10 10:09:16 2012 (r231370) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Feb 10 10:10:41 2012 (r231371) @@ -440,6 +440,7 @@ ar5416SetCapability(struct ath_hal *ah, switch (type) { case HAL_CAP_RX_CHAINMASK: + setting &= ath_hal_eepromGet(ah, AR_EEP_RXMASK, NULL); pCap->halRxChainMask = setting; if (owl_get_ntxchains(setting) > 2) pCap->halRxStreams = 2; @@ -447,6 +448,7 @@ ar5416SetCapability(struct ath_hal *ah, pCap->halRxStreams = 1; return HAL_OK; case HAL_CAP_TX_CHAINMASK: + setting &= ath_hal_eepromGet(ah, AR_EEP_TXMASK, NULL); pCap->halTxChainMask = setting; if (owl_get_ntxchains(setting) > 2) pCap->halTxStreams = 2;