From owner-svn-src-all@FreeBSD.ORG Wed Mar 23 23:48:45 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 1D2F8106566B; Wed, 23 Mar 2011 23:48:45 +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 E66718FC16; Wed, 23 Mar 2011 23:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2NNmip4011004; Wed, 23 Mar 2011 23:48:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2NNmi0P011000; Wed, 23 Mar 2011 23:48:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103232348.p2NNmi0P011000@svn.freebsd.org> From: Adrian Chadd Date: Wed, 23 Mar 2011 23:48:44 +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: r219942 - in head/sys/dev/ath: . ath_hal 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, 23 Mar 2011 23:48:45 -0000 Author: adrian Date: Wed Mar 23 23:48:44 2011 New Revision: 219942 URL: http://svn.freebsd.org/changeset/base/219942 Log: Make the ar2133ForceBias() call controllable at runtime. At least one AR5416 user has reported measurable throughput drops with this option. For now, disable it and make it a run-time twiddle. It won't take affect until the next radio programming trip though (eg channel scan, channel change.) Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar2133.c Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Wed Mar 23 22:35:18 2011 (r219941) +++ head/sys/dev/ath/ah_osdep.c Wed Mar 23 23:48:44 2011 (r219942) @@ -85,6 +85,11 @@ SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); #endif /* AH_DEBUG */ +int ath_hal_ar5416_biasadj = 0; +SYSCTL_INT(_hw_ath_hal, OID_AUTO, ar5416_biasadj, CTLFLAG_RW, + &ath_hal_debug, 0, "Enable 2ghz AR5416 direction sensitivity" + " bias adjust"); + /* NB: these are deprecated; they exist for now for compatibility */ int ath_hal_dma_beacon_response_time = 2; /* in TU's */ SYSCTL_INT(_hw_ath_hal, OID_AUTO, dma_brt, CTLFLAG_RW, Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Wed Mar 23 22:35:18 2011 (r219941) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed Mar 23 23:48:44 2011 (r219942) @@ -476,6 +476,7 @@ isBigEndian(void) extern int ath_hal_dma_beacon_response_time; /* in TU's */ extern int ath_hal_sw_beacon_response_time; /* in TU's */ extern int ath_hal_additional_swba_backoff; /* in TU's */ +extern int ath_hal_ar5416_biasadj; /* 1 or 0 */ /* wait for the register contents to have the specified value */ extern HAL_BOOL ath_hal_wait(struct ath_hal *, u_int reg, Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar2133.c Wed Mar 23 22:35:18 2011 (r219941) +++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c Wed Mar 23 23:48:44 2011 (r219942) @@ -185,7 +185,7 @@ ar2133SetChannel(struct ath_hal *ah, con } /* Workaround for hw bug - AR5416 specific */ - if (AR_SREV_OWL(ah)) + if (AR_SREV_OWL(ah) && ath_hal_ar5416_biasadj) ar2133ForceBias(ah, freq); reg32 = (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) |