linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erich Titl <erich.titl@think.ch>
To: Julian Calaby <julian.calaby@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: regulatory domain settings overwritten
Date: Tue, 27 Nov 2012 13:53:10 +0100	[thread overview]
Message-ID: <50B4B7B6.7020205@think.ch> (raw)
In-Reply-To: <CAGRGNgVT-Yru2ti9CWgwS5H2cfW=RTeL144zsdAmSRCAsLwOsg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3299 bytes --]

Hi Julian

Thank you for the quick reply and the link

on 27.11.2012 10:55, Julian Calaby wrote:
> Hi Erich,
> 
...


> 
> It's not being completely overridden and it is working as designed.
> 
> Firstly, the default country code for all Atheros chips is the USA.
> This is most likely because that's where the company is based.
> 
> Secondly, your choice, China, is not being overridden. As the card is
> saying that it's configured for the USA, and you're saying that it's
> in China, the regulatory framework is using the intersection of the US
> and Chinese rules to govern it's output, thereby ensuring that the
> operation of the card complies with all the information it has about
> it's location.
> 
> This has been explained in more detail in this thread:
> 
> http://www.spinics.net/lists/linux-wireless/msg92420.html
> 
> If you want to have the complete set of frequencies as specified by
> the Chinese rules, you will need to obtain a card which has been
> configured for Chinese operation.

Actually the country code CH should stand for Switzerland and I am
surprised a default for the US should be hard coded into the driver

        regdmn = ath_regd_get_eepromRD(reg);
        reg->country_code = ath_regd_get_default_country(regdmn);

        if (reg->country_code == CTRY_DEFAULT &&
            regdmn == CTRY_DEFAULT) {
                printk(KERN_DEBUG "ath: EEPROM indicates default "
                       "country code should be used\n");
                reg->country_code = CTRY_UNITED_STATES;
        }

        if (reg->country_code == CTRY_DEFAULT) {
                country = NULL;
        } else {
                printk(KERN_DEBUG "ath: doing EEPROM country->regdmn "
                       "map search\n");
                country = ath_regd_find_country(reg->country_code);
                if (country == NULL) {
                        printk(KERN_DEBUG
                                "ath: no valid country maps found for "
                                "country code: 0x%0x\n",
                                reg->country_code);
                        return -EINVAL;
                } else {
                        regdmn = country->regDmnEnum;
                        printk(KERN_DEBUG "ath: country maps to "
                               "regdmn code: 0x%0x\n",
                               regdmn);
                }
        }

Anyway, I am located in Switzerland and I saw similar threads from a few
people on the net. Today's mobile society demands that equipment can be
reconfigured freely to accommodate the local regulatory limits. This can
be achieved at will with an open card, which just gets crippled by the
hard coded limits set here.

So under the worst thinkable circumstances this code won't work for my
environment as, for example, the intersection of the world regdomain and
the US regdomain would AFAIK cut away channels 12 and 13, which are
perfectly legal at my domicile and are used by some AP's.

I could (and will probably have to) recompile the driver using another
regdomain file, but this is not really satisfactory either. IMHO the
regdomain should be chosen as seen fit and not imposed by hard coded
limits in the driver.

Thanks

Erich


[-- Attachment #2: S/MIME Kryptografische Unterschrift --]
[-- Type: application/pkcs7-signature, Size: 1877 bytes --]

  parent reply	other threads:[~2012-11-27 12:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  7:50 regulatory domain settings overwritten Erich Titl
2012-11-27  9:55 ` Julian Calaby
2012-11-27 10:27   ` Christian Lamparter
2012-11-27 10:30     ` Julian Calaby
2012-11-27 12:53   ` Erich Titl [this message]
2012-11-27 22:55     ` Julian Calaby
2012-11-28  7:11       ` Erich Titl
2012-11-28  8:18         ` Julian Calaby
2012-11-28 14:43           ` Erich Titl
2012-11-28 22:01             ` Julian Calaby
2012-11-28 22:11               ` Erich Titl
2012-11-28 14:31         ` Bob Copeland
2012-11-28 14:47           ` Erich Titl

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=50B4B7B6.7020205@think.ch \
    --to=erich.titl@think.ch \
    --cc=julian.calaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).