[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:
parent
65f5f3ce0c
commit
9574e55faa
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user