Skip to contentSkip to conversation

regulatory domain settings overwritten

DISCUSSION Erich Titl 4 participants 13 messages Nov 27, 2012 – Nov 28, 2012

lore
Share & tools
lore

Erich Titl

author
#0 lore raw

Hello

I am trying to set up wireless support on an embedded X86 based device (PCengines WRAP) using an atheros based CM-9 card manufactured by Wistron Neweb.

I am using cfg80211 with the internal regulatory domain database. I am observing the following with dmesg

[  133.324451] cfg80211: Calling CRDA to update world regulatory domain
[  133.344421] cfg80211: World regulatory domain updated:
[  133.346021]     (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[  133.347622]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi,
2000 mBm)
[  133.348902]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi,
2000 mBm)
[  133.349842]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi,
2000 mBm)
[  133.350455]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi,
2000 mBm)
[  133.351736]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi,
2000 mBm)
[  133.353431] cfg80211: Calling CRDA for country: CH
[  133.443881] cfg80211: Regulatory domain changed to country: CH
[  133.444568]     (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[  133.445486]     (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  133.446397]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  133.447630]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  133.448863]     (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
[  141.971982] ath5k 0000:00:0d.0: registered as 'phy0'
[  142.453824] ath: EEPROM regdomain: 0x0
[  142.453881] ath: EEPROM indicates default country code should be used
[  142.453940] ath: doing EEPROM country->regdmn map search
[  142.454009] ath: country maps to regdmn code: 0x3a
[  142.454062] ath: Country alpha2 being used: US
[  142.454109] ath: Regpair used: 0x3a
[  146.738786] phy0: Selected rate control algorithm 'minstrel'
[  146.838666] ath5k phy0: Atheros AR5213A chip found (MAC: 0x59, PHY: 0x43)
[  146.839284] ath5k phy0: RF5112B multiband radio found (0x36)
[  146.842202] cfg80211: Calling CRDA for country: US
[  146.936338] cfg80211: Current regulatory domain intersected:
[  146.937470]     (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[  146.938415]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  146.939290]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 1700 mBm)
[  146.940525]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  146.941758]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  146.942702]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2000 mBm)

Although I specify a country code CH at module loading, it appears that the athk5 driver is calling cfg80211 with a default country code. Why is US the default country code and why is it called at all.

Thanks

Erich Titl

#1 lore raw

Hi Erich,

Quoted 51 lines · Erich Titl

Hello

I am trying to set up wireless support on an embedded X86 based device (PCengines WRAP) using an atheros based CM-9 card manufactured by Wistron Neweb.

I am using cfg80211 with the internal regulatory domain database. I am observing the following with dmesg

