Thread (2 messages) 2 messages, 1 author, 18d ago

[PATCH wireless-next 2/2] wifi: nl80211: reject color-change requests that change 6 GHz power type

flat view
DORMANTno replies IN LINUX-NEXT: 1 (0M)

From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date: 2026-09-21 19:52:59
Subsystem: 802.11 (including cfg80211/nl80211), the rest · Maintainers: Johannes Berg, Linus Torvalds

1 review trailer; queued in linux-next as e01f1c70e47e on 2026-09-28.

From: Pagadala Yesu Anjaneyulu <redacted>

AP power type is regulatory operating state, so changing it requires
full AP reconfiguration and validation. Allowing it through
color-change could bypass stricter checks done in AP setup.

Keep color-change behavior limited to color updates only.

Signed-off-by: Pagadala Yesu Anjaneyulu <redacted>
Reviewed-by: Johannes Berg <redacted>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
 net/wireless/nl80211.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0323b9c383b7..919ac18a2e92 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -18944,6 +18944,7 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
 	struct cfg80211_color_change_settings params = {};
 	struct net_device *dev = info->user_ptr[1];
 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+	enum ieee80211_ap_reg_power reg_power;
 	struct nlattr **tb;
 	u16 offset;
 	int err;
@@ -19045,6 +19046,15 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
 			goto out;
 	}
 
+	reg_power =
+		cfg80211_get_6ghz_power_type(params.beacon_color_change.tail,
+					     params.beacon_color_change.tail_len, 0);
+	if (wdev->links[params.link_id].ap.reg_power != reg_power) {
+		GENL_SET_ERR_MSG(info, "6 GHz power type change not allowed");
+		err = -EINVAL;
+		goto out;
+	}
+
 	err = rdev_color_change(rdev, dev, &params);
 
 out:
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help