insure ic_bss always has a "valid" channel; avoids problems where users could

query the state of a card and find a null channel since allocating the node
left ni_chan zero
This commit is contained in:
Sam Leffler 2003-06-29 20:13:38 +00:00
parent b9ee58c4af
commit 58f40303c4

View file

@ -87,7 +87,8 @@ ieee80211_node_attach(struct ifnet *ifp)
ic->ic_node_free = ieee80211_node_free;
ic->ic_node_copy = ieee80211_node_copy;
ic->ic_bss = (*ic->ic_node_alloc)(ic);
/* XXX KASSERT != NULL? */
KASSERT(ic->ic_bss != NULL, ("unable to setup inital BSS node"));
ic->ic_bss->ni_chan = IEEE80211_CHAN_ANYC;
}
void