Change reset_bss semantics so that the node reference is passed to iv_bss, and then...
authormentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Tue, 29 Jan 2008 11:17:57 +0000 (11:17 +0000)
committermentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Tue, 29 Jan 2008 11:17:57 +0000 (11:17 +0000)
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

index 008477f43c10518fcc2d576481aebe4ddc0e6bf6..4f0a3c9f2c17656905d67156d6b47055e365f546 100644 (file)
@@ -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);
        }