Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jul 2010 13:26:02 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r210647 - user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416
Message-ID:  <201007301326.o6UDQ2Xx073067@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri Jul 30 13:26:02 2010
New Revision: 210647
URL: http://svn.freebsd.org/changeset/base/210647

Log:
  The HAL ath_hal_calibrateN() calls the ah_perCalibrationN method with
  rxchainmask set to 0x1. This means only the first radio chain is calibrated.
  
  Linux ath9k calibrates all three radio chains and a little investigation
  by a friendly atheros developer indicates this is what should occur. So for now,
  override what the OS dependant HAL macro does and set the current rxchainmask.
  
  This calibrates all three radio chains on the AR9160. The AR5416 doesn't
  do any periodic calibration aside from noise floor by default. I haven't
  yet tried it on any other chipsets supported by this code.

Modified:
  user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c

Modified: user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Fri Jul 30 13:23:21 2010	(r210646)
+++ user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Fri Jul 30 13:26:02 2010	(r210647)
@@ -414,6 +414,13 @@ ar5416PerCalibrationN(struct ath_hal *ah
 
 	*isCalDone = AH_TRUE;
 
+	/*
+	 * Since ath_hal calls the PerCal method with rxchainmask=0x1;
+	 * override it with the current chainmask. The upper levels currently
+	 * doesn't know about the chainmask.
+	 */
+	rxchainmask = ahp->ah_rx_chainmask;
+
 	/* Invalid channel check */
 	ichan = ath_hal_checkchannel(ah, chan);
 	if (ichan == AH_NULL) {



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