[  133.324451] cfg80211: Calling CRDA to update world regulatory domain
[  133.344421] cfg80211: World regulatory domain updated:
[  133.346021]     (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[  133.347622]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi,
2000 mBm)
[  133.348902]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi,
2000 mBm)
[  133.349842]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi,
2000 mBm)
[  133.350455]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi,
2000 mBm)
[  133.351736]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi,
2000 mBm)
[  133.353431] cfg80211: Calling CRDA for country: CH
[  133.443881] cfg80211: Regulatory domain changed to country: CH
[  133.444568]     (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[  133.445486]     (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  133.446397]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  133.447630]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  133.448863]     (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
[  141.971982] ath5k 0000:00:0d.0: registered as 'phy0'
[  142.453824] ath: EEPROM regdomain: 0x0
[  142.453881] ath: EEPROM indicates default country code should be used
[  142.453940] ath: doing EEPROM country->regdmn map search
[  142.454009] ath: country maps to regdmn code: 0x3a
[  142.454062] ath: Country alpha2 being used: US
[  142.454109] ath: Regpair used: 0x3a
[  146.738786] phy0: Selected rate control algorithm 'minstrel'
[  146.838666] ath5k phy0: Atheros AR5213A chip found (MAC: 0x59, PHY: 0x43)
[  146.839284] ath5k phy0: RF5112B multiband radio found (0x36)
[  146.842202] cfg80211: Calling CRDA for country: US
[  146.936338] cfg80211: Current regulatory domain intersected:
[  146.937470]     (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[  146.938415]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  146.939290]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 1700 mBm)
[  146.940525]     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  146.941758]     (5490000 KHz - 5600000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  146.942702]     (5650000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Quoted 3 lines

Although I specify a country code CH at module loading, it appears that the athk5 driver is calling cfg80211 with a default country code. Why is US the default country code and why is it called at all.

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.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
#2 lore raw
Quoted 8 lines · Julian Calaby

Hi Erich,

On Tue, Nov 27, 2012 at 6:50 PM, Erich Titl <[email protected]> wrote:
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.

Quoted 7 lines

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.

Just to avoid further confusion. The country code CH maps to Switzerland, whereas CN is China.So the second part should be about Switzerland.

Regards,
Chr

#3 lore raw

Hi Christian,

Quoted 17 lines · Christian Lamparter
Quoted 8 lines · Julian Calaby

Hi Erich,

On Tue, Nov 27, 2012 at 6:50 PM, Erich Titl <[email protected]> wrote:
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.

Quoted 7 lines

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.

Quoted 2 lines

Just to avoid further confusion. The country code CH maps to Switzerland, whereas CN is China.So the second part should be about Switzerland.

I should have known that, I have a Chinese card here in Australia.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
author
#4 lore raw
In reply to Julian Calaby

Hi Julian

Thank you for the quick reply and the link

Quoted 2 lines · Julian Calaby

Hi Erich,

...

Quoted 13 lines

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.

Quoted 7 lines

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

#5 lore raw

Hi Erich,

Quoted 25 lines · Erich Titl

Hi Julian

Thank you for the quick reply and the link

Quoted 2 lines · Julian Calaby

Hi Erich,

...

Quoted 15 lines

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:

Quoted 8 lines
Quoted 5 lines

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

Sorry about that, the last time I explained this, it was for a Chinese resident, and I got the codes mixed up.

This "default" is part of the specification of how the hardware operates. If it hasn't been configured otherwise, it defaults to US operation. I'm sure that the Windows driver behaves in exactly the same way - this isn't some feature of the Linux driver, it's how the card is supposed to work.

Quoted 5 lines

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.

Laws say otherwise. Each country has a different set of regulations for how they expect a WiFi card to operate. To make a card that is fully compliant with all these sets of regulations would require it to be tested against in a way which can prove that it complies with all those regulations. In general, as I understand it, cards are usually built for a particular market, and tested that they comply with that market's regulations, usually then ignoring any other country's regulations. Cheaper manufacturers may just use a reference design, which is probably built to comply with US regulations, and then just use the defaults.

The card is not "open", it's using the default configuration. The default configuration is that it's configured for US operation.

Quoted 4 lines

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.

If you're using access points on channels 12 and 13, then yeah, using a card that is configured for US operation won't work for you.

Quoted 4 lines

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.

You could recompile the driver to use the Swiss country code as the default, however then you'd be using the card in a way which is outside of it's specification.

It is possible that your particular card cannot work predictably enough on channels 12 and 13 to comply with the Swiss regulations which is why it's been left at the default configuration. It's also possible that it can comply with the regulations perfectly, but has never been tested and had the EEPROM set to indicate that it can comply with them.

The simple fact of the matter is that the card is set to use the default configuration. The default configuration is for US operation, simple as that. This isn't short sighted Linux developers assuming that everyone is in the US, this is a design decision by the company that produced the card to give it a sensible default it can comply with.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
author
#6 lore raw

Hi Julian

Quoted 5 lines · Julian Calaby

Hi Erich,

Quoted 2 lines · Erich Titl

Hi Julian

...

Quoted 9 lines

Sorry about that, the last time I explained this, it was for a Chinese resident, and I got the codes mixed up.

This "default" is part of the specification of how the hardware operates. If it hasn't been configured otherwise, it defaults to US operation. I'm sure that the Windows driver behaves in exactly the same way - this isn't some feature of the Linux driver, it's how the card is supposed to work.

I understand that well, but how is the driver supposed to know what the default is?
In my case I got a card imported by a local OEM which gets them from Taiwan directly.

..

Quoted 11 lines

Laws say otherwise. Each country has a different set of regulations for how they expect a WiFi card to operate. To make a card that is fully compliant with all these sets of regulations would require it to be tested against in a way which can prove that it complies with all those regulations. In general, as I understand it, cards are usually built for a particular market, and tested that they comply with that market's regulations, usually then ignoring any other country's regulations. Cheaper manufacturers may just use a reference design, which is probably built to comply with US regulations, and then just use the defaults.

Yes, but in my case the card says 'OK, use the default' and then the default happens to be hard coded as US in he driver. In my book this is different from a card saying, 'OH, I believe I am a US card, so please behave US conformant'.

Quoted 3 lines

The card is not "open", it's using the default configuration. The default configuration is that it's configured for US operation.

No, it is not, the card pretends nothing, the driver does.

Quoted 8 lines
Quoted 5 lines

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.

If you're using access points on channels 12 and 13, then yeah, using a card that is configured for US operation won't work for you.

Indeed and that is what I am ranting about.

Quoted 6 lines
Quoted 5 lines

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.

Quoted 7 lines

You could recompile the driver to use the Swiss country code as the default, however then you'd be using the card in a way which is outside of it's specification.

It is possible that your particular card cannot work predictably enough on channels 12 and 13 to comply with the Swiss regulations which is why it's been left at the default configuration.

The driver itself cannot be made responsible for the malfunction of the card. If the card was restricted in any way, the manufacturer can and IMHO _must_ use the EEPROM value to restrict it's use. This was _not_ done here, as the manufacturer cannot know what the driver author thinks is the default.

It's also

Quoted 3 lines

possible that it can comply with the regulations perfectly, but has never been tested and had the EEPROM set to indicate that it can comply with them.

Yes of course, it could be that way, but my past experience in IT leads me to believe that manufacturers shy away from market specific hardware design. This is why the CM9 does not specify a country code, but a 'default' setting.

Quoted 7 lines

The simple fact of the matter is that the card is set to use the default configuration. The default configuration is for US operation, simple as that. This isn't short sighted Linux developers assuming that everyone is in the US, this is a design decision by the company that produced the card to give it a sensible default it can comply with.

Oh, I don't pretend the developers are short sighted, just that the person writing the code sat possibly somewhere in the US midwest and his perception of the world might be restricted to the county border, been there, seen it. The driver IMHO should be written in a way that it can meet the local regulatory law, and the default should not be US imposed by the driver.

Nevertheless, I have patched the driver to do exactly that, if there is no regdom specified in the EEPROM then use the one specified in the cfg80211 options. The behaviour of the driver can be controlled right now by a compile time flag, I might even turn that into a flag passed as an option at load time.

cheers

Erich

#7 lore raw

Hi Erich,

Quoted 14 lines · Erich Titl

Hi Julian

Quoted 5 lines · Julian Calaby

Hi Erich,

Quoted 2 lines · Erich Titl

Hi Julian

...

Quoted 4 lines

Sorry about that, the last time I explained this, it was for a Chinese resident, and I got the codes mixed up.

Quoted 8 lines
Quoted 5 lines

This "default" is part of the specification of how the hardware operates. If it hasn't been configured otherwise, it defaults to US operation. I'm sure that the Windows driver behaves in exactly the same way - this isn't some feature of the Linux driver, it's how the card is supposed to work.

I understand that well, but how is the driver supposed to know what the default is?

Because the specification of the EEPROM format says that it's US.

Quoted 2 lines

In my case I got a card imported by a local OEM which gets them from Taiwan directly.

So it's unlikely to have been tested to comply with Swiss regulations, therefore the EEPROM is set to use the defaults.

Quoted 11 lines
Quoted 10 lines

Laws say otherwise. Each country has a different set of regulations for how they expect a WiFi card to operate. To make a card that is fully compliant with all these sets of regulations would require it to be tested against in a way which can prove that it complies with all those regulations. In general, as I understand it, cards are usually built for a particular market, and tested that they comply with that market's regulations, usually then ignoring any other country's regulations. Cheaper manufacturers may just use a reference design, which is probably built to comply with US regulations, and then just use the defaults.

Quoted 4 lines

Yes, but in my case the card says 'OK, use the default' and then the default happens to be hard coded as US in he driver. In my book this is different from a card saying, 'OH, I believe I am a US card, so please behave US conformant'.

It's no different. In this case, the card saying "I don't know what I am" is specified to be equivalent to it saying "I'm a US card".

Quoted 4 lines
Quoted 2 lines

The card is not "open", it's using the default configuration. The default configuration is that it's configured for US operation.

No, it is not, the card pretends nothing, the driver does.

The card says to use the default, the default is US.

Quoted 13 lines
Quoted 5 lines
Quoted 4 lines

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.

Quoted 7 lines

You could recompile the driver to use the Swiss country code as the default, however then you'd be using the card in a way which is outside of it's specification.

It is possible that your particular card cannot work predictably enough on channels 12 and 13 to comply with the Swiss regulations which is why it's been left at the default configuration.

Quoted 5 lines

The driver itself cannot be made responsible for the malfunction of the card. If the card was restricted in any way, the manufacturer can and IMHO _must_ use the EEPROM value to restrict it's use. This was _not_ done here, as the manufacturer cannot know what the driver author thinks is the default.

We are required by law to do our best to ensure that the card complies with whatever regulations are in force, wherever we are in the world. The simplest way to do this is to ensure that we comply with every piece of information we have. If the card says that we're in the US and the user says we're in Switzerland, then we restrict it to the minimum of both sets of regulatory rules so that we can be sure that the card is, to the best of our knowledge, complying with the rules.

On the other hand, some cheaper manufacturers use reference designs and keep things default to cut costs. Therefore the manufacturer of the chip specifies a default which is hard coded in the driver.

Quoted 9 lines

It's also

Quoted 3 lines

possible that it can comply with the regulations perfectly, but has never been tested and had the EEPROM set to indicate that it can comply with them.

Yes of course, it could be that way, but my past experience in IT leads me to believe that manufacturers shy away from market specific hardware design. This is why the CM9 does not specify a country code, but a 'default' setting.

CM9 is getting rather old now and there are now facilities in the kernel to detect which region we're in from the information the phone would get from a cell phone tower, I don't know for sure, but I'd expect that this will be used in the future to ensure that we comply where possible.

Also, CM9 is a custom ROM and may simply not have bothered where manufacturer ROMs might have.

Quoted 7 lines
Quoted 6 lines

The simple fact of the matter is that the card is set to use the default configuration. The default configuration is for US operation, simple as that. This isn't short sighted Linux developers assuming that everyone is in the US, this is a design decision by the company that produced the card to give it a sensible default it can comply with.

Quoted 6 lines

Oh, I don't pretend the developers are short sighted, just that the person writing the code sat possibly somewhere in the US midwest and his perception of the world might be restricted to the county border, been there, seen it. The driver IMHO should be written in a way that it can meet the local regulatory law, and the default should not be US imposed by the driver.

The default is not imposed by some midwest driver author, the default is imposed by the manufacturer of the chip as a default when the regulatory information is incorrect or unavailable.

Quoted 5 lines

Nevertheless, I have patched the driver to do exactly that, if there is no regdom specified in the EEPROM then use the one specified in the cfg80211 options. The behaviour of the driver can be controlled right now by a compile time flag, I might even turn that into a flag passed as an option at load time.

And this will be trying to use the card against it's specifications and will probably be rejected because of that.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
author
#8 lore raw

Hi Julian

Quoted 5 lines · Julian Calaby

Hi Erich,

Quoted 2 lines · Erich Titl

Hi Julian

...

Quoted 3 lines

So it's unlikely to have been tested to comply with Swiss regulations, therefore the EEPROM is set to use the defaults.

It is pretty unlikely to have been tested against US regulations either.

Quoted 1 line

....

Quoted 3 lines

It's no different. In this case, the card saying "I don't know what I am" is specified to be equivalent to it saying "I'm a US card".

You don't really want to say that anyone who does not know better is a US citizen ;-)

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

The card is not "open", it's using the default configuration. The default configuration is that it's configured for US operation.

No, it is not, the card pretends nothing, the driver does.

The card says to use the default, the default is US.

And this IMHO is just plain wrong. US is not the navel of the world, if there is one at all.

Quoted 9 lines

..

We are required by law to do our best to ensure that the card complies with whatever regulations are in force, wherever we are in the world. The simplest way to do this is to ensure that we comply with every piece of information we have. If the card says that we're in the US and the user says we're in Switzerland, then we restrict it to the minimum of both sets of regulatory rules so that we can be sure that the card is, to the best of our knowledge, complying with the rules.

I know now, by inspecting the code that this is exactly what happens. I agree with you that if the card says 'I am a US branded card' this is the right thing to do.
I disagree though that for a card that says 'Never mind, just specify your location' US is the right choice.

I believe instead of using

reg->country_code = CTRY_UNITED_STATES;

should be something like

reg->country_code = CTRY_NEUTRAL;

Quoted 4 lines

On the other hand, some cheaper manufacturers use reference designs and keep things default to cut costs. Therefore the manufacturer of the chip specifies a default which is hard coded in the driver.

Yes, but the hard coded regdomain US is doubtful.

Quoted 11 lines
Quoted 10 lines

It's also

Quoted 3 lines

possible that it can comply with the regulations perfectly, but has never been tested and had the EEPROM set to indicate that it can comply with them.

Yes of course, it could be that way, but my past experience in IT leads me to believe that manufacturers shy away from market specific hardware design. This is why the CM9 does not specify a country code, but a 'default' setting.

Quoted 5 lines

CM9 is getting rather old now and there are now facilities in the kernel to detect which region we're in from the information the phone would get from a cell phone tower, I don't know for sure, but I'd expect that this will be used in the future to ensure that we comply where possible.

For phones that may be a good thing, though I would not want my phone somehow to sample my position without asking me. For things that don't depend on the public telephone system this method is unsafe at best.

Quoted 1 line

...

Quoted 4 lines

The default is not imposed by some midwest driver author, the default is imposed by the manufacturer of the chip as a default when the regulatory information is incorrect or unavailable.

Right, in EEPROM this is unavailable, but now the driver translates this to a hardly comprehensible region which apparently is somehow restricted.

Quoted 3 lines

And this will be trying to use the card against it's specifications and will probably be rejected because of that.

That my or may not be the case. Anyway, cfg80211 can set the card to the world domain and can also set it to country code CH. Unfortunately the driver is overlaying this.

I tried several CTRY settings, as I don't want to mess up unnecessarily. CRTY_DEFAUT just makes it cough.

What is a usable CTRY code to cover the broadest possible country range, which can then be controlled through the correct country code. I could use something like CTRY_AUSTRALIA but then that would be as bad as CRTY_UNITED_STATES as it is not a neutral setting.

Is there a neutral CTRY value which does not mess up the worldwide settings?

And yes, we do not need to agree on the universalness of CTRY_UNITED_STATES ;-)

