From owner-svn-src-all@FreeBSD.ORG Tue Dec 4 00:02:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41B30DD5; Tue, 4 Dec 2012 00:02:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1B02F8FC13; Tue, 4 Dec 2012 00:02:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB402k9g091131; Tue, 4 Dec 2012 00:02:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB402kEJ091128; Tue, 4 Dec 2012 00:02:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201212040002.qB402kEJ091128@svn.freebsd.org> From: Adrian Chadd Date: Tue, 4 Dec 2012 00:02:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243843 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 04 Dec 2012 00:02:47 -0000 Author: adrian Date: Tue Dec 4 00:02:46 2012 New Revision: 243843 URL: http://svnweb.freebsd.org/changeset/base/243843 Log: Methodise the BT diversity configuration function; so the AR9285 can correctly override it. This was missed in the previous commit. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Dec 4 00:01:42 2012 (r243842) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Dec 4 00:02:46 2012 (r243843) @@ -107,6 +107,9 @@ struct ath_hal_5416 { void (*ah_initPLL) (struct ath_hal *ah, const struct ieee80211_channel *chan); + /* bluetooth coexistence operations */ + void (*ah_btCoexSetDiversity)(struct ath_hal *ah); + u_int ah_globaltxtimeout; /* global tx timeout */ u_int ah_gpioMask; int ah_hangs; /* h/w hangs state */ @@ -200,6 +203,7 @@ extern void ar5416SetBTCoexInfo(struct a HAL_BT_COEX_INFO *btinfo); extern void ar5416BTCoexConfig(struct ath_hal *ah, HAL_BT_COEX_CONFIG *btconf); +extern void ar5416BTCoexAntennaDiversity(struct ath_hal *ah); extern void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum); extern void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType); extern void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Dec 4 00:01:42 2012 (r243842) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Dec 4 00:02:46 2012 (r243843) @@ -200,6 +200,7 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_btcoexSetParameter = ar5416BTCoexSetParameter; ah->ah_btCoexDisable = ar5416BTCoexDisable; ah->ah_btCoexEnable = ar5416BTCoexEnable; + AH5416(ah)->ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity; ahp->ah_priv.ah_getWirelessModes= ar5416GetWirelessModes; ahp->ah_priv.ah_eepromRead = ar5416EepromRead; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Tue Dec 4 00:01:42 2012 (r243842) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_btcoex.c Tue Dec 4 00:02:46 2012 (r243843) @@ -173,7 +173,7 @@ ar5416BTCoexSetupBmissThresh(struct ath_ * * Kite will override this particular method. */ -static void +void ar5416BTCoexAntennaDiversity(struct ath_hal *ah) { } @@ -350,8 +350,12 @@ ar5416InitBTCoex(struct ath_hal *ah) ar5416GpioCfgInput(ah, ahp->ah_btActiveGpioSelect); ar5416GpioCfgInput(ah, ahp->ah_btPriorityGpioSelect); - if (AR_SREV_KITE(ah)) - ar5416BTCoexAntennaDiversity(ah); + /* + * Configure the antenna diversity setup. + * It's a no-op for AR9287; AR9285 overrides this + * as required. + */ + AH5416(ah)->ah_btCoexSetDiversity(ah); if (ahp->ah_btCoexEnabled) ar5416BTCoexEnable(ah);