svn commit: r221897 - head/sys/dev/ath/ath_hal

Adrian Chadd adrian at FreeBSD.org
Sat May 14 15:24:16 UTC 2011


Author: adrian
Date: Sat May 14 15:24:15 2011
New Revision: 221897
URL: http://svn.freebsd.org/changeset/base/221897

Log:
  Fix the Merlin 5ghz fast-clock EEPROM fetch to return the correct value.
  
  The eeprom Get method should return HAL_OK if fastclock is enabled in the
  EEPROM. It was returning the opposite of what it should have.
  
  Submitted by:	Matthew Fleming <mdf356 at gmail.com>

Modified:
  head/sys/dev/ath/ath_hal/ah_eeprom_v14.c

Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_eeprom_v14.c	Sat May 14 15:12:02 2011	(r221896)
+++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.c	Sat May 14 15:24:15 2011	(r221897)
@@ -84,8 +84,10 @@ v14EepromGet(struct ath_hal *ah, int par
 		return IS_VERS(>=, AR5416_EEP_MINOR_VER_19) ?
 		    pBase->txGainType : AR5416_EEP_TXGAIN_ORIG;
 	case AR_EEP_FSTCLK_5G:
-		return IS_VERS(>, AR5416_EEP_MINOR_VER_16) ?
-		    pBase->fastClk5g : AH_TRUE;
+		/* 5ghz fastclock is always enabled for Merlin minor <= 16 */
+		if (IS_VERS(<=, AR5416_EEP_MINOR_VER_16))
+			return HAL_OK;
+		return pBase->fastClk5g ? HAL_OK : HAL_EIO;
 	case AR_EEP_OL_PWRCTRL:
 		HALASSERT(val == AH_NULL);
 		return pBase->openLoopPwrCntl ?  HAL_OK : HAL_EIO;


More information about the svn-src-head mailing list