From owner-svn-src-user@FreeBSD.ORG Wed Aug 3 23:36:04 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 7A4F6106564A; Wed, 3 Aug 2011 23:36:04 +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 6BF038FC12; Wed, 3 Aug 2011 23:36:04 +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 p73Na4mC034908; Wed, 3 Aug 2011 23:36:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p73Na4W6034906; Wed, 3 Aug 2011 23:36:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108032336.p73Na4W6034906@svn.freebsd.org> From: Adrian Chadd Date: Wed, 3 Aug 2011 23:36:04 +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: r224643 - 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: Wed, 03 Aug 2011 23:36:04 -0000 Author: adrian Date: Wed Aug 3 23:36:04 2011 New Revision: 224643 URL: http://svn.freebsd.org/changeset/base/224643 Log: Hold the ath_node lock when doing TX completion so the rate control code doesn't trample over itself. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Wed Aug 3 20:21:52 2011 (r224642) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Wed Aug 3 23:36:04 2011 (r224643) @@ -4205,8 +4205,11 @@ ath_tx_processq(struct ath_softc *sc, st * Hand the descriptor to the rate control algorithm. */ if ((ts->ts_status & HAL_TXERR_FILT) == 0 && - (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) + (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) { + ATH_NODE_LOCK(an); ath_rate_tx_complete(sc, an, bf); + ATH_NODE_UNLOCK(an); + } } if (bf->bf_comp == NULL)