From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 03:15:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3714F106566B; Fri, 23 Jan 2009 03:15:29 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25D3D8FC08; Fri, 23 Jan 2009 03:15:29 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0N3FSGU029675; Fri, 23 Jan 2009 03:15:28 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0N3FSOY029674; Fri, 23 Jan 2009 03:15:28 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901230315.n0N3FSOY029674@svn.freebsd.org> From: Sam Leffler Date: Fri, 23 Jan 2009 03:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187608 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 03:15:29 -0000 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