iw: update to v3.1, add support for per-chain signal strength info
[openwrt/staging/chunkeey.git] / package / iw / patches / 001-nl80211_h_sync.patch
diff --git a/package/iw/patches/001-nl80211_h_sync.patch b/package/iw/patches/001-nl80211_h_sync.patch
new file mode 100644 (file)
index 0000000..1c42527
--- /dev/null
@@ -0,0 +1,251 @@
+--- a/nl80211.h
++++ b/nl80211.h
+@@ -6,7 +6,7 @@
+  * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
+  * Copyright 2008 Michael Wu <flamingice@sourmilk.net>
+  * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com>
+- * Copyright 2008 Michael Buesch <mb@bu3sch.de>
++ * Copyright 2008 Michael Buesch <m@bues.ch>
+  * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com>
+  * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
+  * Copyright 2008 Colin McCabe <colin@cozybit.com>
+@@ -161,6 +161,13 @@
+  * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface
+  *    using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD,
+  *    %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes.
++ *    Following attributes are provided for drivers that generate full Beacon
++ *    and Probe Response frames internally: %NL80211_ATTR_SSID,
++ *    %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
++ *    %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
++ *    %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
++ *    %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP,
++ *    %NL80211_ATTR_IE_ASSOC_RESP.
+  * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface,
+  *    parameters are like for %NL80211_CMD_SET_BEACON.
+  * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it
+@@ -762,6 +769,8 @@ enum nl80211_commands {
+  *    that can be added to a scan request
+  * @NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN: maximum length of information
+  *    elements that can be added to a scheduled scan request
++ * @NL80211_ATTR_MAX_MATCH_SETS: maximum number of sets that can be
++ *    used with @NL80211_ATTR_SCHED_SCAN_MATCH, a wiphy attribute.
+  *
+  * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
+  * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
+@@ -842,18 +851,20 @@ enum nl80211_commands {
+  * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT
+  *    event (u16)
+  * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating
+- *    that protected APs should be used.
++ *    that protected APs should be used. This is also used with NEW_BEACON to
++ *    indicate that the BSS is to use protection.
+  *
+- * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to
+- *    indicate which unicast key ciphers will be used with the connection
++ * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT, ASSOCIATE, and NEW_BEACON
++ *    to indicate which unicast key ciphers will be used with the connection
+  *    (an array of u32).
+- * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate
+- *    which group key cipher will be used with the connection (a u32).
+- * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate
+- *    which WPA version(s) the AP we want to associate with is using
++ * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
++ *    indicate which group key cipher will be used with the connection (a
++ *    u32).
++ * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
++ *    indicate which WPA version(s) the AP we want to associate with is using
+  *    (a u32 with flags from &enum nl80211_wpa_versions).
+- * @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate
+- *    which key management algorithm(s) to use (an array of u32).
++ * @NL80211_ATTR_AKM_SUITES: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
++ *    indicate which key management algorithm(s) to use (an array of u32).
+  *
+  * @NL80211_ATTR_REQ_IE: (Re)association request information elements as
+  *    sent out by the card, for ROAM and successful CONNECT events.
+@@ -1002,6 +1013,24 @@ enum nl80211_commands {
+  * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan
+  *    cycles, in msecs.
++
++ * @NL80211_ATTR_SCHED_SCAN_MATCH: Nested attribute with one or more
++ *    sets of attributes to match during scheduled scans.  Only BSSs
++ *    that match any of the sets will be reported.  These are
++ *    pass-thru filter rules.
++ *    For a match to succeed, the BSS must match all attributes of a
++ *    set.  Since not every hardware supports matching all types of
++ *    attributes, there is no guarantee that the reported BSSs are
++ *    fully complying with the match sets and userspace needs to be
++ *    able to ignore them by itself.
++ *    Thus, the implementation is somewhat hardware-dependent, but
++ *    this is only an optimization and the userspace application
++ *    needs to handle all the non-filtered results anyway.
++ *    If the match attributes don't make sense when combined with
++ *    the values passed in @NL80211_ATTR_SCAN_SSIDS (eg. if an SSID
++ *    is included in the probe request, but the match attributes
++ *    will never let it go through), -EINVAL may be returned.
++ *    If ommited, no filtering is done.
+  *
+  * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported
+  *    interface combinations. In each nested item, it contains attributes
+@@ -1014,6 +1043,33 @@ enum nl80211_commands {
+  * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information
+  *    necessary for GTK rekeying in the device, see &enum nl80211_rekey_data.
+  *
++ * @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan,
++ *    nested array attribute containing an entry for each band, with the entry
++ *    being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but
++ *    without the length restriction (at most %NL80211_MAX_SUPP_RATES).
++ *
++ * @NL80211_ATTR_HIDDEN_SSID: indicates whether SSID is to be hidden from Beacon
++ *    and Probe Response (when response to wildcard Probe Request); see
++ *    &enum nl80211_hidden_ssid, represented as a u32
++ *
++ * @NL80211_ATTR_IE_PROBE_RESP: Information element(s) for Probe Response frame.
++ *    This is used with %NL80211_CMD_NEW_BEACON and %NL80211_CMD_SET_BEACON to
++ *    provide extra IEs (e.g., WPS/P2P IE) into Probe Response frames when the
++ *    driver (or firmware) replies to Probe Request frames.
++ * @NL80211_ATTR_IE_ASSOC_RESP: Information element(s) for (Re)Association
++ *    Response frames. This is used with %NL80211_CMD_NEW_BEACON and
++ *    %NL80211_CMD_SET_BEACON to provide extra IEs (e.g., WPS/P2P IE) into
++ *    (Re)Association Response frames when the driver (or firmware) replies to
++ *    (Re)Association Request frames.
++ *
++ * @NL80211_ATTR_STA_WME: Nested attribute containing the wme configuration
++ *    of the station, see &enum nl80211_sta_wme_attr.
++ * @NL80211_ATTR_SUPPORT_AP_UAPSD: the device supports uapsd when working
++ *    as AP.
++ *
++ * @NL80211_ATTR_ROAM_SUPPORT: Indicates whether the firmware is capable of
++ *    roaming to another AP in the same ESS if the signal lever is low.
++ *
+  * @NL80211_ATTR_MAX: highest attribute number currently defined
+  * @__NL80211_ATTR_AFTER_LAST: internal use
+  */
+@@ -1217,6 +1273,21 @@ enum nl80211_attrs {
+       NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS,
+       NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN,
++      NL80211_ATTR_SCAN_SUPP_RATES,
++
++      NL80211_ATTR_HIDDEN_SSID,
++
++      NL80211_ATTR_IE_PROBE_RESP,
++      NL80211_ATTR_IE_ASSOC_RESP,
++
++      NL80211_ATTR_STA_WME,
++      NL80211_ATTR_SUPPORT_AP_UAPSD,
++
++      NL80211_ATTR_ROAM_SUPPORT,
++
++      NL80211_ATTR_SCHED_SCAN_MATCH,
++      NL80211_ATTR_MAX_MATCH_SETS,
++
+       /* add attributes here, update the policy in nl80211.c */
+       __NL80211_ATTR_AFTER_LAST,
+@@ -1426,6 +1497,8 @@ enum nl80211_sta_bss_param {
+  * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute
+  *     containing info as possible, see &enum nl80211_sta_bss_param
+  * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
++ * @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
+  */
+@@ -1447,6 +1520,8 @@ enum nl80211_sta_info {
+       NL80211_STA_INFO_RX_BITRATE,
+       NL80211_STA_INFO_BSS_PARAM,
+       NL80211_STA_INFO_CONNECTED_TIME,
++      NL80211_STA_INFO_CHAIN_SIGNAL,
++      NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
+       /* keep last */
+       __NL80211_STA_INFO_AFTER_LAST,
+@@ -1676,6 +1751,26 @@ enum nl80211_reg_rule_attr {
+ };
+ /**
++ * enum nl80211_sched_scan_match_attr - scheduled scan match attributes
++ * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved
++ * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching,
++ * only report BSS with matching SSID.
++ * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
++ *    attribute number currently defined
++ * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
++ */
++enum nl80211_sched_scan_match_attr {
++      __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID,
++
++      NL80211_ATTR_SCHED_SCAN_MATCH_SSID,
++
++      /* keep last */
++      __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
++      NL80211_SCHED_SCAN_MATCH_ATTR_MAX =
++              __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1
++};
++
++/**
+  * enum nl80211_reg_rule_flags - regulatory rule flags
+  *
+  * @NL80211_RRF_NO_OFDM: OFDM modulation not allowed
+@@ -1826,6 +1921,13 @@ enum nl80211_mntr_flags {
+  * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a
+  * source mesh point for path selection elements.
+  *
++ * @NL80211_MESHCONF_HWMP_RANN_INTERVAL:  The interval of time (in TUs) between
++ * root announcements are transmitted.
++ *
++ * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has
++ * access to a broader network beyond the MBSS.  This is done via Root
++ * Announcement frames.
++ *
+  * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
+  *
+  * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
+@@ -1847,6 +1949,8 @@ enum nl80211_meshconf_params {
+       NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
+       NL80211_MESHCONF_HWMP_ROOTMODE,
+       NL80211_MESHCONF_ELEMENT_TTL,
++      NL80211_MESHCONF_HWMP_RANN_INTERVAL,
++      NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
+       /* keep last */
+       __NL80211_MESHCONF_ATTR_AFTER_LAST,
+@@ -2423,4 +2527,37 @@ enum nl80211_rekey_data {
+       MAX_NL80211_REKEY_DATA = NUM_NL80211_REKEY_DATA - 1
+ };
++/**
++ * enum nl80211_hidden_ssid - values for %NL80211_ATTR_HIDDEN_SSID
++ * @NL80211_HIDDEN_SSID_NOT_IN_USE: do not hide SSID (i.e., broadcast it in
++ *    Beacon frames)
++ * @NL80211_HIDDEN_SSID_ZERO_LEN: hide SSID by using zero-length SSID element
++ *    in Beacon frames
++ * @NL80211_HIDDEN_SSID_ZERO_CONTENTS: hide SSID by using correct length of SSID
++ *    element in Beacon frames but zero out each byte in the SSID
++ */
++enum nl80211_hidden_ssid {
++      NL80211_HIDDEN_SSID_NOT_IN_USE,
++      NL80211_HIDDEN_SSID_ZERO_LEN,
++      NL80211_HIDDEN_SSID_ZERO_CONTENTS
++};
++
++/**
++ * enum nl80211_sta_wme_attr - station WME attributes
++ * @__NL80211_STA_WME_INVALID: invalid number for nested attribute
++ * @NL80211_STA_WME_QUEUES: bitmap of uapsd queues.
++ * @NL80211_STA_WME_MAX_SP: max service period.
++ * @__NL80211_STA_WME_AFTER_LAST: internal
++ * @NL80211_STA_WME_MAX: highest station WME attribute
++ */
++enum nl80211_sta_wme_attr {
++      __NL80211_STA_WME_INVALID,
++      NL80211_STA_WME_UAPSD_QUEUES,
++      NL80211_STA_WME_MAX_SP,
++
++      /* keep last */
++      __NL80211_STA_WME_AFTER_LAST,
++      NL80211_STA_WME_MAX = __NL80211_STA_WME_AFTER_LAST - 1
++};
++
+ #endif /* __LINUX_NL80211_H */