From owner-svn-src-user@FreeBSD.ORG Fri Apr 26 00:53:34 2013 Return-Path: Delivered-To: svn-src-user@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 BECBB6B7; Fri, 26 Apr 2013 00:53:34 +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 B18F613B5; Fri, 26 Apr 2013 00:53:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3Q0rYS9013430; Fri, 26 Apr 2013 00:53:34 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3Q0rYi8013429; Fri, 26 Apr 2013 00:53:34 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304260053.r3Q0rYi8013429@svn.freebsd.org> From: Adrian Chadd Date: Fri, 26 Apr 2013 00:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r249914 - user/adrian/net80211_tx/sys/dev/ath X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 26 Apr 2013 00:53:34 -0000 Author: adrian Date: Fri Apr 26 00:53:34 2013 New Revision: 249914 URL: http://svnweb.freebsd.org/changeset/base/249914 Log: Since we're clearing the BAR and filtered frames tracking in the TID, ensure we also take into account the pause counter. Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c Fri Apr 26 00:47:28 2013 (r249913) +++ user/adrian/net80211_tx/sys/dev/ath/if_ath_tx.c Fri Apr 26 00:53:34 2013 (r249914) @@ -3862,6 +3862,36 @@ ath_tx_tid_reset(struct ath_softc *sc, s #endif /* + * If we have a bar_wait set, we need to unpause the TID + * here. Otherwise once cleanup has finished, the TID won't + * have the right paused counter. + * + * XXX I'm not going through resume here - I don't want the + * node to be rescheuled just yet. This however should be + * methodized! + */ + if (tid->bar_wait) { + if (tid->paused > 0) { + tid->paused --; + } + } + + /* + * XXX same with a currently filtered TID. + * + * Since this is being called during a flush, we assume that + * the filtered frame list is actually empty. + * + * XXX TODO: add in a check to ensure that the filtered queue + * depth is actually 0! + */ + if (tid->isfiltered) { + if (tid->paused > 0) { + tid->paused --; + } + } + + /* * Clear BAR, filtered frames, scheduled and ADDBA pending. * The TID may be going through cleanup from the last association * where things in the BAW are still in the hardware queue.