From owner-svn-src-head@FreeBSD.ORG Sun Sep 9 05:06:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37C92106566C; Sun, 9 Sep 2012 05:06:17 +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 09B028FC0C; Sun, 9 Sep 2012 05:06:17 +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 q8956G7M010396; Sun, 9 Sep 2012 05:06:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8956GCM010394; Sun, 9 Sep 2012 05:06:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209090506.q8956GCM010394@svn.freebsd.org> From: Adrian Chadd Date: Sun, 9 Sep 2012 05:06:16 +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: r240255 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 09 Sep 2012 05:06:17 -0000 Author: adrian Date: Sun Sep 9 05:06:16 2012 New Revision: 240255 URL: http://svn.freebsd.org/changeset/base/240255 Log: Make sure the aggregate fields are properly cleared - both in the ath_buf and when forming a non-aggregate frame. The non-11n setds function is called when TXing aggregate frames (and yes, I should fix this!) and the non-11n TX aggregation code doesn't clear the delimiter field. I figure it's nicer to do that. 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 Sun Sep 9 04:53:10 2012 (r240254) +++ head/sys/dev/ath/if_ath_tx.c Sun Sep 9 05:06:16 2012 (r240255) @@ -377,6 +377,11 @@ ath_tx_chaindesclist(struct ath_softc *s , i == bf->bf_nseg - 1 /* last segment */ , (struct ath_desc *) ds0 /* first descriptor */ ); + + /* Make sure the 11n aggregate fields are cleared */ + if (ath_tx_is_11n(sc)) + ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); + isFirstDesc = 0; #ifdef ATH_DEBUG if (sc->sc_debug & ATH_DEBUG_XMIT) @@ -3459,6 +3464,7 @@ ath_tx_retry_subframe(struct ath_softc * ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[atid->ac]); + /* XXX clr11naggr should be done for all subframes */ ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); ath_hal_set11nburstduration(sc->sc_ah, bf->bf_desc, 0); /* ath_hal_set11n_virtualmorefrag(sc->sc_ah, bf->bf_desc, 0); */ @@ -3499,6 +3505,11 @@ ath_tx_retry_subframe(struct ath_softc * ath_tx_set_retry(sc, bf); bf->bf_next = NULL; /* Just to make sure */ + /* Clear the aggregate state */ + bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_ndelim = 0; /* ??? needed? */ + bf->bf_state.bfs_nframes = 1; + TAILQ_INSERT_TAIL(bf_q, bf, bf_list); return 0; } @@ -4127,6 +4138,7 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: single-frame aggregate\n", __func__); bf->bf_state.bfs_aggr = 0; + bf->bf_state.bfs_ndelim = 0; ath_tx_setds(sc, bf); ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc); if (status == ATH_AGGR_BAW_CLOSED)