Search Linux Wireless

Re: [PATCH] nl80211: Add support to notify radar event info received from STA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2018-10-19 at 14:42 +0530, Sriram R wrote:
[...]

This looks fine, but I think it would be nice to have some extended
netlink error reporting for at least some of these errors:

> +	dfs_region = reg_get_dfs_region(wiphy);
> +	if (dfs_region == NL80211_DFS_UNSET)
> +		return -EINVAL;
> +
> +	err = nl80211_parse_chandef(rdev, info, &chandef);
> +	if (err)
> +		return err;
> +
> +	err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
> +	if (err < 0)
> +		return err;
> +
> +	if (err == 0)
> +		return -EINVAL;
> +
> +	/* Do not process this notification if radar is already detected
> +	 * by kernel on this channel
> +	 */
> +	if (chandef.chan->dfs_state == NL80211_DFS_UNAVAILABLE)
> +		return -EINVAL;

And maybe that last one should just return 0?

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux