From owner-svn-src-head@FreeBSD.ORG Wed Apr 23 05:19:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8585E2B; Wed, 23 Apr 2014 05:19:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 954BF1E7A; Wed, 23 Apr 2014 05:19:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3N5JjOx036504; Wed, 23 Apr 2014 05:19:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3N5Jj5E036503; Wed, 23 Apr 2014 05:19:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201404230519.s3N5Jj5E036503@svn.freebsd.org> From: Adrian Chadd Date: Wed, 23 Apr 2014 05:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264798 - 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-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 05:19:45 -0000 Author: adrian Date: Wed Apr 23 05:19:45 2014 New Revision: 264798 URL: http://svnweb.freebsd.org/changeset/base/264798 Log: Wrap the rate control re-init code in a lock, to serialise it with concurrent updates from any completing transmits in other threads. This was exposed when doing power save work - net80211 is constantly doing reassociations and it's causing the rate control state to get blanked out. This could cause the rate control code to assert. This should be MFCed to stable/10 as it's a stability fix. Tested: * AR5416, STA MFC after: 7 days Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Apr 23 03:30:00 2014 (r264797) +++ head/sys/dev/ath/if_ath.c Wed Apr 23 05:19:45 2014 (r264798) @@ -5567,7 +5567,9 @@ ath_newassoc(struct ieee80211_node *ni, an->an_mcastrix = ath_tx_findrix(sc, tp->mcastrate); an->an_mgmtrix = ath_tx_findrix(sc, tp->mgmtrate); + ATH_NODE_LOCK(an); ath_rate_newassoc(sc, an, isnew); + ATH_NODE_UNLOCK(an); if (isnew && (vap->iv_flags & IEEE80211_F_PRIVACY) == 0 && sc->sc_hasclrkey &&