svn commit: r224975 - user/adrian/if_ath_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Thu Aug 18 16:36:27 UTC 2011


Author: adrian
Date: Thu Aug 18 16:36:26 2011
New Revision: 224975
URL: http://svn.freebsd.org/changeset/base/224975

Log:
  ath_hal_setupfirsttxdesc() sets the first TX descriptor fields but it doesn't
  overwrite them.
  
  ath_hal_chaintxdesc() initialises the TX descriptor fields.
  
  Calling setupfirsttxdesc() -before- chaintxdesc() meant various fields
  were being overwritten, blanking a bunch of needed fields (such as flags.)
  
  This allows TX aggregate DMA to proceed a little further, but things
  are still pausing due to BAW tracking issues.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Thu Aug 18 16:19:26 2011	(r224974)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Thu Aug 18 16:36:26 2011	(r224975)
@@ -390,22 +390,6 @@ ath_tx_setds_11n(struct ath_softc *sc, s
 	    bf_first->bf_state.bfs_al);
 
 	/*
-	 * Setup first descriptor of first frame.
-	 * The sub-frame specific stuff is done
-	 * later.
-	 */
-	ath_hal_setupfirsttxdesc(sc->sc_ah,
-	    bf_first->bf_desc,
-	    bf_first->bf_state.bfs_al,
-	    bf_first->bf_state.bfs_flags,
-	    bf_first->bf_state.bfs_txpower,
-	    bf_first->bf_state.bfs_txrate0,
-	    bf_first->bf_state.bfs_try0,
-	    bf_first->bf_state.bfs_txantenna,
-	    bf_first->bf_state.bfs_ctsrate,
-	    bf_first->bf_state.bfs_ctsduration);
-
-	/*
 	 * Setup all descriptors of all subframes.
 	 */
 	bf = bf_first;
@@ -430,6 +414,25 @@ ath_tx_setds_11n(struct ath_softc *sc, s
 	}
 
 	/*
+	 * Setup first descriptor of first frame.
+	 * chaintxdesc() overwrites the descriptor entries;
+	 * setupfirsttxdesc() merges in things.
+	 * Otherwise various fields aren't set correctly (eg flags).
+	 */
+	ath_hal_setupfirsttxdesc(sc->sc_ah,
+	    bf_first->bf_desc,
+	    bf_first->bf_state.bfs_al,
+	    bf_first->bf_state.bfs_flags,
+	    bf_first->bf_state.bfs_txpower,
+	    bf_first->bf_state.bfs_txrate0,
+	    bf_first->bf_state.bfs_try0,
+	    bf_first->bf_state.bfs_txantenna,
+	    bf_first->bf_state.bfs_ctsrate,
+	    bf_first->bf_state.bfs_ctsduration);
+
+
+
+	/*
 	 * Setup the last descriptor in the list.
 	 * bf_prev points to the last; bf is NULL here.
 	 */
@@ -2556,8 +2559,9 @@ ath_tx_aggr_comp_aggr(struct ath_softc *
 	ba[1] = ts->ts_ba_high;
 
 	DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR,
-	    "%s: txa_start=%d, tx_ok=%d, isaggr=%d, seq_st=%d, hasba=%d, ba=%.8x, %.8x\n",
-	    __func__, tap->txa_start, tx_ok, isaggr, seq_st, hasba, ba[0], ba[1]);
+	    "%s: txa_start=%d, tx_ok=%d, status=%.8x, flags=%.8x, isaggr=%d, seq_st=%d, hasba=%d, ba=%.8x, %.8x\n",
+	    __func__, tap->txa_start, tx_ok, ts->ts_status, ts->ts_flags,
+	    isaggr, seq_st, hasba, ba[0], ba[1]);
 
 	/* Occasionally, the MAC sends a tx status for the wrong TID. */
 	if (tid != ts->ts_tid) {


More information about the svn-src-user mailing list