Search Linux Wireless

Re: [PATCH v5 2/4] cfg80211: allow usermode to query wiphy specific regdom

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

 



On Sat, Nov 29, 2014 at 12:00 AM, Luis R. Rodriguez <mcgrof@xxxxxxxx> wrote:
> On Fri, Nov 28, 2014 at 02:46:27PM +0100, Johannes Berg wrote:
>> On Thu, 2014-11-27 at 09:44 +0200, Arik Nemtsov wrote:
>> > If a wiphy-idx is specified, the kernel will return the wiphy specific
>> > regdomain, if such exists. Otherwise return the global regdom.
>> >
>> > When no wiphy-idx is specified, return the global regdomain as well as
>> > all wiphy-specific regulatory domains in the system, via a new nested
>> > list of attributes.
>>
>> Is that really a good idea? Seems rather easy to overrun the message
>> size with that, in which case your current code will not return anything
>> at all... that'll cause strange errors if somebody plugs in a few
>> devices or has hwsim open as well or so ...
>
> Good point, perhaps require 'iw reg get --all' for all listing then?
> This would mean requiring an new optional flag passed on reg get too
> then.

I think Johannes' point was that it's easy to overrun the message size
if there are a lot of wiphys.
So I'll simply add an iterator over all wiphys in "iw reg get" and
kernel-mode will only return a single regdomain in each GET_REG
invocation.

About the "--all" suggestion - I think it's fine to not have backward
compatibility in the output of "iw reg get"? So we can just output the
global first, and then output private regdoms for all wiphys that have
them.

Does that sound ok?

>
>> > Add a new attribute for each wiphy-specific regdomain, for usermode to
>> > identify it as such.
>>
>> Shouldn't userspace also *request* this for backward compatibility?
>> Otherwise older userspace might assume that a returned regd applies to
>> everything, when it doesn't really?
>
> If the flag --all is used and passed then I see no issue.

Well you have to give a wiphy-idx in order to get a private regdom in
the first place. And only new userspace will add a wiphy-idx in the
first place..

Also, when a global regdom is returned for a given wiphy-idx instead
of a private one, it is valid, since the global one is being used for
this wiphy.
If there is a private regdom (from regulatory_hint()) then we'll
return it to usermode. This is less restrictive than the global one,
and that's the one being used for channel verification for this wiphy.

Arik
--
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