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>
This commit is contained in:

committed by
Johannes Berg

parent
708d50edb1
commit
a442b761b2
@@ -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;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user