From owner-svn-src-all@FreeBSD.ORG Sat Jul 28 07:28:09 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 979EB106564A; Sat, 28 Jul 2012 07:28:09 +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 816F38FC08; Sat, 28 Jul 2012 07:28:09 +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 q6S7S93u097320; Sat, 28 Jul 2012 07:28:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6S7S9Gj097313; Sat, 28 Jul 2012 07:28:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207280728.q6S7S9Gj097313@svn.freebsd.org> From: Adrian Chadd Date: Sat, 28 Jul 2012 07:28:09 +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: r238858 - in head/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 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: Sat, 28 Jul 2012 07:28:09 -0000 Author: adrian Date: Sat Jul 28 07:28:08 2012 New Revision: 238858 URL: http://svn.freebsd.org/changeset/base/238858 Log: Flesh out the multi-rate retry capability. The existing method for testing for MRR is to call the "SetupXTXDesc" HAL method and see if it returns AH_TRUE or AH_FALSE. This capability explicitly lists what number of multi-rate attempts are possible. "1" means "one rate attempt supported". Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat Jul 28 07:25:00 2012 (r238857) +++ head/sys/dev/ath/ath_hal/ah.c Sat Jul 28 07:28:08 2012 (r238858) @@ -657,7 +657,8 @@ ath_hal_getcapability(struct ath_hal *ah } case HAL_CAP_RXBUFSIZE: case HAL_CAP_NUM_MR_RETRIES: - return HAL_EINVAL; /* XXX not yet */ + *result = pCap->halNumMRRetries; + return HAL_OK; case HAL_CAP_BT_COEX: return pCap->halBtCoexSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_HT20_SGI: Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sat Jul 28 07:25:00 2012 (r238857) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sat Jul 28 07:28:08 2012 (r238858) @@ -252,6 +252,7 @@ typedef struct { int halRxStatusLen; int halRxHpFifoDepth; int halRxLpFifoDepth; + int halNumMRRetries; } HAL_CAPABILITIES; struct regDomain; Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Sat Jul 28 07:25:00 2012 (r238857) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Sat Jul 28 07:28:08 2012 (r238858) @@ -361,6 +361,7 @@ ar5210FillCapabilityInfo(struct ath_hal pCap->halSleepAfterBeaconBroken = AH_TRUE; pCap->halPSPollBroken = AH_FALSE; + pCap->halNumMRRetries = 1; /* No hardware MRR support */ pCap->halTotalQueues = HAL_NUM_TX_QUEUES; pCap->halKeyCacheSize = 64; Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Sat Jul 28 07:25:00 2012 (r238857) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Sat Jul 28 07:28:08 2012 (r238858) @@ -496,6 +496,7 @@ ar5211FillCapabilityInfo(struct ath_hal pCap->halSleepAfterBeaconBroken = AH_TRUE; pCap->halPSPollBroken = AH_TRUE; pCap->halVEOLSupport = AH_TRUE; + pCap->halNumMRRetries = 1; /* No hardware MRR support */ pCap->halTotalQueues = HAL_NUM_TX_QUEUES; pCap->halKeyCacheSize = 128; Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Sat Jul 28 07:25:00 2012 (r238857) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Sat Jul 28 07:28:08 2012 (r238858) @@ -824,6 +824,7 @@ ar5212FillCapabilityInfo(struct ath_hal pCap->halTurboGSupport = pCap->halWirelessModes & HAL_MODE_108G; pCap->halPSPollBroken = AH_TRUE; /* XXX fixed in later revs? */ + pCap->halNumMRRetries = 4; /* Hardware supports 4 MRR */ pCap->halVEOLSupport = AH_TRUE; pCap->halBssIdMaskSupport = AH_TRUE; pCap->halMcastKeySrchSupport = AH_TRUE; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Jul 28 07:25:00 2012 (r238857) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Jul 28 07:28:08 2012 (r238858) @@ -892,6 +892,7 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halTurboGSupport = pCap->halWirelessModes & HAL_MODE_108G; pCap->halPSPollBroken = AH_TRUE; /* XXX fixed in later revs? */ + pCap->halNumMRRetries = 4; /* Hardware supports 4 MRR */ pCap->halVEOLSupport = AH_TRUE; pCap->halBssIdMaskSupport = AH_TRUE; pCap->halMcastKeySrchSupport = AH_TRUE; /* Works on AR5416 and later */