From owner-svn-src-all@FreeBSD.ORG Sat Mar 23 23:51:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1A558B26; Sat, 23 Mar 2013 23:51:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0C47017A; Sat, 23 Mar 2013 23:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2NNpBPm034727; Sat, 23 Mar 2013 23:51:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2NNpBrZ034726; Sat, 23 Mar 2013 23:51:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201303232351.r2NNpBrZ034726@svn.freebsd.org> From: Adrian Chadd Date: Sat, 23 Mar 2013 23:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248670 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 23 Mar 2013 23:51:12 -0000 Author: adrian Date: Sat Mar 23 23:51:11 2013 New Revision: 248670 URL: http://svnweb.freebsd.org/changeset/base/248670 Log: CABQ calculation changes to try and fix some weird corner cases leading to stuck beacons. * Set the cabq readytime (ie, how long to burst for) to 50% of the total beacon interval time * fix the cabq adjustment calculation based on how the beacon offset is calculated (the SWBA/DBA time offset.) This is all still a bit magic voodoo but it does seem to have further quietened issues with missed/stuck beacons under my local testing. In any case, it better matches what the reference HAL implements. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sat Mar 23 23:27:16 2013 (r248669) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Sat Mar 23 23:51:11 2013 (r248670) @@ -1191,10 +1191,10 @@ ar5416ResetTxQueue(struct ath_hal *ah, u * XXX which I gather is because of such a long * XXX cabq time.) */ - value = (ahp->ah_beaconInterval * 70 / 100) - - (ah->ah_config.ah_sw_beacon_response_time - + ah->ah_config.ah_dma_beacon_response_time) - - ah->ah_config.ah_additional_swba_backoff; + value = (ahp->ah_beaconInterval * 50 / 100) + - ah->ah_config.ah_additional_swba_backoff + - ah->ah_config.ah_sw_beacon_response_time + + ah->ah_config.ah_dma_beacon_response_time; /* * XXX Ensure it isn't too low - nothing lower * XXX than 10 TU