* [PATCH v7 1/3] dt-bindings: net: wireless: add flag marvell,invalid-reg-hint-in-rom
@ 2026-08-27 13:03 Georgi Valkov
2026-08-27 13:03 ` [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain Georgi Valkov
2026-08-27 13:03 ` [PATCH v7 3/3] ARM: dts: armada: WRT3200ACM: add marvell,invalid-reg-hint-in-rom Georgi Valkov
0 siblings, 2 replies; 6+ messages in thread
From: Georgi Valkov @ 2026-08-27 13:03 UTC (permalink / raw)
To: briannorris, johannes, andrew, krzk+dt
Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit,
rongqianfeng, wenst, rafael.beims, avraham.stern, error27,
s.kerkmann, gregory.clement, sebastian.hesselbarth, robh,
conor+dt, Frank.Li, chunfan.chen, arend.vanspriel, peddolla.reddy,
linux-arm-kernel, linux-wireless, linux-kernel, devicetree,
stable, gvalkov, Krzysztof Kozlowski
WRT3200ACM and WRT32x routers always report a fixed US regulatory domain
from the mwifiex ROM, which conflicts with the platform regulatory
configuration on units sold outside the US market. For example:
- phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR
- phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR
- phy2 mwifiex 2.4 and 5 GHz, hard-coded region US
When the system boots, it detects a conflict between the user selected
region and the radios, e.g. BG FR US, and applies extreme restrictions,
preventing phy0 from starting on any DFS channel. phy2 works.
Add a device-tree flag, which allows affected devices, where the radio
conflicts with the platform to ignore the incorrect regulatory hint in
the ROM of the radio, so the platform regulatory domain can be used.
This does not allow the user to change the regulatory configuration of
any radio. It only allows phy0 to start and operate according to its
certified configuration.
[1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699
[2] https://github.com/openwrt/openwrt/issues/9956
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
v7:
1. drop Cc: stable, the first patch only documents a binding
2. restore colon after Tested-on as requested by openwrt-ai
3. mention the added wifi@1 node
v6:
Rename flag:
marvell,ignore-regulatory-hint -> marvell,invalid-reg-hint-in-rom
Clarify commit description:
The patch series allows affected devices, where the radio conflicts with
the platform to ignore the incorrect regulatory hint in the ROM of the
radio, so the platform regulatory domain can be used.
This does not allow the user to change the regulatory configuration of
any radio. It only allows phy0 to start and operate according to its
certified configuration.
The change affects only platforms which explicitly define this flag, and
helps overcome the incorrect behaviour of proprietary radio firmware.
Rearrange patches so that the flag is implemented in the driver, before
being added to the board for WRT3200ACM.
Link:
https://lore.kernel.org/linux-wireless/20260728103536.25012-1-gvalkov@gmail.com/T/#u
v5:
1. description: remove tag Tested-on
2. add #address-cells = <1>, #size-cells = <0> to fix a warning:
arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts:183.3-13:
Warning (reg_format): /soc/internal-regs/sdhci@d8000/wifi@1:reg:
property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
3. description: add info about testing
v4:
1. Add binding documentation for flag marvell,ignore-regulatory-hint
2. Add dt for sd8897 and move the flag there, I used sample from docs
3. Use device_property_read_bool in the driver
v3:
I implemented and tested a better approach with no board specific code:
1. check for a device-tree flag in mwifiex_register_cfg80211in()
!of_property_read_bool(of_root, "marvell,ignore-regulatory-hint")
2. add this flag to the root device tree of each affected board
Currently this affects only armada-385-linksys-rango.dts,
because Linux has no dts for venom. OpenWrt will take care of that.
This approach is more flexible and scalable, because the flag can
also be used in other drivers, e.g. mwlwifi (not part of Linux).
v2:
Replace the compatible device names, which are currently only available on
OpenWrt with board names which are available on both Linux and OpenWrt.
.../devicetree/bindings/net/wireless/marvell,sd8787.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml b/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml
index 930b700b73d0..9f905ef5c2c0 100644
--- a/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml
@@ -59,6 +59,12 @@ properties:
description: Calibration data for sub-band 3 in the 5GHz band.
maxItems: 502
+ marvell,invalid-reg-hint-in-rom:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ The regulatory hint in ROM conflicts with platform configuration.
+ It should be ignored, so the platform regulatory domain can be used.
+
marvell,wakeup-pin:
$ref: /schemas/types.yaml#/definitions/uint32
description:
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain
2026-08-27 13:03 [PATCH v7 1/3] dt-bindings: net: wireless: add flag marvell,invalid-reg-hint-in-rom Georgi Valkov
@ 2026-08-27 13:03 ` Georgi Valkov
2026-08-27 15:33 ` Krzysztof Kozlowski
2026-08-27 13:03 ` [PATCH v7 3/3] ARM: dts: armada: WRT3200ACM: add marvell,invalid-reg-hint-in-rom Georgi Valkov
1 sibling, 1 reply; 6+ messages in thread
From: Georgi Valkov @ 2026-08-27 13:03 UTC (permalink / raw)
To: briannorris, johannes, andrew, krzk+dt
Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit,
rongqianfeng, wenst, rafael.beims, avraham.stern, error27,
s.kerkmann, gregory.clement, sebastian.hesselbarth, robh,
conor+dt, Frank.Li, chunfan.chen, arend.vanspriel, peddolla.reddy,
linux-arm-kernel, linux-wireless, linux-kernel, devicetree,
stable, gvalkov
WRT3200ACM and WRT32x routers always report a fixed US regulatory domain
from the mwifiex ROM, which conflicts with the platform regulatory
configuration on units sold outside the US market. For example:
- phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR
- phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR
- phy2 mwifiex 2.4 and 5 GHz, hard-coded region US
When the system boots, it detects a conflict between the user selected
region and the radios, e.g. BG FR US, and applies extreme restrictions,
preventing phy0 from starting on any DFS channel. phy2 works.
Add a device-tree flag, which allows affected devices, where the radio
conflicts with the platform to ignore the incorrect regulatory hint in
the ROM of the radio, so the platform regulatory domain can be used.
This does not allow the user to change the regulatory configuration of
any radio. It only allows phy0 to start and operate according to its
certified configuration.
The change affects only platforms which explicitly define this flag, and
helps overcome the incorrect behaviour of proprietary radio firmware.
[1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699
[2] https://github.com/openwrt/openwrt/issues/9956
Tested-on: WRT3200ACM, OpenWrt
iw reg get: no longer reports region for phy2
Cc: stable@vger.kernel.org
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 7a1ba32f1fb3..293876397b67 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -4897,7 +4897,14 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
country_code =
mwifiex_11d_code_2_region(
adapter->region_code);
+
+ /* If the reg hint in ROM conflicts with platform
+ * configuration, it should be ignored, so the
+ * platform regulatory domain can be used.
+ */
if (country_code &&
+ !device_property_read_bool(adapter->dev,
+ "marvell,invalid-reg-hint-in-rom") &&
regulatory_hint(wiphy, country_code))
mwifiex_dbg(priv->adapter, ERROR,
"regulatory_hint() failed\n");
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain
2026-08-27 13:03 ` [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain Georgi Valkov
@ 2026-08-27 15:33 ` Krzysztof Kozlowski
2026-08-27 17:27 ` George Valkov
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-27 15:33 UTC (permalink / raw)
To: Georgi Valkov, briannorris, johannes, andrew, krzk+dt
Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit,
rongqianfeng, wenst, rafael.beims, avraham.stern, error27,
s.kerkmann, gregory.clement, sebastian.hesselbarth, robh,
conor+dt, Frank.Li, chunfan.chen, arend.vanspriel, peddolla.reddy,
linux-arm-kernel, linux-wireless, linux-kernel, devicetree,
stable
On 27/08/2026 15:03, Georgi Valkov wrote:
> WRT3200ACM and WRT32x routers always report a fixed US regulatory domain
> from the mwifiex ROM, which conflicts with the platform regulatory
> configuration on units sold outside the US market. For example:
> - phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR
> - phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR
> - phy2 mwifiex 2.4 and 5 GHz, hard-coded region US
>
> When the system boots, it detects a conflict between the user selected
> region and the radios, e.g. BG FR US, and applies extreme restrictions,
> preventing phy0 from starting on any DFS channel. phy2 works.
>
> Add a device-tree flag, which allows affected devices, where the radio
> conflicts with the platform to ignore the incorrect regulatory hint in
> the ROM of the radio, so the platform regulatory domain can be used.
> This does not allow the user to change the regulatory configuration of
> any radio. It only allows phy0 to start and operate according to its
> certified configuration.
>
> The change affects only platforms which explicitly define this flag, and
> helps overcome the incorrect behaviour of proprietary radio firmware.
>
> [1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699
> [2] https://github.com/openwrt/openwrt/issues/9956
>
> Tested-on: WRT3200ACM, OpenWrt
OK, so this comment from v6 was not about binding, but this is still
wrong - there is no such tag. Just make it a standard sentence.
Do not introduce OpenWRT rules in to the upstream kernel.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain
2026-08-27 15:33 ` Krzysztof Kozlowski
@ 2026-08-27 17:27 ` George Valkov
2026-08-27 21:32 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: George Valkov @ 2026-08-27 17:27 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: briannorris, johannes, andrew, krzk+dt, francesco, johannes.berg,
kees, miriam.rachel.korenblit, rongqianfeng, wenst, rafael.beims,
avraham.stern, error27, s.kerkmann, gregory.clement,
sebastian.hesselbarth, robh, conor+dt, Frank.Li, chunfan.chen,
arend.vanspriel, peddolla.reddy, linux-arm-kernel, linux-wireless,
linux-kernel, devicetree, stable
On Thu, 27 Aug 2026 at 18:33, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 27/08/2026 15:03, Georgi Valkov wrote:
> > WRT3200ACM and WRT32x routers always report a fixed US regulatory domain
> > from the mwifiex ROM, which conflicts with the platform regulatory
> > configuration on units sold outside the US market. For example:
> > - phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR
> > - phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR
> > - phy2 mwifiex 2.4 and 5 GHz, hard-coded region US
> >
> > When the system boots, it detects a conflict between the user selected
> > region and the radios, e.g. BG FR US, and applies extreme restrictions,
> > preventing phy0 from starting on any DFS channel. phy2 works.
> >
> > Add a device-tree flag, which allows affected devices, where the radio
> > conflicts with the platform to ignore the incorrect regulatory hint in
> > the ROM of the radio, so the platform regulatory domain can be used.
> > This does not allow the user to change the regulatory configuration of
> > any radio. It only allows phy0 to start and operate according to its
> > certified configuration.
> >
> > The change affects only platforms which explicitly define this flag, and
> > helps overcome the incorrect behaviour of proprietary radio firmware.
> >
> > [1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699
> > [2] https://github.com/openwrt/openwrt/issues/9956
> >
> > Tested-on: WRT3200ACM, OpenWrt
>
> OK, so this comment from v6 was not about binding, but this is still
> wrong - there is no such tag. Just make it a standard sentence.
>
> Do not introduce OpenWRT rules in to the upstream kernel.
Dropped the invalid tag. I hope this is suitable:
The change has been tested on OpenWrt and fixes the issue where
phy0 does not start on WRT3200ACM-EU when a DFS channel is used
I sent v8:
https://lore.kernel.org/linux-wireless/20260827171937.28878-1-gvalkov@gmail.com/T/#t
Greetings!
Georgi Valkov
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain
2026-08-27 17:27 ` George Valkov
@ 2026-08-27 21:32 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-27 21:32 UTC (permalink / raw)
To: George Valkov
Cc: briannorris, johannes, andrew, krzk+dt, francesco, johannes.berg,
kees, miriam.rachel.korenblit, rongqianfeng, wenst, rafael.beims,
avraham.stern, error27, s.kerkmann, gregory.clement,
sebastian.hesselbarth, robh, conor+dt, Frank.Li, chunfan.chen,
arend.vanspriel, peddolla.reddy, linux-arm-kernel, linux-wireless,
linux-kernel, devicetree, stable
On 27/08/2026 19:27, George Valkov wrote:
> On Thu, 27 Aug 2026 at 18:33, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>> [1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699
>>> [2] https://github.com/openwrt/openwrt/issues/9956
>>>
>>> Tested-on: WRT3200ACM, OpenWrt
>>
>> OK, so this comment from v6 was not about binding, but this is still
>> wrong - there is no such tag. Just make it a standard sentence.
>>
>> Do not introduce OpenWRT rules in to the upstream kernel.
>
> Dropped the invalid tag. I hope this is suitable:
> The change has been tested on OpenWrt and fixes the issue where
> phy0 does not start on WRT3200ACM-EU when a DFS channel is used
>
Thanks.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v7 3/3] ARM: dts: armada: WRT3200ACM: add marvell,invalid-reg-hint-in-rom
2026-08-27 13:03 [PATCH v7 1/3] dt-bindings: net: wireless: add flag marvell,invalid-reg-hint-in-rom Georgi Valkov
2026-08-27 13:03 ` [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain Georgi Valkov
@ 2026-08-27 13:03 ` Georgi Valkov
1 sibling, 0 replies; 6+ messages in thread
From: Georgi Valkov @ 2026-08-27 13:03 UTC (permalink / raw)
To: briannorris, johannes, andrew, krzk+dt
Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit,
rongqianfeng, wenst, rafael.beims, avraham.stern, error27,
s.kerkmann, gregory.clement, sebastian.hesselbarth, robh,
conor+dt, Frank.Li, chunfan.chen, arend.vanspriel, peddolla.reddy,
linux-arm-kernel, linux-wireless, linux-kernel, devicetree,
stable, gvalkov
WRT3200ACM and WRT32x routers always report a fixed US regulatory domain
from the mwifiex ROM, which conflicts with the platform regulatory
configuration on units sold outside the US market. For example:
- phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR
- phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR
- phy2 mwifiex 2.4 and 5 GHz, hard-coded region US
When the system boots, it detects a conflict between the user selected
region and the radios, e.g. BG FR US, and applies extreme restrictions,
preventing phy0 from starting on any DFS channel. phy2 works.
Add node wifi@1 with a flag marvell,invalid-reg-hint-in-rom to the
WRT3200ACM device-tree, which signals mwifiex that its regulatory
hint from ROM conflicts with the platform and should be ignored, so the
platform regulatory domain can be used. This does not allow the user to
change the regulatory config of any radio. It only allows phy0 to start
and operate according to its certified configuration. All radios in
WRT3200ACM/WRT32x are locked to the hard-coded configuration for which
they are certified.
On WRT3200ACM, the platform configuration is stored on the devinfo mtd3
partition, which is read-only: cert_region=EU modelNumber=WRT3200ACM-EU
The Linux kernel sources do not have support for WRT32x. An equivalent
patch for these routers has to be sent to OpenWrt.
[1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699
[2] https://github.com/openwrt/openwrt/issues/9956
Cc: stable@vger.kernel.org
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
---
arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts b/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
index 4ab45f294de2..2bf29981a031 100644
--- a/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
@@ -165,6 +165,15 @@ &sdhci {
wp-inverted;
bus-width = <8>;
status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ wifi@1 {
+ compatible = "marvell,sd8897";
+ reg = <1>;
+ marvell,invalid-reg-hint-in-rom;
+ };
};
&usb3_1_vbus {
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-08-27 21:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 13:03 [PATCH v7 1/3] dt-bindings: net: wireless: add flag marvell,invalid-reg-hint-in-rom Georgi Valkov
2026-08-27 13:03 ` [PATCH v7 2/3] wifi: mwifiex: add dt flag to avoid conflict with platform reg domain Georgi Valkov
2026-08-27 15:33 ` Krzysztof Kozlowski
2026-08-27 17:27 ` George Valkov
2026-08-27 21:32 ` Krzysztof Kozlowski
2026-08-27 13:03 ` [PATCH v7 3/3] ARM: dts: armada: WRT3200ACM: add marvell,invalid-reg-hint-in-rom Georgi Valkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox