From 3202c2a0de5a33419c81db0300420c77b437ca6d Mon Sep 17 00:00:00 2001 From: mentor Date: Tue, 29 Jan 2008 11:17:57 +0000 Subject: [PATCH] Change reset_bss semantics so that the node reference is passed to iv_bss, and then use the iv_bss reference. I believe that this is semantically correct, and so have removed the comment. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3303 0192ed92-7a03-0410-a25b-9323aeb14dbd --- net80211/ieee80211_node.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net80211/ieee80211_node.c b/net80211/ieee80211_node.c index 008477f..4f0a3c9 100644 --- a/net80211/ieee80211_node.c +++ b/net80211/ieee80211_node.c @@ -416,17 +416,13 @@ ieee80211_reset_bss(struct ieee80211vap *vap) __func__, ni, MAC_ADDR(vap->iv_myaddr)); KASSERT(ni != NULL, ("unable to setup inital BSS node")); - /* ieee80211_alloc_node_table bumps the refcount twice. - * one reference is held by the node table and the other - * is a gift to the caller, so we do not bump the refcount - * when we assign to vap->iv_bss here. */ - vap->iv_bss = ni; + vap->iv_bss = PASS_NODE(ni); KASSERT( (atomic_read(&ni->ni_refcnt) == 2), ("wrong refcount for new node.")); if (obss != NULL) { - copy_bss_state(ni, obss); - ni->ni_intval = ic->ic_lintval; + copy_bss_state(vap->iv_bss, obss); + vap->iv_bss->ni_intval = ic->ic_lintval; /* Caller's reference */ ieee80211_unref_node(&obss); } -- 2.35.1