Thanks

Erich

#9 lore raw

Hi Erich,

The rule for dealing with invalid or default regulatory data in Atheros cards is to use the US region.

This is specified in Atheros' documentation for the EEPROM format.

The code is working as designed, to the specification for the chipset and as close as we can be certain to compliance with all applicable laws.

The fact that your cards are using the defaults indicates that somewhere between the factory and your hands someone isn't testing the cards to verify them against a set of regulatory rules.

As far as I'm concerned, this matter is closed. The issue has been explained to you repeatedly and in detail. Arguing with me won't change the specification, won't change the code, and won't change the fact that the device and driver are working exactly as they are supposed to.

Quoted 8 lines · Erich Titl

Hi Julian

Quoted 5 lines · Julian Calaby

Hi Erich,

Quoted 2 lines · Erich Titl

Hi Julian

Quoted 7 lines

...

Quoted 3 lines

So it's unlikely to have been tested to comply with Swiss regulations, therefore the EEPROM is set to use the defaults.

It is pretty unlikely to have been tested against US regulations either.

Yes, which indicates to me that someone between the factory and you hasn't been checking that the cards comply before selling them on.

Quoted 5 lines
Quoted 2 lines

It's no different. In this case, the card saying "I don't know what I am" is specified to be equivalent to it saying "I'm a US card".

