From: "Arend van Spriel" <arend@broadcom.com>
To: "Seth Forshee" <seth.forshee@canonical.com>
Cc: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Problems with regulatory domain support and BCM43224
Date: Wed, 21 Mar 2012 18:51:16 +0100 [thread overview]
Message-ID: <4F6A1514.9090907@broadcom.com> (raw)
In-Reply-To: <20120321141916.GA23643@thinkpad-t410>
On 03/21/2012 03:19 PM, Seth Forshee wrote:
> On Wed, Mar 21, 2012 at 12:05:40PM +0100, Arend van Spriel wrote:
>> On 03/20/2012 11:07 PM, Seth Forshee wrote:
>>> On Thu, Mar 08, 2012 at 01:06:57PM -0800, Luis R. Rodriguez wrote:
>>>>> Hi, Seth
>>>>>
>>>>> Noticed your email yesterday, but did not get to chime into the
>>>>> conversation. brcmsmac does indeed provide a regulatory hint, which is
>>>>> either from SPROM or hard-coded to "US". Since "X0" is not a known
>>>>> regulatory domain for crda it does not make sense to pass it as a regulatory
>>>>> hint. However, the "full" story is told on linuxwireless.org (see [1]).
>>>>
>>>> The Linux kernel allows you to define custom regulatory domains, the
>>>> ath module uses these, it defines 13 of them. You can review that code
>>>> for an example of how to use them. So your X0 can still be used, you
>>>> just have to define the data structure.
>>>
>>> I took a shot at implementing custom regulatory domain support for
>>> brcmsmac. I've got it working to the point of letting me see APs on the
>>> DFS channels at least. The patch is below. A number of issues
>>> undoubtedly remain to be resolved. Some that I can think of:
>>
>> Hi Seth,
>>
>> Thanks for looking into this. I also did some tinkering over here,
>> but not sure which way to go here, ie. 1) define and use custom
>> regulatory domains, or 2) be happy with world regulatory domain as
>> is and do not pass the custom codes if found in sprom.
>
> For 2 I think you also have to set WIPGHY_FLAG_CUSTOM_REGULATORY or else
> the default world domain will still be applied. That certainly seems to
> be the quick-and-easy fix, but I'm not sure about what's preferable.
>
> However, I do think that passing up the custom codes as hints doesn't
> make sense, and the patch I sent only passes it up if it's not known to
> be one of the custom domains.
Ok. so the wiphy_apply_custom_regulatory() does not make the custom
domains known by their code (.alpha2).
>>> - I set up two custom domains, X0 and X2, which are identical. I'm not
>>> sure precisely how each needs to be set up, but I took a reasonable
>>> guess.
>>
>> There are 9 custom domains in the proprietary driver. X0 only allows
>> using channels 1-11. X2 allows 1-13. There are other parameters like
>> rates and txpower that may differ.
>
> That's the kind if information I would need to make this patch viable.
> I'll go ahead and update the patch to remove channels 12-13 from X0, and
> 14 from both. Are the 5 GHz rules correct?
5G channels are all considered passive by brcmsmac. Not sure whether
that should be made explicit in the rules. Also the driver does not
support IBSS so those flags are redundant now, but it is good to have it
already in place.
> Are the custom domains named X[0-8]? If that's the case I can simplify
> some of the code.
Unfortunately, no.
>>> - I tried to integrate with the existing X2 domain support, but this
>>> could probably be improved. I avoided making large changes because
>>> there's some complexity in the current code that doesn't seem to
>>> serve a purpose currently, but I assume it's there for a reason.
>>
>> The code in channel.c was taken from our proprietary driver.
>> Basically, the LOCALES hold the same information as the rules in
>> regdomain.
>
> I assumed as much, but I haven't made much of an effort to understand it
> yet.
>
> But the complexity I'm referring to is really the infrastructure to
> support multiple locales and revisions that just isn't used right now. I
> can only assume that there are plans to use additional locales and
> revisions at some point.
Understood. The proprietary driver (which is not a mac80211 driver)
supports a lot of locales, which are selected on country code and
regulatory revision (both read from sprom). I suspect this is done to
support the regulatory rules for which the device was certified.
Revisiting channel.c is on our work list, but it would mean more moving
toward using the regdomain approach you started on instead of locales.
>>> - The flow of the initialization and organization of the code make it
>>> necessary to search through the list of custom regulatory domains
>>> many times. It would be nice to improve upon this.
>>>
>>> Does this look to be on the right track?
>>>
>>
>> Looks good. I will see if I can map the LOCALES for these to
>> regdomain rules.
>
> Great! Thanks for you comments.
>
> Seth
>
Gr. AvS
next prev parent reply other threads:[~2012-03-21 17:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 19:40 Problems with regulatory domain support and BCM43224 Seth Forshee
2012-03-08 17:41 ` Seth Forshee
2012-03-08 18:53 ` Luis R. Rodriguez
2012-03-08 19:07 ` Quan, David
2012-03-08 19:36 ` Luis R. Rodriguez
2012-03-08 19:45 ` Quan, David
2012-03-08 19:51 ` Luis R. Rodriguez
2012-03-08 20:07 ` Seth Forshee
2012-03-08 20:17 ` Luis R. Rodriguez
2012-03-08 21:01 ` Arend van Spriel
2012-03-08 21:06 ` Luis R. Rodriguez
2012-03-08 21:31 ` Arend van Spriel
2012-03-08 21:42 ` Seth Forshee
2012-03-20 22:07 ` Seth Forshee
2012-03-21 11:05 ` Arend van Spriel
2012-03-21 14:19 ` Seth Forshee
2012-03-21 17:51 ` Arend van Spriel [this message]
2012-03-21 18:17 ` Luis R. Rodriguez
2012-03-21 19:37 ` Seth Forshee
2012-03-22 0:27 ` Luis R. Rodriguez
2012-03-26 19:36 ` Seth Forshee
2012-04-04 2:46 ` Seth Forshee
2012-04-04 7:03 ` Arend van Spriel
2012-04-10 16:28 ` Seth Forshee
2012-04-11 10:16 ` Arend van Spriel
2012-04-11 13:39 ` Seth Forshee
2012-04-11 16:52 ` Arend van Spriel
2012-03-08 21:59 ` Seth Forshee
2012-03-08 22:12 ` Luis R. Rodriguez
2012-03-08 22:30 ` Seth Forshee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6A1514.9090907@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rodrigue@qca.qualcomm.com \
--cc=seth.forshee@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).