From owner-svn-src-all@FreeBSD.ORG Sat Mar 26 10:47: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 DB102106564A; Sat, 26 Mar 2011 10:47: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 B138B8FC16; Sat, 26 Mar 2011 10:47:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2QAlH4N019427; Sat, 26 Mar 2011 10:47:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2QAlHil019423; Sat, 26 Mar 2011 10:47:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103261047.p2QAlHil019423@svn.freebsd.org> From: Adrian Chadd Date: Sat, 26 Mar 2011 10:47: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: r220027 - in head/sys/dev/ath/ath_hal: . 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, 26 Mar 2011 10:47:17 -0000 Author: adrian Date: Sat Mar 26 10:47:17 2011 New Revision: 220027 URL: http://svn.freebsd.org/changeset/base/220027 Log: Introduce hardware PS-POLL support in the HAL. Linux ath9k only enables this for AR9280 and later NICs; so create a capability for it so it isn't enabled for earlier NICs. Enabling hardware PS-POLL support will come in a later commit and will be disabled by default. Modified: head/sys/dev/ath/ath_hal/ah.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.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat Mar 26 09:25:35 2011 (r220026) +++ head/sys/dev/ath/ath_hal/ah.c Sat Mar 26 10:47:17 2011 (r220027) @@ -599,8 +599,10 @@ ath_hal_getcapability(struct ath_hal *ah default: return HAL_ENOTSUPP; } - case HAP_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ + case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_HAS_PSPOLL: /* hardware has ps-poll support */ + return pCap->halHasPsPollSupport ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat Mar 26 09:25:35 2011 (r220026) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat Mar 26 10:47:17 2011 (r220027) @@ -780,6 +780,8 @@ ar9280FillCapabilityInfo(struct ath_hal #endif pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->hal4kbSplitTransSupport = AH_FALSE; + if (AR_SREV_MERLIN_20_OR_LATER(ah)) + pCap->halHasPsPollSupport = AH_TRUE; pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat Mar 26 09:25:35 2011 (r220026) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat Mar 26 10:47:17 2011 (r220027) @@ -380,6 +380,9 @@ ar9285FillCapabilityInfo(struct ath_hal #endif pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->hal4kbSplitTransSupport = AH_FALSE; + if (AR_SREV_KITE_12_OR_LATER(ah)) + pCap->halHasPsPollSupport = AH_TRUE; + pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1;