Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2012 00:02:46 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
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
Message-ID:  <201212040002.qB402kEJ091128@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212040002.qB402kEJ091128>