diff options
author | Veerendranath Jakkam <quic_vjakkam@quicinc.com> | 2022-07-30 10:56:42 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-08-25 10:41:03 +0200 |
commit | aa129bcd34b6de2c37b5145da54a57901d5195bc (patch) | |
tree | 8ba219c4f7d1d92f7e55762d43eb4fae34e570eb | |
parent | 5ec245e4d14b6299148b18f3a088a3211458b75f (diff) | |
download | linux-aa129bcd34b6de2c37b5145da54a57901d5195bc.tar.bz2 |
wifi: cfg80211: Prevent cfg80211_wext_siwencodeext() on MLD
Currently, MLO support is not added for WEXT code and WEXT handlers are
prevented on MLDs. Prevent WEXT handler cfg80211_wext_siwencodeext()
also on MLD which is missed in commit 7b0a0e3c3a88 ("wifi: cfg80211: do
some rework towards MLO link APIs")
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Link: https://lore.kernel.org/r/20220730052643.1959111-3-quic_vjakkam@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/wext-compat.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index a9767bfe7330..129d3bb91dfb 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -685,6 +685,13 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev, !rdev->ops->set_default_key) return -EOPNOTSUPP; + wdev_lock(wdev); + if (wdev->valid_links) { + wdev_unlock(wdev); + return -EOPNOTSUPP; + } + wdev_unlock(wdev); + switch (ext->alg) { case IW_ENCODE_ALG_NONE: remove = true; |