summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-08-13 22:09:44 +0000
committersam <sam@FreeBSD.org>2003-08-13 22:09:44 +0000
commitaf81e4b88b676946e3442bf7d4f9af2e40838249 (patch)
tree244a2909477eff2931f53f98709a2b718e02b520 /sys/net80211/ieee80211_node.c
parente588332388c1b9727f5a65662fb2e12046735134 (diff)
downloadFreeBSD-src-af81e4b88b676946e3442bf7d4f9af2e40838249.zip
FreeBSD-src-af81e4b88b676946e3442bf7d4f9af2e40838249.tar.gz
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 <dyoung@pobox.com>
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c7
1 files changed, 7 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud