summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2018-04-27 17:03:09 +0000
committerstsp <stsp@openbsd.org>2018-04-27 17:03:09 +0000
commitde9919e2bdc6f75efa1f5a281bd0ee9f2cc9d7be (patch)
treeb9aaa8adf9a5f420724807a25ccff66ac3b29133
parentImport lpd, a re-implementation of the lpr daemon following the latest (diff)
downloadwireguard-openbsd-de9919e2bdc6f75efa1f5a281bd0ee9f2cc9d7be.tar.xz
wireguard-openbsd-de9919e2bdc6f75efa1f5a281bd0ee9f2cc9d7be.zip
If a wifi driver does not provide an ic_bgscan_start() function there is no
point in scheduling ic_bgscan_timeout() since this timeout will find that it has nothing to do. ok phessler pirofti
-rw-r--r--sys/net80211/ieee80211_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 304c13c3444..8b437a8ebae 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.198 2017/12/12 15:57:11 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.199 2018/04/27 17:03:09 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -268,7 +268,7 @@ ieee80211_input(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni,
ni->ni_rstamp = rxi->rxi_tstamp;
ni->ni_inact = 0;
- if (ic->ic_state == IEEE80211_S_RUN) {
+ if (ic->ic_state == IEEE80211_S_RUN && ic->ic_bgscan_start) {
/* Cancel or start background scan based on RSSI. */
if ((*ic->ic_node_checkrssi)(ic, ni))
timeout_del(&ic->ic_bgscan_timeout);