summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bcd18ae59e84..72f68a17c92b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -13782,7 +13782,9 @@ static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info)
break;
case NL80211_IFTYPE_NAN:
if (!wiphy_ext_feature_isset(wdev->wiphy,
- NL80211_EXT_FEATURE_SECURE_NAN))
+ NL80211_EXT_FEATURE_SECURE_NAN) &&
+ !(wdev->wiphy->nan_capa.flags &
+ WIPHY_NAN_FLAGS_USERSPACE_DE))
return -EOPNOTSUPP;
break;
default:
@@ -13843,7 +13845,9 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
break;
case NL80211_IFTYPE_NAN:
if (!wiphy_ext_feature_isset(wdev->wiphy,
- NL80211_EXT_FEATURE_SECURE_NAN))
+ NL80211_EXT_FEATURE_SECURE_NAN) &&
+ !(wdev->wiphy->nan_capa.flags &
+ WIPHY_NAN_FLAGS_USERSPACE_DE))
return -EOPNOTSUPP;
break;
default: