1 --- a/net80211/ieee80211_node.c
2 +++ b/net80211/ieee80211_node.c
5 ni = ieee80211_find_node(&ic->ic_sta, vap->iv_myaddr);
7 - ni = ieee80211_alloc_node_table(vap, vap->iv_myaddr);
8 + ni = ieee80211_alloc_node(vap, vap->iv_myaddr);
9 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
10 "%s: ni:%p allocated for " MAC_FMT "\n",
11 __func__, ni, MAC_ADDR(vap->iv_myaddr));
13 /* XXX multi-bss wrong */
14 ieee80211_reset_erp(ic, ic->ic_curmode);
16 - ni = ieee80211_alloc_node_table(vap, vap->iv_myaddr);
17 + ni = ieee80211_alloc_node(vap, vap->iv_myaddr);
18 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
19 "%s: ni:%p allocated for " MAC_FMT "\n",
20 __func__, ni, MAC_ADDR(vap->iv_myaddr));
21 KASSERT(ni != NULL, ("unable to setup inital BSS node"));
23 vap->iv_bss = PASS_NODE(ni);
24 - KASSERT((atomic_read(&vap->iv_bss->ni_refcnt) == 2),
25 + KASSERT((atomic_read(&vap->iv_bss->ni_refcnt) == 1),
26 ("wrong refcount for new node."));
30 ieee80211_fix_rate(selbs, IEEE80211_F_DODEL);
33 + IEEE80211_VAPS_LOCK_BH(ic);
35 * Committed to selbs, setup state.
38 (vap->iv_state == IEEE80211_S_RUN) && bssid_equal(obss, selbs)); */
40 IEEE80211_ADDR_COPY(vap->iv_bssid, selbs->ni_bssid);
42 + if ((obss != NULL) && (obss != selbs))
43 ieee80211_unref_node(&obss);
44 + IEEE80211_VAPS_UNLOCK_BH(ic);
45 ic->ic_bsschan = selbs->ni_chan;
46 ic->ic_curchan = ic->ic_bsschan;
47 ic->ic_curmode = ieee80211_chan2mode(ic->ic_curchan);
48 --- a/net80211/ieee80211_input.c
49 +++ b/net80211/ieee80211_input.c
53 if (ni_or_null == NULL)
55 + ni = ieee80211_ref_node(vap->iv_bss);
57 wh = (struct ieee80211_frame *) skb->data;
58 frm = (u_int8_t *)&wh[1];