Date: Mon, 5 Mar 2018 08:30:47 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330466 - stable/11/sys/net80211 Message-ID: <201803050830.w258Ul2n017921@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Mon Mar 5 08:30:47 2018 New Revision: 330466 URL: https://svnweb.freebsd.org/changeset/base/330466 Log: MFC r313578: [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: stable/11/sys/net80211/ieee80211_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_freebsd.c ============================================================================== --- stable/11/sys/net80211/ieee80211_freebsd.c Mon Mar 5 08:29:38 2018 (r330465) +++ stable/11/sys/net80211/ieee80211_freebsd.c Mon Mar 5 08:30:47 2018 (r330466) @@ -180,6 +180,26 @@ ieee80211_sysctl_radar(SYSCTL_HANDLER_ARGS) 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 ieee80211vap *vap) &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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803050830.w258Ul2n017921>