From owner-svn-src-head@FreeBSD.ORG Mon Jan 30 23:07:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2886106566B; Mon, 30 Jan 2012 23:07:27 +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 C1EC08FC0C; Mon, 30 Jan 2012 23:07:27 +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 q0UN7RL2006724; Mon, 30 Jan 2012 23:07:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0UN7Rvl006718; Mon, 30 Jan 2012 23:07:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201201302307.q0UN7Rvl006718@svn.freebsd.org> From: Adrian Chadd Date: Mon, 30 Jan 2012 23:07:27 +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: r230791 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2012 23:07:28 -0000 Author: adrian Date: Mon Jan 30 23:07:27 2012 New Revision: 230791 URL: http://svn.freebsd.org/changeset/base/230791 Log: Radar API related fixes. * For legacy NICs, the combined RSSI should be used. For earlier AR5416 NICs, use control chain 0 RSSI rather than combined RSSI. For AR5416 > version 2.1, use the combined RSSI again. * Add in a missing AR5212 HAL method (get11nextbusy) which may be called by radar code. This serves no functional change for what's currently in FreeBSD. Modified: 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.h head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Mon Jan 30 23:03:21 2012 (r230790) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Mon Jan 30 23:07:27 2012 (r230791) @@ -359,6 +359,12 @@ ar5210FillCapabilityInfo(struct ath_hal pCap->halChanHalfRate = AH_FALSE; pCap->halChanQuarterRate = AH_FALSE; + /* + * RSSI uses the combined field; some 11n NICs may use + * the control chain RSSI. + */ + pCap->halUseCombinedRadarRssi = AH_TRUE; + if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL)) { /* * Setup initial rfsilent settings based on the EEPROM Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Mon Jan 30 23:03:21 2012 (r230790) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Mon Jan 30 23:07:27 2012 (r230791) @@ -494,6 +494,12 @@ ar5211FillCapabilityInfo(struct ath_hal pCap->halChanHalfRate = AH_FALSE; pCap->halChanQuarterRate = AH_FALSE; + /* + * RSSI uses the combined field; some 11n NICs may use + * the control chain RSSI. + */ + pCap->halUseCombinedRadarRssi = AH_TRUE; + if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { /* NB: enabled by default */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Mon Jan 30 23:03:21 2012 (r230790) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Mon Jan 30 23:07:27 2012 (r230791) @@ -628,5 +628,6 @@ extern HAL_BOOL ar5212ProcessRadarEvent( struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event); extern HAL_BOOL ar5212IsFastClockEnabled(struct ath_hal *ah); +extern uint32_t ar5212Get11nExtBusy(struct ath_hal *ah); #endif /* _ATH_AR5212_H_ */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Mon Jan 30 23:03:21 2012 (r230790) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Mon Jan 30 23:07:27 2012 (r230791) @@ -134,6 +134,7 @@ static const struct ath_hal_private ar52 .ah_getDfsThresh = ar5212GetDfsThresh, .ah_procRadarEvent = ar5212ProcessRadarEvent, .ah_isFastClockEnabled = ar5212IsFastClockEnabled, + .ah_get11nExtBusy = ar5212Get11nExtBusy, /* Key Cache Functions */ .ah_getKeyCacheSize = ar5212GetKeyCacheSize, @@ -839,6 +840,12 @@ ar5212FillCapabilityInfo(struct ath_hal pCap->halChanHalfRate = AH_TRUE; pCap->halChanQuarterRate = AH_TRUE; + /* + * RSSI uses the combined field; some 11n NICs may use + * the control chain RSSI. + */ + pCap->halUseCombinedRadarRssi = AH_TRUE; + if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { /* NB: enabled by default */ Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Mon Jan 30 23:03:21 2012 (r230790) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Mon Jan 30 23:07:27 2012 (r230791) @@ -1233,3 +1233,13 @@ ar5212IsFastClockEnabled(struct ath_hal { return AH_FALSE; } + +/* + * Return what percentage of the extension channel is busy. + * This is always disabled for AR5212 series NICs. + */ +uint32_t +ar5212Get11nExtBusy(struct ath_hal *ah) +{ + return 0; +}