Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2011 15:12:48 +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: r220600 - in head/sys/dev/ath/ath_hal: . ar9002
Message-ID:  <201104131512.p3DFCmuL096513@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Apr 13 15:12:48 2011
New Revision: 220600
URL: http://svn.freebsd.org/changeset/base/220600

Log:
  Add in the last bit of the HAL support for Kite diversity.
  
  * add a new method, specifically for doing per-RX packet
    antenna diversity
  * set that HAL method only if it's Kite and a Kite chip that
    does diversity.

Modified:
  head/sys/dev/ath/ath_hal/ah.h
  head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c

Modified: head/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.h	Wed Apr 13 15:08:51 2011	(r220599)
+++ head/sys/dev/ath/ath_hal/ah.h	Wed Apr 13 15:12:48 2011	(r220600)
@@ -767,6 +767,9 @@ struct ath_hal {
 				const struct ieee80211_channel *);
 	void	  __ahdecl(*ah_procMibEvent)(struct ath_hal *,
 				const HAL_NODE_STATS *);
+	void	  __ahdecl(*ah_rxAntCombDiversity)(struct ath_hal *,
+				struct ath_rx_status *,
+				unsigned long, int);
 
 	/* Misc Functions */
 	HAL_STATUS __ahdecl(*ah_getCapability)(struct ath_hal *,

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c	Wed Apr 13 15:08:51 2011	(r220599)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c	Wed Apr 13 15:12:48 2011	(r220600)
@@ -34,6 +34,8 @@
 #include "ar9002/ar9280v2.ini"		/* XXX ini for tx/rx gain */
 
 #include "ar9002/ar9285_cal.h"
+#include "ar9002/ar9285_phy.h"
+#include "ar9002/ar9285_diversity.h"
 
 static const HAL_PERCAL_DATA ar9280_iq_cal = {		/* single sample */
 	.calName = "IQ", .calType = IQ_MISMATCH_CAL,
@@ -262,6 +264,12 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s
 		goto bad;
 	}
 
+	/* Print out whether the EEPROM settings enable AR9285 diversity */
+	if (ar9285_check_div_comb(ah)) {
+		ath_hal_printf(ah, "[ath] Enabling diversity for Kite\n");
+		ah->ah_rxAntCombDiversity = ar9285_ant_comb_scan;
+	}
+
 	/* Disable 11n for the AR2427 */
 	if (devid == AR2427_DEVID_PCIE)
 		AH_PRIVATE(ah)->ah_caps.halHTSupport = AH_FALSE;



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