You don't really want to say that anyone who does not know better is a US citizen ;-)

This has nothing to do with nationality.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

The card is not "open", it's using the default configuration. The default configuration is that it's configured for US operation.

No, it is not, the card pretends nothing, the driver does.

The card says to use the default, the default is US.

And this IMHO is just plain wrong. US is not the navel of the world, if there is one at all.

Again, this has nothing to do with nationality. Would you complain as much if the default was England? Spain? Afganistan?

Quoted 14 lines
Quoted 7 lines

We are required by law to do our best to ensure that the card complies with whatever regulations are in force, wherever we are in the world. The simplest way to do this is to ensure that we comply with every piece of information we have. If the card says that we're in the US and the user says we're in Switzerland, then we restrict it to the minimum of both sets of regulatory rules so that we can be sure that the card is, to the best of our knowledge, complying with the rules.

I know now, by inspecting the code that this is exactly what happens. I agree with you that if the card says 'I am a US branded card' this is the right thing to do.
I disagree though that for a card that says 'Never mind, just specify your location' US is the right choice.

Quoted 7 lines

I believe instead of using

reg->country_code = CTRY_UNITED_STATES;

should be something like

reg->country_code = CTRY_NEUTRAL;

The "neutral" regulatory rules are the "world" regulatory rules which comply with every set of regulations out there. It is even more restricted than the US regulatory rules.

