AA: iw: sync with trunk r40801
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 Jun 2014 12:30:54 +0000 (12:30 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 Jun 2014 12:30:54 +0000 (12:30 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@41117 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/iw/Makefile
package/iw/patches/001-nl80211_h_sync.patch
package/iw/patches/100-rx_rate.patch [deleted file]
package/iw/patches/110-per_chain_signal_strength.patch [deleted file]
package/iw/patches/120-antenna_gain.patch [new file with mode: 0644]
package/iw/patches/120-tdls_peer_indentation.patch [deleted file]
package/iw/patches/130-antenna_gain.patch [deleted file]
package/iw/patches/200-reduce_size.patch [new file with mode: 0644]

index f47d76b..2528441 100644 (file)
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iw
-PKG_VERSION:=3.6
+PKG_VERSION:=3.14
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/
-PKG_MD5SUM:=1c18bfbbc8773629e5e8ac733a39540c
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://www.kernel.org/pub/software/network/iw
+PKG_MD5SUM:=66e41053f6fc0781b683b5b688442de6
+
+PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -22,7 +24,7 @@ define Package/iw
   CATEGORY:=Network
   TITLE:=cfg80211 interface configuration utility
   URL:=http://wireless.kernel.org/en/users/Documentation/iw
-  DEPENDS:= +libnl-tiny @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
+  DEPENDS:= +libnl-tiny @(!TARGET_avr32||BROKEN)
 endef
 
 define Build/Configure
@@ -39,8 +41,8 @@ TARGET_CPPFLAGS:= \
        -D_GNU_SOURCE
 
 MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
-       LDFLAGS="$(TARGET_LDFLAGS)" \
+       CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
+       LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
        NL1FOUND="" NL2FOUND=Y \
        NLLIBNAME="libnl-tiny" \
        LIBS="-lm -lnl-tiny" \
index 4c20557..3a26368 100644 (file)
 --- a/nl80211.h
 +++ b/nl80211.h
-@@ -118,8 +118,9 @@
-  *    to get a list of all present wiphys.
-  * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
-  *    %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
-- *    %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ,
-- *    %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT,
-+ *    %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the
-+ *    attributes determining the channel width; this is used for setting
-+ *    monitor mode channel),  %NL80211_ATTR_WIPHY_RETRY_SHORT,
-  *    %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
-  *    and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.
-  *    However, for setting the channel, see %NL80211_CMD_SET_CHANNEL
-@@ -169,9 +170,10 @@
-  *    %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 and %NL80211_ATTR_INACTIVITY_TIMEOUT.
-+ *    %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
-+ *    %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
-  *    The channel to use can be set on the interface or be given using the
-- *    %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_CHANNEL_TYPE attrs.
-+ *    %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width.
-  * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
-  * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
-  * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
-@@ -373,8 +375,8 @@
-  *    requests to connect to a specified network but without separating
-  *    auth and assoc steps. For this, you need to specify the SSID in a
+@@ -303,8 +303,9 @@
+  *    passed, all channels allowed for the current regulatory domain
+  *    are used.  Extra IEs can also be passed from the userspace by
+  *    using the %NL80211_ATTR_IE attribute.
+- * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan.  Returns -ENOENT
+- *    if scheduled scan is not running.
++ * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if
++ *    scheduled scan is not running. The caller may assume that as soon
++ *    as the call returns, it is safe to start a new scheduled scan again.
+  * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan
+  *    results available.
+  * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has
+@@ -418,8 +419,18 @@
   *    %NL80211_ATTR_SSID attribute, and can optionally specify the association
-- *    IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
-- *    %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
-+ *    IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
-+ *    %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
-  *    %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
-  *    %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
+  *    IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
+  *    %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
+- *    %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
+- *    %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
++ *    %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
++ *    %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and
++ *    %NL80211_ATTR_WIPHY_FREQ_HINT.
++ *    If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are
++ *    restrictions on BSS selection, i.e., they effectively prevent roaming
++ *    within the ESS. %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT
++ *    can be included to provide a recommendation of the initial BSS while
++ *    allowing the driver to roam to other BSSes within the ESS and also to
++ *    ignore this recommendation if the indicated BSS is not ideal. Only one
++ *    set of BSSID,frequency parameters is used (i.e., either the enforcing
++ *    %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict
++ *    %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT).
   *    Background scan period can optionally be
-@@ -401,8 +403,7 @@
-  *    a response while being associated to an AP on another channel.
-  *    %NL80211_ATTR_IFINDEX is used to specify which interface (and thus
-  *    radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
-- *    frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be
-- *    optionally used to specify additional channel parameters.
-+ *    frequency for the operation.
-  *    %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
-  *    to remain on the channel. This command is also used as an event to
-  *    notify when the requested duration starts (it may take a while for the
-@@ -440,12 +441,11 @@
-  *    as an event indicating reception of a frame that was not processed in
-  *    kernel code, but is for us (i.e., which may need to be processed in a
-  *    user space application). %NL80211_ATTR_FRAME is used to specify the
-- *    frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and
-- *    optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on
-- *    which channel the frame is to be transmitted or was received. If this
-- *    channel is not the current channel (remain-on-channel or the
-- *    operational channel) the device will switch to the given channel and
-- *    transmit the frame, optionally waiting for a response for the time
-+ *    frame contents (including header). %NL80211_ATTR_WIPHY_FREQ is used
-+ *    to indicate on which channel the frame is to be transmitted or was
-+ *    received. If this channel is not the current channel (remain-on-channel
-+ *    or the operational channel) the device will switch to the given channel
-+ *    and transmit the frame, optionally waiting for a response for the time
-  *    specified using %NL80211_ATTR_DURATION. When called, this operation
-  *    returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
+  *    specified in %NL80211_ATTR_BG_SCAN_PERIOD,
+  *    if not specified default background scan configuration
+@@ -492,6 +503,9 @@
   *    TX status event pertaining to the TX request.
-@@ -473,8 +473,8 @@
-  *    command is used as an event to indicate the that a trigger level was
-  *    reached.
-  * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ
-- *    and %NL80211_ATTR_WIPHY_CHANNEL_TYPE) the given interface (identifed
-- *    by %NL80211_ATTR_IFINDEX) shall operate on.
-+ *    and the attributes determining channel width) the given interface
-+ *    (identifed by %NL80211_ATTR_IFINDEX) shall operate on.
-  *    In case multiple channels are supported by the device, the mechanism
-  *    with which it switches channels is implementation-defined.
-  *    When a monitor interface is given, it can only switch channel while
-@@ -513,6 +513,12 @@
-  *    command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
-  *    more background information, see
-  *    http://wireless.kernel.org/en/users/Documentation/WoWLAN.
-+ *    The @NL80211_CMD_SET_WOWLAN command can also be used as a notification
-+ *    from the driver reporting the wakeup reason. In this case, the
-+ *    @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason
-+ *    for the wakeup, if it was caused by wireless. If it is not present
-+ *    in the wakeup notification, the wireless device didn't cause the
-+ *    wakeup but reports that it was woken up.
+  *    %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
+  *    management frames at CCK rate or not in 2GHz band.
++ *    %NL80211_ATTR_CSA_C_OFFSETS_TX is an array of offsets to CSA
++ *    counters which will be updated to the current value. This attribute
++ *    is used during CSA period.
+  * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
+  *    command may be used with the corresponding cookie to cancel the wait
+  *    time if it is known that it is no longer necessary.
+@@ -1514,10 +1528,10 @@ enum nl80211_commands {
+  *    operation).
+  * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
+  *    for the time while performing a channel switch.
+- * @NL80211_ATTR_CSA_C_OFF_BEACON: Offset of the channel switch counter
+- *    field in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
+- * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter
+- *    field in the probe response (%NL80211_ATTR_PROBE_RESP).
++ * @NL80211_ATTR_CSA_C_OFF_BEACON: An array of offsets (u16) to the channel
++ *    switch counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
++ * @NL80211_ATTR_CSA_C_OFF_PRESP: An array of offsets (u16) to the channel
++ *    switch counters in the probe response (%NL80211_ATTR_PROBE_RESP).
   *
-  * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver
-  *    the necessary information for supporting GTK rekey offload. This
-@@ -526,6 +532,12 @@
-  *    of PMKSA caching dandidates.
+  * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.
+  *    As specified in the &enum nl80211_rxmgmt_flags.
+@@ -1555,6 +1569,31 @@ enum nl80211_commands {
+  *    data is in the format defined for the payload of the QoS Map Set element
+  *    in IEEE Std 802.11-2012, 8.4.2.97.
   *
-  * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup).
-+ *    In addition, this can be used as an event to request userspace to take
-+ *    actions on TDLS links (set up a new link or tear down an existing one).
-+ *    In such events, %NL80211_ATTR_TDLS_OPERATION indicates the requested
-+ *    operation, %NL80211_ATTR_MAC contains the peer MAC address, and
-+ *    %NL80211_ATTR_REASON_CODE the reason code to be used (only with
-+ *    %NL80211_TDLS_TEARDOWN).
-  * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame.
-  *
-  * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP
-@@ -562,8 +574,42 @@
-  *
-  * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels
-  *    independently of the userspace SME, send this event indicating
-- *    %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with
-- *    %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
-+ *    %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the
-+ *    attributes determining channel width.
-+ *
-+ * @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.
-+ *
-+ * @NL80211_CMD_CONN_FAILED: connection request to an AP failed; used to
-+ *    notify userspace that AP has rejected the connection request from a
-+ *    station, due to particular reason. %NL80211_ATTR_CONN_FAILED_REASON
-+ *    is used for this.
-+ *
-+ * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames
-+ *    for IBSS or MESH vif.
++ * @NL80211_ATTR_MAC_HINT: MAC address recommendation as initial BSS
++ * @NL80211_ATTR_WIPHY_FREQ_HINT: frequency of the recommended initial BSS
 + *
-+ * @NL80211_CMD_SET_MAC_ACL: sets ACL for MAC address based access control.
-+ *    This is to be used with the drivers advertising the support of MAC
-+ *    address based access control. List of MAC addresses is passed in
-+ *    %NL80211_ATTR_MAC_ADDRS and ACL policy is passed in
-+ *    %NL80211_ATTR_ACL_POLICY. Driver will enable ACL with this list, if it
-+ *    is not already done. The new list will replace any existing list. Driver
-+ *    will clear its ACL when the list of MAC addresses passed is empty. This
-+ *    command is used in AP/P2P GO mode. Driver has to make sure to clear its
-+ *    ACL list during %NL80211_CMD_STOP_AP.
-+ *
-+ * @NL80211_CMD_RADAR_DETECT: Start a Channel availability check (CAC). Once
-+ *    a radar is detected or the channel availability scan (CAC) has finished
-+ *    or was aborted, or a radar was detected, usermode will be notified with
-+ *    this event. This command is also used to notify userspace about radars
-+ *    while operating on this channel.
-+ *    %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
-+ *    event.
-  *
-  * @NL80211_CMD_MAX: highest used command number
-  * @__NL80211_CMD_AFTER_LAST: internal use
-@@ -708,6 +754,17 @@ enum nl80211_commands {
-       NL80211_CMD_CH_SWITCH_NOTIFY,
-+      NL80211_CMD_START_P2P_DEVICE,
-+      NL80211_CMD_STOP_P2P_DEVICE,
-+
-+      NL80211_CMD_CONN_FAILED,
-+
-+      NL80211_CMD_SET_MCAST_RATE,
-+
-+      NL80211_CMD_SET_MAC_ACL,
-+
-+      NL80211_CMD_RADAR_DETECT,
-+
-       /* add new commands above here */
-       /* used to define NL80211_CMD_MAX below */
-@@ -744,14 +801,26 @@ enum nl80211_commands {
-  *    /sys/class/ieee80211/<phyname>/index
-  * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
-  * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
-- * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
-+ * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz,
-+ *    defines the channel together with the (deprecated)
-+ *    %NL80211_ATTR_WIPHY_CHANNEL_TYPE attribute or the attributes
-+ *    %NL80211_ATTR_CHANNEL_WIDTH and if needed %NL80211_ATTR_CENTER_FREQ1
-+ *    and %NL80211_ATTR_CENTER_FREQ2
-+ * @NL80211_ATTR_CHANNEL_WIDTH: u32 attribute containing one of the values
-+ *    of &enum nl80211_chan_width, describing the channel width. See the
-+ *    documentation of the enum for more information.
-+ * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the
-+ *    channel, used for anything but 20 MHz bandwidth
-+ * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the
-+ *    channel, used only for 80+80 MHz bandwidth
-  * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
-- *    if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
-+ *    if HT20 or HT40 are to be used (i.e., HT disabled if not included):
-  *    NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
-  *            this attribute)
-  *    NL80211_CHAN_HT20 = HT20 only
-  *    NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
-  *    NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
-+ *    This attribute is now deprecated.
-  * @NL80211_ATTR_WIPHY_RETRY_SHORT: TX retry limit for frames whose length is
-  *    less than or equal to the RTS threshold; allowed range: 1..255;
-  *    dot11ShortRetryLimit; u8
-@@ -918,7 +987,7 @@ enum nl80211_commands {
-  * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
-  *    used for the association (&enum nl80211_mfp, represented as a u32);
-  *    this attribute can be used
-- *    with %NL80211_CMD_ASSOCIATE request
-+ *    with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests
-  *
-  * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
-  *    &struct nl80211_sta_flag_update.
-@@ -1251,6 +1320,54 @@ enum nl80211_commands {
-  *    was used to provide the hint. For the different types of
-  *    allowed user regulatory hints see nl80211_user_reg_hint_type.
-  *
-+ * @NL80211_ATTR_CONN_FAILED_REASON: The reason for which AP has rejected
-+ *    the connection request from a station. nl80211_connect_failed_reason
-+ *    enum has different reasons of connection failure.
++ * @NL80211_ATTR_MAX_AP_ASSOC_STA: Device attribute that indicates how many
++ *    associated stations are supported in AP mode (including P2P GO); u32.
++ *    Since drivers may not have a fixed limit on the maximum number (e.g.,
++ *    other concurrent operations may affect this), drivers are allowed to
++ *    advertise values that cannot always be met. In such cases, an attempt
++ *    to add a new station entry with @NL80211_CMD_NEW_STATION may fail.
 + *
-+ * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
-+ *    with the Authentication transaction sequence number field.
++ * @NL80211_ATTR_CSA_C_OFFSETS_TX: An array of csa counter offsets (u16) which
++ *    should be updated when the frame is transmitted.
++ * @NL80211_ATTR_MAX_CSA_COUNTERS: U8 attribute used to advertise the maximum
++ *    supported number of csa counters.
 + *
-+ * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
-+ *    association request when used with NL80211_CMD_NEW_STATION)
++ * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
++ *    As specified in the &enum nl80211_tdls_peer_capability.
 + *
-+ * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32)
++ * @NL80211_ATTR_IFACE_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
 + *
-+ * @NL80211_ATTR_P2P_CTWINDOW: P2P GO Client Traffic Window (u8), used with
-+ *    the START_AP and SET_BSS commands
-+ * @NL80211_ATTR_P2P_OPPPS: P2P GO opportunistic PS (u8), used with the
-+ *    START_AP and SET_BSS commands. This can have the values 0 or 1;
-+ *    if not given in START_AP 0 is assumed, if not given in SET_BSS
-+ *    no change is made.
-+ *
-+ * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
-+ *    defined in &enum nl80211_mesh_power_mode.
-+ *
-+ * @NL80211_ATTR_ACL_POLICY: ACL policy, see &enum nl80211_acl_policy,
-+ *    carried in a u32 attribute
-+ *
-+ * @NL80211_ATTR_MAC_ADDRS: Array of nested MAC addresses, used for
-+ *    MAC ACL.
-+ *
-+ * @NL80211_ATTR_MAC_ACL_MAX: u32 attribute to advertise the maximum
-+ *    number of MAC addresses that a device can support for MAC
-+ *    ACL.
-+ *
-+ * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace,
-+ *    contains a value of enum nl80211_radar_event (u32).
-+ *
-+ * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver
-+ *    has and handles. The format is the same as the IE contents. See
-+ *    802.11-2012 8.4.2.29 for more information.
-+ * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver
-+ *    has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields.
-+ *
-+ * @NL80211_ATTR_STA_CAPABILITY: Station capabilities (u16) are advertised to
-+ *    the driver, e.g., to enable TDLS power save (PU-APSD).
-+ *
-+ * @NL80211_ATTR_STA_EXT_CAPABILITY: Station extended capabilities are
-+ *    advertised to the driver, e.g., to enable TDLS off channel operations
-+ *    and PU-APSD.
++ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
++ *    transmit power to stay within regulatory limits. u32, dBi.
 + *
   * @NL80211_ATTR_MAX: highest attribute number currently defined
   * @__NL80211_ATTR_AFTER_LAST: internal use
   */
-@@ -1506,6 +1623,39 @@ enum nl80211_attrs {
+@@ -1883,6 +1922,20 @@ enum nl80211_attrs {
  
-       NL80211_ATTR_USER_REG_HINT_TYPE,
+       NL80211_ATTR_QOS_MAP,
  
-+      NL80211_ATTR_CONN_FAILED_REASON,
-+
-+      NL80211_ATTR_SAE_DATA,
-+
-+      NL80211_ATTR_VHT_CAPABILITY,
-+
-+      NL80211_ATTR_SCAN_FLAGS,
-+
-+      NL80211_ATTR_CHANNEL_WIDTH,
-+      NL80211_ATTR_CENTER_FREQ1,
-+      NL80211_ATTR_CENTER_FREQ2,
-+
-+      NL80211_ATTR_P2P_CTWINDOW,
-+      NL80211_ATTR_P2P_OPPPS,
-+
-+      NL80211_ATTR_LOCAL_MESH_POWER_MODE,
-+
-+      NL80211_ATTR_ACL_POLICY,
-+
-+      NL80211_ATTR_MAC_ADDRS,
++      NL80211_ATTR_MAC_HINT,
++      NL80211_ATTR_WIPHY_FREQ_HINT,
 +
-+      NL80211_ATTR_MAC_ACL_MAX,
++      NL80211_ATTR_MAX_AP_ASSOC_STA,
 +
-+      NL80211_ATTR_RADAR_EVENT,
++      NL80211_ATTR_TDLS_PEER_CAPABILITY,
 +
-+      NL80211_ATTR_EXT_CAPA,
-+      NL80211_ATTR_EXT_CAPA_MASK,
++      NL80211_ATTR_IFACE_SOCKET_OWNER,
 +
-+      NL80211_ATTR_STA_CAPABILITY,
-+      NL80211_ATTR_STA_EXT_CAPABILITY,
++      NL80211_ATTR_CSA_C_OFFSETS_TX,
++      NL80211_ATTR_MAX_CSA_COUNTERS,
 +
 +      NL80211_ATTR_WIPHY_ANTENNA_GAIN,
 +
        /* add attributes here, update the policy in nl80211.c */
  
        __NL80211_ATTR_AFTER_LAST,
-@@ -1549,6 +1699,7 @@ enum nl80211_attrs {
- #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY   16
- #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY   24
- #define NL80211_HT_CAPABILITY_LEN             26
-+#define NL80211_VHT_CAPABILITY_LEN            12
- #define NL80211_MAX_NR_CIPHER_SUITES          5
- #define NL80211_MAX_NR_AKM_SUITES             2
-@@ -1575,6 +1726,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 +1748,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,
-@@ -1617,6 +1773,9 @@ enum nl80211_iftype {
-  *    flag can't be changed, it is only valid while adding a station, and
-  *    attempts to change it will silently be ignored (rather than rejected
-  *    as errors.)
-+ * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers
-+ *    that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a
-+ *    previously added station into associated state
-  * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
-  * @__NL80211_STA_FLAG_AFTER_LAST: internal use
-  */
-@@ -1628,6 +1787,7 @@ enum nl80211_sta_flags {
-       NL80211_STA_FLAG_MFP,
-       NL80211_STA_FLAG_AUTHENTICATED,
-       NL80211_STA_FLAG_TDLS_PEER,
-+      NL80211_STA_FLAG_ASSOCIATED,
-       /* keep last */
-       __NL80211_STA_FLAG_AFTER_LAST,
-@@ -1664,10 +1824,15 @@ struct nl80211_sta_flag_update {
-  * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved
-  * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s)
-  * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8)
-- * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate
-+ * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 MHz dualchannel bitrate
-  * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval
-  * @NL80211_RATE_INFO_BITRATE32: total bitrate (u32, 100kbit/s)
-  * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined
-+ * @NL80211_RATE_INFO_VHT_MCS: MCS index for VHT (u8)
-+ * @NL80211_RATE_INFO_VHT_NSS: number of streams in VHT (u8)
-+ * @NL80211_RATE_INFO_80_MHZ_WIDTH: 80 MHz VHT rate
-+ * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: 80+80 MHz VHT rate
-+ * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate
-  * @__NL80211_RATE_INFO_AFTER_LAST: internal use
-  */
- enum nl80211_rate_info {
-@@ -1677,6 +1842,11 @@ enum nl80211_rate_info {
-       NL80211_RATE_INFO_40_MHZ_WIDTH,
-       NL80211_RATE_INFO_SHORT_GI,
-       NL80211_RATE_INFO_BITRATE32,
-+      NL80211_RATE_INFO_VHT_MCS,
-+      NL80211_RATE_INFO_VHT_NSS,
-+      NL80211_RATE_INFO_80_MHZ_WIDTH,
-+      NL80211_RATE_INFO_80P80_MHZ_WIDTH,
-+      NL80211_RATE_INFO_160_MHZ_WIDTH,
-       /* keep last */
-       __NL80211_RATE_INFO_AFTER_LAST,
-@@ -1723,6 +1893,8 @@ enum nl80211_sta_bss_param {
-  * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
-  * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
-  * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
-+ * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station)
-+ * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station)
-  * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
-  * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
-  *    containing info as possible, see &enum nl80211_rate_info
-@@ -1744,6 +1916,12 @@ 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_LOCAL_PM: local mesh STA link-specific power mode
-+ * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
-+ * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
-+ *    non-peer STA
-+ * @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
-  */
-@@ -1768,6 +1946,13 @@ enum nl80211_sta_info {
-       NL80211_STA_INFO_STA_FLAGS,
-       NL80211_STA_INFO_BEACON_LOSS,
-       NL80211_STA_INFO_T_OFFSET,
-+      NL80211_STA_INFO_LOCAL_PM,
-+      NL80211_STA_INFO_PEER_PM,
-+      NL80211_STA_INFO_NONPEER_PM,
-+      NL80211_STA_INFO_RX_BYTES64,
-+      NL80211_STA_INFO_TX_BYTES64,
-+      NL80211_STA_INFO_CHAIN_SIGNAL,
-+      NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
-       /* keep last */
-       __NL80211_STA_INFO_AFTER_LAST,
-@@ -1877,6 +2062,20 @@ enum nl80211_band_attr {
-  *    on this channel in current regulatory domain.
-  * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
-  *    (100 * dBm).
-+ * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS
-+ *    (enum nl80211_dfs_state)
-+ * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long
-+ *    this channel is in this DFS state.
-+ * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this
-+ *    channel as the control channel
-+ * @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this
-+ *    channel as the control channel
-+ * @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel
-+ *    as the primary or any of the secondary channels isn't possible,
-+ *    this includes 80+80 channels
-+ * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
-+ *    using this channel as the primary or any of the secondary channels
-+ *    isn't possible
+@@ -2304,9 +2357,35 @@ enum nl80211_band_attr {
+  * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
+  *    using this channel as the primary or any of the secondary channels
+  *    isn't possible
++ * @NL80211_FREQUENCY_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
++ * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Only indoor use is permitted on this
++ *    channel. A channel that has the INDOOR_ONLY attribute can only be
++ *    used when there is a clear assessment that the device is operating in
++ *    an indoor surroundings, i.e., it is connected to AC power (and not
++ *    through portable DC inverters) or is under the control of a master
++ *    that is acting as an AP and is connected to AC power.
++ * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
++ *    channel if it's connected concurrently to a BSS on the same channel on
++ *    the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
++ *    band), and IEEE80211_CHAN_RADAR is not set. Instantiating a GO on a
++ *    channel that has the GO_CONCURRENT attribute set can be done when there
++ *    is a clear assessment that the device is operating under the guidance of
++ *    an authorized master, i.e., setting up a GO while the device is also
++ *    connected to an AP with DFS and radar detection on the UNII band (it is
++ *    up to user-space, i.e., wpa_supplicant to perform the required
++ *    verifications)
++ * @NL80211_FREQUENCY_ATTR_NO_20MHZ: 20 MHz operation is not allowed
++ *    on this channel in current regulatory domain.
++ * @NL80211_FREQUENCY_ATTR_NO_10MHZ: 10 MHz operation is not allowed
++ *    on this channel in current regulatory domain.
   * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
   *    currently defined
   * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
-@@ -1889,6 +2088,12 @@ enum nl80211_frequency_attr {
-       NL80211_FREQUENCY_ATTR_NO_IBSS,
-       NL80211_FREQUENCY_ATTR_RADAR,
-       NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
-+      NL80211_FREQUENCY_ATTR_DFS_STATE,
-+      NL80211_FREQUENCY_ATTR_DFS_TIME,
-+      NL80211_FREQUENCY_ATTR_NO_HT40_MINUS,
-+      NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
-+      NL80211_FREQUENCY_ATTR_NO_80MHZ,
-+      NL80211_FREQUENCY_ATTR_NO_160MHZ,
-       /* keep last */
-       __NL80211_FREQUENCY_ATTR_AFTER_LAST,
-@@ -2159,6 +2364,34 @@ enum nl80211_mntr_flags {
- };
- /**
-+ * enum nl80211_mesh_power_mode - mesh power save modes
-+ *
-+ * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is
-+ *    not known or has not been set yet.
-+ * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is
-+ *    in Awake state all the time.
-+ * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will
-+ *    alternate between Active and Doze states, but will wake up for
-+ *    neighbor's beacons.
-+ * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will
-+ *    alternate between Active and Doze states, but may not wake up
-+ *    for neighbor's beacons.
-+ *
-+ * @__NL80211_MESH_POWER_AFTER_LAST - internal use
-+ * @NL80211_MESH_POWER_MAX - highest possible power save level
-+ */
-+
-+enum nl80211_mesh_power_mode {
-+      NL80211_MESH_POWER_UNKNOWN,
-+      NL80211_MESH_POWER_ACTIVE,
-+      NL80211_MESH_POWER_LIGHT_SLEEP,
-+      NL80211_MESH_POWER_DEEP_SLEEP,
-+
-+      __NL80211_MESH_POWER_AFTER_LAST,
-+      NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
-+};
-+
-+/**
-  * enum nl80211_meshconf_params - mesh configuration parameters
-  *
-  * Mesh configuration parameters. These can be changed while the mesh is
-@@ -2252,6 +2485,11 @@ enum nl80211_mntr_flags {
-  *    (in TUs) during which a mesh STA can send only one Action frame
-  *    containing a PREQ element for root path confirmation.
-  *
-+ * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links.
-+ *    type &enum nl80211_mesh_power_mode (u32)
 + *
-+ * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
-+ *
-  * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
++ * See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
++ * for more information on the FCC description of the relaxations allowed
++ * by NL80211_FREQUENCY_ATTR_INDOOR_ONLY and
++ * NL80211_FREQUENCY_ATTR_GO_CONCURRENT.
   */
- enum nl80211_meshconf_params {
-@@ -2281,6 +2519,8 @@ enum nl80211_meshconf_params {
-       NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
-       NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
-       NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
-+      NL80211_MESHCONF_POWER_MODE,
-+      NL80211_MESHCONF_AWAKE_WINDOW,
+ enum nl80211_frequency_attr {
+       __NL80211_FREQUENCY_ATTR_INVALID,
+@@ -2322,6 +2401,11 @@ enum nl80211_frequency_attr {
+       NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
+       NL80211_FREQUENCY_ATTR_NO_80MHZ,
+       NL80211_FREQUENCY_ATTR_NO_160MHZ,
++      NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
++      NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
++      NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
++      NL80211_FREQUENCY_ATTR_NO_20MHZ,
++      NL80211_FREQUENCY_ATTR_NO_10MHZ,
  
        /* keep last */
-       __NL80211_MESHCONF_ATTR_AFTER_LAST,
-@@ -2385,6 +2625,15 @@ enum nl80211_ac {
- #define NL80211_TXQ_Q_BE      NL80211_AC_BE
- #define NL80211_TXQ_Q_BK      NL80211_AC_BK
-+/**
-+ * enum nl80211_channel_type - channel type
-+ * @NL80211_CHAN_NO_HT: 20 MHz, non-HT channel
-+ * @NL80211_CHAN_HT20: 20 MHz HT channel
-+ * @NL80211_CHAN_HT40MINUS: HT40 channel, secondary channel
-+ *    below the control channel
-+ * @NL80211_CHAN_HT40PLUS: HT40 channel, secondary channel
-+ *    above the control channel
-+ */
- enum nl80211_channel_type {
-       NL80211_CHAN_NO_HT,
-       NL80211_CHAN_HT20,
-@@ -2393,6 +2642,32 @@ enum nl80211_channel_type {
- };
+       __NL80211_FREQUENCY_ATTR_AFTER_LAST,
+@@ -2412,12 +2496,14 @@ enum nl80211_reg_type {
+  *    in KHz. This is not a center a frequency but an actual regulatory
+  *    band edge.
+  * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
+- *    frequency range, in KHz.
++ *    frequency range, in KHz.
+  * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
+  *    for a given frequency range. The value is in mBi (100 * dBi).
+  *    If you don't have one then don't send this.
+  * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
+  *    a given frequency range. The value is in mBm (100 * dBm).
++ * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
++ *    If not present or 0 default CAC time will be used.
+  * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number
+  *    currently defined
+  * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use
+@@ -2433,6 +2519,8 @@ enum nl80211_reg_rule_attr {
+       NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN,
+       NL80211_ATTR_POWER_RULE_MAX_EIRP,
  
- /**
-+ * enum nl80211_chan_width - channel width definitions
-+ *
-+ * These values are used with the %NL80211_ATTR_CHANNEL_WIDTH
-+ * attribute.
-+ *
-+ * @NL80211_CHAN_WIDTH_20_NOHT: 20 MHz, non-HT channel
-+ * @NL80211_CHAN_WIDTH_20: 20 MHz HT channel
-+ * @NL80211_CHAN_WIDTH_40: 40 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
-+ *    attribute must be provided as well
-+ * @NL80211_CHAN_WIDTH_80: 80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
-+ *    attribute must be provided as well
-+ * @NL80211_CHAN_WIDTH_80P80: 80+80 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
-+ *    and %NL80211_ATTR_CENTER_FREQ2 attributes must be provided as well
-+ * @NL80211_CHAN_WIDTH_160: 160 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
-+ *    attribute must be provided as well
-+ */
-+enum nl80211_chan_width {
-+      NL80211_CHAN_WIDTH_20_NOHT,
-+      NL80211_CHAN_WIDTH_20,
-+      NL80211_CHAN_WIDTH_40,
-+      NL80211_CHAN_WIDTH_80,
-+      NL80211_CHAN_WIDTH_80P80,
-+      NL80211_CHAN_WIDTH_160,
-+};
++      NL80211_ATTR_DFS_CAC_TIME,
 +
-+/**
-  * enum nl80211_bss - netlink attributes for a BSS
-  *
-  * @__NL80211_BSS_INVALID: invalid
-@@ -2460,6 +2735,7 @@ enum nl80211_bss_status {
-  * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
-  * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
-  * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
-+ * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals
-  * @__NL80211_AUTHTYPE_NUM: internal
-  * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
-  * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
-@@ -2471,6 +2747,7 @@ enum nl80211_auth_type {
-       NL80211_AUTHTYPE_SHARED_KEY,
-       NL80211_AUTHTYPE_FT,
-       NL80211_AUTHTYPE_NETWORK_EAP,
-+      NL80211_AUTHTYPE_SAE,
        /* keep last */
-       __NL80211_AUTHTYPE_NUM,
-@@ -2689,10 +2966,12 @@ enum nl80211_tx_power_setting {
-  *    corresponds to the lowest-order bit in the second byte of the mask.
-  *    For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where
-  *    xx indicates "don't care") would be represented by a pattern of
-- *    twelve zero bytes, and a mask of "0xed,0x07".
-+ *    twelve zero bytes, and a mask of "0xed,0x01".
-  *    Note that the pattern matching is done as though frames were not
-  *    802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
-  *    first (including SNAP header unpacking) and then matched.
-+ * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
-+ *    these fixed number of bytes of received packet
-  * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
-  * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
+       __NL80211_REG_RULE_ATTR_AFTER_LAST,
+       NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1
+@@ -2442,9 +2530,15 @@ 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.
++ *    only report BSS with matching SSID.
+  * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a
+- *    BSS in scan results. Filtering is turned off if not specified.
++ *    BSS in scan results. Filtering is turned off if not specified. Note that
++ *    if this attribute is in a match set of its own, then it is treated as
++ *    the default value for all matchsets with an SSID, rather than being a
++ *    matchset of its own without an RSSI filter. This is due to problems with
++ *    how this API was implemented in the past. Also, due to the same problem,
++ *    the only way to create a matchset with only an RSSI filter (with this
++ *    attribute) is if there's only a single matchset with the RSSI attribute.
+  * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
+  *    attribute number currently defined
+  * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
+@@ -2477,6 +2571,9 @@ enum nl80211_sched_scan_match_attr {
+  * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
+  *    this includes probe requests or modes of operation that require
+  *    beaconing.
++ * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
++ *    base on contiguous rules and wider channels will be allowed to cross
++ *    multiple contiguous/overlapping frequency ranges.
   */
-@@ -2700,6 +2979,7 @@ enum nl80211_wowlan_packet_pattern_attr 
-       __NL80211_WOWLAN_PKTPAT_INVALID,
-       NL80211_WOWLAN_PKTPAT_MASK,
-       NL80211_WOWLAN_PKTPAT_PATTERN,
-+      NL80211_WOWLAN_PKTPAT_OFFSET,
+ enum nl80211_reg_rule_flags {
+       NL80211_RRF_NO_OFDM             = 1<<0,
+@@ -2488,6 +2585,7 @@ enum nl80211_reg_rule_flags {
+       NL80211_RRF_PTMP_ONLY           = 1<<6,
+       NL80211_RRF_NO_IR               = 1<<7,
+       __NL80211_RRF_NO_IBSS           = 1<<8,
++      NL80211_RRF_AUTO_BW             = 1<<11,
+ };
  
-       NUM_NL80211_WOWLAN_PKTPAT,
-       MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
-@@ -2710,6 +2990,7 @@ enum nl80211_wowlan_packet_pattern_attr 
-  * @max_patterns: maximum number of patterns supported
-  * @min_pattern_len: minimum length of each pattern
-  * @max_pattern_len: maximum length of each pattern
-+ * @max_pkt_offset: maximum Rx packet offset
-  *
-  * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
-  * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
-@@ -2719,6 +3000,7 @@ struct nl80211_wowlan_pattern_support {
-       __u32 max_patterns;
-       __u32 min_pattern_len;
-       __u32 max_pattern_len;
-+      __u32 max_pkt_offset;
- } __attribute__((packed));
+ #define NL80211_RRF_PASSIVE_SCAN      NL80211_RRF_NO_IR
+@@ -2526,10 +2624,13 @@ enum nl80211_dfs_regions {
+  *    present has been registered with the wireless core that
+  *    has listed NL80211_FEATURE_CELL_BASE_REG_HINTS as a
+  *    supported feature.
++ * @NL80211_USER_REG_HINT_INDOOR: a user sent an hint indicating that the
++ *    platform is operating in an indoor environment.
+  */
+ enum nl80211_user_reg_hint_type {
+       NL80211_USER_REG_HINT_USER      = 0,
+       NL80211_USER_REG_HINT_CELL_BASE = 1,
++      NL80211_USER_REG_HINT_INDOOR    = 2,
+ };
  
  /**
-@@ -2734,12 +3016,17 @@ struct nl80211_wowlan_pattern_support {
-  * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns
-  *    which are passed in an array of nested attributes, each nested attribute
-  *    defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern.
-- *    Each pattern defines a wakeup packet. The matching is done on the MSDU,
-- *    i.e. as though the packet was an 802.3 packet, so the pattern matching
-- *    is done after the packet is converted to the MSDU.
-+ *    Each pattern defines a wakeup packet. Packet offset is associated with
-+ *    each pattern which is used while matching the pattern. The matching is
-+ *    done on the MSDU, i.e. as though the packet was an 802.3 packet, so the
-+ *    pattern matching is done after the packet is converted to the MSDU.
-  *
-  *    In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
-  *    carrying a &struct nl80211_wowlan_pattern_support.
-+ *
-+ *    When reporting wakeup. it is a u32 attribute containing the 0-based
-+ *    index of the pattern that caused the wakeup, in the patterns passed
-+ *    to the kernel when configuring.
-  * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be
-  *    used when setting, used only to indicate that GTK rekeying is supported
-  *    by the device (flag)
-@@ -2750,8 +3037,36 @@ struct nl80211_wowlan_pattern_support {
-  * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag)
-  * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released
-  *    (on devices that have rfkill in the device) (flag)
-+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains
-+ *    the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame
-+ *    may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN
-+ *    attribute contains the original length.
-+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11
-+ *    packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211
-+ *    attribute if the packet was truncated somewhere.
-+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the
-+ *    802.11 packet that caused the wakeup, e.g. a magic packet. The frame may
-+ *    be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute
-+ *    contains the original length.
-+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3
-+ *    packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023
-+ *    attribute if the packet was truncated somewhere.
-+ * @NL80211_WOWLAN_TRIG_TCP_CONNECTION: TCP connection wake, see DOC section
-+ *    "TCP connection wakeup" for more details. This is a nested attribute
-+ *    containing the exact information for establishing and keeping alive
-+ *    the TCP connection.
-+ * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the
-+ *    wakeup packet was received on the TCP connection
-+ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the
-+ *    TCP connection was lost or failed to be established
-+ * @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
-  * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
-  * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
-+ *
-+ * These nested attributes are used to configure the wakeup triggers and
-+ * to report the wakeup reason(s).
+@@ -3131,6 +3232,7 @@ enum nl80211_key_attributes {
+  *    in an array of MCS numbers.
+  * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
+  *    see &struct nl80211_txrate_vht
++ * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi
+  * @__NL80211_TXRATE_AFTER_LAST: internal
+  * @NL80211_TXRATE_MAX: highest TX rate attribute
   */
- enum nl80211_wowlan_triggers {
-       __NL80211_WOWLAN_TRIG_INVALID,
-@@ -2764,6 +3079,14 @@ enum nl80211_wowlan_triggers {
-       NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
-       NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
-       NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
-+      NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211,
-+      NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN,
-+      NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023,
-+      NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN,
-+      NL80211_WOWLAN_TRIG_TCP_CONNECTION,
-+      NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH,
-+      NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST,
-+      NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
+@@ -3139,6 +3241,7 @@ enum nl80211_tx_rate_attributes {
+       NL80211_TXRATE_LEGACY,
+       NL80211_TXRATE_HT,
+       NL80211_TXRATE_VHT,
++      NL80211_TXRATE_GI,
  
        /* keep last */
-       NUM_NL80211_WOWLAN_TRIG,
-@@ -2771,6 +3094,116 @@ enum nl80211_wowlan_triggers {
+       __NL80211_TXRATE_AFTER_LAST,
+@@ -3156,6 +3259,12 @@ struct nl80211_txrate_vht {
+       __u16 mcs[NL80211_VHT_NSS_MAX];
  };
  
- /**
-+ * DOC: TCP connection wakeup
-+ *
-+ * Some devices can establish a TCP connection in order to be woken up by a
-+ * packet coming in from outside their network segment, or behind NAT. If
-+ * configured, the device will establish a TCP connection to the given
-+ * service, and periodically send data to that service. The first data
-+ * packet is usually transmitted after SYN/ACK, also ACKing the SYN/ACK.
-+ * The data packets can optionally include a (little endian) sequence
-+ * number (in the TCP payload!) that is generated by the device, and, also
-+ * optionally, a token from a list of tokens. This serves as a keep-alive
-+ * with the service, and for NATed connections, etc.
-+ *
-+ * During this keep-alive period, the server doesn't send any data to the
-+ * client. When receiving data, it is compared against the wakeup pattern
-+ * (and mask) and if it matches, the host is woken up. Similarly, if the
-+ * connection breaks or cannot be established to start with, the host is
-+ * also woken up.
-+ *
-+ * Developer's note: ARP offload is required for this, otherwise TCP
-+ * response packets might not go through correctly.
-+ */
-+
-+/**
-+ * struct nl80211_wowlan_tcp_data_seq - WoWLAN TCP data sequence
-+ * @start: starting value
-+ * @offset: offset of sequence number in packet
-+ * @len: length of the sequence value to write, 1 through 4
-+ *
-+ * Note: don't confuse with the TCP sequence number(s), this is for the
-+ * keepalive packet payload. The actual value is written into the packet
-+ * in little endian.
-+ */
-+struct nl80211_wowlan_tcp_data_seq {
-+      __u32 start, offset, len;
-+};
-+
-+/**
-+ * struct nl80211_wowlan_tcp_data_token - WoWLAN TCP data token config
-+ * @offset: offset of token in packet
-+ * @len: length of each token
-+ * @token_stream: stream of data to be used for the tokens, the length must
-+ *    be a multiple of @len for this to make sense
-+ */
-+struct nl80211_wowlan_tcp_data_token {
-+      __u32 offset, len;
-+      __u8 token_stream[];
++enum nl80211_txrate_gi {
++      NL80211_TXRATE_DEFAULT_GI,
++      NL80211_TXRATE_FORCE_SGI,
++      NL80211_TXRATE_FORCE_LGI,
 +};
 +
-+/**
-+ * struct nl80211_wowlan_tcp_data_token_feature - data token features
-+ * @min_len: minimum token length
-+ * @max_len: maximum token length
-+ * @bufsize: total available token buffer size (max size of @token_stream)
-+ */
-+struct nl80211_wowlan_tcp_data_token_feature {
-+      __u32 min_len, max_len, bufsize;
-+};
-+
-+/**
-+ * enum nl80211_wowlan_tcp_attrs - WoWLAN TCP connection parameters
-+ * @__NL80211_WOWLAN_TCP_INVALID: invalid number for nested attributes
-+ * @NL80211_WOWLAN_TCP_SRC_IPV4: source IPv4 address (in network byte order)
-+ * @NL80211_WOWLAN_TCP_DST_IPV4: destination IPv4 address
-+ *    (in network byte order)
-+ * @NL80211_WOWLAN_TCP_DST_MAC: destination MAC address, this is given because
-+ *    route lookup when configured might be invalid by the time we suspend,
-+ *    and doing a route lookup when suspending is no longer possible as it
-+ *    might require ARP querying.
-+ * @NL80211_WOWLAN_TCP_SRC_PORT: source port (u16); optional, if not given a
-+ *    socket and port will be allocated
-+ * @NL80211_WOWLAN_TCP_DST_PORT: destination port (u16)
-+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD: data packet payload, at least one byte.
-+ *    For feature advertising, a u32 attribute holding the maximum length
-+ *    of the data payload.
-+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ: data packet sequence configuration
-+ *    (if desired), a &struct nl80211_wowlan_tcp_data_seq. For feature
-+ *    advertising it is just a flag
-+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN: data packet token configuration,
-+ *    see &struct nl80211_wowlan_tcp_data_token and for advertising see
-+ *    &struct nl80211_wowlan_tcp_data_token_feature.
-+ * @NL80211_WOWLAN_TCP_DATA_INTERVAL: data interval in seconds, maximum
-+ *    interval in feature advertising (u32)
-+ * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
-+ *    u32 attribute holding the maximum length
-+ * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
-+ *    feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
-+ *    but on the TCP payload only.
-+ * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
-+ * @MAX_NL80211_WOWLAN_TCP: highest attribute number
-+ */
-+enum nl80211_wowlan_tcp_attrs {
-+      __NL80211_WOWLAN_TCP_INVALID,
-+      NL80211_WOWLAN_TCP_SRC_IPV4,
-+      NL80211_WOWLAN_TCP_DST_IPV4,
-+      NL80211_WOWLAN_TCP_DST_MAC,
-+      NL80211_WOWLAN_TCP_SRC_PORT,
-+      NL80211_WOWLAN_TCP_DST_PORT,
-+      NL80211_WOWLAN_TCP_DATA_PAYLOAD,
-+      NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ,
-+      NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN,
-+      NL80211_WOWLAN_TCP_DATA_INTERVAL,
-+      NL80211_WOWLAN_TCP_WAKE_PAYLOAD,
-+      NL80211_WOWLAN_TCP_WAKE_MASK,
-+
-+      /* keep last */
-+      NUM_NL80211_WOWLAN_TCP,
-+      MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
-+};
-+
-+/**
-  * enum nl80211_iface_limit_attrs - limit attributes
-  * @NL80211_IFACE_LIMIT_UNSPEC: (reserved)
-  * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that
-@@ -2806,6 +3239,8 @@ enum nl80211_iface_limit_attrs {
-  *    the infrastructure network's beacon interval.
-  * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many
+ /**
+  * enum nl80211_band - Frequency band
+  * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
+@@ -3595,6 +3704,8 @@ enum nl80211_iface_limit_attrs {
   *    different channels may be used within this group.
-+ * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
-+ *    of supported channel widths for radar detection.
+  * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
+  *    of supported channel widths for radar detection.
++ * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the bitmap
++ *    of supported regulatory regions for radar detection.
   * @NUM_NL80211_IFACE_COMB: number of attributes
   * @MAX_NL80211_IFACE_COMB: highest attribute number
   *
-@@ -2838,6 +3273,7 @@ enum nl80211_if_combination_attrs {
-       NL80211_IFACE_COMB_MAXNUM,
+@@ -3628,6 +3739,7 @@ enum nl80211_if_combination_attrs {
        NL80211_IFACE_COMB_STA_AP_BI_MATCH,
        NL80211_IFACE_COMB_NUM_CHANNELS,
-+      NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
+       NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
++      NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
  
        /* keep last */
        NUM_NL80211_IFACE_COMB,
-@@ -2994,12 +3430,56 @@ enum nl80211_ap_sme_features {
+@@ -3801,11 +3913,8 @@ 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.
-+ * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of
-+ *    equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station
-+ *    mode
-+ * @NL80211_FEATURE_LOW_PRIORITY_SCAN: This driver supports low priority scan
-+ * @NL80211_FEATURE_SCAN_FLUSH: Scan flush is supported
-+ * @NL80211_FEATURE_AP_SCAN: Support scanning using an AP vif
-+ * @NL80211_FEATURE_VIF_TXPOWER: The driver supports per-vif TX power setting
-+ * @NL80211_FEATURE_NEED_OBSS_SCAN: The driver expects userspace to perform
-+ *    OBSS scans and generate 20/40 BSS coex reports. This flag is used only
-+ *    for drivers implementing the CONNECT API, for AUTH/ASSOC it is implied.
-+ * @NL80211_FEATURE_P2P_GO_CTWIN: P2P GO implementation supports CT Window
-+ *    setting
-+ * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic
-+ *    powersave
-+ * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state
-+ *    transitions for AP clients. Without this flag (and if the driver
-+ *    doesn't have the AP SME in the device) the driver supports adding
-+ *    stations only when they're associated and adds them in associated
-+ *    state (to later be transitioned into authorized), with this flag
-+ *    they should be added before even sending the authentication reply
-+ *    and then transitioned into authenticated, associated and authorized
-+ *    states using station flags.
-+ *    Note that even for drivers that support this, the default is to add
-+ *    stations in authenticated/associated state, so to add unauthenticated
-+ *    stations the authenticated/associated bits have to be set in the mask.
-+ * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
-+ *    (HT40, VHT 80/160 MHz) if this flag is set
+- * @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.
++ * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: (no longer available, only
++ *    here to reserve the value for API/ABI compatibility)
+  * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of
+  *    equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station
+  *    mode
+@@ -3841,6 +3950,9 @@ enum nl80211_ap_sme_features {
+  *    interface. An active monitor interface behaves like a normal monitor
+  *    interface, but gets added to the driver. It ensures that incoming
+  *    unicast packets directed at the configured interface address get ACKed.
++ * @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic
++ *    channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the
++ *    lifetime of a BSS.
   */
  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_FEATURE_SAE                             = 1 << 5,
-+      NL80211_FEATURE_LOW_PRIORITY_SCAN               = 1 << 6,
-+      NL80211_FEATURE_SCAN_FLUSH                      = 1 << 7,
-+      NL80211_FEATURE_AP_SCAN                         = 1 << 8,
-+      NL80211_FEATURE_VIF_TXPOWER                     = 1 << 9,
-+      NL80211_FEATURE_NEED_OBSS_SCAN                  = 1 << 10,
-+      NL80211_FEATURE_P2P_GO_CTWIN                    = 1 << 11,
-+      NL80211_FEATURE_P2P_GO_OPPPS                    = 1 << 12,
-+      /* bit 13 is reserved */
-+      NL80211_FEATURE_ADVERTISE_CHAN_LIMITS           = 1 << 14,
-+      NL80211_FEATURE_FULL_AP_CLIENT_STATE            = 1 << 15,
+       NL80211_FEATURE_SK_TX_STATUS                    = 1 << 0,
+@@ -3861,6 +3973,7 @@ enum nl80211_feature_flags {
+       NL80211_FEATURE_FULL_AP_CLIENT_STATE            = 1 << 15,
+       NL80211_FEATURE_USERSPACE_MPM                   = 1 << 16,
+       NL80211_FEATURE_ACTIVE_MONITOR                  = 1 << 17,
++      NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE       = 1 << 18,
  };
  
  /**
-@@ -3023,4 +3503,94 @@ enum nl80211_probe_resp_offload_support_
-       NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U =     1<<3,
+@@ -4037,4 +4150,20 @@ struct nl80211_vendor_cmd_info {
+       __u32 subcmd;
  };
  
 +/**
-+ * enum nl80211_connect_failed_reason - connection request failed reasons
-+ * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be
-+ *    handled by the AP is reached.
-+ * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Connection request is rejected due to ACL.
-+ */
-+enum nl80211_connect_failed_reason {
-+      NL80211_CONN_FAIL_MAX_CLIENTS,
-+      NL80211_CONN_FAIL_BLOCKED_CLIENT,
-+};
-+
-+/**
-+ * enum nl80211_scan_flags -  scan request control flags
-+ *
-+ * Scan request control flags are used to control the handling
-+ * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN
-+ * requests.
-+ *
-+ * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority
-+ * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning
-+ * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured
-+ *    as AP and the beaconing has already been configured. This attribute is
-+ *    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
-+ */
-+enum nl80211_scan_flags {
-+      NL80211_SCAN_FLAG_LOW_PRIORITY                  = 1<<0,
-+      NL80211_SCAN_FLAG_FLUSH                         = 1<<1,
-+      NL80211_SCAN_FLAG_AP                            = 1<<2,
-+};
-+
-+/**
-+ * enum nl80211_acl_policy - access control policy
-+ *
-+ * Access control policy is applied on a MAC list set by
-+ * %NL80211_CMD_START_AP and %NL80211_CMD_SET_MAC_ACL, to
-+ * be used with %NL80211_ATTR_ACL_POLICY.
-+ *
-+ * @NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED: Deny stations which are
-+ *    listed in ACL, i.e. allow all the stations which are not listed
-+ *    in ACL to authenticate.
-+ * @NL80211_ACL_POLICY_DENY_UNLESS_LISTED: Allow the stations which are listed
-+ *    in ACL, i.e. deny all the stations which are not listed in ACL.
-+ */
-+enum nl80211_acl_policy {
-+      NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
-+      NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
-+};
-+
-+/**
-+ * enum nl80211_radar_event - type of radar event for DFS operation
-+ *
-+ * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace
-+ * about detected radars or success of the channel available check (CAC)
-+ *
-+ * @NL80211_RADAR_DETECTED: A radar pattern has been detected. The channel is
-+ *    now unusable.
-+ * @NL80211_RADAR_CAC_FINISHED: Channel Availability Check has been finished,
-+ *    the channel is now available.
-+ * @NL80211_RADAR_CAC_ABORTED: Channel Availability Check has been aborted, no
-+ *    change to the channel status.
-+ * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is
-+ *    over, channel becomes usable.
-+ */
-+enum nl80211_radar_event {
-+      NL80211_RADAR_DETECTED,
-+      NL80211_RADAR_CAC_FINISHED,
-+      NL80211_RADAR_CAC_ABORTED,
-+      NL80211_RADAR_NOP_FINISHED,
-+};
-+
-+/**
-+ * enum nl80211_dfs_state - DFS states for channels
++ * enum nl80211_tdls_peer_capability - TDLS peer flags.
 + *
-+ * Channel states used by the DFS code.
++ * Used by tdls_mgmt() to determine which conditional elements need
++ * to be added to TDLS Setup frames.
 + *
-+ * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability
-+ *    check (CAC) must be performed before using it for AP or IBSS.
-+ * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it
-+ *    is therefore marked as not available.
-+ * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available.
++ * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
++ * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
++ * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
 + */
-+
-+enum nl80211_dfs_state {
-+      NL80211_DFS_USABLE,
-+      NL80211_DFS_UNAVAILABLE,
-+      NL80211_DFS_AVAILABLE,
++enum nl80211_tdls_peer_capability {
++      NL80211_TDLS_PEER_HT = 1<<0,
++      NL80211_TDLS_PEER_VHT = 1<<1,
++      NL80211_TDLS_PEER_WMM = 1<<2,
 +};
 +
  #endif /* __LINUX_NL80211_H */
diff --git a/package/iw/patches/100-rx_rate.patch b/package/iw/patches/100-rx_rate.patch
deleted file mode 100644 (file)
index 642b9f3..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
---- a/station.c
-+++ b/station.c
-@@ -29,13 +29,47 @@ enum plink_actions {
-       PLINK_ACTION_BLOCK,
- };
-+static void print_sta_bitrate(struct nlattr *nla, const char *name)
-+{
-+      struct nlattr *rinfo[NL80211_RATE_INFO_MAX + 1];
-+
-+      static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = {
-+              [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 },
-+              [NL80211_RATE_INFO_BITRATE32] = { .type = NLA_U32 },
-+              [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 },
-+              [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG },
-+              [NL80211_RATE_INFO_SHORT_GI] = { .type = NLA_FLAG },
-+      };
-+
-+      if (!nla)
-+              return;
-+
-+      if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX, nla, rate_policy)) {
-+              fprintf(stderr, "failed to parse nested rate attributes!\n");
-+      } else {
-+              int rate = 0;
-+              printf("\n\t%s:\t", name);
-+              if (rinfo[NL80211_RATE_INFO_BITRATE32])
-+                      rate = nla_get_u32(rinfo[NL80211_RATE_INFO_BITRATE32]);
-+              else if (rinfo[NL80211_RATE_INFO_BITRATE])
-+                      rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]);
-+              if (rate > 0)
-+                      printf("%d.%d MBit/s", rate / 10, rate % 10);
-+
-+              if (rinfo[NL80211_RATE_INFO_MCS])
-+                      printf(" MCS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_MCS]));
-+              if (rinfo[NL80211_RATE_INFO_40_MHZ_WIDTH])
-+                      printf(" 40Mhz");
-+              if (rinfo[NL80211_RATE_INFO_SHORT_GI])
-+                      printf(" short GI");
-+      }
-+}
- static int print_sta_handler(struct nl_msg *msg, void *arg)
- {
-       struct nlattr *tb[NL80211_ATTR_MAX + 1];
-       struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-       struct nlattr *sinfo[NL80211_STA_INFO_MAX + 1];
--      struct nlattr *rinfo[NL80211_RATE_INFO_MAX + 1];
-       char mac_addr[20], state_name[10], dev[20];
-       struct nl80211_sta_flag_update *sta_flags;
-       static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = {
-@@ -47,6 +81,7 @@ static int print_sta_handler(struct nl_m
-               [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
-               [NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 },
-               [NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
-+              [NL80211_STA_INFO_RX_BITRATE] = { .type = NLA_NESTED },
-               [NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
-               [NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
-               [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
-@@ -56,14 +91,6 @@ static int print_sta_handler(struct nl_m
-                       { .minlen = sizeof(struct nl80211_sta_flag_update) },
-       };
--      static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = {
--              [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 },
--              [NL80211_RATE_INFO_BITRATE32] = { .type = NLA_U32 },
--              [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 },
--              [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG },
--              [NL80211_RATE_INFO_SHORT_GI] = { .type = NLA_FLAG },
--      };
--
-       nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
-                 genlmsg_attrlen(gnlh, 0), NULL);
-@@ -119,28 +146,8 @@ static int print_sta_handler(struct nl_m
-               printf("\n\tToffset:\t%lld us",
-                       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]));
--      if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
--              if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,
--                                   sinfo[NL80211_STA_INFO_TX_BITRATE], rate_policy)) {
--                      fprintf(stderr, "failed to parse nested rate attributes!\n");
--              } else {
--                      int rate = 0;
--                      printf("\n\ttx bitrate:\t");
--                      if (rinfo[NL80211_RATE_INFO_BITRATE32])
--                              rate = nla_get_u32(rinfo[NL80211_RATE_INFO_BITRATE32]);
--                      else if (rinfo[NL80211_RATE_INFO_BITRATE])
--                              rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]);
--                      if (rate > 0)
--                              printf("%d.%d MBit/s", rate / 10, rate % 10);
--
--                      if (rinfo[NL80211_RATE_INFO_MCS])
--                              printf(" MCS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_MCS]));
--                      if (rinfo[NL80211_RATE_INFO_40_MHZ_WIDTH])
--                              printf(" 40Mhz");
--                      if (rinfo[NL80211_RATE_INFO_SHORT_GI])
--                              printf(" short GI");
--              }
--      }
-+      print_sta_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], "tx bitrate");
-+      print_sta_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE], "rx bitrate");
-       if (sinfo[NL80211_STA_INFO_LLID])
-               printf("\n\tmesh llid:\t%d",
diff --git a/package/iw/patches/110-per_chain_signal_strength.patch b/package/iw/patches/110-per_chain_signal_strength.patch
deleted file mode 100644 (file)
index 813a7d9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/station.c
-+++ b/station.c
-@@ -65,6 +65,33 @@ static void print_sta_bitrate(struct nla
-       }
- }
-+static char *get_chain_signal(struct nlattr *attr_list)
-+{
-+      struct nlattr *attr;
-+      static char buf[64];
-+      char *cur = buf;
-+      int i = 0, rem;
-+      const char *prefix;
-+
-+      if (!attr_list)
-+              return "";
-+
-+      nla_for_each_nested(attr, attr_list, rem) {
-+              if (i++ > 0)
-+                      prefix = ", ";
-+              else
-+                      prefix = "[";
-+
-+              cur += snprintf(cur, sizeof(buf) - (cur - buf), "%s%d", prefix,
-+                              (int8_t) nla_get_u8(attr));
-+      }
-+
-+      if (i)
-+              snprintf(cur, sizeof(buf) - (cur - buf), "] ");
-+
-+      return buf;
-+}
-+
- static int print_sta_handler(struct nl_msg *msg, void *arg)
- {
-       struct nlattr *tb[NL80211_ATTR_MAX + 1];
-@@ -89,7 +116,10 @@ static int print_sta_handler(struct nl_m
-               [NL80211_STA_INFO_TX_FAILED] = { .type = NLA_U32 },
-               [NL80211_STA_INFO_STA_FLAGS] =
-                       { .minlen = sizeof(struct nl80211_sta_flag_update) },
-+              [NL80211_STA_INFO_CHAIN_SIGNAL] = { .type = NLA_NESTED },
-+              [NL80211_STA_INFO_CHAIN_SIGNAL_AVG] = { .type = NLA_NESTED },
-       };
-+      char *chain;
-       nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
-                 genlmsg_attrlen(gnlh, 0), NULL);
-@@ -136,12 +166,19 @@ static int print_sta_handler(struct nl_m
-       if (sinfo[NL80211_STA_INFO_TX_FAILED])
-               printf("\n\ttx failed:\t%u",
-                       nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED]));
-+
-+      chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL]);
-       if (sinfo[NL80211_STA_INFO_SIGNAL])
--              printf("\n\tsignal:  \t%d dBm",
--                      (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
-+              printf("\n\tsignal:  \t%d %sdBm",
-+                      (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]),
-+                      chain);
-+
-+      chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL_AVG]);
-       if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
--              printf("\n\tsignal avg:\t%d dBm",
--                      (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
-+              printf("\n\tsignal avg:\t%d %sdBm",
-+                      (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]),
-+                      chain);
-+
-       if (sinfo[NL80211_STA_INFO_T_OFFSET])
-               printf("\n\tToffset:\t%lld us",
-                       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]));
diff --git a/package/iw/patches/120-antenna_gain.patch b/package/iw/patches/120-antenna_gain.patch
new file mode 100644 (file)
index 0000000..04316ab
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/phy.c
++++ b/phy.c
+@@ -424,3 +424,31 @@ COMMAND(set, antenna, "<bitmap> | all | 
+       NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna,
+       "Set a bitmap of allowed antennas to use for TX and RX.\n"
+       "The driver may reject antenna configurations it cannot support.");
++
++static int handle_antenna_gain(struct nl80211_state *state,
++                             struct nl_cb *cb,
++                             struct nl_msg *msg,
++                             int argc, char **argv,
++                             enum id_input id)
++{
++      char *endptr;
++      int dbm;
++
++      /* get the required args */
++      if (argc != 1)
++              return 1;
++
++      dbm = strtol(argv[0], &endptr, 10);
++      if (*endptr)
++              return 2;
++
++      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_GAIN, dbm);
++
++      return 0;
++
++ nla_put_failure:
++      return -ENOBUFS;
++}
++COMMAND(set, antenna_gain, "<antenna gain in dBm>",
++      NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna_gain,
++      "Specify antenna gain.");
diff --git a/package/iw/patches/120-tdls_peer_indentation.patch b/package/iw/patches/120-tdls_peer_indentation.patch
deleted file mode 100644 (file)
index 6836873..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/station.c
-+++ b/station.c
-@@ -267,7 +267,7 @@ static int print_sta_handler(struct nl_m
-               }
-               if (sta_flags->mask & BIT(NL80211_STA_FLAG_TDLS_PEER)) {
--                      printf("\n\tTDLS peer:\t\t");
-+                      printf("\n\tTDLS peer:\t");
-                       if (sta_flags->set & BIT(NL80211_STA_FLAG_TDLS_PEER))
-                               printf("yes");
-                       else
diff --git a/package/iw/patches/130-antenna_gain.patch b/package/iw/patches/130-antenna_gain.patch
deleted file mode 100644 (file)
index f3ca691..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/phy.c
-+++ b/phy.c
-@@ -359,3 +359,31 @@ COMMAND(set, antenna, "<bitmap> | all | 
-       NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna,
-       "Set a bitmap of allowed antennas to use for TX and RX.\n"
-       "The driver may reject antenna configurations it cannot support.");
-+
-+static int handle_antenna_gain(struct nl80211_state *state,
-+                             struct nl_cb *cb,
-+                             struct nl_msg *msg,
-+                             int argc, char **argv,
-+                             enum id_input id)
-+{
-+      char *endptr;
-+      int dbm;
-+
-+      /* get the required args */
-+      if (argc != 1)
-+              return 1;
-+
-+      dbm = strtol(argv[0], &endptr, 10);
-+      if (*endptr)
-+              return 2;
-+
-+      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_GAIN, dbm);
-+
-+      return 0;
-+
-+ nla_put_failure:
-+      return -ENOBUFS;
-+}
-+COMMAND(set, antenna_gain, "<antenna gain in dBm>",
-+      NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna_gain,
-+      "Specify antenna gain.");
diff --git a/package/iw/patches/200-reduce_size.patch b/package/iw/patches/200-reduce_size.patch
new file mode 100644 (file)
index 0000000..2a282a8
--- /dev/null
@@ -0,0 +1,109 @@
+--- a/Makefile
++++ b/Makefile
+@@ -15,8 +15,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy
+ OBJS = iw.o genl.o event.o info.o phy.o \
+       interface.o ibss.o station.o survey.o util.o \
+       mesh.o mpath.o scan.o reg.o version.o \
+-      reason.o status.o connect.o link.o offch.o ps.o cqm.o \
+-      bitrate.o wowlan.o coalesce.o roc.o p2p.o
++      reason.o status.o connect.o link.o ps.o \
++      bitrate.o
+ OBJS += sections.o
+ OBJS-$(HWSIM) += hwsim.o
+--- a/info.c
++++ b/info.c
+@@ -204,6 +204,7 @@ next:
+                               }
+                       }
++#if 0
+                       if (tb_band[NL80211_BAND_ATTR_RATES]) {
+                       printf("\t\tBitrates (non-HT):\n");
+                       nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
+@@ -220,6 +221,7 @@ next:
+                               printf("\n");
+                       }
+                       }
++#endif
+               }
+       }
+@@ -254,6 +256,7 @@ next:
+               printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
+       }
++#if 0
+       if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
+               int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
+               int i;
+@@ -265,6 +268,7 @@ next:
+                                       cipher_name(ciphers[i]));
+               }
+       }
++#endif
+       if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
+           tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
+@@ -284,11 +288,13 @@ next:
+                       printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
+       }
++#if 0
+       if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) {
+               printf("\tsoftware interface modes (can always be added):\n");
+               nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode)
+                       printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
+       }
++#endif
+       if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
+               struct nlattr *nl_combi;
+@@ -385,6 +391,7 @@ broken_combination:
+                       printf("\tinterface combinations are not supported\n");
+       }
++#if 0
+       if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
+               printf("\tSupported commands:\n");
+               nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
+@@ -477,6 +484,7 @@ broken_combination:
+                               printf("\t\t * wake up on TCP connection\n");
+               }
+       }
++#endif
+       if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
+               printf("\tDevice supports roaming.\n");
+@@ -513,6 +521,7 @@ broken_combination:
+               }
+       }
++#if 0
+       if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
+               unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
+@@ -533,6 +542,7 @@ broken_combination:
+               if (features & NL80211_FEATURE_AP_SCAN)
+                       printf("\tDevice supports AP scan.\n");
+       }
++#endif
+       if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])
+               printf("\tDevice supports T-DLS.\n");
+@@ -582,6 +592,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
+        "List all wireless devices and their capabilities.");
+ TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
++#if 0
+ static int handle_commands(struct nl80211_state *state,
+                          struct nl_cb *cb, struct nl_msg *msg,
+                          int argc, char **argv, enum id_input id)
+@@ -594,6 +605,7 @@ static int handle_commands(struct nl8021
+ }
+ TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
+        "list all known commands and their decimal & hex value");
++#endif
+ static int print_feature_handler(struct nl_msg *msg, void *arg)
+ {