summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2015-01-13 23:17:00 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2015-01-13 23:17:00 +0000
commit3f6b40d274cfd0b036bf14988c30068e7ac4f0d5 (patch)
tree20764322fd92f8c74cf4b7ad9e0c2cfcf5e74329
parentdc00790022a313643a3fea3380fd93e957637490 (diff)
In IBSS mode, stop calling the driver's newassoc() each time a probe
response is received from a node. Only call it once when the node is initially discovered, as used to be the case before r1.4 of this file. Asking the driver to set up its per-node private state once is enough. Also remove an outdated comment. ok sthen deraadt jsg
-rw-r--r--sys/net80211/ieee80211_input.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 4bbd9f13266..c340b200852 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.128 2014/12/23 03:24:08 tedu Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.129 2015/01/13 23:16:59 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -1633,18 +1633,8 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m,
/* NB: must be after ni_chan is setup */
ieee80211_setup_rates(ic, ni, rates, xrates, IEEE80211_F_DOSORT);
- /*
- * When scanning we record results (nodes) with a zero
- * refcnt. Otherwise we want to hold the reference for
- * ibss neighbors so the nodes don't get released prematurely.
- * Anything else can be discarded (XXX and should be handled
- * above so we don't do so much work).
- */
- if (
#ifndef IEEE80211_STA_ONLY
- ic->ic_opmode == IEEE80211_M_IBSS ||
-#endif
- (is_new && isprobe)) {
+ if (ic->ic_opmode == IEEE80211_M_IBSS && is_new && isprobe) {
/*
* Fake an association so the driver can setup it's
* private state. The rate set has been setup above;
@@ -1653,6 +1643,7 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m,
if (ic->ic_newassoc)
(*ic->ic_newassoc)(ic, ni, 1);
}
+#endif
}
#ifndef IEEE80211_STA_ONLY