Quoted 5 lines
Quoted 3 lines

On the other hand, some cheaper manufacturers use reference designs and keep things default to cut costs. Therefore the manufacturer of the chip specifies a default which is hard coded in the driver.

Yes, but the hard coded regdomain US is doubtful.

It's specified by Atheros, the company that makes the chips, as the domain to use when there is none set.

Quoted 16 lines
Quoted 10 lines
Quoted 9 lines

It's also

Quoted 3 lines

possible that it can comply with the regulations perfectly, but has never been tested and had the EEPROM set to indicate that it can comply with them.

Yes of course, it could be that way, but my past experience in IT leads me to believe that manufacturers shy away from market specific hardware design. This is why the CM9 does not specify a country code, but a 'default' setting.

Quoted 5 lines

CM9 is getting rather old now and there are now facilities in the kernel to detect which region we're in from the information the phone would get from a cell phone tower, I don't know for sure, but I'd expect that this will be used in the future to ensure that we comply where possible.

Quoted 3 lines

For phones that may be a good thing, though I would not want my phone somehow to sample my position without asking me. For things that don't depend on the public telephone system this method is unsafe at best.

Personally, if I were designing code that could interact with laws in a way that could potentially get users of that code in legal trouble, I'd take every precaution to ensure that this didn't happen. This code is designed with that in mind.

