Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2008 16:58:06 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 142539 for review
Message-ID:  <200805291658.m4TGw6JN075454@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142539

Change 142539 by sam@sam_ebb on 2008/05/29 16:57:17

	Split ieee80211_notify_erp into locked and unlocked variants
	and use the locked version to handle the hostap input path
	case where the com lock is not already held.
	
	Noticed by:	Jared Go

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_node.c#36 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_node.c#36 (text+ko) ====

@@ -2077,8 +2077,8 @@
 		(ieee80211_iter_func *) ieee80211_dump_node, nt);
 }
 
-void
-ieee80211_notify_erp(struct ieee80211com *ic)
+static void
+ieee80211_notify_erp_locked(struct ieee80211com *ic)
 {
 	struct ieee80211vap *vap;
 
@@ -2089,6 +2089,14 @@
 			ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP);
 }
 
+void
+ieee80211_notify_erp(struct ieee80211com *ic)
+{
+	IEEE80211_LOCK(ic);
+	ieee80211_notify_erp_locked(ic);
+	IEEE80211_UNLOCK(ic);
+}
+
 /*
  * Handle a station joining an 11g network.
  */
@@ -2151,7 +2159,7 @@
 			IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC,
 			    "%s: enable use of protection\n", __func__);
 			ic->ic_flags |= IEEE80211_F_USEPROT;
-			ieee80211_notify_erp(ic);
+			ieee80211_notify_erp_locked(ic);
 		}
 	} else
 		ni->ni_flags |= IEEE80211_NODE_ERP;
@@ -2241,7 +2249,7 @@
 		ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
 		ic->ic_flags &= ~IEEE80211_F_USEBARKER;
 	}
-	ieee80211_notify_erp(ic);
+	ieee80211_notify_erp_locked(ic);
 }
 
 /*



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