Skip to content
Snippets Groups Projects
Commit 2425dc7b authored by Leon Yen's avatar Leon Yen Committed by Felix Fietkau
Browse files

wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain


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).

Signed-off-by: default avatarLeon Yen <leon.yen@mediatek.com>
Signed-off-by: default avatarMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Tested-by: default avatarDavid Ruth <druth@chromium.org>
Link: https://patch.msgid.link/20240412085357.13756-1-mingyen.hsieh@mediatek.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 0e19942e
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,13 @@ mt7921_regd_notifier(struct wiphy *wiphy, ...@@ -137,6 +137,13 @@ mt7921_regd_notifier(struct wiphy *wiphy,
dev->mt76.region = request->dfs_region; dev->mt76.region = request->dfs_region;
dev->country_ie_env = request->country_ie_env; 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) if (pm->suspended)
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment