PERFORCE change 133737 for review

Sam Leffler sam at FreeBSD.org
Sun Jan 20 10:04:52 PST 2008


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

Change 133737 by sam at sam_ebb on 2008/01/20 18:03:54

	Correct ieee80211_node_table_reset logic to not reclaim nodes
	from the table when matched for the wds reference.  This corrects
	handling of a multi-vap config (ap+dwds) where manually changing
	the channel caused the bss node to be removed from the table
	before a disassoc event could be dispatched.

Affected files ...

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

Differences ...

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

@@ -1524,8 +1524,7 @@
 
 	IEEE80211_NODE_LOCK(nt);
 	TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next) {
-		if (match != NULL &&
-		    !(ni->ni_vap == match || ni->ni_wdsvap == match))
+		if (match != NULL && ni->ni_vap != match)
 			continue;
 		/* XXX can this happen?  if so need's work */
 		if (ni->ni_associd != 0) {
@@ -1536,10 +1535,21 @@
 			if (vap->iv_aid_bitmap != NULL)
 				IEEE80211_AID_CLR(vap, ni->ni_associd);
 		}
-		if (match != NULL && match->iv_opmode == IEEE80211_M_WDS)
-			ni->ni_wdsvap = NULL;		/* clear reference */
+		ni->ni_wdsvap = NULL;		/* clear reference */
 		node_reclaim(nt, ni);
 	}
+	if (match != NULL && match->iv_opmode == IEEE80211_M_WDS) {
+		/*
+		 * Make a separate pass to clear references to this vap
+		 * held by DWDS entries.  They will not be matched above
+		 * because ni_vap will point to the ap vap but we still
+		 * need to clear ni_wdsvap when the WDS vap is destroyed
+		 * and/or reset.
+		 */
+		TAILQ_FOREACH_SAFE(ni, &nt->nt_node, ni_list, next)
+			if (ni->ni_wdsvap == match)
+				ni->ni_wdsvap = NULL;
+	}
 	IEEE80211_NODE_UNLOCK(nt);
 }
 


More information about the p4-projects mailing list