svn commit: r210647 - user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416

Adrian Chadd adrian at
Fri Jul 30 13:26:02 UTC 2010

Author: adrian
Date: Fri Jul 30 13:26:02 2010
New Revision: 210647

  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
--- 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) {

More information about the svn-src-user mailing list