From owner-svn-src-head@FreeBSD.ORG Wed Nov 9 23:28:47 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 A95E1106566C; Wed, 9 Nov 2011 23:28:47 +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 98D408FC16; Wed, 9 Nov 2011 23:28:47 +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 pA9NSlVM004628; Wed, 9 Nov 2011 23:28:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA9NSlFH004626; Wed, 9 Nov 2011 23:28:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201111092328.pA9NSlFH004626@svn.freebsd.org> From: Adrian Chadd Date: Wed, 9 Nov 2011 23:28:47 +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: r227411 - 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: Wed, 09 Nov 2011 23:28:47 -0000 Author: adrian Date: Wed Nov 9 23:28:47 2011 New Revision: 227411 URL: http://svn.freebsd.org/changeset/base/227411 Log: Bump this up to where it used to be. I need to investigate this a little closer, but it seems that in noisy environments the NF load takes longer than 5 * DELAY(10) and this is messing up future NF calibrations. (The background: NF calibrations begin at the value programmed in after the load has completed, so if this is never loaded in, the NF calibrations only ever start at the currently calibrated NF value, rather than starting at something high (say -50.) More investigation about the effect on 11n RX and calibration results are needed. Sponsored by: Hobnob, Inc. 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 Nov 9 22:39:44 2011 (r227410) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Wed Nov 9 23:28:47 2011 (r227411) @@ -642,15 +642,7 @@ ar5416LoadNF(struct ath_hal *ah, const s OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); /* Wait for load to complete, should be fast, a few 10s of us. */ - /* - * XXX For now, don't be so aggressive in waiting for the NF - * XXX load to complete. A very busy 11n RX load will cause this - * XXX to always fail; so just leave it. - * XXX Later on we may wish to split longcal into two parts - one to do - * XXX the initial longcal, and one to load in an updated NF value - * XXX once it's finished - say, by checking it every 500ms. - */ - if (! ar5212WaitNFCalComplete(ah, 5)) { + if (! ar5212WaitNFCalComplete(ah, 1000)) { /* * We timed out waiting for the noisefloor to load, probably due to an * in-progress rx. Simply return here and allow the load plenty of time