ni->ni_refcnt = 1;		 ieee80211_node_critsec_begin(ic, s); TAILQ_INSERT_TAIL(&ic->ic_node, ni, ni_list); LIST_INSERT_HEAD(&ic->ic_hash[hash], ni, ni_hash);
ieee80211_node_newstate(ni, IEEE80211_STA_CACHE); IEEE80211_NODE_LOCK_BH(ic);
ieee80211_setup_node(struct ieee80211com *ic,	struct ieee80211_node *ni, u_int8_t *macaddr){	int hash;	ieee80211_node_critsec_decl(s);	IEEE80211_ADDR_COPY(ni->ni_macaddr, macaddr);	hash = IEEE80211_NODE_HASH(macaddr);	ni->ni_refcnt = 1;		/* mark referenced */	ieee80211_node_critsec_begin(ic, s);	TAILQ_INSERT_TAIL(&ic->ic_node, ni, ni_list);	LIST_INSERT_HEAD(&ic->ic_hash[hash], ni, ni_hash);	/*	 * Note we don't enable the inactive timer when acting	 * as a station.  Nodes created in this mode represent	 * AP's identified while scanning.  If we time them out	 * then several things happen: we can't return the data	 * to users to show the list of AP's we encountered, and	 * more importantly, we'll incorrectly deauthenticate	 * ourself because the inactivity timer will kick us off.	 */	if (ic->ic_opmode != IEEE80211_M_STA)		ic->ic_inact_timer = IEEE80211_INACT_WAIT;	ieee80211_node_critsec_end(ic, s);}