aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAyala Beker <ayala.beker@intel.com>2016-09-20 10:31:13 -0400
committerJohannes Berg <johannes.berg@intel.com>2016-09-30 07:21:14 -0400
commitcb3b7d87652aeb37cfb5295a6157a3280dae10cb (patch)
treea11a630c9a8aaa59cc1d08d76dca0e4db24b8e3b /include/uapi/linux
parentb8676221f00dd5b6018f0fd88cd278f93e11143a (diff)
cfg80211: add start / stop NAN commands
This allows user space to start/stop NAN interface. A NAN interface is like P2P device in a few aspects: it doesn't have a netdev associated to it. Add the new interface type and prevent operations that can't be executed on NAN interface like scan. Define several attributes that may be configured by user space when starting NAN functionality (master preference and dual band operation) 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/linux')
-rw-r--r--include/uapi/linux/nl80211.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index ec10d1b2838f..98fd3ec8598d 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -838,6 +838,16 @@
838 * not running. The driver indicates the status of the scan through 838 * not running. The driver indicates the status of the scan through
839 * cfg80211_scan_done(). 839 * cfg80211_scan_done().
840 * 840 *
841 * @NL80211_CMD_START_NAN: Start NAN operation, identified by its
842 * %NL80211_ATTR_WDEV interface. This interface must have been previously
843 * created with %NL80211_CMD_NEW_INTERFACE. After it has been started, the
844 * NAN interface will create or join a cluster. This command must have a
845 * valid %NL80211_ATTR_NAN_MASTER_PREF attribute and optional
846 * %NL80211_ATTR_NAN_DUAL attributes.
847 * After this command NAN functions can be added.
848 * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by
849 * its %NL80211_ATTR_WDEV interface.
850 *
841 * @NL80211_CMD_MAX: highest used command number 851 * @NL80211_CMD_MAX: highest used command number
842 * @__NL80211_CMD_AFTER_LAST: internal use 852 * @__NL80211_CMD_AFTER_LAST: internal use
843 */ 853 */
@@ -1026,6 +1036,9 @@ enum nl80211_commands {
1026 1036
1027 NL80211_CMD_ABORT_SCAN, 1037 NL80211_CMD_ABORT_SCAN,
1028 1038
1039 NL80211_CMD_START_NAN,
1040 NL80211_CMD_STOP_NAN,
1041
1029 /* add new commands above here */ 1042 /* add new commands above here */
1030 1043
1031 /* used to define NL80211_CMD_MAX below */ 1044 /* used to define NL80211_CMD_MAX below */
@@ -1739,6 +1752,12 @@ enum nl80211_commands {
1739 * regulatory indoor configuration would be owned by the netlink socket 1752 * regulatory indoor configuration would be owned by the netlink socket
1740 * that configured the indoor setting, and the indoor operation would be 1753 * that configured the indoor setting, and the indoor operation would be
1741 * cleared when the socket is closed. 1754 * cleared when the socket is closed.
1755 * If set during NAN interface creation, the interface will be destroyed
1756 * if the socket is closed just like any other interface. Moreover, only
1757 * the netlink socket that created the interface will be allowed to add
1758 * and remove functions. NAN notifications will be sent in unicast to that
1759 * socket. Without this attribute, any socket can add functions and the
1760 * notifications will be sent to the %NL80211_MCGRP_NAN multicast group.
1742 * 1761 *
1743 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is 1762 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
1744 * the TDLS link initiator. 1763 * the TDLS link initiator.
@@ -1873,6 +1892,14 @@ enum nl80211_commands {
1873 * @NL80211_ATTR_MESH_PEER_AID: Association ID for the mesh peer (u16). This is 1892 * @NL80211_ATTR_MESH_PEER_AID: Association ID for the mesh peer (u16). This is
1874 * used to pull the stored data for mesh peer in power save state. 1893 * used to pull the stored data for mesh peer in power save state.
1875 * 1894 *
1895 * @NL80211_ATTR_NAN_MASTER_PREF: the master preference to be used by
1896 * %NL80211_CMD_START_NAN. Its type is u8 and it can't be 0.
1897 * Also, values 1 and 255 are reserved for certification purposes and
1898 * should not be used during a normal device operation.
1899 * @NL80211_ATTR_NAN_DUAL: NAN dual band operation config (see
1900 * &enum nl80211_nan_dual_band_conf). This attribute is used with
1901 * %NL80211_CMD_START_NAN.
1902 *
1876 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 1903 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1877 * @NL80211_ATTR_MAX: highest attribute number currently defined 1904 * @NL80211_ATTR_MAX: highest attribute number currently defined
1878 * @__NL80211_ATTR_AFTER_LAST: internal use 1905 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2267,6 +2294,9 @@ enum nl80211_attrs {
2267 2294
2268 NL80211_ATTR_MESH_PEER_AID, 2295 NL80211_ATTR_MESH_PEER_AID,
2269 2296
2297 NL80211_ATTR_NAN_MASTER_PREF,
2298 NL80211_ATTR_NAN_DUAL,
2299
2270 /* add attributes here, update the policy in nl80211.c */ 2300 /* add attributes here, update the policy in nl80211.c */
2271 2301
2272 __NL80211_ATTR_AFTER_LAST, 2302 __NL80211_ATTR_AFTER_LAST,
@@ -2345,6 +2375,7 @@ enum nl80211_attrs {
2345 * commands to create and destroy one 2375 * commands to create and destroy one
2346 * @NL80211_IF_TYPE_OCB: Outside Context of a BSS 2376 * @NL80211_IF_TYPE_OCB: Outside Context of a BSS
2347 * This mode corresponds to the MIB variable dot11OCBActivated=true 2377 * This mode corresponds to the MIB variable dot11OCBActivated=true
2378 * @NL80211_IFTYPE_NAN: NAN device interface type (not a netdev)
2348 * @NL80211_IFTYPE_MAX: highest interface type number currently defined 2379 * @NL80211_IFTYPE_MAX: highest interface type number currently defined
2349 * @NUM_NL80211_IFTYPES: number of defined interface types 2380 * @NUM_NL80211_IFTYPES: number of defined interface types
2350 * 2381 *
@@ -2365,6 +2396,7 @@ enum nl80211_iftype {
2365 NL80211_IFTYPE_P2P_GO, 2396 NL80211_IFTYPE_P2P_GO,
2366 NL80211_IFTYPE_P2P_DEVICE, 2397 NL80211_IFTYPE_P2P_DEVICE,
2367 NL80211_IFTYPE_OCB, 2398 NL80211_IFTYPE_OCB,
2399 NL80211_IFTYPE_NAN,
2368 2400
2369 /* keep last */ 2401 /* keep last */
2370 NUM_NL80211_IFTYPES, 2402 NUM_NL80211_IFTYPES,
@@ -4870,4 +4902,19 @@ enum nl80211_bss_select_attr {
4870 NL80211_BSS_SELECT_ATTR_MAX = __NL80211_BSS_SELECT_ATTR_AFTER_LAST - 1 4902 NL80211_BSS_SELECT_ATTR_MAX = __NL80211_BSS_SELECT_ATTR_AFTER_LAST - 1
4871}; 4903};
4872 4904
4905/**
4906 * enum nl80211_nan_dual_band_conf - NAN dual band configuration
4907 *
4908 * Defines the NAN dual band mode of operation
4909 *
4910 * @NL80211_NAN_BAND_DEFAULT: device default mode
4911 * @NL80211_NAN_BAND_2GHZ: 2.4GHz mode
4912 * @NL80211_NAN_BAND_5GHZ: 5GHz mode
4913 */
4914enum nl80211_nan_dual_band_conf {
4915 NL80211_NAN_BAND_DEFAULT = 1 << 0,
4916 NL80211_NAN_BAND_2GHZ = 1 << 1,
4917 NL80211_NAN_BAND_5GHZ = 1 << 2,
4918};
4919
4873#endif /* __LINUX_NL80211_H */ 4920#endif /* __LINUX_NL80211_H */