WLE900VX regulatory domain setting

By mgw_ at 2018-06-04 • 1 collector • 1903 pageviews

Hello,


I have the following problem with my WLE900VX card that I intend to use in AP mode:


I cannot change the regulatory domain to my local country (DE),


on boot, I get the following kernel messages related to the card:



[    6.896736] ath10k_pci 0000:04:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:04:00.0.bin failed with error -2
[    6.896816] ath10k_pci 0000:04:00.0: Direct firmware load for ath10k/cal-pci-0000:04:00.0.bin failed with error -2
[    8.075480] ath10k_pci 0000:04:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[    8.097673] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
[    8.097682] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 0
[    8.098403] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00037 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 a4a52adb
[    8.131498] ath10k_pci 0000:04:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[    8.132531] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[    9.269773] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
[    9.349088] ath: EEPROM regdomain: 0x0
[    9.349124] ath: EEPROM indicates default country code should be used
[    9.349126] ath: doing EEPROM country->regdmn map search
[    9.349130] ath: country maps to regdmn code: 0x3a
[    9.349134] ath: Country alpha2 being used: US
[    9.349136] ath: Regpair used: 0x3a


trying to set the regulatory domain with

iw reg set DE

does not produce an error message, however, the output of

iw reg get

then becomes:

global
country DE: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country US: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)
        (57240 - 63720 @ 2160), (N/A, 40), (N/A)


How can I get the card to utilize all channels allowed by local regulations instead of only the intersection with the US regulations.

It seems like the driver refuses to change the regulatory setting due to the EEPROM setting on the card. Is it possible to change the EEPROM content?


The board that I am using is a PC Engines apu2c4

The board is running Arch Linux.

The output of

uname -a

is:

Linux nas 4.16.13-1-ARCH #1 SMP PREEMPT Thu May 31 23:29:29 UTC 2018 x86_64 GNU/Linux


If any further information is required, I'll be happy to provide it.

Thank you for any help with this.

9 Replies | Last update 11 days ago
2018-06-05   #1

Dear MGW ,

Please could you provide the iwlist channel info ?


Thanks ,

Winston

2018-06-05   #2

Please could you provide the iwlist channel info ?

Yes, no problem:


for the 2.4GHz band:

                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (disabled)
                        * 2472 MHz [13] (disabled)
                        * 2484 MHz [14] (disabled)

Here, you can see that e.g. channel 12 and 13 are disabled, even though they are legal to use in Germany.


for the 5GHz band:

                Frequencies:
                        * 5180 MHz [36] (20.0 dBm)
                        * 5200 MHz [40] (20.0 dBm)
                        * 5220 MHz [44] (20.0 dBm)
                        * 5240 MHz [48] (20.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
                        * 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
                        * 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
                        * 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
                        * 5500 MHz [100] (23.0 dBm) (no IR, radar detection)
                        * 5520 MHz [104] (23.0 dBm) (no IR, radar detection)
                        * 5540 MHz [108] (23.0 dBm) (no IR, radar detection)
                        * 5560 MHz [112] (23.0 dBm) (no IR, radar detection)
                        * 5580 MHz [116] (23.0 dBm) (no IR, radar detection)
                        * 5600 MHz [120] (23.0 dBm) (no IR, radar detection)
                        * 5620 MHz [124] (23.0 dBm) (no IR, radar detection)
                        * 5640 MHz [128] (23.0 dBm) (no IR, radar detection)
                        * 5660 MHz [132] (23.0 dBm) (no IR, radar detection)
                        * 5680 MHz [136] (23.0 dBm) (no IR, radar detection)
                        * 5700 MHz [140] (23.0 dBm) (no IR, radar detection)
                        * 5720 MHz [144] (disabled)
                        * 5745 MHz [149] (13.0 dBm)
                        * 5765 MHz [153] (13.0 dBm)
                        * 5785 MHz [157] (13.0 dBm)
                        * 5805 MHz [161] (13.0 dBm)
                        * 5825 MHz [165] (13.0 dBm)
                        * 5845 MHz [169] (disabled)


2018-06-06   #3

Dear MGW ,

Please could you check if you have the following items ? :


1) /sbin/crda

2) /lib/crda/

3) /lib/udev/rules.d/85-regulatory.rules

4) /etc/udev/rules.d/regulatory.rules


Thanks ,

Winston


2018-06-06   #4

Items 1) - 4) are present.

Item 4 is missing. The entire directory /etc/udev/rules.d/ is empty.


I had actively installed crda myself. Before I had done that, it was not possible to change the regdomain setting at all. If I remember correctly, it was set to "country 00: DFS-UNSET".

After having installed crda, I can change the general setting, but for the WLE900VX card, I can only narrow the rules to more restrictive ones than the US settings, as described in the initial post.

2018-06-11   #5

Dear MGW,

Have you referred to this link before ? :


https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA


# Example file, should be put in /etc/udev/rules.d/regulatory.rules

KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"


Thanks,

Winston

2018-06-13   #6

Hello Winston,


I have seen that link before, however I don't think that this helps with my problem. My problem is not that I generally can't change the regulatory domain.

My problem is that I cannot change the regulatory domain for the WLE900VX card.

With another card, which identifies in lspci as

Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)

I can successfully change the regulatory settings. As well with a cheap Ralink based USB wifi dongle.


Only the WLE900VX is affected. This can also be seen in the original post where the result of "iw reg get" says DE for the global setting, but US as an exception for phy0, which is the WLE900VX.


Also, the WLE900VX does not stay on US settings entirely. It uses the intersection of allowed channels and power levels between US and DE.

