if (ic->ic_opmode == IEEE80211_M_IBSS) ni->ni_bssid[0] |= 0x02;
if (ic->ic_opmode == IEEE80211_M_IBSS) { if ((ic->ic_flags & IEEE80211_F_DESBSSID) != 0) IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_des_bssid); else ni->ni_bssid[0] |= 0x02;	 }
ieee80211_create_ibss(struct ieee80211com* ic, struct ieee80211_channel *chan){	struct ieee80211_node *ni;	struct ifnet *ifp = &ic->ic_if;	ni = ic->ic_bss;	if (ifp->if_flags & IFF_DEBUG)		if_printf(ifp, "creating ibss\n");	ic->ic_flags |= IEEE80211_F_SIBSS;	ni->ni_chan = chan;	ni->ni_rates = ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)];	IEEE80211_ADDR_COPY(ni->ni_macaddr, ic->ic_myaddr);	IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_myaddr);	if (ic->ic_opmode == IEEE80211_M_IBSS)		ni->ni_bssid[0] |= 0x02;	/* local bit for IBSS */	ni->ni_esslen = ic->ic_des_esslen;	memcpy(ni->ni_essid, ic->ic_des_essid, ni->ni_esslen);	ni->ni_rssi = 0;	ni->ni_rstamp = 0;	memset(ni->ni_tstamp, 0, sizeof(ni->ni_tstamp));	ni->ni_intval = ic->ic_lintval;	ni->ni_capinfo = IEEE80211_CAPINFO_IBSS;	if (ic->ic_flags & IEEE80211_F_WEPON)		ni->ni_capinfo |= IEEE80211_CAPINFO_PRIVACY;	if (ic->ic_phytype == IEEE80211_T_FH) {		ni->ni_fhdwell = 200;	/* XXX */		ni->ni_fhindex = 1;	}	ieee80211_new_state(ic, IEEE80211_S_RUN, -1);}