From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 05:06:49 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 A228A106566C; Tue, 6 Sep 2011 05:06:49 +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 92C1F8FC0C; Tue, 6 Sep 2011 05:06:49 +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 p8656nQ7069250; Tue, 6 Sep 2011 05:06:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8656nwc069248; Tue, 6 Sep 2011 05:06:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109060506.p8656nwc069248@svn.freebsd.org> From: Adrian Chadd Date: Tue, 6 Sep 2011 05:06:49 +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: r225413 - 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: Tue, 06 Sep 2011 05:06:49 -0000 Author: adrian Date: Tue Sep 6 05:06:49 2011 New Revision: 225413 URL: http://svn.freebsd.org/changeset/base/225413 Log: Two fixes: * Clarify the software queue handling a little better; * Don't add a frame to the BAW if it's not in the BAW - specifically, NULL frames. 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 Tue Sep 6 03:17:11 2011 (r225412) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Tue Sep 6 05:06:49 2011 (r225413) @@ -2032,8 +2032,10 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s tid->hwq_depth++; /* Add to BAW */ - ath_tx_addto_baw(sc, an, tid, bf); - bf->bf_state.bfs_addedbaw = 1; + if (bf->bf_state.bfs_dobaw) { + ath_tx_addto_baw(sc, an, tid, bf); + bf->bf_state.bfs_addedbaw = 1; + } /* Set completion handler, multi-frame aggregate or not */ bf->bf_comp = ath_tx_aggr_comp; @@ -2085,10 +2087,14 @@ ath_tx_swq(struct ath_softc *sc, struct } else if (ath_tx_ampdu_pending(sc, an, tid)) { /* AMPDU pending; queue */ ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); - } else if (txq->axq_depth < sc->sc_hwq_limit && - ath_tx_ampdu_running(sc, an, tid)) { - /* AMPDU running, attempt direct dispatch */ - ath_tx_xmit_aggr(sc, an, bf); + } else if (ath_tx_ampdu_running(sc, an, tid)) { + /* AMPDU running, attempt direct dispatch if possible */ + if (txq->axq_depth < sc->sc_hwq_limit) + ath_tx_xmit_aggr(sc, an, bf); + else { + ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + ath_tx_tid_sched(sc, an, atid); + } } else if (txq->axq_depth < sc->sc_hwq_limit) { /* AMPDU not running, attempt direct dispatch */ ath_tx_xmit_normal(sc, txq, bf);