Hi,
I am working on removing some of the artificial regulatory restrictions in ath11k, the main one being the broken regulatory rule intersection which is based on the false assumption that we all live in the US and that even QCA removed downstream ages ago.
This will finally allow the use of channels 12 and 13 in ETSI countries and increased 5GHz TX powers.

I would really appreciate some testing:

11 Likes

Happy to try this out, but I'll need to set up a build environment with the right tool chain etc first.

Any gotchas I need to be aware of?

I just compiled and it looks like it has still FW 2.5?

Are we also getting an upgrade to 2.9?
(I know I can add it myself if so required)

I can compile again tomorrow and test

Whole target has been updated to 2.9 couple of days ago

1 Like

Hmm, I applied it on AX3600 and cannot see difference. Using region DE I get still the included regdb result: (iw phy)

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


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

(miss the higher 5ghz channels, also the tx power is too high...) - compare it with my previous list in Dynalink DL-WRX36 Askey RT5010W IPQ8072A technical discussion - #1420 by NerdyProjects to see that now the intersection with the actual regdb is not made, it is ONLY using the wrong internal one.

dmesg:

[   10.442302] ath10k_pci 0000:01:00.0: NOTE:  Firmware DBGLOG output disabled in debug_mask: 0x10000000
[   10.560922] ath: EEPROM regdomain: 0x0
[   10.560930] ath: EEPROM indicates default country code should be used
[   10.560934] ath: doing EEPROM country->regdmn map search
[   10.560939] ath: country maps to regdmn code: 0x3a
[   10.560943] ath: Country alpha2 being used: US
[   10.560947] ath: Regpair used: 0x3a
[   10.572499] ath11k c000000.wifi: ipq8074 hw2.0
[   10.572536] ath11k c000000.wifi: FW memory mode: 1
[   11.959163] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[   11.966567] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[   11.966620] ath11k c000000.wifi: fw_version 0x290c84a5 fw_build_timestamp 2023-03-25 07:34 fw_build_id WLAN.HK.2.9.0.1-01385-QCAHKSWPL_SILICONZ-1
[   12.220493] ath11k c000000.wifi: htt event 48 not handled
[   15.472771] ath: EEPROM regdomain: 0x8114
[   15.472798] ath: EEPROM indicates we should expect a country code
[   15.472801] ath: doing EEPROM country->regdmn map search
[   15.472804] ath: country maps to regdmn code: 0x37
[   15.472807] ath: Country alpha2 being used: DE
[   15.472811] ath: Regpair used: 0x37
[   15.472814] ath: regdomain 0x8114 dynamically updated by user

(beginning is ath10k - for comparison; that's working correct)

@NerdyProjects can you try updated BDF? (with the patch)

No change - everything exactly as in my post #1447. (my mistake, see below)

Intersection removal is not magic, AX3600 BDF has completely outdated regulatory info.

Also, ath11k was never intersecting with the wireless-regdb, it was intersecting US rules from the FW which are default with your desired domain rules again from the FW thus further restricting the rules.

For example its the reason why channels 12 and 13 were not available for ETSI countries.

Whoops, thanks for clarifying. I had hope :smiley: I wonder why we cannot just use wireless-regdb in ath11k only? But as I'm not gonna code it you also don't need to explain. (Edit: Ah, the firmware itself applies the rules from BDF. Sad :frowning: )
Thanks for all the good work! Happy to test whatever comes up.

We are getting there. I noticed I downloaded the wrong file (from master branch...). From update-regdb branch I get:

			* 5180 MHz [36] (23.0 dBm)
			* 5200 MHz [40] (23.0 dBm)
			* 5220 MHz [44] (23.0 dBm)
			* 5240 MHz [48] (23.0 dBm)
			* 5260 MHz [52] (23.0 dBm) (radar detection)
			* 5280 MHz [56] (23.0 dBm) (radar detection)
			* 5300 MHz [60] (23.0 dBm) (radar detection)
			* 5320 MHz [64] (23.0 dBm) (radar detection)
			* 5500 MHz [100] (30.0 dBm) (radar detection)
			* 5520 MHz [104] (30.0 dBm) (radar detection)
			* 5540 MHz [108] (30.0 dBm) (radar detection)
			* 5560 MHz [112] (30.0 dBm) (radar detection)
			* 5580 MHz [116] (30.0 dBm) (radar detection)
			* 5600 MHz [120] (30.0 dBm) (radar detection)
			* 5620 MHz [124] (30.0 dBm) (radar detection)
			* 5640 MHz [128] (30.0 dBm) (radar detection)
			* 5660 MHz [132] (30.0 dBm) (radar detection)
			* 5680 MHz [136] (30.0 dBm) (radar detection)
			* 5700 MHz [140] (30.0 dBm) (radar detection)
			* 5720 MHz [144] (disabled)
			* 5745 MHz [149] (disabled)
			* 5765 MHz [153] (disabled)
			* 5785 MHz [157] (disabled)
			* 5805 MHz [161] (disabled)
			* 5825 MHz [165] (disabled)
			* 5845 MHz [169] (disabled)
			* 5865 MHz [173] (disabled)
			* 5885 MHz [177] (disabled)
	
			* 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] (20.0 dBm)
			* 2472 MHz [13] (20.0 dBm)
			* 2484 MHz [14] (disabled)

