mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
wifi: nl80211: check link is beaconing for color change
When trying to do a color change, validate that the link is beaconing first, to avoid calling the driver with an invalid link. Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260415145348.beb59ea5fbf7.I128a956a3e610bb6a5c9cad941d7d5b59b735a5e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -18388,6 +18388,10 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
|
||||
params.count = nla_get_u8(info->attrs[NL80211_ATTR_COLOR_CHANGE_COUNT]);
|
||||
params.color = nla_get_u8(info->attrs[NL80211_ATTR_COLOR_CHANGE_COLOR]);
|
||||
|
||||
params.link_id = nl80211_link_id(info->attrs);
|
||||
if (!wdev->links[params.link_id].ap.beacon_interval)
|
||||
return -EINVAL;
|
||||
|
||||
err = nl80211_parse_beacon(rdev, info->attrs, ¶ms.beacon_next,
|
||||
wdev->links[params.link_id].ap.chandef.chan,
|
||||
info->extack);
|
||||
@@ -18463,7 +18467,6 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
|
||||
goto out;
|
||||
}
|
||||
|
||||
params.link_id = nl80211_link_id(info->attrs);
|
||||
err = rdev_color_change(rdev, dev, ¶ms);
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user