Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2011 22:41:21 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Gavin Atkinson <gavin@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r224267 - head/sys/dev/ath/ath_dfs/null
Message-ID:  <CAJ-VmomD9koJckVvymdYwXcvc9zaMpA5XdUA0VLCfBzzogDORQ@mail.gmail.com>
In-Reply-To: <1311687058.3848.44.camel@buffy.york.ac.uk>
References:  <201107220939.p6M9dnsR008517@svn.freebsd.org> <1311687058.3848.44.camel@buffy.york.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hm, nope. I'll double-check this against the reference code and commit a fi=
x.

Thanks for picking it up!


adrian

On 26 July 2011 21:30, Gavin Atkinson <gavin@freebsd.org> wrote:
> 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:
>> =A0 Implement a basic radar parameter API in the dfs_null module.
>>
>> =A0 Since no actual radar data is ever handled, this won't
>> =A0 do anything. It's mostly here as a reference for those who
>> =A0 wish to experiment with radar detection.
>>
>> Modified:
>> =A0 head/sys/dev/ath/ath_dfs/null/dfs_null.c
>
> [...]
>
>> + =A0 =A0 =A0 =A0 =A0 =A0 indata =3D malloc(insize, M_TEMP, M_NOWAIT);
>> + =A0 =A0 =A0 =A0 =A0 =A0 if (indata =3D=3D NULL) {
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D ENOMEM;
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto bad;
>
> Here you return positive errors to indicate a failure...
>
>> + =A0 =A0 =A0 =A0 =A0 =A0 case DFS_SET_THRESH:
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (insize < sizeof(HAL_PHYERR=
_PARAM)) {
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D -EIN=
VAL;
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break;
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
> [...]
>> + =A0 =A0 =A0 =A0 =A0 =A0 default:
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D -EINVAL;
>> + =A0 =A0 }
> [...]
>> + =A0 =A0 if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_si=
ze))
>> + =A0 =A0 =A0 =A0 =A0 =A0 error =3D -EFAULT;
>
> And for these, you return negative error values. =A0Is this inconsistency
> intentional?
>
> Thanks,
>
> Gavin
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomD9koJckVvymdYwXcvc9zaMpA5XdUA0VLCfBzzogDORQ>