From owner-svn-src-head@FreeBSD.ORG Fri Feb 8 09:07:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C9815C8F; Fri, 8 Feb 2013 09:07:04 +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 8C3E1688; Fri, 8 Feb 2013 09:07:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r18974gO024345; Fri, 8 Feb 2013 09:07:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r18974XN024343; Fri, 8 Feb 2013 09:07:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201302080907.r18974XN024343@svn.freebsd.org> From: Adrian Chadd Date: Fri, 8 Feb 2013 09:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246536 - 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Feb 2013 09:07:04 -0000 Author: adrian Date: Fri Feb 8 09:07:03 2013 New Revision: 246536 URL: http://svnweb.freebsd.org/changeset/base/246536 Log: Fix a corner case that I noticed with the AR5416 (and it's currently crappy 802.11n performance, sigh.) With the AR5416, aggregates need to be limited to 8KiB if RTS/CTS is enabled. However, larger aggregates were going out with RTSCTS enabled. The following was going on: * The first buffer in the list would have RTS/CTS enabled in bf->bf_state.txflags; * The aggregate would be formed; * The "copy over the txflags from the first buffer" logic that I added blanked the RTS/CTS TX flags fields, and then copied the bf_first RTS/CTS flags over; * .. but that'd cause bf_first to be blanked out! And thus the flag was cleared; * So the rest of the aggregate formation would run with those flags cleared, and thus > 8KiB aggregates were formed. The driver is now (again) correctly limiting aggregate formation for the AR5416 but there are still other pending issues to resolve. Tested: * AR5416, STA mode Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 8 08:03:18 2013 (r246535) +++ head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 8 09:07:03 2013 (r246536) @@ -688,11 +688,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s bf->bf_next = NULL; /* - * Don't unlock the tid lock until we're sure we are going - * to queue this frame. - */ - - /* * If the frame doesn't have a sequence number that we're * tracking in the BAW (eg NULL QOS data frame), we can't * aggregate it. Stop the aggregation process; the sender @@ -749,11 +744,13 @@ ath_tx_form_aggr(struct ath_softc *sc, s * that differs from the first frame, override the * subsequent frame with this config. */ - bf->bf_state.bfs_txflags &= - ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); - bf->bf_state.bfs_txflags |= - bf_first->bf_state.bfs_txflags & - (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + if (bf != bf_first) { + bf->bf_state.bfs_txflags &= + ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + bf->bf_state.bfs_txflags |= + bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + } /* * If the packet has a sequence number, do not