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
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 @@ · 812 unmodified lines
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 number874 * @NL80211_CMD_MAX: highest used command number
871 * @__NL80211_CMD_AFTER_LAST: internal use875 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -1060,6 +1064,7 @@ enum nl80211_commands { · 188 unmodified lines
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 { · 860 unmodified lines
1926 * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See1931 * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See
1927 * &enum nl80211_nan_func_attributes for description of this nested1932 * &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 available1937 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1931 * @NL80211_ATTR_MAX: highest attribute number currently defined1938 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2324,6 +2331,7 @@ enum nl80211_attrs { · 392 unmodified lines
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 { · 2744 unmodified lines
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 */

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