mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
wifi: nl80211: reject color-change requests that change 6 GHz power type
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 <pagadala.yesu.anjaneyulu@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260921224731.1d8727ce4fbf.I1049058ae5e60b7ebcb450d03f6b13cee573eeea@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
4b7ad021a9
commit
e01f1c70e4
|
|
@ -19085,6 +19085,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;
|
||||
|
|
@ -19186,6 +19187,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, ¶ms);
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user