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:
Ayala Beker
2016-09-20 17:31:15 +03:00
committed by Johannes Berg
parent 708d50edb1
commit a442b761b2
7 changed files with 694 additions and 1 deletions

View File

@@ -1916,6 +1916,45 @@ DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_nan,
TP_ARGS(wiphy, wdev)
);
TRACE_EVENT(rdev_add_nan_func,
TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
const struct cfg80211_nan_func *func),
TP_ARGS(wiphy, wdev, func),
TP_STRUCT__entry(
WIPHY_ENTRY
WDEV_ENTRY
__field(u8, func_type)
__field(u64, cookie)
),
TP_fast_assign(
WIPHY_ASSIGN;
WDEV_ASSIGN;
__entry->func_type = func->type;
__entry->cookie = func->cookie
),
TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", type=%u, cookie=%llu",
WIPHY_PR_ARG, WDEV_PR_ARG, __entry->func_type,
__entry->cookie)
);
TRACE_EVENT(rdev_del_nan_func,
TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
u64 cookie),
TP_ARGS(wiphy, wdev, cookie),
TP_STRUCT__entry(
WIPHY_ENTRY
WDEV_ENTRY
__field(u64, cookie)
),
TP_fast_assign(
WIPHY_ASSIGN;
WDEV_ASSIGN;
__entry->cookie = cookie;
),
TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", cookie=%llu",
WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie)
);
TRACE_EVENT(rdev_set_mac_acl,
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
struct cfg80211_acl_data *params),