From owner-svn-src-user@FreeBSD.ORG Thu Aug 18 16:36:26 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEE40106566C; Thu, 18 Aug 2011 16:36:26 +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 B58D78FC13; Thu, 18 Aug 2011 16:36:26 +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 p7IGaQk9065096; Thu, 18 Aug 2011 16:36:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7IGaQUc065094; Thu, 18 Aug 2011 16:36:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108181636.p7IGaQUc065094@svn.freebsd.org> From: Adrian Chadd Date: Thu, 18 Aug 2011 16:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224975 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2011 16:36:27 -0000 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) {