* [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x [not found] <anWWr80yAcOQaVVS@nxpwireless-Inspiron-14-Plus-7440> @ 2026-08-07 18:21 ` Georgi Valkov 2026-08-07 18:21 ` [PATCH v3 2/2] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint Georgi Valkov 2026-08-07 18:39 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Johannes Berg 0 siblings, 2 replies; 8+ messages in thread From: Georgi Valkov @ 2026-08-07 18:21 UTC (permalink / raw) To: briannorris, andrew, chunfan.chen Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, peddolla.reddy, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, 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 use of 5 GHz and DFS channels. This also affects phy0. Implement a device-tree flag, which allows affected platforms to ignore an incorrect regulatory hint in the ROM, so userspace can set the correct platform regulatory domain. The radios in WRT3200ACM/WRT32x are locked to the hard-coded configuration for which they are certified, so the only impact is that the region conflict is avoided and the 5 GHz radios can be used. 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 Cc: stable@vger.kernel.org Signed-off-by: Georgi Valkov <gvalkov@gmail.com> --- Hi Jeff, I did not consider the idea suggested by openwrt-ai, because I do not understand it and I do not know how to implement it. Any help is welcome! 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. 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 abc703441c5d..0239b1c9214b 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -4899,7 +4899,14 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) country_code = mwifiex_11d_code_2_region( adapter->region_code); + + /* Allow platforms to ignore an incorrect + * regulatory hint from ROM, so userspace + * can set the correct regulatory domain. + */ if (country_code && + !of_property_read_bool(of_root, + "marvell,ignore-regulatory-hint") && regulatory_hint(wiphy, country_code)) mwifiex_dbg(priv->adapter, ERROR, "regulatory_hint() failed\n"); -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint 2026-08-07 18:21 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Georgi Valkov @ 2026-08-07 18:21 ` Georgi Valkov 2026-08-07 18:39 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Johannes Berg 1 sibling, 0 replies; 8+ messages in thread From: Georgi Valkov @ 2026-08-07 18:21 UTC (permalink / raw) To: briannorris, andrew, chunfan.chen Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, peddolla.reddy, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, 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 use of 5 GHz and DFS channels. This also affects phy0. Add a device-tree flag marvell,ignore-regulatory-hint to the WRT3200ACM device-tree, which signals mwifiex to ignore an incorrect regulatory hint in the ROM, so userspace can set the correct platform regulatory domain. The radios in WRT3200ACM/WRT32x are locked to the hard-coded configuration for which they are certified, so the only impact is that the region conflict is avoided and the 5 GHz radios can be used. 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 Tested-on: WRT3200ACM, OpenWrt Cc: stable@vger.kernel.org Signed-off-by: Georgi Valkov <gvalkov@gmail.com> --- arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts | 1 + 1 file changed, 1 insertion(+) 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..6e283e223ca4 100644 --- a/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts +++ b/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts @@ -14,6 +14,7 @@ / { model = "Linksys WRT3200ACM"; compatible = "linksys,rango", "linksys,armada385", "marvell,armada385", "marvell,armada380"; + marvell,ignore-regulatory-hint; }; &expander0 { -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x 2026-08-07 18:21 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Georgi Valkov 2026-08-07 18:21 ` [PATCH v3 2/2] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint Georgi Valkov @ 2026-08-07 18:39 ` Johannes Berg 2026-08-07 19:49 ` George Valkov 1 sibling, 1 reply; 8+ messages in thread From: Johannes Berg @ 2026-08-07 18:39 UTC (permalink / raw) To: Georgi Valkov, briannorris, andrew, chunfan.chen Cc: francesco, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, peddolla.reddy, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, linux-arm-kernel, linux-wireless, linux-kernel, devicetree, stable On Fri, 2026-08-07 at 21:21 +0300, Georgi Valkov wrote: > > + /* Allow platforms to ignore an incorrect > + * regulatory hint from ROM, so userspace > + * can set the correct regulatory domain. > + */ > if (country_code && > + !of_property_read_bool(of_root, > + "marvell,ignore-regulatory-hint") && > regulatory_hint(wiphy, country_code)) You're supposed to always update bindings first, no? johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x 2026-08-07 18:39 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Johannes Berg @ 2026-08-07 19:49 ` George Valkov 2026-08-10 18:30 ` Brian Norris 0 siblings, 1 reply; 8+ messages in thread From: George Valkov @ 2026-08-07 19:49 UTC (permalink / raw) To: Johannes Berg, sashiko-bot Cc: briannorris, andrew, chunfan.chen, francesco, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, peddolla.reddy, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, linux-arm-kernel, linux-wireless, linux-kernel, devicetree, stable Hello Johannes, and thank you for your quick reply! > You're supposed to always update bindings first, no? To me the logical order is to implement the feature in the driver and then enable it in each board which needs it. For Linux just WRT3200ACM. A separate patch for WRT32x should be sent to OpenWrt. Please let me know if I should reverse the order. Hello Sashiko AI, Yes, I intentionally implemented the flag as a root node. This way the new device-tree property can be reused for the other radios, which use mwlwifi, and also require this fix. It would be inefficient and impractical to define a separate device-tree property for each radio, where it is actually the board that is affected, so it should be a per-board setting. Also my attempts to use per device nodes or the parent always return false so they are not usable. I do not understand the part about dependence on CONFIG_OF. of_property_read_bool() returns false when the flag is not defined. This preserves the original behaviour as if it is set to false, so the feature is disabled. External radios which do not implement support for this flag are not affected. v2 of this PR used of_machine_is_compatible, but there was an objection that this adds platform code to the driver. How can I add binding documentation and where? On Fri, 7 Aug 2026 at 21:39, Johannes Berg <johannes@sipsolutions.net> wrote: > > On Fri, 2026-08-07 at 21:21 +0300, Georgi Valkov wrote: > > > > + /* Allow platforms to ignore an incorrect > > + * regulatory hint from ROM, so userspace > > + * can set the correct regulatory domain. > > + */ > > if (country_code && > > + !of_property_read_bool(of_root, > > + "marvell,ignore-regulatory-hint") && > > regulatory_hint(wiphy, country_code)) > > You're supposed to always update bindings first, no? > > johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x 2026-08-07 19:49 ` George Valkov @ 2026-08-10 18:30 ` Brian Norris 2026-08-14 12:50 ` [PATCH 1/3] dt-bindings: net: wireless: add flag marvell,ignore-regulatory-hint Georgi Valkov 0 siblings, 1 reply; 8+ messages in thread From: Brian Norris @ 2026-08-10 18:30 UTC (permalink / raw) To: George Valkov Cc: Johannes Berg, sashiko-bot, andrew, chunfan.chen, francesco, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, peddolla.reddy, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, linux-arm-kernel, linux-wireless, linux-kernel, devicetree, stable On Fri, Aug 07, 2026 at 10:49:40PM +0300, George Valkov wrote: > Hello Johannes, and thank you for your quick reply! > > > You're supposed to always update bindings first, no? > To me the logical order is to implement the feature in the driver and > then enable it in each board which needs it. For Linux just WRT3200ACM. > A separate patch for WRT32x should be sent to OpenWrt. > > Please let me know if I should reverse the order. Johannes is asking about the binding documentation (.txt or .yaml), not the .c (driver) or .dts/.dtsi files. You haven't included "marvell,ignore-regulatory-hint" in any valid binding document, so it's not a valid property to use in this driver. See Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml for the correct binding file relevant to this driver. > Hello Sashiko AI, > Yes, I intentionally implemented the flag as a root node. > This way the new device-tree property can be reused for the > other radios, which use mwlwifi, and also require this fix. > > It would be inefficient and impractical to define a separate > device-tree property for each radio, where it is actually the > board that is affected, so it should be a per-board setting. I'm not sure what you're saying here. Device Tree Blobs are inherently a per-board object. The question here is simply where within the Device Tree we want to add a property. I believe that you're describing problems with the radio, and so you should add DT properties to the node for the radio(s) in question, not the root node. > Also my attempts to use per device nodes or the parent always > return false so they are not usable. That seems like something you need to figure out. Just because you found it difficult doesn't mean we should accept the wrong approach. IIUC, you're using a PCIe-based WiFi card, and that's enabled in arch/arm/boot/dts/marvell/armada-385-linksys.dtsi: &pcie1 { /* Marvell 88W8864, 5GHz-only */ status = "okay"; }; &pcie2 { /* Marvell 88W8864, 2GHz-only */ status = "okay"; }; I think those are the "port" nodes, and there currently is no node that actually represents the PCIe endpoint device (i.e., your wifi cards). You need to add those as children, like: &pcie1 { ... wifi@0 { compatible = "pciXXXX,YYYY"; /* figure out the appropriate IDs here */ marvell,ignore-regulatory-hint; ... }; }; ... > I do not understand the part about dependence on CONFIG_OF. > of_property_read_bool() returns false when the flag is not > defined. This preserves the original behaviour as if it is > set to false, so the feature is disabled. > External radios which do not implement support for this flag > are not affected. I think if you stop using 'of_root', you'll dodge this problem. And you should not be looking at of_root. > v2 of this PR used of_machine_is_compatible, but there was an > objection that this adds platform code to the driver. > > How can I add binding documentation and where? Documentation/devicetree/bindings/net/wireless/marvell,sd8787.yaml. See the other hints above too. Side question: did you consider Jeff's suggestion from v2, to try the 'reg_alpha2' module param? It might already do what you need, and it only requires you configure your OpenWrt builds properly, I think. Brian > On Fri, 7 Aug 2026 at 21:39, Johannes Berg <johannes@sipsolutions.net> wrote: > > > > On Fri, 2026-08-07 at 21:21 +0300, Georgi Valkov wrote: > > > > > > + /* Allow platforms to ignore an incorrect > > > + * regulatory hint from ROM, so userspace > > > + * can set the correct regulatory domain. > > > + */ > > > if (country_code && > > > + !of_property_read_bool(of_root, > > > + "marvell,ignore-regulatory-hint") && > > > regulatory_hint(wiphy, country_code)) > > > > You're supposed to always update bindings first, no? > > > > johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] dt-bindings: net: wireless: add flag marvell,ignore-regulatory-hint 2026-08-10 18:30 ` Brian Norris @ 2026-08-14 12:50 ` Georgi Valkov 2026-08-14 12:50 ` [PATCH 2/3] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint Georgi Valkov 2026-08-14 12:50 ` [PATCH 3/3] wifi: mwifiex: add dt flag to ignore incorrect ROM regulatory hint Georgi Valkov 0 siblings, 2 replies; 8+ messages in thread From: Georgi Valkov @ 2026-08-14 12:50 UTC (permalink / raw) To: briannorris, johannes, andrew Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, Frank.Li, chunfan.chen, 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 use of 5 GHz and DFS channels. This also affects phy0. Add a device-tree flag, which allows affected platforms to ignore an incorrect regulatory hint from ROM, so userspace can set the correct platform regulatory domain. [1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699 [2] https://github.com/openwrt/openwrt/issues/9956 Tested-on: WRT3200ACM, OpenWrt Cc: stable@vger.kernel.org Signed-off-by: Georgi Valkov <gvalkov@gmail.com> --- Thank you Brian and Johannes! > Just because you found it difficult doesn't mean we should accept the > wrong approach. I agree. Guidance and careful inspection helps reach a good solution. > IIUC, you're using a PCIe-based WiFi card, and that's enabled in > arch/arm/boot/dts/marvell/armada-385-linksys.dtsi: > > &pcie1 { > /* Marvell 88W8864, 5GHz-only */ > status = "okay"; > }; > > &pcie2 { > /* Marvell 88W8864, 2GHz-only */ > status = "okay"; > }; No, you are referring to the main radios, which are not part of these patch series. Would you allow me to also add the flag to them? Their driver is not part of Linux so only dt bindings need to be added. The changes here target the third radio: - phy2: Marvell 88W8887 802.11ac/b/g/n 2.4 / 5 GHz, region US - compatible = marvell,sd8897 works I cannot confirm if any other devices from the family need the fix or not, so I intentionally target the board dts, and not the include: armada-385-linksys.dtsi > Side question: did you consider Jeff's suggestion from v2, to try the > 'reg_alpha2' module param? It might already do what you need, and it > only requires you configure your OpenWrt builds properly, I think. A universal solution is better than targeting OpenWrt only. And unfortunately I have no idea how to implement this. > I'm not sure what you're saying here In v3 I wanted to reuse a flag for both drivers. Using a root flag was objected, so in v4 I added a flag for mwifiex, and I would like to add the same flag to mwlwifi later. - driver dev_name(adapter->dev) = mmc0:0001:1 dev_fwnode(adapter->dev) = wifi@1 marvell,ignore-regulatory-hint = 1 - procfs /proc/device-tree/soc/internal-regs/sdhci@d8000/wifi@1 compatible = marvell,sd8897 marvell,ignore-regulatory-hint name = wifi reg 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..5f235cb9f3e5 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,ignore-regulatory-hint: + $ref: /schemas/types.yaml#/definitions/flag + description: + Ignore an incorrect regulatory hint from ROM, + so userspace can set the correct regulatory domain. + marvell,wakeup-pin: $ref: /schemas/types.yaml#/definitions/uint32 description: -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint 2026-08-14 12:50 ` [PATCH 1/3] dt-bindings: net: wireless: add flag marvell,ignore-regulatory-hint Georgi Valkov @ 2026-08-14 12:50 ` Georgi Valkov 2026-08-14 12:50 ` [PATCH 3/3] wifi: mwifiex: add dt flag to ignore incorrect ROM regulatory hint Georgi Valkov 1 sibling, 0 replies; 8+ messages in thread From: Georgi Valkov @ 2026-08-14 12:50 UTC (permalink / raw) To: briannorris, johannes, andrew Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, Frank.Li, chunfan.chen, 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 use of 5 GHz and DFS channels. This also affects phy0. Add a flag marvell,ignore-regulatory-hint to the WRT3200ACM device-tree, which signals mwifiex to ignore an incorrect regulatory hint from ROM, so userspace can set the correct platform regulatory domain. The radios in WRT3200ACM/WRT32x are locked to the hard-coded configuration for which they are certified, so the only impact is that the region conflict is avoided and the 5 GHz radios can be used. 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 Tested-on: WRT3200ACM, OpenWrt, make dt_binding_check: pass Cc: stable@vger.kernel.org Signed-off-by: Georgi Valkov <gvalkov@gmail.com> --- arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts | 6 ++++++ 1 file changed, 6 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..c5f94463ef71 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,12 @@ &sdhci { wp-inverted; bus-width = <8>; status = "okay"; + + wifi@1 { + compatible = "marvell,sd8897"; + reg = <1>; + marvell,ignore-regulatory-hint; + }; }; &usb3_1_vbus { -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] wifi: mwifiex: add dt flag to ignore incorrect ROM regulatory hint 2026-08-14 12:50 ` [PATCH 1/3] dt-bindings: net: wireless: add flag marvell,ignore-regulatory-hint Georgi Valkov 2026-08-14 12:50 ` [PATCH 2/3] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint Georgi Valkov @ 2026-08-14 12:50 ` Georgi Valkov 1 sibling, 0 replies; 8+ messages in thread From: Georgi Valkov @ 2026-08-14 12:50 UTC (permalink / raw) To: briannorris, johannes, andrew Cc: francesco, johannes.berg, kees, miriam.rachel.korenblit, wenst, rafael.beims, avraham.stern, error27, s.kerkmann, gregory.clement, sebastian.hesselbarth, robh, krzk+dt, conor+dt, Frank.Li, chunfan.chen, 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 use of 5 GHz and DFS channels. This also affects phy0. Implement a device-tree flag, which allows affected platforms to ignore an incorrect regulatory hint from ROM, so userspace can set the correct platform regulatory domain. This avoids the region conflict and allows the 5 GHz radios to be used. 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 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 abc703441c5d..26978158a0ad 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -4899,7 +4899,14 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) country_code = mwifiex_11d_code_2_region( adapter->region_code); + + /* Allow platforms to ignore an incorrect + * regulatory hint from ROM, so userspace + * can set the correct regulatory domain. + */ if (country_code && + !device_property_read_bool(adapter->dev, + "marvell,ignore-regulatory-hint") && regulatory_hint(wiphy, country_code)) mwifiex_dbg(priv->adapter, ERROR, "regulatory_hint() failed\n"); -- 2.55.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-08-14 12:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <anWWr80yAcOQaVVS@nxpwireless-Inspiron-14-Plus-7440>
2026-08-07 18:21 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Georgi Valkov
2026-08-07 18:21 ` [PATCH v3 2/2] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint Georgi Valkov
2026-08-07 18:39 ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Johannes Berg
2026-08-07 19:49 ` George Valkov
2026-08-10 18:30 ` Brian Norris
2026-08-14 12:50 ` [PATCH 1/3] dt-bindings: net: wireless: add flag marvell,ignore-regulatory-hint Georgi Valkov
2026-08-14 12:50 ` [PATCH 2/3] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint Georgi Valkov
2026-08-14 12:50 ` [PATCH 3/3] wifi: mwifiex: add dt flag to ignore incorrect ROM regulatory hint Georgi Valkov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox