2021-10-25 16:19:54

by Sipos Csaba

[permalink] [raw]
Subject: ath11k: regulatory issues with ETSI countries

Dear Kalle,

I tried to draw your attention to a regdb issue via your github page
(https://github.com/kvalo/ath11k-firmware/issues/8), and as that did
not yield any response, I decided to try it here as well.

With Robert Marko we are investigating a regdb issue, where the regdb
rules are applied incorrectly for the ETSI countries.

First we checked the BDFs for our test devices to make sure this issue
is not an OEM fault, like a vendor failing to produce a proper BDF
file with correct regdb in it.
As it turns out, the BDFs contain a completley outdated and grossly
incorrect regdb, which is an OEM fault.

But we also found out, that even if the corecct regualtroy data is
present in the BDF for a specific country, if the "regDbRegDomains5g"
rule is marked as an ETSI country ("regDbRegDomains5g[].dfs_region
2"), then the WLAN-firmware overrides the BDF rules and applies an
incorrect set of rules to the wireless interface.

We tested this theory by changing the "regDbRegDomains5g[].dfs_region
1", and converted a single ETSI country to an FCC country. And voila:
the BDF rules are applied correctly.

Example country: Hungary:

country HU: DFS-ETSI
(2402 - 2482 @ 40), (N/A, 23), (N/A)
(5150 - 5250 @ 80), (N/A, 24), (N/A), AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5590 @ 80), (N/A, 27), (0 ms), DFS, AUTO-BW
(5590 - 5650 @ 40), (N/A, 27), (600000 ms), DFS, AUTO-BW
(5650 - 5725 @ 40), (N/A, 27), (0 ms), DFS, AUTO-BW

Please note that the last two rules are not in the BDF file at all,
the ath11k driver is not sending it to the firmware core, yet somehow
it gets applied by the firmware.
Please also note, that the BDF does contain a 160MHz rule for this
country, which does not get applied.

So even when the BDF entry is correct for an ETSI country, the
firmware apparently adds incorrect rules, and deletes rules present in
the BDF.
And the result is incorrect and non-compliant rules for ETSI countries.

This issue is tested and present with IPQ8074 and QCN9074 for sure,
maybe others as well.
In both cases, tests were conducted agains
WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1.
ath11k version is 5.15

This is how far we are managed to get.

Please let us know, if you need any more information, or you want us
to test anything. Happy to help.

Regards,

Robert Marko
Csaba Sipos