From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Mingyen Hsieh" <mingyen.hsieh@mediatek.com>, <nbd@nbd.name>,
<lorenzo@kernel.org>
Cc: <deren.wu@mediatek.com>, <Sean.Wang@mediatek.com>,
<Soul.Huang@mediatek.com>, <Leon.Yen@mediatek.com>,
<Eric-SY.Chang@mediatek.com>, <km.lin@mediatek.com>,
<robin.chiu@mediatek.com>, <ch.yeh@mediatek.com>,
<posh.sun@mediatek.com>, <Quan.Zhou@mediatek.com>,
<Ryder.Lee@mediatek.com>, <Shayne.Chen@mediatek.com>,
<linux-wireless@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
"Leon Yen" <leon.yen@mediatek.com>
Subject: Re: [PATCH] wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain
Date: Fri, 12 Apr 2024 11:27:54 +0200 [thread overview]
Message-ID: <D0I1D2J8EB1L.2DPV9W79YKN2C@gmail.com> (raw)
In-Reply-To: <20240412085357.13756-1-mingyen.hsieh@mediatek.com>
On Fri Apr 12, 2024 at 10:53 AM CEST, Mingyen Hsieh wrote:
> From: Leon Yen <leon.yen@mediatek.com>
>
> Some countries have strict RF restrictions where changing the regulatory
> domain dynamically based on the connected AP is not acceptable.
> This patch disables Beacon country IE hinting when a valid country code
> is set from usersland (e.g., by system using iw or CRDA).
I always had trouble fully understanding the regulation but isn't the country
code IE sole purpose to adapt the regulatory of the client ?
>
> Signed-off-by: Leon Yen <leon.yen@mediatek.com>
> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7921/init.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> index ef0c721d26e3..3c9a5fcd6924 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> @@ -135,6 +135,13 @@ mt7921_regd_notifier(struct wiphy *wiphy,
> dev->mt76.region = request->dfs_region;
> dev->country_ie_env = request->country_ie_env;
>
> + if (request->initiator == NL80211_REGDOM_SET_BY_USER) {
> + if (dev->mt76.alpha2[0] == '0' && dev->mt76.alpha2[1] == '0')
> + wiphy->regulatory_flags &= ~REGULATORY_COUNTRY_IE_IGNORE;
> + else
> + wiphy->regulatory_flags |= REGULATORY_COUNTRY_IE_IGNORE;
> + }
> +
> if (pm->suspended)
> return;
>
next prev parent reply other threads:[~2024-04-12 9:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 8:53 [PATCH] wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain Mingyen Hsieh
2024-04-12 9:27 ` Nicolas Escande [this message]
2024-04-15 5:53 ` Mingyen Hsieh (謝明諺)
2024-04-15 10:26 ` Nicolas Escande
2024-04-22 6:32 ` Mingyen Hsieh (謝明諺)
2024-10-28 1:55 ` Mingyen Hsieh (謝明諺)
2024-06-10 16:16 ` David Ruth
2024-12-30 19:05 ` Felix Fietkau
[not found] ` <SI2PR03MB5322E7B73B5AB27215A5436585102@SI2PR03MB5322.apcprd03.prod.outlook.com>
2025-01-06 5:58 ` Mingyen Hsieh (謝明諺)
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=D0I1D2J8EB1L.2DPV9W79YKN2C@gmail.com \
--to=nico.escande@gmail.com \
--cc=Eric-SY.Chang@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Quan.Zhou@mediatek.com \
--cc=Ryder.Lee@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=Shayne.Chen@mediatek.com \
--cc=Soul.Huang@mediatek.com \
--cc=ch.yeh@mediatek.com \
--cc=deren.wu@mediatek.com \
--cc=km.lin@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=mingyen.hsieh@mediatek.com \
--cc=nbd@nbd.name \
--cc=posh.sun@mediatek.com \
--cc=robin.chiu@mediatek.com \
/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