svn commit: r313578 - head/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Sat Feb 11 05:33:50 UTC 2017
Author: adrian
Date: Sat Feb 11 05:33:49 2017
New Revision: 313578
URL: https://svnweb.freebsd.org/changeset/base/313578
Log:
[net80211] add a sysctl that forces a vap restart.
Well, vap restart really does "all restart" for now, which will be a good
way of debugging firmware restart issues.
Modified:
head/sys/net80211/ieee80211_freebsd.c
Modified: head/sys/net80211/ieee80211_freebsd.c
==============================================================================
--- head/sys/net80211/ieee80211_freebsd.c Sat Feb 11 05:19:45 2017 (r313577)
+++ head/sys/net80211/ieee80211_freebsd.c Sat Feb 11 05:33:49 2017 (r313578)
@@ -180,6 +180,26 @@ ieee80211_sysctl_radar(SYSCTL_HANDLER_AR
return 0;
}
+/*
+ * For now, just restart everything.
+ *
+ * Later on, it'd be nice to have a separate VAP restart to
+ * full-device restart.
+ */
+static int
+ieee80211_sysctl_vap_restart(SYSCTL_HANDLER_ARGS)
+{
+ struct ieee80211vap *vap = arg1;
+ int t = 0, error;
+
+ error = sysctl_handle_int(oidp, &t, 0, req);
+ if (error || !req->newptr)
+ return error;
+
+ ieee80211_restart_all(vap->iv_ic);
+ return 0;
+}
+
void
ieee80211_sysctl_attach(struct ieee80211com *ic)
{
@@ -259,6 +279,12 @@ ieee80211_sysctl_vattach(struct ieee8021
&vap->iv_ampdu_mintraffic[WME_AC_VI], 0,
"VI traffic tx aggr threshold (pps)");
}
+
+ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
+ "force_restart", CTLTYPE_INT | CTLFLAG_RW, vap, 0,
+ ieee80211_sysctl_vap_restart, "I",
+ "force a VAP restart");
+
if (vap->iv_caps & IEEE80211_C_DFS) {
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
"radar", CTLTYPE_INT | CTLFLAG_RW, vap->iv_ic, 0,
More information about the svn-src-all
mailing list