summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2019-11-09 11:39:15 +0000
committerstsp <stsp@openbsd.org>2019-11-09 11:39:15 +0000
commit0af58bec9520abbddc54e16ac5ea104ce992e54d (patch)
tree4ccf063a8e11d292ac2d8118471f42162d0013cc /sys/net80211
parentwhitespace fixes, no functional change. (diff)
downloadwireguard-openbsd-0af58bec9520abbddc54e16ac5ea104ce992e54d.tar.xz
wireguard-openbsd-0af58bec9520abbddc54e16ac5ea104ce992e54d.zip
Trigger a background scan when root runs the 'ifconfig scan' command.
This will update the list of cached APs for future invocations of the 'scan' command, and will force a search for a better AP to roam to. ok sthen@ phessler@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_ioctl.c4
-rw-r--r--sys/net80211/ieee80211_var.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index b7b2ea6d631..2d6f8afbc11 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.c,v 1.75 2019/09/02 12:54:21 stsp Exp $ */
+/* $OpenBSD: ieee80211_ioctl.c,v 1.76 2019/11/09 11:39:15 stsp Exp $ */
/* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */
/*-
@@ -906,6 +906,8 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
na->na_nodes++;
ni = RBT_NEXT(ieee80211_tree, ni);
}
+ if (suser(curproc) == 0)
+ ieee80211_begin_bgscan(ifp);
break;
case SIOCG80211FLAGS:
flags = ic->ic_userflags;
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index d5560e75f48..bf3ac419f64 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_var.h,v 1.99 2019/11/06 13:55:44 stsp Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.100 2019/11/09 11:39:15 stsp Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
@@ -473,6 +473,7 @@ void ieee80211_del_ess(struct ieee80211com *, char *, int, int);
void ieee80211_set_ess(struct ieee80211com *, struct ieee80211_ess *,
struct ieee80211_node *);
struct ieee80211_ess *ieee80211_get_ess(struct ieee80211com *, const char *, int);
+void ieee80211_begin_bgscan(struct ifnet *);
extern int ieee80211_cache_size;