Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2009 05:14:57 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r191479 - user/thompsa/vaptq/sys/net80211
Message-ID:  <200904250514.n3P5Ev8X042979@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904250514.n3P5Ev8X042979>