summaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorAyala Beker <ayala.beker@intel.com>2016-09-20 17:31:15 +0300
committerJohannes Berg <johannes.berg@intel.com>2016-09-30 14:21:23 +0300
commita442b761b24b6886f9a4e2ff5f8cb4824c96526b (patch)
tree85886140e3f340c7716e8bb58caf9ed9ec5be8db /net/wireless/core.c
parent708d50edb149fe488c7c96f59ba9a89a64985cf2 (diff)
downloadlinux-a442b761b24b6886f9a4e2ff5f8cb4824c96526b.tar.xz
cfg80211: add add_nan_func / del_nan_func
A NAN function can be either publish, subscribe or follow up. Make all the necessary verifications and just pass the request to the driver. Allow the user space application that starts NAN to forbid any other socket to add or remove functions. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 013987243c0b..8201e6d7449e 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -605,7 +605,8 @@ int wiphy_register(struct wiphy *wiphy)
return -EINVAL;
if (WARN_ON((wiphy->interface_modes & BIT(NL80211_IFTYPE_NAN)) &&
- (!rdev->ops->start_nan || !rdev->ops->stop_nan)))
+ (!rdev->ops->start_nan || !rdev->ops->stop_nan ||
+ !rdev->ops->add_nan_func || !rdev->ops->del_nan_func)))
return -EINVAL;
/*