summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2004-12-31 21:22:12 +0000
committersam <sam@FreeBSD.org>2004-12-31 21:22:12 +0000
commit2cf886f5dccadd6aaf976ea1502953d562dd502f (patch)
tree77427a0308e44841f6275fe709cc503142e22903 /sys/net80211
parent886afd72876ee4579355ce1258c444f4eab5e520 (diff)
downloadFreeBSD-src-2cf886f5dccadd6aaf976ea1502953d562dd502f.zip
FreeBSD-src-2cf886f5dccadd6aaf976ea1502953d562dd502f.tar.gz
check if the node/station table is already present before creating one; this
can happen on an ibss merge
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_node.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index c6a8500..02553ec 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -758,17 +758,20 @@ ieee80211_sta_join(struct ieee80211com *ic, struct ieee80211_node *selbs)
return 0;
}
/*
- * Create the neighbor table.
+ * Create the neighbor table; it will already
+ * exist if we are simply switching mastership.
*/
- ic->ic_sta = ieee80211_node_table_alloc(ic,
+ if (ic->ic_sta == NULL) {
+ ic->ic_sta = ieee80211_node_table_alloc(ic,
"neighbor", ic->ic_inact_run,
ieee80211_timeout_stations);
- if (ic->ic_sta == NULL) {
- /*
- * Should remain in SCAN state and retry.
- */
- /* XXX stat+msg */
- return 0;
+ if (ic->ic_sta == NULL) {
+ /*
+ * Should remain in SCAN state and retry.
+ */
+ /* XXX stat+msg */
+ return 0;
+ }
}
}
OpenPOWER on IntegriCloud