PERFORCE change 142539 for review

Sam Leffler sam at FreeBSD.org
Thu May 29 16:58:08 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=142539

Change 142539 by sam at 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);
 }
 
 /*


More information about the p4-projects mailing list