Re: [PATCH] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x
From: Jeff Chen
Date: Thu Jul 30 2026 - 04:02:00 EST
On Thu, Jul 30, 2026 at 06:24:15 AM +0300, George Valkov wrote:
> Hi Jeff, I forgot to mention:
> The compatibile strings are added by this OpenWrt patch:
> https://github.com/openwrt/openwrt/blob/main/target/linux/mvebu/patches-6.18/
> 311-adjust-compatible-for-linksys.patch
>
> So unless we also upstream this patch, using device names will work
> only on OpenWrt, which would make the current patch ineffective.
>
> Georgi
>
> On Thu, 30 Jul 2026 at 06:06, George Valkov <gvalkov@xxxxxxxxx> wrote:
> >
> > Hi Jeff,
> > Initially I wanted to keep changes easy to read and as simple as possible,
> > hence my current patch is based on device names.
> >
> > Indeed out openwrt-ai also caught this:
> > https://github.com/openwrt/openwrt/pull/24458#pullrequestreview-4803923901
> >
> > I've been thinking about possible options:
> > 1. Use board names "linksys,rango" and "linksys,venom", where
> > rango is WRT3200ACM, and venom is WRT32x. But a venom dts
> > is also not available in Linux. We do have it in OpenWrt:
> > https://github.com/openwrt/openwrt/blob/main/target/linux/mvebu/files
> > /arch/arm/boot/dts/marvell/armada-385-linksys-venom.dts
> > 2. We could either ignore this or
> > 3. Have another PR with venom board support files, but that will require
> > much more research and work. I don't have WRT32x hardware, and I'm
> > uncomfortable doing this without supervision.
> > 4. We can also implement a dts flag, e.g. ignore_reg_hint, which can be
> > set in the board dts. This might be the best and most flexible option.
> > My experience with dts is almost zero and I will need help to implement
> > it.
> >
> > Georgi
> >
Hi Georgi,
Thanks for the update. My recommendation aligns with openwrt-ai's suggestion.
In general, checking board-specific DT strings inside a generic driver is
not a good idea. However, since implementing a new DT flag or module parameter
requires deeper driver architectural changes, expanding the list of compatible
strings is a more pragmatic way considering these are legacy devices.
You can update the check to include all four strings for V2:
if (country_code &&
!of_machine_is_compatible("linksys,rango") &&
!of_machine_is_compatible("linksys,wrt3200acm") &&
!of_machine_is_compatible("linksys,venom") &&
!of_machine_is_compatible("linksys,wrt32x") &&
regulatory_hint(wiphy, country_code))
Combining these four strings ensures the patch works in both pure mainline and
OpenWrt environments.
We should still wait for feedback from the maintainers or other reviewers
to see if they prefer this hardcoded approach or a proper module/DT property.
Jeff