From owner-svn-src-user@FreeBSD.ORG Thu Aug 18 00:19:12 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 CCB8E1065672; Thu, 18 Aug 2011 00:19:12 +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 A3AF98FC12; Thu, 18 Aug 2011 00:19:12 +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 p7I0JCAh028898; Thu, 18 Aug 2011 00:19:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7I0JCmn028896; Thu, 18 Aug 2011 00:19:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108180019.p7I0JCmn028896@svn.freebsd.org> From: Adrian Chadd Date: Thu, 18 Aug 2011 00:19:12 +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: r224954 - 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 00:19:12 -0000 Author: adrian Date: Thu Aug 18 00:19:12 2011 New Revision: 224954 URL: http://svn.freebsd.org/changeset/base/224954 Log: In preparation for forming aggregates, push the descriptor setup and descriptor chain code into the software queue routine, and leave setting the rate control stuff until the packet is actually queued to the hardware. 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 00:05:09 2011 (r224953) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Thu Aug 18 00:19:12 2011 (r224954) @@ -1397,10 +1397,10 @@ ath_tx_raw_start(struct ath_softc *sc, s */ if (do_override) { - ATH_TXQ_LOCK(sc->sc_ac2q[pri]); ath_tx_setds(sc, bf); ath_tx_set_ratectrl(sc, ni, bf); ath_tx_chaindesclist(sc, bf); + ATH_TXQ_LOCK(sc->sc_ac2q[pri]); ath_tx_handoff(sc, sc->sc_ac2q[pri], bf); ATH_TXQ_UNLOCK(sc->sc_ac2q[pri]); } @@ -1792,6 +1792,16 @@ ath_tx_swq(struct ath_softc *sc, struct bf->bf_state.bfs_aggr = 0; bf->bf_state.bfs_aggrburst = 0; + /* + * Program first and chain the descriptors together. + * + * These fields (along with the DMA map setup) are needed + * by the aggregate forming code, which only overrides + * the rate control setup and the aggregation fields. + */ + ath_tx_setds(sc, bf); + ath_tx_chaindesclist(sc, bf); + /* Queue frame to the tail of the software queue */ ATH_TXQ_LOCK(atid); ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); @@ -2636,10 +2646,8 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft if (bf->bf_state.bfs_tid == IEEE80211_NONQOS_TID) device_printf(sc->sc_dev, "%s: TID=16?\n", __func__); - /* Program descriptor */ - ath_tx_setds(sc, bf); + /* Program rate control */ ath_tx_set_ratectrl(sc, ni, bf); - ath_tx_chaindesclist(sc, bf); /* Punt to hardware or software txq */ ATH_TXQ_LOCK(txq); @@ -2700,10 +2708,8 @@ ath_tx_tid_hw_queue_norm(struct ath_soft /* Normal completion handler */ bf->bf_comp = ath_tx_normal_comp; - /* Program descriptor */ - ath_tx_setds(sc, bf); + /* Program rate control*/ ath_tx_set_ratectrl(sc, ni, bf); - ath_tx_chaindesclist(sc, bf); /* Punt to hardware or software txq */ ATH_TXQ_LOCK(txq);