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
@@ -907,6 +907,27 @@ static inline void rdev_stop_nan(struct cfg80211_registered_device *rdev,
|
||||
trace_rdev_return_void(&rdev->wiphy);
|
||||
}
|
||||
|
||||
static inline int
|
||||
rdev_add_nan_func(struct cfg80211_registered_device *rdev,
|
||||
struct wireless_dev *wdev,
|
||||
struct cfg80211_nan_func *nan_func)
|
||||
{
|
||||
int ret;
|
||||
|
||||
trace_rdev_add_nan_func(&rdev->wiphy, wdev, nan_func);
|
||||
ret = rdev->ops->add_nan_func(&rdev->wiphy, wdev, nan_func);
|
||||
trace_rdev_return_int(&rdev->wiphy, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void rdev_del_nan_func(struct cfg80211_registered_device *rdev,
|
||||
struct wireless_dev *wdev, u64 cookie)
|
||||
{
|
||||
trace_rdev_del_nan_func(&rdev->wiphy, wdev, cookie);
|
||||
rdev->ops->del_nan_func(&rdev->wiphy, wdev, cookie);
|
||||
trace_rdev_return_void(&rdev->wiphy);
|
||||
}
|
||||
|
||||
static inline int rdev_set_mac_acl(struct cfg80211_registered_device *rdev,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_acl_data *params)
|
||||
|
Reference in New Issue
Block a user