Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Georgi Valkov" <gvalkov@gmail.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 2/2] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint
Date: Fri, 07 Aug 2026 18:43:10 +0000	[thread overview]
Message-ID: <20260807184310.D1D491F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260807182124.41572-2-gvalkov@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The device-specific property `marvell,ignore-regulatory-hint` is incorrectly placed in the global root node (`/`), lacking binding documentation and causing the quirk to erroneously apply to all `mwifiex` devices.
- [Medium] The `mwifiex` driver directly accesses the global `of_root` variable, which is undefined when `CONFIG_OF` is disabled, violating the driver model and risking linker errors.
--

--- Patch [2]: [PATCH v3 2/2] ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint ---
commit 7033e1a77e69407f0088e5cd43fbc6b4fc03d549
Author: Georgi Valkov <gvalkov@gmail.com>

ARM: dts: armada: WRT3200ACM: add marvell,ignore-regulatory-hint

This patch adds the marvell,ignore-regulatory-hint flag to the WRT3200ACM
device tree. It prevents the system from applying extreme restrictions due
to conflicts between the user-selected region and the radios' hard-coded
US region.

> 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 4ab45f294de22..6e283e223ca4c 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;

[Severity: High]
Does adding this device-specific property to the global root node (/) instead
of a dedicated device node cause a regression where it applies universally?

Because the driver in drivers/net/wireless/marvell/mwifiex/cfg80211.c queries
this property from the root node:

mwifiex_register_cfg80211():
                if (country_code &&
                    !of_property_read_bool(of_root,
                                           "marvell,ignore-regulatory-hint") &&
                    regulatory_hint(wiphy, country_code))

this board quirk will be broadcast globally across the system.

If a user connects a generic USB mwifiex Wi-Fi adapter to this router, it
appears the driver would incorrectly apply the board quirk to the external
adapter, potentially causing a regression in regulatory compliance by ignoring
its valid regulatory hint.

Would it be safer to use of_machine_is_compatible() for this platform quirk?

[Severity: Medium]
Will querying of_root directly in the mwifiex driver cause a compilation
regression when CONFIG_OF is disabled?

Since of_root is only defined in drivers/of/base.c, and the mwifiex driver
does not depend on CONFIG_OF, this relies entirely on the compiler's dead-code
elimination to drop the of_root symbol reference when of_property_read_bool()
expands to an inline dummy.

Relying on dead code elimination for undefined symbols can be brittle.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807182124.41572-1-gvalkov@gmail.com?part=2

  reply	other threads:[~2026-08-07 18:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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:43     ` sashiko-bot [this message]
2026-08-07 18:37   ` [PATCH v3 1/2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x sashiko-bot
2026-08-07 18:39   ` Johannes Berg
2026-08-07 19:49     ` George Valkov
2026-08-10 18:30       ` Brian Norris

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=20260807184310.D1D491F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gvalkov@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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