Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2009 03:15:28 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187608 - head/sys/dev/ath
Message-ID:  <200901230315.n0N3FSOY029674@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Fri Jan 23 03:15:28 2009
New Revision: 187608
URL: http://svn.freebsd.org/changeset/base/187608

Log:
  don't run the calibration code if scanning, we won't be on the home channel

Modified:
  head/sys/dev/ath/if_ath.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Fri Jan 23 00:58:14 2009	(r187607)
+++ head/sys/dev/ath/if_ath.c	Fri Jan 23 03:15:28 2009	(r187608)
@@ -5793,9 +5793,12 @@ ath_calibrate(void *arg)
 	struct ath_softc *sc = arg;
 	struct ath_hal *ah = sc->sc_ah;
 	struct ifnet *ifp = sc->sc_ifp;
+	struct ieee80211com *ic = ifp->if_l2com;
 	HAL_BOOL longCal, isCalDone;
 	int nextcal;
 
+	if (ic->ic_flags & IEEE80211_F_SCAN)	/* defer, off channel */
+		goto restart;
 	longCal = (ticks - sc->sc_lastlongcal >= ath_longcalinterval*hz);
 	if (longCal) {
 		sc->sc_stats.ast_per_cal++;
@@ -5833,6 +5836,7 @@ ath_calibrate(void *arg)
 		sc->sc_stats.ast_per_calfail++;
 	}
 	if (!isCalDone) {
+restart:
 		/*
 		 * Use a shorter interval to potentially collect multiple
 		 * data samples required to complete calibration.  Once



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