svn commit: r224267 - head/sys/dev/ath/ath_dfs/null

Adrian Chadd adrian at freebsd.org
Wed Jul 27 14:41:22 UTC 2011


Hm, nope. I'll double-check this against the reference code and commit a fix.

Thanks for picking it up!


adrian

On 26 July 2011 21:30, Gavin Atkinson <gavin at 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:
>>   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-head mailing list