]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
update nl80211.h
authorJohannes Berg <johannes.berg@intel.com>
Fri, 12 Dec 2014 12:52:06 +0000 (13:52 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 12 Dec 2014 12:52:06 +0000 (13:52 +0100)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
nl80211.h

index 442369f69b4fa74b806107c9602b6da82997d30b..b37bd5a1cb8253cd334ea05c3da920f0cf30f6e0 100644 (file)
--- a/nl80211.h
+++ b/nl80211.h
  * @NL80211_CMD_LEAVE_OCB: Leave the OCB network -- no special arguments, the
  *     network is determined by the network interface.
  *
+ * @NL80211_CMD_TDLS_CHANNEL_SWITCH: Start channel-switching with a TDLS peer,
+ *     identified by the %NL80211_ATTR_MAC parameter. A target channel is
+ *     provided via %NL80211_ATTR_WIPHY_FREQ and other attributes determining
+ *     channel width/type. The target operating class is given via
+ *     %NL80211_ATTR_OPER_CLASS.
+ *     The driver is responsible for continually initiating channel-switching
+ *     operations and returning to the base channel for communication with the
+ *     AP.
+ * @NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH: Stop channel-switching with a TDLS
+ *     peer given by %NL80211_ATTR_MAC. Both peers must be on the base channel
+ *     when this command completes.
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -943,6 +955,9 @@ enum nl80211_commands {
 
        NL80211_CMD_CH_SWITCH_STARTED_NOTIFY,
 
+       NL80211_CMD_TDLS_CHANNEL_SWITCH,
+       NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -1637,9 +1652,9 @@ enum nl80211_commands {
  * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
  *     As specified in the &enum nl80211_tdls_peer_capability.
  *
- * @NL80211_ATTR_IFACE_SOCKET_OWNER: flag attribute, if set during interface
+ * @NL80211_ATTR_SOCKET_OWNER: Flag attribute, if set during interface
  *     creation then the new interface will be owned by the netlink socket
- *     that created it and will be destroyed when the socket is closed
+ *     that created it and will be destroyed when the socket is closed.
  *
  * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
  *     the TDLS link initiator.
@@ -1669,6 +1684,11 @@ enum nl80211_commands {
  * @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see
  *     &enum nl80211_smps_mode.
  *
+ * @NL80211_ATTR_OPER_CLASS: operating class
+ *
+ * @NL80211_ATTR_MAC_MASK: MAC address mask
+ *
+ * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -2004,7 +2024,7 @@ enum nl80211_attrs {
 
        NL80211_ATTR_TDLS_PEER_CAPABILITY,
 
-       NL80211_ATTR_IFACE_SOCKET_OWNER,
+       NL80211_ATTR_SOCKET_OWNER,
 
        NL80211_ATTR_CSA_C_OFFSETS_TX,
        NL80211_ATTR_MAX_CSA_COUNTERS,
@@ -2021,15 +2041,21 @@ enum nl80211_attrs {
 
        NL80211_ATTR_SMPS_MODE,
 
+       NL80211_ATTR_OPER_CLASS,
+
+       NL80211_ATTR_MAC_MASK,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
+       NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
        NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
 };
 
 /* source-level API compatibility */
 #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
 #define        NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
+#define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
 
 /*
  * Allow user space programs to use #ifdef on new attributes by defining them
@@ -3425,6 +3451,8 @@ enum nl80211_ps_state {
  *     interval in which %NL80211_ATTR_CQM_TXE_PKTS and
  *     %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an
  *     %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting.
+ * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon
+ *     loss event
  * @__NL80211_ATTR_CQM_AFTER_LAST: internal
  * @NL80211_ATTR_CQM_MAX: highest key attribute
  */
@@ -3437,6 +3465,7 @@ enum nl80211_attr_cqm {
        NL80211_ATTR_CQM_TXE_RATE,
        NL80211_ATTR_CQM_TXE_PKTS,
        NL80211_ATTR_CQM_TXE_INTVL,
+       NL80211_ATTR_CQM_BEACON_LOSS_EVENT,
 
        /* keep last */
        __NL80211_ATTR_CQM_AFTER_LAST,
@@ -3449,9 +3478,7 @@ enum nl80211_attr_cqm {
  *      configured threshold
  * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the
  *      configured threshold
- * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: The device experienced beacon loss.
- *     (Note that deauth/disassoc will still follow if the AP is not
- *     available. This event might get used as roaming event, etc.)
+ * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: (reserved, never sent)
  */
 enum nl80211_cqm_rssi_threshold_event {
        NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
@@ -3591,6 +3618,25 @@ struct nl80211_pattern_support {
  * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only,
  *     the TCP connection ran out of tokens to use for data to send to the
  *     service
+ * @NL80211_WOWLAN_TRIG_NET_DETECT: wake up when a configured network
+ *     is detected.  This is a nested attribute that contains the
+ *     same attributes used with @NL80211_CMD_START_SCHED_SCAN.  It
+ *     specifies how the scan is performed (e.g. the interval and the
+ *     channels to scan) as well as the scan results that will
+ *     trigger a wake (i.e. the matchsets).
+ * @NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS: nested attribute
+ *     containing an array with information about what triggered the
+ *     wake up.  If no elements are present in the array, it means
+ *     that the information is not available.  If more than one
+ *     element is present, it means that more than one match
+ *     occurred.
+ *     Each element in the array is a nested attribute that contains
+ *     one optional %NL80211_ATTR_SSID attribute and one optional
+ *     %NL80211_ATTR_SCAN_FREQUENCIES attribute.  At least one of
+ *     these attributes must be present.  If
+ *     %NL80211_ATTR_SCAN_FREQUENCIES contains more than one
+ *     frequency, it means that the match occurred in more than one
+ *     channel.
  * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
  * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
  *
@@ -3616,6 +3662,8 @@ enum nl80211_wowlan_triggers {
        NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH,
        NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST,
        NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
+       NL80211_WOWLAN_TRIG_NET_DETECT,
+       NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS,
 
        /* keep last */
        NUM_NL80211_WOWLAN_TRIG,
@@ -4095,6 +4143,20 @@ enum nl80211_ap_sme_features {
  * @NL80211_FEATURE_MAC_ON_CREATE: Device supports configuring
  *     the vif's MAC address upon creation.
  *     See 'macaddr' field in the vif_params (cfg80211.h).
+ * @NL80211_FEATURE_TDLS_CHANNEL_SWITCH: Driver supports channel switching when
+ *     operating as a TDLS peer.
+ * @NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR: This device/driver supports using a
+ *     random MAC address during scan (if the device is unassociated); the
+ *     %NL80211_SCAN_FLAG_RANDOM_ADDR flag may be set for scans and the MAC
+ *     address mask/value will be used.
+ * @NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR: This device/driver supports
+ *     using a random MAC address for every scan iteration during scheduled
+ *     scan (while not associated), the %NL80211_SCAN_FLAG_RANDOM_ADDR may
+ *     be set for scheduled scan and the MAC address mask/value will be used.
+ * @NL80211_FEATURE_ND_RANDOM_MAC_ADDR: This device/driver supports using a
+ *     random MAC address for every scan iteration during "net detect", i.e.
+ *     scan in unassociated WoWLAN, the %NL80211_SCAN_FLAG_RANDOM_ADDR may
+ *     be set for scheduled scan and the MAC address mask/value will be used.
  */
 enum nl80211_feature_flags {
        NL80211_FEATURE_SK_TX_STATUS                    = 1 << 0,
@@ -4125,6 +4187,10 @@ enum nl80211_feature_flags {
        NL80211_FEATURE_DYNAMIC_SMPS                    = 1 << 25,
        NL80211_FEATURE_SUPPORTS_WMM_ADMISSION          = 1 << 26,
        NL80211_FEATURE_MAC_ON_CREATE                   = 1 << 27,
+       NL80211_FEATURE_TDLS_CHANNEL_SWITCH             = 1 << 28,
+       NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR            = 1 << 29,
+       NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR      = 1 << 30,
+       NL80211_FEATURE_ND_RANDOM_MAC_ADDR              = 1 << 31,
 };
 
 /**
@@ -4173,11 +4239,21 @@ enum nl80211_connect_failed_reason {
  *     dangerous because will destroy stations performance as a lot of frames
  *     will be lost while scanning off-channel, therefore it must be used only
  *     when really needed
+ * @NL80211_SCAN_FLAG_RANDOM_ADDR: use a random MAC address for this scan (or
+ *     for scheduled scan: a different one for every scan iteration). When the
+ *     flag is set, depending on device capabilities the @NL80211_ATTR_MAC and
+ *     @NL80211_ATTR_MAC_MASK attributes may also be given in which case only
+ *     the masked bits will be preserved from the MAC address and the remainder
+ *     randomised. If the attributes are not given full randomisation (46 bits,
+ *     locally administered 1, multicast 0) is assumed.
+ *     This flag must not be requested when the feature isn't supported, check
+ *     the nl80211 feature flags for the device.
  */
 enum nl80211_scan_flags {
        NL80211_SCAN_FLAG_LOW_PRIORITY                  = 1<<0,
        NL80211_SCAN_FLAG_FLUSH                         = 1<<1,
        NL80211_SCAN_FLAG_AP                            = 1<<2,
+       NL80211_SCAN_FLAG_RANDOM_ADDR                   = 1<<3,
 };
 
 /**