Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 May 2011 11:02:20 +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: r221773 - head/sys/dev/ath/ath_hal/ar5416
Message-ID:  <201105111102.p4BB2Kew087401@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed May 11 11:02:20 2011
New Revision: 221773
URL: http://svn.freebsd.org/changeset/base/221773

Log:
  Remove the initial NF completion check.
  
  This is taking quite a while for some people in some situations
  (eg AR5418 in phk's Abusive Radio Environment).
  
  Instead, the rest of the calibration related code should
  ensure that a NF calibration has occured before reading NF
  values and kicking off another NF calibration.
  
  The channel should also likely be marked as "noisy" (CWINT)
  if the NF calibration takes too long.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Wed May 11 10:30:31 2011	(r221772)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Wed May 11 11:02:20 2011	(r221773)
@@ -264,31 +264,13 @@ ar5416InitCal(struct ath_hal *ah, const 
 	 * triggered at the same time.
 	 */
 	OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
-	/*
-	 * This sometimes takes a -lot- longer than it should.
-	 * Just give it a bit more time.
-	 */
-	for (i = 0; i < MAX_CAL_CHECK; i++) {
-		if (ar5212WaitNFCalComplete(ah, 10000))
-			break;
 
-		HALDEBUG(ah, HAL_DEBUG_ANY, "%s: initial NF calibration did "
-		    "not complete in time; noisy environment (pass %d)?\n", __func__, i);
-	}
-	
 	/*
-	 * Although periodic and NF calibrations shouldn't run concurrently,
-	 * this was causing the radio to not be usable on the active
-	 * channel if the channel was busy.
-	 *
-	 * Instead, now simply print a warning and continue. That way if users
-	 * report "weird crap", they should get this warning.
+	 * This may take a while to run; make sure subsequent
+	 * calibration routines check that this has completed
+	 * before reading the value and triggering a subsequent
+	 * calibration.
 	 */
-	if (i >= MAX_CAL_CHECK) {
-		ath_hal_printf(ah, "[ath] Warning - initial NF calibration did "
-		    "not complete in time, noisy environment?\n");
-		/* return AH_FALSE; */
-	}
 
 	/* Initialize list pointers */
 	cal->cal_list = cal->cal_last = cal->cal_curr = AH_NULL;



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