So only thing missing is the higher channels for DE, the TX power is right now. Or are the channels missing because it still intersects with WORLD? Can we not use a BDF where world allows everything?

can you tell me the exact freq missing? also can you give output from iw? (gives more specific info)

Just basing on NerdyProjects's iw list output (I'll test my ax3600 in a few hours), only the short range devices (ETSI EN 300 440-1) with (5725 - 5875 @ 80), (25 mW).

For comparison (mt7915 DBDC):

# iw reg get
global
country DE: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (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)
        (5945 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)
# iw phy phy0 info
…
                        * 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] (20.0 dBm)
                        * 2472 MHz [13] (20.0 dBm)
                        * 2484 MHz [14] (disabled)
…
# iw phy phy1 info
…
                        * 5180 MHz [36] (23.0 dBm)
                        * 5200 MHz [40] (23.0 dBm)
                        * 5220 MHz [44] (23.0 dBm)
                        * 5240 MHz [48] (23.0 dBm)
                        * 5260 MHz [52] (20.0 dBm) (radar detection)
                        * 5280 MHz [56] (20.0 dBm) (radar detection)
                        * 5300 MHz [60] (20.0 dBm) (radar detection)
                        * 5320 MHz [64] (20.0 dBm) (radar detection)
                        * 5500 MHz [100] (23.0 dBm) (radar detection)
                        * 5520 MHz [104] (23.0 dBm) (radar detection)
                        * 5540 MHz [108] (23.0 dBm) (radar detection)
                        * 5560 MHz [112] (23.0 dBm) (radar detection)
                        * 5580 MHz [116] (23.0 dBm) (radar detection)
                        * 5600 MHz [120] (23.0 dBm) (radar detection)
                        * 5620 MHz [124] (23.0 dBm) (radar detection)
                        * 5640 MHz [128] (23.0 dBm) (radar detection)
                        * 5660 MHz [132] (23.0 dBm) (radar detection)
                        * 5680 MHz [136] (23.0 dBm) (radar detection)
                        * 5700 MHz [140] (23.0 dBm) (radar detection)
                        * 5720 MHz [144] (13.0 dBm) (radar detection)
                        * 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] (13.0 dBm)
                        * 5865 MHz [173] (13.0 dBm)
…

Sure.
The definition for DE is:

