Skip to content

Commit

Permalink
wifi: nl80211: require MLD address on link STA add/modify
Browse files Browse the repository at this point in the history
We always need the MLD address and link ID to add or
modify the link STA, so require it in the API.

Fixes: 577e5b8 ("wifi: cfg80211: add API to add/modify/remove a link station")
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
jmberg-intel committed Jul 22, 2022
1 parent 956b961 commit 8876c67
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -15827,14 +15827,13 @@ nl80211_add_mod_link_station(struct sk_buff *skb, struct genl_info *info,
if (add && !info->attrs[NL80211_ATTR_MAC])
return -EINVAL;

if (add && !info->attrs[NL80211_ATTR_MLD_ADDR])
if (!info->attrs[NL80211_ATTR_MLD_ADDR])
return -EINVAL;

if (add && !info->attrs[NL80211_ATTR_STA_SUPPORTED_RATES])
return -EINVAL;

if (info->attrs[NL80211_ATTR_MLD_ADDR])
params.mld_mac = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);
params.mld_mac = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);

if (info->attrs[NL80211_ATTR_MAC]) {
params.link_mac = nla_data(info->attrs[NL80211_ATTR_MAC]);
Expand Down

0 comments on commit 8876c67

Please sign in to comment.