Quoted 6 lines
Quoted 3 lines

The default is not imposed by some midwest driver author, the default is imposed by the manufacturer of the chip as a default when the regulatory information is incorrect or unavailable.

Right, in EEPROM this is unavailable, but now the driver translates this to a hardly comprehensible region which apparently is somehow restricted.

Yes, by following the specification specified by the manufacturer of the chipset.

Quoted 6 lines
Quoted 2 lines

And this will be trying to use the card against it's specifications and will probably be rejected because of that.

That my or may not be the case. Anyway, cfg80211 can set the card to the world domain and can also set it to country code CH. Unfortunately the driver is overlaying this.

As explained previously, you are saying that you're in Switzerland, we have information that indicates that we may be in the USA so we use a set of rules that comply with both.

Quoted 9 lines

I tried several CTRY settings, as I don't want to mess up unnecessarily. CRTY_DEFAUT just makes it cough.

What is a usable CTRY code to cover the broadest possible country range, which can then be controlled through the correct country code. I could use something like CTRY_AUSTRALIA but then that would be as bad as CRTY_UNITED_STATES as it is not a neutral setting.

Is there a neutral CTRY value which does not mess up the worldwide settings?

You could use the world regulatory domain, but it's even more restricted as it complies with _every_ set of rules.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
author
#10 lore raw

Hi Julian

Quoted 15 lines · Julian Calaby

Hi Erich,

The rule for dealing with invalid or default regulatory data in Atheros cards is to use the US region.

This is specified in Atheros' documentation for the EEPROM format.

The code is working as designed, to the specification for the chipset and as close as we can be certain to compliance with all applicable laws.

The fact that your cards are using the defaults indicates that somewhere between the factory and your hands someone isn't testing the cards to verify them against a set of regulatory rules.

Quoted 5 lines

As far as I'm concerned, this matter is closed. The issue has been explained to you repeatedly and in detail. Arguing with me won't change the specification, won't change the code, and won't change the fact that the device and driver are working exactly as they are supposed to.

Of course it is and I don't argue that

Thanks

Erich

#11 lore raw
In reply to Erich Titl
Quoted 6 lines · Erich Titl

Oh, I don't pretend the developers are short sighted, just that the person writing the code sat possibly somewhere in the US midwest and his perception of the world might be restricted to the county border, been there, seen it. The driver IMHO should be written in a way that it can meet the local regulatory law, and the default should not be US imposed by the driver.

For what it's worth, the ath5k author lives in Greece :P

(Well, actually this code came from ath9k which is pretty much from the horse's mouth...)

Signature · 1 line
Bob Copeland %% www.bobcopeland.com
author
#12 lore raw

Hi Bob

Quoted 9 lines · Bob Copeland
Quoted 6 lines · Erich Titl

Oh, I don't pretend the developers are short sighted, just that the person writing the code sat possibly somewhere in the US midwest and his perception of the world might be restricted to the county border, been there, seen it. The driver IMHO should be written in a way that it can meet the local regulatory law, and the default should not be US imposed by the driver.

For what it's worth, the ath5k author lives in Greece :P

Thanks for the info, well Greece has some more things to do right now than to worry about a wireless driver :P

Quoted 3 lines

(Well, actually this code came from ath9k which is pretty much from the horse's mouth...)

Yes, it is pretty universal across the ath range. Do you know how other implementations handle this situation, or is it just the Atheros (or CM9) EEPROM that is undecided?

Thanks

Erich