From owner-svn-src-user@FreeBSD.ORG Sat Apr 25 05:14:57 2009 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 3A6FE106564A; Sat, 25 Apr 2009 05:14:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2973F8FC17; Sat, 25 Apr 2009 05:14:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3P5Ev24042980; Sat, 25 Apr 2009 05:14:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3P5Ev8X042979; Sat, 25 Apr 2009 05:14:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200904250514.n3P5Ev8X042979@svn.freebsd.org> From: Andrew Thompson Date: Sat, 25 Apr 2009 05:14:57 +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: r191479 - user/thompsa/vaptq/sys/net80211 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: Sat, 25 Apr 2009 05:14:57 -0000 Author: thompsa Date: Sat Apr 25 05:14:56 2009 New Revision: 191479 URL: http://svn.freebsd.org/changeset/base/191479 Log: Put the test for scanning in ieee80211_beacon_miss() before the task is queued, it is not possible for scanning to still be running once the task fires. Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Modified: user/thompsa/vaptq/sys/net80211/ieee80211_proto.c ============================================================================== --- user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Sat Apr 25 02:59:06 2009 (r191478) +++ user/thompsa/vaptq/sys/net80211/ieee80211_proto.c Sat Apr 25 05:14:56 2009 (r191479) @@ -1361,8 +1361,12 @@ ieee80211_resume_all(struct ieee80211com void ieee80211_beacon_miss(struct ieee80211com *ic) { - /* Process in a taskq, the bmiss handler may reenter the driver */ - taskqueue_enqueue(ic->ic_tq, &ic->ic_bmiss_task); + IEEE80211_LOCK(ic); + if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { + /* Process in a taskq, the handler may reenter the driver */ + taskqueue_enqueue(ic->ic_tq, &ic->ic_bmiss_task); + } + IEEE80211_UNLOCK(ic); } static void @@ -1371,8 +1375,6 @@ beacon_miss(void *arg, int npending) struct ieee80211com *ic = arg; struct ieee80211vap *vap; - if (ic->ic_flags & IEEE80211_F_SCAN) - return; /* XXX locking */ TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { /*