Search Linux Wireless

Re: [PATCH] cfg80211: fix set_regdom() to cancel requests with same alpha2

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

 



On Fri, Jul 13, 2012 at 5:50 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> Luis?

It follows the -EALREADY convention of when a regdomain is already applied.

Acked-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxxxxx>

>>               if (!regdom_changes(rd->alpha2))
>> -                     return -EINVAL;
>> +                     return -EALREADY;
>>       }
>>
>>       /*
>> @@ -2325,6 +2325,9 @@ int set_regdom(const struct ieee80211_regdomain *rd)
>>       /* Note that this doesn't update the wiphys, this is done below */
>>       r = __set_regdom(rd);
>>       if (r) {
>> +             if (r == -EALREADY)
>> +                     reg_set_request_processed();
>> +
>
> I'm not really sure I like the reliance on the error code ... would it
> make more sense to invent a status enum? Or just return 0 to start with?

The code already did this with -EALREADY, if we want to treat this
differently we should go in and sweep change all that. But the big
sweep is better to happen on the regsim IMHO. I've been trying to do
as little changes as possible to existing code.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux