PERFORCE change 146385 for review
Sam Leffler
sam at FreeBSD.org
Fri Aug 1 18:03:06 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146385
Change 146385 by sam at sam_ebb on 2008/08/01 18:02:06
add a sysctl to simulate a radar event for testing
Affected files ...
.. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#31 edit
Differences ...
==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#31 (text+ko) ====
@@ -201,6 +201,21 @@
return SYSCTL_OUT(req, name, strlen(name));
}
+static int
+ieee80211_sysctl_radar(SYSCTL_HANDLER_ARGS)
+{
+ struct ieee80211com *ic = arg1;
+ int t = 0, error;
+
+ error = sysctl_handle_int(oidp, &t, 0, req);
+ if (error || !req->newptr)
+ return error;
+ IEEE80211_LOCK(ic);
+ ieee80211_dfs_notify_radar(ic, ic->ic_curchan);
+ IEEE80211_UNLOCK(ic);
+ return 0;
+}
+
void
ieee80211_sysctl_attach(struct ieee80211com *ic)
{
@@ -280,6 +295,11 @@
&vap->iv_ampdu_mintraffic[WME_AC_VI], 0,
"VI traffic tx aggr threshold (pps)");
}
+ 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,
+ ieee80211_sysctl_radar, "I", "simulare radar event");
+ }
vap->iv_sysctl = ctx;
vap->iv_oid = oid;
}
More information about the p4-projects
mailing list