Date: Wed, 17 Aug 2011 09:52:34 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r224934 - user/adrian/if_ath_tx/sys/dev/ath Message-ID: <201108170952.p7H9qYEO096899@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Wed Aug 17 09:52:34 2011 New Revision: 224934 URL: http://svn.freebsd.org/changeset/base/224934 Log: Flesh out the aggregate cleanup function. Again, untested. Fix the aggregate single-packet cleanup function - call the completion handler before potentially kicking the queue. 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 Wed Aug 17 09:44:15 2011 (r224933) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Wed Aug 17 09:52:34 2011 (r224934) @@ -2023,6 +2023,8 @@ ath_tx_comp_cleanup_unaggr(struct ath_so DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: TID %d: incomp=%d\n", __func__, tid, atid->incomp); + ath_tx_default_comp(sc, bf, 0); + atid->incomp--; if (atid->incomp == 0) { DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, @@ -2032,7 +2034,6 @@ ath_tx_comp_cleanup_unaggr(struct ath_so ath_tx_tid_resume(sc, atid); } - ath_tx_default_comp(sc, bf, 0); } /* @@ -2330,9 +2331,31 @@ ath_tx_comp_aggr_error(struct ath_softc * Handle clean-up of packets from an aggregate list. */ static void -ath_tx_comp_cleanup_aggr(struct ath_softc *sc, struct ath_buf *bf) +ath_tx_comp_cleanup_aggr(struct ath_softc *sc, struct ath_buf *bf_first) { - /* XXX TODO */ + struct ath_buf *bf, *bf_next; + struct ieee80211_node *ni = bf_first->bf_node; + struct ath_node *an = ATH_NODE(ni); + int tid = bf_first->bf_state.bfs_tid; + struct ath_tid *atid = &an->an_tid[tid]; + + bf = bf_first; + + while (bf) { + atid->incomp--; + bf_next = bf->bf_next; + ath_tx_default_comp(sc, bf, -1); + bf = bf_next; + } + + if (atid->incomp == 0) { + DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, + "%s: TID %d: cleaned up! resume!\n", + __func__, tid); + atid->cleanup_inprogress = 0; + ath_tx_tid_resume(sc, atid); + } + } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108170952.p7H9qYEO096899>