iw: sync nl80211.h with compat-wireless 2015-10-26
[openwrt/openwrt.git] / package / network / utils / iw / patches / 001-nl80211_h_sync.patch
index 8e776643b7bfa439dadd9d1377bc8263e3f24759..7de225859b71c2bb7627503b676aa7f2a122ccd9 100644 (file)
 --- a/nl80211.h
 +++ b/nl80211.h
-@@ -565,6 +565,14 @@
-  *    %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with
-  *    %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
+@@ -10,6 +10,7 @@
+  * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com>
+  * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
+  * Copyright 2008 Colin McCabe <colin@cozybit.com>
++ * Copyright 2015     Intel Deutschland GmbH
   *
-+ * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by
-+ *    its %NL80211_ATTR_WDEV identifier. It must have been created with
-+ *    %NL80211_CMD_NEW_INTERFACE previously. After it has been started, the
-+ *    P2P Device can be used for P2P operations, e.g. remain-on-channel and
-+ *    public action frame TX.
-+ * @NL80211_CMD_STOP_P2P_DEVICE: Stop the given P2P Device, identified by
-+ *    its %NL80211_ATTR_WDEV identifier.
+  * Permission to use, copy, modify, and/or distribute this software for any
+  * purpose with or without fee is hereby granted, provided that the above
+@@ -328,7 +329,15 @@
+  *    partial scan results may be available
+  *
+  * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain
+- *    intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL.
++ *    intervals and certain number of cycles, as specified by
++ *    %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is
++ *    not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified,
++ *    scheduled scan will run in an infinite loop with the specified interval.
++ *    These attributes are mutually exculsive,
++ *    i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if
++ *    NL80211_ATTR_SCHED_SCAN_PLANS is defined.
++ *    If for some reason scheduled scan is aborted by the driver, all scan
++ *    plans are canceled (including scan plans that did not start yet).
+  *    Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS)
+  *    are passed, they are used in the probe requests.  For
+  *    broadcast, a broadcast SSID must be passed (ie. an empty
+@@ -1761,6 +1770,22 @@ enum nl80211_commands {
+  * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device
+  *      is operating in an indoor environment.
+  *
++ * @NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS: maximum number of scan plans for
++ *    scheduled scan supported by the device (u32), a wiphy attribute.
++ * @NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL: maximum interval (in seconds) for
++ *    a scan plan (u32), a wiphy attribute.
++ * @NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS: maximum number of iterations in
++ *    a scan plan (u32), a wiphy attribute.
++ * @NL80211_ATTR_SCHED_SCAN_PLANS: a list of scan plans for scheduled scan.
++ *    Each scan plan defines the number of scan iterations and the interval
++ *    between scans. The last scan plan will always run infinitely,
++ *    thus it must not specify the number of iterations, only the interval
++ *    between scans. The scan plans are executed sequentially.
++ *    Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan.
 + *
-  * @NL80211_CMD_MAX: highest used command number
-  * @__NL80211_CMD_AFTER_LAST: internal use
-  */
-@@ -708,6 +716,9 @@ enum nl80211_commands {
++ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
++ *    transmit power to stay within regulatory limits. u32, dBi.
++ *
+  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
+  * @NL80211_ATTR_MAX: highest attribute number currently defined
+  * @__NL80211_ATTR_AFTER_LAST: internal use
+@@ -2130,6 +2155,13 @@ enum nl80211_attrs {
  
-       NL80211_CMD_CH_SWITCH_NOTIFY,
+       NL80211_ATTR_REG_INDOOR,
  
-+      NL80211_CMD_START_P2P_DEVICE,
-+      NL80211_CMD_STOP_P2P_DEVICE,
++      NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS,
++      NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL,
++      NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS,
++      NL80211_ATTR_SCHED_SCAN_PLANS,
 +
-       /* add new commands above here */
-       /* used to define NL80211_CMD_MAX below */
-@@ -1506,6 +1517,8 @@ enum nl80211_attrs {
-       NL80211_ATTR_USER_REG_HINT_TYPE,
 +      NL80211_ATTR_WIPHY_ANTENNA_GAIN,
 +
        /* add attributes here, update the policy in nl80211.c */
  
        __NL80211_ATTR_AFTER_LAST,
-@@ -1575,6 +1588,10 @@ enum nl80211_attrs {
-  * @NL80211_IFTYPE_MESH_POINT: mesh point
-  * @NL80211_IFTYPE_P2P_CLIENT: P2P client
-  * @NL80211_IFTYPE_P2P_GO: P2P group owner
-+ * @NL80211_IFTYPE_P2P_DEVICE: P2P device interface type, this is not a netdev
-+ *    and therefore can't be created in the normal ways, use the
-+ *    %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE
-+ *    commands to create and destroy one
-  * @NL80211_IFTYPE_MAX: highest interface type number currently defined
-  * @NUM_NL80211_IFTYPES: number of defined interface types
-  *
-@@ -1593,6 +1610,7 @@ enum nl80211_iftype {
-       NL80211_IFTYPE_MESH_POINT,
-       NL80211_IFTYPE_P2P_CLIENT,
-       NL80211_IFTYPE_P2P_GO,
-+      NL80211_IFTYPE_P2P_DEVICE,
-       /* keep last */
-       NUM_NL80211_IFTYPES,
-@@ -1744,6 +1762,8 @@ enum nl80211_sta_bss_param {
-  * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
-  * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
-  * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
-+ * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
-+ * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
-  * @__NL80211_STA_INFO_AFTER_LAST: internal
-  * @NL80211_STA_INFO_MAX: highest possible station info attribute
+@@ -3364,6 +3396,9 @@ enum nl80211_bss_scan_width {
+  *    (not present if no beacon frame has been received yet)
+  * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
+  *    @NL80211_BSS_TSF is known to be from a probe response (flag attribute)
++ * @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry
++ *    was last updated by a received frame. The value is expected to be
++ *    accurate to about 10ms. (u64, nanoseconds)
+  * @__NL80211_BSS_AFTER_LAST: internal
+  * @NL80211_BSS_MAX: highest BSS attribute
   */
-@@ -1768,6 +1788,8 @@ enum nl80211_sta_info {
-       NL80211_STA_INFO_STA_FLAGS,
-       NL80211_STA_INFO_BEACON_LOSS,
-       NL80211_STA_INFO_T_OFFSET,
-+      NL80211_STA_INFO_CHAIN_SIGNAL,
-+      NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
+@@ -3383,6 +3418,7 @@ enum nl80211_bss {
+       NL80211_BSS_CHAN_WIDTH,
+       NL80211_BSS_BEACON_TSF,
+       NL80211_BSS_PRESP_DATA,
++      NL80211_BSS_LAST_SEEN_BOOTTIME,
  
        /* keep last */
-       __NL80211_STA_INFO_AFTER_LAST,
-@@ -2994,12 +3016,18 @@ enum nl80211_ap_sme_features {
-  * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
-  *    to work properly to suppport receiving regulatory hints from
-  *    cellular base stations.
-+ * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active
-+ *    P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel
-+ *    in the interface combinations, even when it's only used for scan
-+ *    and remain-on-channel. This could be due to, for example, the
-+ *    remain-on-channel implementation requiring a channel context.
-  */
- enum nl80211_feature_flags {
--      NL80211_FEATURE_SK_TX_STATUS    = 1 << 0,
--      NL80211_FEATURE_HT_IBSS         = 1 << 1,
--      NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2,
--      NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3,
-+      NL80211_FEATURE_SK_TX_STATUS                    = 1 << 0,
-+      NL80211_FEATURE_HT_IBSS                         = 1 << 1,
-+      NL80211_FEATURE_INACTIVITY_TIMER                = 1 << 2,
-+      NL80211_FEATURE_CELL_BASE_REG_HINTS             = 1 << 3,
-+      NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL        = 1 << 4,
+       __NL80211_BSS_AFTER_LAST,
+@@ -4589,4 +4625,28 @@ enum nl80211_tdls_peer_capability {
+       NL80211_TDLS_PEER_WMM = 1<<2,
  };
  
- /**
++/**
++ * enum nl80211_sched_scan_plan - scanning plan for scheduled scan
++ * @__NL80211_SCHED_SCAN_PLAN_INVALID: attribute number 0 is reserved
++ * @NL80211_SCHED_SCAN_PLAN_INTERVAL: interval between scan iterations. In
++ *    seconds (u32).
++ * @NL80211_SCHED_SCAN_PLAN_ITERATIONS: number of scan iterations in this
++ *    scan plan (u32). The last scan plan must not specify this attribute
++ *    because it will run infinitely. A value of zero is invalid as it will
++ *    make the scan plan meaningless.
++ * @NL80211_SCHED_SCAN_PLAN_MAX: highest scheduled scan plan attribute number
++ *    currently defined
++ * @__NL80211_SCHED_SCAN_PLAN_AFTER_LAST: internal use
++ */
++enum nl80211_sched_scan_plan {
++      __NL80211_SCHED_SCAN_PLAN_INVALID,
++      NL80211_SCHED_SCAN_PLAN_INTERVAL,
++      NL80211_SCHED_SCAN_PLAN_ITERATIONS,
++
++      /* keep last */
++      __NL80211_SCHED_SCAN_PLAN_AFTER_LAST,
++      NL80211_SCHED_SCAN_PLAN_MAX =
++              __NL80211_SCHED_SCAN_PLAN_AFTER_LAST - 1
++};
++
+ #endif /* __LINUX_NL80211_H */