From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:31:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC82DBB1; Fri, 26 Oct 2012 16:31:12 +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 8739D8FC17; Fri, 26 Oct 2012 16:31:12 +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 q9QGVC2R040110; Fri, 26 Oct 2012 16:31:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGVCnF040108; Fri, 26 Oct 2012 16:31:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210261631.q9QGVCnF040108@svn.freebsd.org> From: Adrian Chadd Date: Fri, 26 Oct 2012 16:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242144 - head/sys/dev/ath 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: Fri, 26 Oct 2012 16:31:12 -0000 Author: adrian Date: Fri Oct 26 16:31:12 2012 New Revision: 242144 URL: http://svn.freebsd.org/changeset/base/242144 Log: Since it's not immediately obvious whether the current TX path handles fragment rate lookups correctly, add a comment describing exactly that. The assumption in the fragment duration code is the duration of the next fragment will match the rate used by the current fragment. But I think a rate lookup is being done for _each_ fragment. For older pre-sample rate control this would almost always be the case, but for sample it may be incorrect more often then correct. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Oct 26 16:30:49 2012 (r242143) +++ head/sys/dev/ath/if_ath_tx.c Fri Oct 26 16:31:12 2012 (r242144) @@ -1067,6 +1067,10 @@ ath_tx_calc_duration(struct ath_softc *s * Include the size of next fragment so NAV is * updated properly. The last fragment uses only * the ACK duration + * + * XXX TODO: ensure that the rate lookup for each + * fragment is the same as the rate used by the + * first fragment! */ dur += ath_hal_computetxtime(ah, rt, bf->bf_m->m_nextpkt->m_pkthdr.len,