[PATCH] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x
From: Georgi Valkov <hidden>
Date: 2026-07-28 10:37:13
Also in:
lkml, stable
Subsystem:
marvell mwifiex wireless driver, the rest · Maintainers:
Brian Norris, Linus Torvalds
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. Ignore the incorrect regulatory hint in the ROM of these devices, so userspace can set the correct platform regulatory domain. These radios 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 WRT3200ACM and WRT32x routers, 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 <redacted> --- Please backport to 6.18, which is used by OpenWrt. And let me know if there is a better approach to address this. drivers/net/wireless/marvell/mwifiex/cfg80211.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index abc703441c5d..04f7f58cc7d0 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c@@ -4899,7 +4899,15 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) country_code = mwifiex_11d_code_2_region( adapter->region_code); + + /* WRT3200ACM/WRT32x ROM always reports US, which + * conflicts with routers sold outside the US. + * Ignore this hint so userspace can + * set the correct regulatory domain. + */ if (country_code && + !of_machine_is_compatible("linksys,wrt3200acm") && + !of_machine_is_compatible("linksys,wrt32x") && regulatory_hint(wiphy, country_code)) mwifiex_dbg(priv->adapter, ERROR, "regulatory_hint() failed\n");
--
2.55.0