aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorAyala Beker <ayala.beker@intel.com>2016-09-20 10:31:17 -0400
committerJohannes Berg <johannes.berg@intel.com>2016-09-30 07:21:32 -0400
commit50bcd31d9992e99c231820f5276e70346cbfbc51 (patch)
tree9b5e1302ed1478448919dc96ae538591c47aafa6 /include/uapi
parenta5a9dcf291e1e541243878eed2d73a74006fa1f1 (diff)
cfg80211: provide a function to report a match for NAN
Provide a function the driver can call to report a match. This will send the event to the user space. If the NAN instance is tied to the owner, the notifications will be sent to the socket that started the NAN interface only. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/nl80211.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 9c9c0c352873..995bf802d604 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -48,6 +48,7 @@
48#define NL80211_MULTICAST_GROUP_REG "regulatory" 48#define NL80211_MULTICAST_GROUP_REG "regulatory"
49#define NL80211_MULTICAST_GROUP_MLME "mlme" 49#define NL80211_MULTICAST_GROUP_MLME "mlme"
50#define NL80211_MULTICAST_GROUP_VENDOR "vendor" 50#define NL80211_MULTICAST_GROUP_VENDOR "vendor"
51#define NL80211_MULTICAST_GROUP_NAN "nan"
51#define NL80211_MULTICAST_GROUP_TESTMODE "testmode" 52#define NL80211_MULTICAST_GROUP_TESTMODE "testmode"
52 53
53/** 54/**
@@ -866,6 +867,9 @@
866 * must be operational (%NL80211_CMD_START_NAN was executed). 867 * must be operational (%NL80211_CMD_START_NAN was executed).
867 * It must contain at least one of the following attributes: 868 * It must contain at least one of the following attributes:
868 * %NL80211_ATTR_NAN_MASTER_PREF, %NL80211_ATTR_NAN_DUAL. 869 * %NL80211_ATTR_NAN_MASTER_PREF, %NL80211_ATTR_NAN_DUAL.
870 * @NL80211_CMD_NAN_FUNC_MATCH: Notification sent when a match is reported.
871 * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
872 * %NL80211_ATTR_COOKIE.
869 * 873 *
870 * @NL80211_CMD_MAX: highest used command number 874 * @NL80211_CMD_MAX: highest used command number
871 * @__NL80211_CMD_AFTER_LAST: internal use 875 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -1060,6 +1064,7 @@ enum nl80211_commands {
1060 NL80211_CMD_ADD_NAN_FUNCTION, 1064 NL80211_CMD_ADD_NAN_FUNCTION,
1061 NL80211_CMD_DEL_NAN_FUNCTION, 1065 NL80211_CMD_DEL_NAN_FUNCTION,
1062 NL80211_CMD_CHANGE_NAN_CONFIG, 1066 NL80211_CMD_CHANGE_NAN_CONFIG,
1067 NL80211_CMD_NAN_MATCH,
1063 1068
1064 /* add new commands above here */ 1069 /* add new commands above here */
1065 1070
@@ -1926,6 +1931,8 @@ enum nl80211_commands {
1926 * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See 1931 * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See
1927 * &enum nl80211_nan_func_attributes for description of this nested 1932 * &enum nl80211_nan_func_attributes for description of this nested
1928 * attribute. 1933 * attribute.
1934 * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
1935 * See &enum nl80211_nan_match_attributes.
1929 * 1936 *
1930 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 1937 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1931 * @NL80211_ATTR_MAX: highest attribute number currently defined 1938 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2324,6 +2331,7 @@ enum nl80211_attrs {
2324 NL80211_ATTR_NAN_MASTER_PREF, 2331 NL80211_ATTR_NAN_MASTER_PREF,
2325 NL80211_ATTR_NAN_DUAL, 2332 NL80211_ATTR_NAN_DUAL,
2326 NL80211_ATTR_NAN_FUNC, 2333 NL80211_ATTR_NAN_FUNC,
2334 NL80211_ATTR_NAN_MATCH,
2327 2335
2328 /* add attributes here, update the policy in nl80211.c */ 2336 /* add attributes here, update the policy in nl80211.c */
2329 2337
@@ -5074,4 +5082,27 @@ enum nl80211_nan_srf_attributes {
5074 NL80211_NAN_SRF_ATTR_MAX = NUM_NL80211_NAN_SRF_ATTR - 1, 5082 NL80211_NAN_SRF_ATTR_MAX = NUM_NL80211_NAN_SRF_ATTR - 1,
5075}; 5083};
5076 5084
5085/**
5086 * enum nl80211_nan_match_attributes - NAN match attributes
5087 * @__NL80211_NAN_MATCH_INVALID: invalid
5088 * @NL80211_NAN_MATCH_FUNC_LOCAL: the local function that had the
5089 * match. This is a nested attribute.
5090 * See &enum nl80211_nan_func_attributes.
5091 * @NL80211_NAN_MATCH_FUNC_PEER: the peer function
5092 * that caused the match. This is a nested attribute.
5093 * See &enum nl80211_nan_func_attributes.
5094 *
5095 * @NUM_NL80211_NAN_MATCH_ATTR: internal
5096 * @NL80211_NAN_MATCH_ATTR_MAX: highest NAN match attribute
5097 */
5098enum nl80211_nan_match_attributes {
5099 __NL80211_NAN_MATCH_INVALID,
5100 NL80211_NAN_MATCH_FUNC_LOCAL,
5101 NL80211_NAN_MATCH_FUNC_PEER,
5102
5103 /* keep last */
5104 NUM_NL80211_NAN_MATCH_ATTR,
5105 NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
5106};
5107
5077#endif /* __LINUX_NL80211_H */ 5108#endif /* __LINUX_NL80211_H */