From: Brian Norris <briannorris@chromium.org>
To: George Valkov <gvalkov@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
sashiko-bot@kernel.org, andrew@lunn.ch, chunfan.chen@gmail.com,
francesco@dolcini.it, 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, gregory.clement@bootlin.com,
sebastian.hesselbarth@gmail.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x
Date: Mon, 10 Aug 2026 11:30:07 -0700 [thread overview]
Message-ID: <anoYr9H4KojJv-aZ@google.com> (raw)
In-Reply-To: <CADOrJmbhdWhqRj_TSKYEgb_TrbJUpkQeYTGDb_93WSDdeaJPpQ@mail.gmail.com>
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
prev parent reply other threads:[~2026-08-10 18:30 UTC|newest]
Thread overview: 12+ 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
2026-07-31 6:31 ` [PATCH v2] " Georgi Valkov
2026-08-07 8:26 ` Jeff Chen
2026-08-07 18:21 ` [PATCH v3 1/2] " 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 [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=anoYr9H4KojJv-aZ@google.com \
--to=briannorris@chromium.org \
--cc=andrew@lunn.ch \
--cc=avraham.stern@intel.com \
--cc=chunfan.chen@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=error27@gmail.com \
--cc=francesco@dolcini.it \
--cc=gregory.clement@bootlin.com \
--cc=gvalkov@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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=robh@kernel.org \
--cc=s.kerkmann@pengutronix.de \
--cc=sashiko-bot@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).