country DE: DFS-ETSI
	(2400 - 2483.5 @ 40), (100 mW)
	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
	(5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
	(5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
	# short range devices (ETSI EN 300 440-1)
	(5725 - 5875 @ 80), (25 mW)
	# WiFi 6E
	(5945 - 6425 @ 160), (23), NO-OUTDOOR, wmmrule=ETSI
	# 60 GHz band channels 1-4 (ETSI EN 302 567)
	(57000 - 66000 @ 2160), (40)

So we should also have:
149-173 (5.735-5.875) with 25 mW.

The ath10k on ax3600 does it right:

			* 5180 MHz [36] (23.0 dBm)
			* 5200 MHz [40] (23.0 dBm)
			* 5220 MHz [44] (23.0 dBm)
			* 5240 MHz [48] (23.0 dBm)
			* 5260 MHz [52] (20.0 dBm) (radar detection)
			* 5280 MHz [56] (20.0 dBm) (radar detection)
			* 5300 MHz [60] (20.0 dBm) (radar detection)
			* 5320 MHz [64] (20.0 dBm) (radar detection)
			* 5500 MHz [100] (26.0 dBm) (radar detection)
			* 5520 MHz [104] (26.0 dBm) (radar detection)
			* 5540 MHz [108] (26.0 dBm) (radar detection)
			* 5560 MHz [112] (26.0 dBm) (radar detection)
			* 5580 MHz [116] (26.0 dBm) (radar detection)
			* 5600 MHz [120] (26.0 dBm) (radar detection)
			* 5620 MHz [124] (26.0 dBm) (radar detection)
			* 5640 MHz [128] (26.0 dBm) (radar detection)
			* 5660 MHz [132] (26.0 dBm) (radar detection)
			* 5680 MHz [136] (26.0 dBm) (radar detection)
			* 5700 MHz [140] (26.0 dBm) (radar detection)
			* 5720 MHz [144] (13.0 dBm) (radar detection)
			* 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] (13.0 dBm)
			* 5865 MHz [173] (13.0 dBm)

(Sidenote: I checked using PA region that generally the FW allows higher channels:

||||* 5180 MHz [36] (30.0 dBm)|
|---|---|---|---|
||||* 5200 MHz [40] (30.0 dBm)|
||||* 5220 MHz [44] (30.0 dBm)|
||||* 5240 MHz [48] (30.0 dBm)|
||||* 5260 MHz [52] (24.0 dBm)|
||||* 5280 MHz [56] (24.0 dBm)|
||||* 5300 MHz [60] (24.0 dBm)|
||||* 5320 MHz [64] (24.0 dBm)|
||||* 5500 MHz [100] (24.0 dBm)|
||||* 5520 MHz [104] (24.0 dBm)|
||||* 5540 MHz [108] (24.0 dBm)|
||||* 5560 MHz [112] (24.0 dBm)|
||||* 5580 MHz [116] (24.0 dBm)|
||||* 5600 MHz [120] (24.0 dBm)|
||||* 5620 MHz [124] (24.0 dBm)|
||||* 5640 MHz [128] (24.0 dBm)|
||||* 5660 MHz [132] (24.0 dBm)|
||||* 5680 MHz [136] (24.0 dBm)|
||||* 5700 MHz [140] (24.0 dBm)|
||||* 5720 MHz [144] (24.0 dBm)|
||||* 5745 MHz [149] (30.0 dBm)|
||||* 5765 MHz [153] (30.0 dBm)|
||||* 5785 MHz [157] (30.0 dBm)|
||||* 5805 MHz [161] (30.0 dBm)|
||||* 5825 MHz [165] (30.0 dBm)|
||||* 5845 MHz [169] (disabled)|
||||* 5865 MHz [173] (disabled)|
||||* 5885 MHz [177] (disabled)|

ahh, iw phy reg get output:

root@OpenWrt:~# iw phy phy1 reg get
phy#1
country DE: DFS-ETSI
	(2402 - 2482 @ 40), (N/A, 20), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
	(5490 - 5590 @ 80), (N/A, 30), (0 ms), DFS, AUTO-BW
	(5590 - 5650 @ 40), (N/A, 30), (600000 ms), DFS, AUTO-BW
	(5650 - 5710 @ 40), (N/A, 30), (0 ms), DFS, AUTO-BW

root@OpenWrt:~# iw phy phy2 reg get
phy#2
country DE: DFS-ETSI
	(2402 - 2482 @ 40), (N/A, 20), (N/A)
	(5170 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
	(5250 - 5330 @ 80), (N/A, 23), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
	(5490 - 5590 @ 80), (N/A, 30), (0 ms), DFS, AUTO-BW
	(5590 - 5650 @ 40), (N/A, 30), (600000 ms), DFS, AUTO-BW
	(5650 - 5710 @ 40), (N/A, 30), (0 ms), DFS, AUTO-BW

Ah right, what I also noticed was the 10 minutes delay for DFS. I thought 1 minute should be fine?

Those 25mW channels are not set in QCA regulatory rules as they are not usable for AP-s

1 Like

Thanks. I agree and disagree - other APs allow using these channels, I don't see why we should not - while agreeing, that 25 mW is a bit low on 5 GHz.
But besides that - this is a full success, with the updated board files this looks like it should look.
Looking forward to see the board files and the patch upstream! Thanks to the both of you.

2 Likes

Well, only ones that will in theory allow those channels to be used are ones that are not using self managed regulatory info, 25mW is crazy low.

I just hope that QCA will make the damn external regdb public finally

6 Likes

Does this mean that we are not going to get "149-173 (5.735-5.875) with 25 mW" channels even with a patched BDF file because of restrictions in the firmware?

Well, if the BDF included those they would be allowed

1 Like

tested on the qnap - works fine together with the updated bdf and country GB + tx power 29db (from 24db)


however "iw reg get" doesn't show the 160mhz / the same with " iw phy phy0 reg get"

i am assuming the updates to the bdf are not taken from by the "iw" command

an wifi analyser tool though confirms it is as per the wireless config

@Ansuel are you going to add a PR for the updated boards?

thank you both for the hard work

1 Like

are you sure it's actually 160 an not something like 80+80?