From owner-svn-src-user@FreeBSD.ORG Fri Jul 30 13:26:02 2010 Return-Path: <owner-svn-src-user@FreeBSD.ORG> Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9414C106566B; Fri, 30 Jul 2010 13:26:02 +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 833628FC13; Fri, 30 Jul 2010 13:26:02 +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 o6UDQ2lm073069; Fri, 30 Jul 2010 13:26:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6UDQ2Xx073067; Fri, 30 Jul 2010 13:26:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007301326.o6UDQ2Xx073067@svn.freebsd.org> From: Adrian Chadd <adrian@FreeBSD.org> Date: Fri, 30 Jul 2010 13:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210647 - user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" <svn-src-user.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>, <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user> List-Post: <mailto:svn-src-user@freebsd.org> List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-user>, <mailto:svn-src-user-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 30 Jul 2010 13:26:02 -0000 Author: adrian Date: Fri Jul 30 13:26:02 2010 New Revision: 210647 URL: http://svn.freebsd.org/changeset/base/210647 Log: The HAL ath_hal_calibrateN() calls the ah_perCalibrationN method with rxchainmask set to 0x1. This means only the first radio chain is calibrated. Linux ath9k calibrates all three radio chains and a little investigation by a friendly atheros developer indicates this is what should occur. So for now, override what the OS dependant HAL macro does and set the current rxchainmask. This calibrates all three radio chains on the AR9160. The AR5416 doesn't do any periodic calibration aside from noise floor by default. I haven't yet tried it on any other chipsets supported by this code. Modified: user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Jul 30 13:23:21 2010 (r210646) +++ user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Jul 30 13:26:02 2010 (r210647) @@ -414,6 +414,13 @@ ar5416PerCalibrationN(struct ath_hal *ah *isCalDone = AH_TRUE; + /* + * Since ath_hal calls the PerCal method with rxchainmask=0x1; + * override it with the current chainmask. The upper levels currently + * doesn't know about the chainmask. + */ + rxchainmask = ahp->ah_rx_chainmask; + /* Invalid channel check */ ichan = ath_hal_checkchannel(ah, chan); if (ichan == AH_NULL) {