From owner-svn-src-head@FreeBSD.ORG Sun May 15 07:59:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 960E5106564A; Sun, 15 May 2011 07:59:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 862038FC14; Sun, 15 May 2011 07:59:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4F7xXEN029737; Sun, 15 May 2011 07:59:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4F7xX5d029735; Sun, 15 May 2011 07:59:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105150759.p4F7xX5d029735@svn.freebsd.org> From: Adrian Chadd Date: Sun, 15 May 2011 07:59:33 +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: r221944 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2011 07:59:33 -0000 Author: adrian Date: Sun May 15 07:59:33 2011 New Revision: 221944 URL: http://svn.freebsd.org/changeset/base/221944 Log: Fix NF calibration breakage introduced by me in a past commit. Since the returned NF will be -ve, checking for <= 0 is not good enough. For now, check whether it equals 0 or -1; a future commit will tidy this mess up and have it return HAL_BOOL instead. 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 Sun May 15 06:42:32 2011 (r221943) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun May 15 07:59:33 2011 (r221944) @@ -501,7 +501,7 @@ ar5416PerCalibrationN(struct ath_hal *ah * and update the history buffer. */ r = ar5416GetNf(ah, chan); - if (r <= 0) { + if (r == 0 || r == -1) { /* NF calibration result isn't valid */ HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, "%s: NF calibration" " didn't finish; delaying CCA\n", __func__);