svn commit: r210657 -
user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416
Adrian Chadd
adrian at FreeBSD.org
Fri Jul 30 15:36:57 UTC 2010
Author: adrian
Date: Fri Jul 30 15:36:57 2010
New Revision: 210657
URL: http://svn.freebsd.org/changeset/base/210657
Log:
Don't perform any periodic or longcal calibrations if a noise floor (NF)
calibration is in progress. Scheduling any kind of calibration whilst another
is pending is a big no-no.
This should fix the issue of periodic calibrations being performed during
NF calibrations but it doesn't stop NF calibrations being scheduled during
a periodic calibration. That'll come next.
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 15:25:57 2010 (r210656)
+++ user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Jul 30 15:36:57 2010 (r210657)
@@ -406,6 +406,30 @@ ar5416PerCalibrationN(struct ath_hal *ah
OS_MARK(ah, AH_MARK_PERCAL, chan->ic_freq);
+ /*
+ * Don't do any of these calibrations if there's a NF
+ * calibration in progress. Long calibration will try to program
+ * the CCA registers and kick another NF calibration ; periodic
+ * calibrations shouldn't be occuring during a NF calibration.
+ */
+ if (ar5416IsNFCalInProgress(ah)) {
+ HALDEBUG(ah, HAL_DEBUG_ANY,
+ "%s: NF calibration in-progress; skipping\n",
+ __func__);
+
+ /*
+ * Is there a percal in progress? Return
+ * "not-done" so we're re-prodded very soon.
+ */
+ if (currCal && ((currCal->calState == CAL_WAITING) ||
+ (currCal->calState == CAL_RUNNING)))
+ *isCalDone = AH_FALSE;
+ else
+ *isCalDone = AH_TRUE;
+
+ return AH_TRUE;
+ }
+
*isCalDone = AH_TRUE;
/*
More information about the svn-src-user
mailing list