[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.
This commit is contained in:
Adrian Chadd 2017-02-11 05:33:49 +00:00
parent 701dacac99
commit 07569d5533
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313578

View File

@ -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,