From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 23:01:53 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 921F71065673; Tue, 25 Oct 2011 23:01:53 +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 811088FC08; Tue, 25 Oct 2011 23:01:53 +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 p9PN1rve020534; Tue, 25 Oct 2011 23:01:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PN1rJS020532; Tue, 25 Oct 2011 23:01:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110252301.p9PN1rJS020532@svn.freebsd.org> From: Adrian Chadd Date: Tue, 25 Oct 2011 23:01:53 +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: r226758 - 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: Tue, 25 Oct 2011 23:01:53 -0000 Author: adrian Date: Tue Oct 25 23:01:53 2011 New Revision: 226758 URL: http://svn.freebsd.org/changeset/base/226758 Log: Reduce the NF wait timeout. When doing heavy 11n RX loads, this can actually interfere with traffic, as the NF load can take quite a while and poking the AGC every 10uS is just a bit silly. Instead, just leave the baseband NF calibration where it is and just read it back next time a longcal interval happens. 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 Tue Oct 25 22:47:36 2011 (r226757) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Oct 25 23:01:53 2011 (r226758) @@ -642,7 +642,15 @@ 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. */ - if (! ar5212WaitNFCalComplete(ah, 1000)) { + /* + * 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)) { /* * 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