aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-07 18:19:27 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:19 +0200
commit45aaf17c0c3471efa3100dadfc65e3d459821443 (patch)
tree66a0d0542468beff107762bf2c44eda5c7e8842a /net/wireless/nl80211.c
parentwifi: mac80211: add a helper to fragment an element (diff)
downloadlinux-dev-45aaf17c0c3471efa3100dadfc65e3d459821443.tar.xz
linux-dev-45aaf17c0c3471efa3100dadfc65e3d459821443.zip
wifi: nl80211: check MLO support in authenticate
We should check that MLO connections are supported before attempting to authenticate with MLO parameters, check that. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b75398f0d5b4..ee3826e8e52b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10410,6 +10410,8 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
req.key_idx = key.idx;
req.link_id = nl80211_link_id_or_invalid(info->attrs);
if (req.link_id >= 0) {
+ if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO))
+ return -EINVAL;
if (!info->attrs[NL80211_ATTR_MLD_ADDR])
return -EINVAL;
req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);