summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-06-29 20:13:38 +0000
committersam <sam@FreeBSD.org>2003-06-29 20:13:38 +0000
commitc0ad98bb7c5c5cb8129f69f62b57d9b1b76d5314 (patch)
treeb45e85b3433d8aa360a41c30cf6f1ecfcd6f7f37 /sys/net80211/ieee80211_node.c
parent709e58cfa7b9aed6a6ffd26e4b847f765dc64ceb (diff)
downloadFreeBSD-src-c0ad98bb7c5c5cb8129f69f62b57d9b1b76d5314.zip
FreeBSD-src-c0ad98bb7c5c5cb8129f69f62b57d9b1b76d5314.tar.gz
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
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index d799f2b..9176ea7 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -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
OpenPOWER on IntegriCloud