svn commit: r240255 - head/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Sun Sep 9 05:06:17 UTC 2012
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)
More information about the svn-src-head
mailing list