From owner-p4-projects@FreeBSD.ORG Sun Jan 20 18:04:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE4DD16A421; Sun, 20 Jan 2008 18:04:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6567416A419 for ; Sun, 20 Jan 2008 18:04:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 60C4D13C45A for ; Sun, 20 Jan 2008 18:04:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0KI4p88053878 for ; Sun, 20 Jan 2008 18:04:51 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0KI4oR1053875 for perforce@freebsd.org; Sun, 20 Jan 2008 18:04:50 GMT (envelope-from sam@freebsd.org) Date: Sun, 20 Jan 2008 18:04:50 GMT Message-Id: <200801201804.m0KI4oR1053875@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 133737 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2008 18:04:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=133737 Change 133737 by sam@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); }