History

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.

Ayala Beker committed 10 years ago

Commit 50bcd311 parent a5a9dcf3 files · +148 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+31−0
@@ -48,6 +48,7 @@ · 47 unmodified lines
4848 #define NL80211_MULTICAST_GROUP_REG "regulatory"
4949 #define NL80211_MULTICAST_GROUP_MLME "mlme"
5050 #define NL80211_MULTICAST_GROUP_VENDOR "vendor"
51+#define NL80211_MULTICAST_GROUP_NAN "nan"
5152 #define NL80211_MULTICAST_GROUP_TESTMODE "testmode"
5253
5354 /**
@@ -866,6 +867,9 @@ · 812 unmodified lines
866867 * must be operational (%NL80211_CMD_START_NAN was executed).
867868 * It must contain at least one of the following attributes:
868869 * %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.
869873 *
870874 * @NL80211_CMD_MAX: highest used command number
871875 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -1060,6 +1064,7 @@ enum nl80211_commands { · 188 unmodified lines
10601064 NL80211_CMD_ADD_NAN_FUNCTION,
10611065 NL80211_CMD_DEL_NAN_FUNCTION,
10621066 NL80211_CMD_CHANGE_NAN_CONFIG,
1067+ NL80211_CMD_NAN_MATCH,
10631068
10641069 /* add new commands above here */
10651070
@@ -1926,6 +1931,8 @@ enum nl80211_commands { · 860 unmodified lines
19261931 * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See
19271932 * &enum nl80211_nan_func_attributes for description of this nested
19281933 * attribute.
1934+ * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
1935+ * See &enum nl80211_nan_match_attributes.
19291936 *
19301937 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
19311938 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2324,6 +2331,7 @@ enum nl80211_attrs { · 392 unmodified lines
23242331 NL80211_ATTR_NAN_MASTER_PREF,
23252332 NL80211_ATTR_NAN_DUAL,
23262333 NL80211_ATTR_NAN_FUNC,
2334+ NL80211_ATTR_NAN_MATCH,
23272335
23282336 /* add attributes here, update the policy in nl80211.c */
23292337
@@ -5074,4 +5082,27 @@ enum nl80211_nan_srf_attributes { · 2744 unmodified lines
50745082 NL80211_NAN_SRF_ATTR_MAX = NUM_NL80211_NAN_SRF_ATTR - 1,
50755083 };
50765084
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+ */
5098+enum 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+
50775108 #endif /* __LINUX_NL80211_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t