summaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-19 09:44:25 +0300
committerJohannes Berg <johannes.berg@intel.com>2022-07-22 15:28:13 +0300
commit8876c67e6296b44c283cd748d4888788af3f7942 (patch)
tree472bace9636ba271ab4ffac654058b520f1547d7 /net/wireless/nl80211.c
parent956b96133763dcfdf1b78de0910631f610df2d7b (diff)
downloadlinux-8876c67e6296b44c283cd748d4888788af3f7942.tar.xz
wifi: nl80211: require MLD address on link STA add/modify
We always need the MLD address and link ID to add or modify the link STA, so require it in the API. Fixes: 577e5b8c3924 ("wifi: cfg80211: add API to add/modify/remove a link station") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b6e640437568..310d22b263d1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -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]);