Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jeff Chen <chunfan.chen@gmail.com>
To: George Valkov <gvalkov@gmail.com>
Cc: Jeff Chen <chunfan.chen@gmail.com>,
	briannorris@chromium.org, francesco@dolcini.it,
	johannes.berg@intel.com, kees@kernel.org,
	miriam.rachel.korenblit@intel.com, wenst@chromium.org,
	rafael.beims@toradex.com, avraham.stern@intel.com,
	peddolla.reddy@oss.qualcomm.com, error27@gmail.com,
	s.kerkmann@pengutronix.de, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x
Date: Thu, 30 Jul 2026 15:47:06 +0800	[thread overview]
Message-ID: <amsBes9fCF9ZdkCS@nxpwireless-Inspiron-14-Plus-7440> (raw)
In-Reply-To: <CADOrJmb=_uNHnnqswMAN+LTNPHnRARqF=MicFTP6C5QoMxH4Uw@mail.gmail.com>

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@gmail.com> 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

      reply	other threads:[~2026-07-30  7:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 10:35 [PATCH] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Georgi Valkov
2026-07-30  2:16 ` Jeff Chen
2026-07-30  3:06   ` George Valkov
2026-07-30  3:24     ` George Valkov
2026-07-30  7:47       ` Jeff Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=amsBes9fCF9ZdkCS@nxpwireless-Inspiron-14-Plus-7440 \
    --to=chunfan.chen@gmail.com \
    --cc=avraham.stern@intel.com \
    --cc=briannorris@chromium.org \
    --cc=error27@gmail.com \
    --cc=francesco@dolcini.it \
    --cc=gvalkov@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=peddolla.reddy@oss.qualcomm.com \
    --cc=rafael.beims@toradex.com \
    --cc=s.kerkmann@pengutronix.de \
    --cc=stable@vger.kernel.org \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox