diff options
Diffstat (limited to 'net')
-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; |