From af81e4b88b676946e3442bf7d4f9af2e40838249 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 13 Aug 2003 22:09:44 +0000 Subject: Delay creating ic_bss until after the super-class has a chance to override the method pointers for manipulating nodes; this fixes a problem where the ic_bss node was not being created properly for the ath driver causing the driver to scribble on random memory. Noticed by: David Young --- sys/net80211/ieee80211_node.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/net80211/ieee80211_node.c') diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index a05c838..dd2541e 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -86,6 +86,13 @@ ieee80211_node_attach(struct ifnet *ifp) ic->ic_node_alloc = ieee80211_node_alloc; ic->ic_node_free = ieee80211_node_free; ic->ic_node_copy = ieee80211_node_copy; +} + +void +ieee80211_node_lateattach(struct ifnet *ifp) +{ + struct ieee80211com *ic = (void *)ifp; + ic->ic_bss = (*ic->ic_node_alloc)(ic); KASSERT(ic->ic_bss != NULL, ("unable to setup inital BSS node")); ic->ic_bss->ni_chan = IEEE80211_CHAN_ANYC; -- cgit v1.1