summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-11-09 11:39:16 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-11-09 11:39:16 +0000
commit44532ac057b39782938d352330d417d9bb508088 (patch)
tree2035925a7771e1d49f2580d101a0cbecc159f995
parent62dff1fd5a9707b7a3fee0a4a6c07a3d4a278f94 (diff)
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@
-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;