Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 May 2011 17:30:26 +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: r221702 - head/sys/dev/ath/ath_hal/ar9002
Message-ID:  <201105091730.p49HUQK6006010@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Mon May  9 17:30:25 2011
New Revision: 221702
URL: http://svn.freebsd.org/changeset/base/221702

Log:
  Disable diversity combining support until I can get a firm answer
  from Atheros as to what/when this is supposed to be enabled.
  
  Using the default RX fast diversity settings seems to help quite
  a bit.
  
  Whilst I'm here, change the prototype to return HAL_BOOL rather than int.

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

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c	Mon May  9 17:10:48 2011	(r221701)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c	Mon May  9 17:30:25 2011	(r221702)
@@ -75,24 +75,30 @@ ar9285_antdiv_comb_conf_set(struct ath_h
 }
 
 /*
- * Check whether antenna diversity should be enabled
+ * Check whether combined + fast antenna diversity should be enabled.
+ *
+ * This enables software-driven RX antenna diversity based on RX
+ * RSSI + antenna config packet sampling.
  */
-int
+HAL_BOOL
 ar9285_check_div_comb(struct ath_hal *ah)
 {
 	uint8_t ant_div_ctl1;
 	HAL_EEPROM_v4k *ee = AH_PRIVATE(ah)->ah_eeprom;
         const MODAL_EEP4K_HEADER *pModal = &ee->ee_base.modalHeader;
 
+	/* For now, simply disable this until it's better debugged. -adrian */
+	return AH_FALSE;
+
 	if (! AR_SREV_KITE(ah))
-		return 0;
+		return AH_FALSE;
 
 	if (pModal->version < 3)
-		return 0;
+		return AH_FALSE;
 
 	ant_div_ctl1 = pModal->antdiv_ctl1;
 	if ((ant_div_ctl1 & 0x1) && ((ant_div_ctl1 >> 3) & 0x1))
-		return 1;
+		return AH_TRUE;
 
-	return 0;
+	return AH_FALSE;
 }

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.h	Mon May  9 17:10:48 2011	(r221701)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_phy.h	Mon May  9 17:30:25 2011	(r221702)
@@ -41,6 +41,6 @@ extern	void ar9285_antdiv_comb_conf_set(
 		struct ar9285_antcomb_conf *antconf);
 extern	void ar9285_antdiv_comb_conf_get(struct ath_hal *ah,
 		struct ar9285_antcomb_conf *antconf);
-extern	int ar9285_check_div_comb(struct ath_hal *ah);
+extern	HAL_BOOL ar9285_check_div_comb(struct ath_hal *ah);
 
 #endif



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