svn commit: r224267 - head/sys/dev/ath/ath_dfs/null
Gavin Atkinson
gavin at FreeBSD.org
Tue Jul 26 13:41:53 UTC 2011
On Fri, 2011-07-22 at 09:39 +0000, Adrian Chadd wrote:
> Author: adrian
> Date: Fri Jul 22 09:39:49 2011
> New Revision: 224267
> URL: http://svn.freebsd.org/changeset/base/224267
>
> Log:
> Implement a basic radar parameter API in the dfs_null module.
>
> Since no actual radar data is ever handled, this won't
> do anything. It's mostly here as a reference for those who
> wish to experiment with radar detection.
>
> Modified:
> head/sys/dev/ath/ath_dfs/null/dfs_null.c
[...]
> + indata = malloc(insize, M_TEMP, M_NOWAIT);
> + if (indata == NULL) {
> + error = ENOMEM;
> + goto bad;
Here you return positive errors to indicate a failure...
> + case DFS_SET_THRESH:
> + if (insize < sizeof(HAL_PHYERR_PARAM)) {
> + error = -EINVAL;
> + break;
> + }
[...]
> + default:
> + error = -EINVAL;
> + }
[...]
> + if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size))
> + error = -EFAULT;
And for these, you return negative error values. Is this inconsistency
intentional?
Thanks,
Gavin
More information about the svn-src-all
mailing list