From owner-svn-src-all@FreeBSD.ORG Wed May 11 11:02:20 2011 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 E43D3106567A; Wed, 11 May 2011 11:02:20 +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 B82658FC0A; Wed, 11 May 2011 11:02:20 +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 p4BB2K1f087403; Wed, 11 May 2011 11:02:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4BB2Kew087401; Wed, 11 May 2011 11:02:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105111102.p4BB2Kew087401@svn.freebsd.org> From: Adrian Chadd Date: Wed, 11 May 2011 11:02:20 +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: r221773 - head/sys/dev/ath/ath_hal/ar5416 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: Wed, 11 May 2011 11:02:21 -0000 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;