From owner-svn-src-all@FreeBSD.ORG Wed May 29 01:40:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AF05A82E; Wed, 29 May 2013 01:40:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8815FB35; Wed, 29 May 2013 01:40:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4T1eEuS040929; Wed, 29 May 2013 01:40:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4T1eErx040928; Wed, 29 May 2013 01:40:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201305290140.r4T1eErx040928@svn.freebsd.org> From: Adrian Chadd Date: Wed, 29 May 2013 01:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251090 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 May 2013 01:40:14 -0000 Author: adrian Date: Wed May 29 01:40:13 2013 New Revision: 251090 URL: http://svnweb.freebsd.org/changeset/base/251090 Log: Shuffle around the cleanup unpause calls a bit. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed May 29 00:32:49 2013 (r251089) +++ head/sys/dev/ath/if_ath_tx.c Wed May 29 01:40:13 2013 (r251090) @@ -4156,7 +4156,9 @@ ath_tx_comp_cleanup_unaggr(struct ath_so * - Count the number of unacked frames, and let transmit completion * handle it later. * - * The caller is responsible for pausing the TID. + * The caller is responsible for pausing the TID and unpausing the + * TID if no cleanup was required. Otherwise the cleanup path will + * unpause the TID once the last hardware queued frame is completed. */ static void ath_tx_tid_cleanup(struct ath_softc *sc, struct ath_node *an, int tid, @@ -4214,12 +4216,6 @@ ath_tx_tid_cleanup(struct ath_softc *sc, bf = TAILQ_NEXT(bf, bf_list); } - /* The caller is required to pause the TID */ -#if 0 - /* Pause the TID */ - ath_tx_tid_pause(sc, atid); -#endif - /* * Calculate what hardware-queued frames exist based * on the current BAW size. Ie, what frames have been @@ -4238,14 +4234,6 @@ ath_tx_tid_cleanup(struct ath_softc *sc, INCR(tap->txa_start, IEEE80211_SEQ_RANGE); } - /* - * If cleanup is required, defer TID scheduling - * until all the HW queued packets have been - * sent. - */ - if (! atid->cleanup_inprogress) - ath_tx_tid_resume(sc, atid); - if (atid->cleanup_inprogress) DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: TID %d: cleanup needed: %d packets\n", @@ -5789,6 +5777,11 @@ ath_addba_stop(struct ieee80211_node *ni TAILQ_INIT(&bf_cq); ATH_TX_LOCK(sc); ath_tx_tid_cleanup(sc, an, tid, &bf_cq); + /* + * Unpause the TID if no cleanup is required. + */ + if (! atid->cleanup_inprogress) + ath_tx_tid_resume(sc, atid); ATH_TX_UNLOCK(sc); /* Handle completing frames and fail them */ @@ -5830,6 +5823,11 @@ ath_tx_node_reassoc(struct ath_softc *sc ":", i); ath_tx_tid_cleanup(sc, an, i, &bf_cq); + /* + * Unpause the TID if no cleanup is required. + */ + if (! tid->cleanup_inprogress) + ath_tx_tid_resume(sc, tid); } ATH_TX_UNLOCK(sc);