示例#1
0
/**
 * This function provides control to simulate Radar event
 *
 * @param 
 *  SYSCTL_HANDLER_ARGS Standard arguments of the Linux sysctl handler 
 *
 * @returns 
 *  0 on success, or corresponding negative error code on failure
 */
static int
ieee80211_sysctl_radar(SYSCTL_HANDLER_ARGS)
{
	struct ieee80211com *ic  = ctl->extra1;
	
	IEEE80211_LOCK(ic);
	ieee80211_dfs_notify_radar(ic, ic->ic_curchan);
	IEEE80211_UNLOCK(ic); 
	return 0;
}
示例#2
0
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;
}