This is consistent with what is described at the link you posted.

In the section "Changing Regulatory Domains", it states that

In order to achieve this devices always respect their programmed regulatory domain and a country code selection will only enhance regulatory restrictions.

I think that this output of dmesg is relevant:

[    7.938946] ath: EEPROM regdomain: 0x0
[    7.938968] ath: EEPROM indicates default country code should be used
[    7.938970] ath: doing EEPROM country->regdmn map search
[    7.938974] ath: country maps to regdmn code: 0x3a
[    7.938977] ath: Country alpha2 being used: US
[    7.938979] ath: Regpair used: 0x3a

It says that the cards EEPROM forces the US settings.


I also found this documentation:

https://wireless.wiki.kernel.org/en/users/drivers/ath#the_0x0_regulatory_domain

where it confirms that the EEPROM 0x0 setting causes me to be restricted to US settings.

The 0x0 value of a regulatory domain is to be used by Atheros devices to map to the “US”, always. This is as per Atheros documentation to manufacturers. Manufacturers wanting to enable users to use cards as “region free” should supply their own builds of CRDA and a signed regulatory database.


Does this mean, I'll have to build CRDA myself with a customized database to use this card according to my local regulations?


Being restricted to US settings is especially annoying because it means I'm unable to use most of the 5GHz band. As DFS is required on most of it, and the ath10k driver only supports ETSI DFS and not FCC DFS, as is documented here:

Current implementation of ath radar pattern detector supports only ETSI regulatory domain. It means radar detection works only when master region is set to ETSI.

Is there any other way than building a custom regulatory database?

If there isn't, can you provide me with hints on how to do that?


Thanks in advance for any help,

Markus

2018-06-19   #7

Dear Markus,


Did you tried with the following link:

https://forums.gentoo.org/viewtopic-t-980448-start-0.html


I found the file /usr/src/linux-3.10.17-gentoo/drivers/net/wireless/ath/regd.c responsible for the initial limitations of the card. 
I made a change on line 569: 

Code:
        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; 
        }


from United States to Germany: 

Code:
reg->country_code = CTRY_GERMANY;



By the way, I tried on my Linux PC with WLE900VX, it was able to change the regulatory domain without any change and modification needed.

Screenshot from 2018-06-18 13-58-26.png

Can you kindly check your Arch Linux in order to compare with the Ubuntu Linux version I displayed above here?


Thanks.

2018-12-20   #8

And I have a similar problem.

I use my WLE900VX with Armbian Stretch mainline kernel 4.18.y

root@AP:~# iw reg get

global

country BG: DFS-ETSI

        (2402 - 2482 @ 40), (N/A, 20), (N/A)

        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW

        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW

        (5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS

        (5725 - 5875 @ 80), (N/A, 14), (N/A)

        (57000 - 66000 @ 2160), (N/A, 40), (N/A), NO-OUTDOOR


phy#0

country US: DFS-FCC

        (2402 - 2472 @ 40), (N/A, 30), (N/A)

        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW

        (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW

        (5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS

        (5735 - 5835 @ 80), (N/A, 30), (N/A)

        (57240 - 63720 @ 2160), (N/A, 40), (N/A)

---------------------------------------------------------------------------------------------------

root@AP:~# iwlist wlp0s0  frequency

wlp0s0    32 channels in total; available frequencies :

          Channel 01 : 2.412 GHz

          Channel 02 : 2.417 GHz

          Channel 03 : 2.422 GHz

          Channel 04 : 2.427 GHz

          Channel 05 : 2.432 GHz

          Channel 06 : 2.437 GHz

          Channel 07 : 2.442 GHz

          Channel 08 : 2.447 GHz

          Channel 09 : 2.452 GHz

          Channel 10 : 2.457 GHz

          Channel 11 : 2.462 GHz

          Channel 36 : 5.18 GHz

          Channel 40 : 5.2 GHz

          Channel 44 : 5.22 GHz

          Channel 48 : 5.24 GHz

          Channel 52 : 5.26 GHz

          Channel 56 : 5.28 GHz

          Channel 60 : 5.3 GHz

          Channel 64 : 5.32 GHz

          Channel 100 : 5.5 GHz

          Channel 104 : 5.52 GHz

          Channel 108 : 5.54 GHz

          Channel 112 : 5.56 GHz

          Channel 116 : 5.58 GHz

          Channel 120 : 5.6 GHz

          Channel 124 : 5.62 GHz

          Channel 128 : 5.64 GHz

          Channel 132 : 5.66 GHz

          Channel 136 : 5.68 GHz

          Channel 140 : 5.7 GHz

          Channel 149 : 5.745 GHz

          Channel 153 : 5.765 GHz


But in 5 Ghz I can only use channels 36 and 44. When trying for other permissive channels the AP does not go. Any guidelines to use the cards WLE900VX?


11 days ago   #9

Hi nik0lai,


Please ensure you are enabling dfs feature for 5 Ghz WiFi connection.

https://wireless.wiki.kernel.org/en/users/drivers/ath10k/configuration


Thanks

Compex Support 

Requires Login

Log in
Information Bar
Welcome to the Compex Support Forum. To start with an enquiry:

1) Sign up for an account.
2) Create a topic and describe the issue as detail as possible.
3) Use the tags on your post to help us identify the issue. Eg. Hardware, Software, Module.

F.A.Q
How do I generate a verification code?
To generate the verification code, simply click on the form. It will create a 4 character code. Simply fill it in.

LINKS

Compex Website
Compex Webshop

Loading...