mac80211: update to backports-4.14-rc2
[openwrt/staging/lynxis.git] / package / network / utils / iw / patches / 001-nl80211_h_sync.patch
index fc28a652d5ece7d8281f7bba9ccc4b5e67cf1b1f..25ec1263ad9ae7e50203ddebcc7ae21f2553f475 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
-@@ -171,7 +172,7 @@
-  *    %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
-  *    %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT.
-  *    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
-@@ -401,8 +402,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 +440,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
-  *    TX status event pertaining to the TX request.
-@@ -473,8 +472,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
-@@ -526,6 +525,12 @@
-  *    of PMKSA caching dandidates.
+@@ -10,7 +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
++ * Copyright 2015-2017        Intel Deutschland GmbH
   *
-  * @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.
+  * Permission to use, copy, modify, and/or distribute this software for any
+  * purpose with or without fee is hereby granted, provided that the above
+@@ -173,6 +173,65 @@
+  */
+ /**
++ * DOC: WPA/WPA2 EAPOL handshake offload
++ *
++ * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers
++ * can indicate they support offloading EAPOL handshakes for WPA/WPA2
++ * preshared key authentication. In %NL80211_CMD_CONNECT the preshared
++ * key should be specified using %NL80211_ATTR_PMK. Drivers supporting
++ * this offload may reject the %NL80211_CMD_CONNECT when no preshared
++ * key material is provided, for example when that driver does not
++ * support setting the temporal keys through %CMD_NEW_KEY.
++ *
++ * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be
++ * set by drivers indicating offload support of the PTK/GTK EAPOL
++ * handshakes during 802.1X authentication. In order to use the offload
++ * the %NL80211_CMD_CONNECT should have %NL80211_ATTR_WANT_1X_4WAY_HS
++ * attribute flag. Drivers supporting this offload may reject the
++ * %NL80211_CMD_CONNECT when the attribute flag is not present.
++ *
++ * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK
++ * using %NL80211_CMD_SET_PMK. For offloaded FT support also
++ * %NL80211_ATTR_PMKR0_NAME must be provided.
++ */
++
++/**
++ * DOC: FILS shared key authentication offload
++ *
++ * FILS shared key authentication offload can be advertized by drivers by
++ * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support
++ * FILS shared key authentication offload should be able to construct the
++ * authentication and association frames for FILS shared key authentication and
++ * eventually do a key derivation as per IEEE 802.11ai. The below additional
++ * parameters should be given to driver in %NL80211_CMD_CONNECT.
++ *    %NL80211_ATTR_FILS_ERP_USERNAME - used to construct keyname_nai
++ *    %NL80211_ATTR_FILS_ERP_REALM - used to construct keyname_nai
++ *    %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used to construct erp message
++ *    %NL80211_ATTR_FILS_ERP_RRK - used to generate the rIK and rMSK
++ * rIK should be used to generate an authentication tag on the ERP message and
++ * rMSK should be used to derive a PMKSA.
++ * rIK, rMSK should be generated and keyname_nai, sequence number should be used
++ * as specified in IETF RFC 6696.
++ *
++ * When FILS shared key authentication is completed, driver needs to provide the
++ * below additional parameters to userspace.
++ *    %NL80211_ATTR_FILS_KEK - used for key renewal
++ *    %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used in further EAP-RP exchanges
++ *    %NL80211_ATTR_PMKID - used to identify the PMKSA used/generated
++ *    %Nl80211_ATTR_PMK - used to update PMKSA cache in userspace
++ * The PMKSA can be maintained in userspace persistently so that it can be used
++ * later after reboots or wifi turn off/on also.
++ *
++ * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertized by a FILS
++ * capable AP supporting PMK caching. It specifies the scope within which the
++ * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and
++ * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based
++ * on FILS cache identifier. Additionally %NL80211_ATTR_PMK is used with
++ * %NL80211_SET_PMKSA to specify the PMK corresponding to a PMKSA for driver to
++ * use in a FILS shared key connection with PMKSA caching.
++ */
++
++/**
+  * enum nl80211_commands - supported nl80211 commands
+  *
+  * @NL80211_CMD_UNSPEC: unspecified command to catch errors
+@@ -323,7 +382,7 @@
+  * @NL80211_CMD_GET_SCAN: get scan results
+  * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
+  *    %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
+- *    probe requests at CCK rate or not. %NL80211_ATTR_MAC can be used to
++ *    probe requests at CCK rate or not. %NL80211_ATTR_BSSID can be used to
+  *    specify a BSSID to scan for; if not included, the wildcard BSSID will
+  *    be used.
+  * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
+@@ -351,7 +410,9 @@
+  *    are used.  Extra IEs can also be passed from the userspace by
+  *    using the %NL80211_ATTR_IE attribute.  The first cycle of the
+  *    scheduled scan can be delayed by %NL80211_ATTR_SCHED_SCAN_DELAY
+- *    is supplied.
++ *    is supplied. If the device supports multiple concurrent scheduled
++ *    scans, it will allow such when the caller provides the flag attribute
++ *    %NL80211_ATTR_SCHED_SCAN_MULTI to indicate user-space support for it.
+  * @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.
+@@ -370,10 +431,18 @@
+  * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to
+  *    NL80211_CMD_GET_SURVEY and on the "scan" multicast group)
+  *
+- * @NL80211_CMD_SET_PMKSA: Add a PMKSA cache entry, using %NL80211_ATTR_MAC
+- *    (for the BSSID) and %NL80211_ATTR_PMKID.
++ * @NL80211_CMD_SET_PMKSA: Add a PMKSA cache entry using %NL80211_ATTR_MAC
++ *    (for the BSSID), %NL80211_ATTR_PMKID, and optionally %NL80211_ATTR_PMK
++ *    (PMK is used for PTKSA derivation in case of FILS shared key offload) or
++ *    using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID,
++ *    %NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS
++ *    authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier
++ *    advertized by a FILS capable AP identifying the scope of PMKSA in an
++ *    ESS.
+  * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC
+- *    (for the BSSID) and %NL80211_ATTR_PMKID.
++ *    (for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID,
++ *    %NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS
++ *    authentication.
+  * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries.
+  *
+  * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
+@@ -500,8 +569,13 @@
+  *    authentication/association or not receiving a response from the AP.
+  *    Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
+  *    well to remain backwards compatible.
+- * @NL80211_CMD_ROAM: request that the card roam (currently not implemented),
+- *    sent as an event when the card/driver roamed by itself.
++ * @NL80211_CMD_ROAM: notifcation indicating the card/driver roamed by itself.
++ *    When the driver roamed in a network that requires 802.1X authentication,
++ *    %NL80211_ATTR_PORT_AUTHORIZED should be set if the 802.1X authentication
++ *    was done by the driver or if roaming was done using Fast Transition
++ *    protocol (in which case 802.1X authentication is not needed). If
++ *    %NL80211_ATTR_PORT_AUTHORIZED is not set, user space is responsible for
++ *    the 802.1X authentication.
+  * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
+  *    userspace that a connection was dropped by the AP or due to other
+  *    reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
+@@ -600,6 +674,20 @@
   *
-  * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP
-@@ -562,8 +567,24 @@
+  * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
   *
-  * @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_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
++ *    multicast to unicast conversion. When enabled, all multicast packets
++ *    with ethertype ARP, IPv4 or IPv6 (possibly within an 802.1Q header)
++ *    will be sent out to each station once with the destination (multicast)
++ *    MAC address replaced by the station's MAC address. Note that this may
++ *    break certain expectations of the receiver, e.g. the ability to drop
++ *    unicast IP packets encapsulated in multicast L2 frames, or the ability
++ *    to not send destination unreachable messages in such cases.
++ *    This can only be toggled per BSS. Configure this on an interface of
++ *    type %NL80211_IFTYPE_AP. It applies to all its VLAN interfaces
++ *    (%NL80211_IFTYPE_AP_VLAN), except for those in 4addr (WDS) mode.
++ *    If %NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED is not present with this
++ *    command, the feature is disabled.
 + *
-+ * @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_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial
+  *    mesh config parameters may be given.
+  * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the
+@@ -840,12 +928,15 @@
+  *    cfg80211_scan_done().
+  *
+  * @NL80211_CMD_START_NAN: Start NAN operation, identified by its
+- *    %NL80211_ATTR_WDEV interface. This interface must have been previously
+- *    created with %NL80211_CMD_NEW_INTERFACE. After it has been started, the
+- *    NAN interface will create or join a cluster. This command must have a
+- *    valid %NL80211_ATTR_NAN_MASTER_PREF attribute and optional
+- *    %NL80211_ATTR_NAN_DUAL attributes.
+- *    After this command NAN functions can be added.
++ *    %NL80211_ATTR_WDEV interface. This interface must have been
++ *    previously created with %NL80211_CMD_NEW_INTERFACE. After it
++ *    has been started, the NAN interface will create or join a
++ *    cluster. This command must have a valid
++ *    %NL80211_ATTR_NAN_MASTER_PREF attribute and optional
++ *    %NL80211_ATTR_BANDS attributes.  If %NL80211_ATTR_BANDS is
++ *    omitted or set to 0, it means don't-care and the device will
++ *    decide what to use.  After this command NAN functions can be
++ *    added.
+  * @NL80211_CMD_STOP_NAN: Stop the NAN operation, identified by
+  *    its %NL80211_ATTR_WDEV interface.
+  * @NL80211_CMD_ADD_NAN_FUNCTION: Add a NAN function. The function is defined
+@@ -866,14 +957,32 @@
+  *    This command is also used as a notification sent when a NAN function is
+  *    terminated. This will contain a %NL80211_ATTR_NAN_FUNC_INST_ID
+  *    and %NL80211_ATTR_COOKIE attributes.
+- * @NL80211_CMD_CHANGE_NAN_CONFIG: Change current NAN configuration. NAN
+- *    must be operational (%NL80211_CMD_START_NAN was executed).
+- *    It must contain at least one of the following attributes:
+- *    %NL80211_ATTR_NAN_MASTER_PREF, %NL80211_ATTR_NAN_DUAL.
++ * @NL80211_CMD_CHANGE_NAN_CONFIG: Change current NAN
++ *    configuration. NAN must be operational (%NL80211_CMD_START_NAN
++ *    was executed).  It must contain at least one of the following
++ *    attributes: %NL80211_ATTR_NAN_MASTER_PREF,
++ *    %NL80211_ATTR_BANDS.  If %NL80211_ATTR_BANDS is omitted, the
++ *    current configuration is not changed.  If it is present but
++ *    set to zero, the configuration is changed to don't-care
++ *    (i.e. the device can decide what to do).
+  * @NL80211_CMD_NAN_FUNC_MATCH: Notification sent when a match is reported.
+  *    This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
+  *    %NL80211_ATTR_COOKIE.
+  *
++ * @NL80211_CMD_UPDATE_CONNECT_PARAMS: Update one or more connect parameters
++ *    for subsequent roaming cases if the driver or firmware uses internal
++ *    BSS selection. This command can be issued only while connected and it
++ *    does not result in a change for the current association. Currently,
++ *    only the %NL80211_ATTR_IE data is used and updated with this command.
 + *
-+ * @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_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0
++ *    for the given authenticator address (specified with &NL80211_ATTR_MAC).
++ *    When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the
++ *    PMK-R0, otherwise it specifies the PMK.
++ * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
++ *    configured PMK for the authenticator address identified by
++ *    &NL80211_ATTR_MAC.
 + *
-+ * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames
-+ *    for IBSS or MESH vif.
-  *
   * @NL80211_CMD_MAX: highest used command number
   * @__NL80211_CMD_AFTER_LAST: internal use
-@@ -708,6 +729,13 @@ enum nl80211_commands {
-       NL80211_CMD_CH_SWITCH_NOTIFY,
+  */
+@@ -1069,6 +1178,13 @@ enum nl80211_commands {
+       NL80211_CMD_CHANGE_NAN_CONFIG,
+       NL80211_CMD_NAN_MATCH,
  
-+      NL80211_CMD_START_P2P_DEVICE,
-+      NL80211_CMD_STOP_P2P_DEVICE,
++      NL80211_CMD_SET_MULTICAST_TO_UNICAST,
 +
-+      NL80211_CMD_CONN_FAILED,
++      NL80211_CMD_UPDATE_CONNECT_PARAMS,
 +
-+      NL80211_CMD_SET_MCAST_RATE,
++      NL80211_CMD_SET_PMK,
++      NL80211_CMD_DEL_PMK,
 +
        /* add new commands above here */
  
        /* used to define NL80211_CMD_MAX below */
-@@ -744,14 +772,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
-@@ -1251,6 +1291,25 @@ enum nl80211_commands {
-  *    was used to provide the hint. For the different types of
-  *    allowed user regulatory hints see nl80211_user_reg_hint_type.
+@@ -1638,8 +1754,16 @@ enum nl80211_commands {
+  *    the connection request from a station. nl80211_connect_failed_reason
+  *    enum has different reasons of connection failure.
   *
-+ * @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_SAE_DATA: SAE elements in Authentication frames. This starts
+- *    with the Authentication transaction sequence number field.
++ * @NL80211_ATTR_AUTH_DATA: Fields and elements in Authentication frames.
++ *    This contains the authentication frame body (non-IE and IE data),
++ *    excluding the Authentication algorithm number, i.e., starting at the
++ *    Authentication transaction sequence number field. It is used with
++ *    authentication algorithms that need special fields to be added into
++ *    the frames (SAE and FILS). Currently, only the SAE cases use the
++ *    initial two fields (Authentication transaction sequence number and
++ *    Status code). However, those fields are included in the attribute data
++ *    for all authentication algorithms to keep the attribute definition
++ *    consistent.
+  *
+  * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
+  *    association request when used with NL80211_CMD_NEW_STATION)
+@@ -1740,7 +1864,9 @@ enum nl80211_commands {
+  *
+  * @NL80211_ATTR_OPMODE_NOTIF: Operating mode field from Operating Mode
+  *    Notification Element based on association request when used with
+- *    %NL80211_CMD_NEW_STATION; u8 attribute.
++ *    %NL80211_CMD_NEW_STATION or %NL80211_CMD_SET_STATION (only when
++ *    %NL80211_FEATURE_FULL_AP_CLIENT_STATE is supported, or with TDLS);
++ *    u8 attribute.
+  *
+  * @NL80211_ATTR_VENDOR_ID: The vendor ID, either a 24-bit OUI or, if
+  *    %NL80211_VENDOR_ID_IS_LINUX is set, a special Linux ID (not used yet)
+@@ -1783,11 +1909,12 @@ enum nl80211_commands {
+  *    that configured the indoor setting, and the indoor operation would be
+  *    cleared when the socket is closed.
+  *    If set during NAN interface creation, the interface will be destroyed
+- *    if the socket is closed just like any other interface. Moreover, only
+- *    the netlink socket that created the interface will be allowed to add
+- *    and remove functions. NAN notifications will be sent in unicast to that
+- *    socket. Without this attribute, any socket can add functions and the
+- *    notifications will be sent to the %NL80211_MCGRP_NAN multicast group.
++ *    if the socket is closed just like any other interface. Moreover, NAN
++ *    notifications will be sent in unicast to that socket. Without this
++ *    attribute, the notifications will be sent to the %NL80211_MCGRP_NAN
++ *    multicast group.
++ *    If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the
++ *    station will deauthenticate when the socket is closed.
+  *
+  * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
+  *    the TDLS link initiator.
+@@ -1927,15 +2054,93 @@ enum nl80211_commands {
+  *    %NL80211_CMD_CHANGE_NAN_CONFIG. Its type is u8 and it can't be 0.
+  *    Also, values 1 and 255 are reserved for certification purposes and
+  *    should not be used during a normal device operation.
+- * @NL80211_ATTR_NAN_DUAL: NAN dual band operation config (see
+- *    &enum nl80211_nan_dual_band_conf). This attribute is used with
+- *    %NL80211_CMD_START_NAN and optionally with
+- *    %NL80211_CMD_CHANGE_NAN_CONFIG.
++ * @NL80211_ATTR_BANDS: operating bands configuration.  This is a u32
++ *    bitmask of BIT(NL80211_BAND_*) as described in %enum
++ *    nl80211_band.  For instance, for NL80211_BAND_2GHZ, bit 0
++ *    would be set.  This attribute is used with
++ *    %NL80211_CMD_START_NAN and %NL80211_CMD_CHANGE_NAN_CONFIG, and
++ *    it is optional.  If no bands are set, it means don't-care and
++ *    the device will decide what to use.
+  * @NL80211_ATTR_NAN_FUNC: a function that can be added to NAN. See
+  *    &enum nl80211_nan_func_attributes for description of this nested
+  *    attribute.
+  * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
+  *    See &enum nl80211_nan_match_attributes.
++ * @NL80211_ATTR_FILS_KEK: KEK for FILS (Re)Association Request/Response frame
++ *    protection.
++ * @NL80211_ATTR_FILS_NONCES: Nonces (part of AAD) for FILS (Re)Association
++ *    Request/Response frame protection. This attribute contains the 16 octet
++ *    STA Nonce followed by 16 octets of AP Nonce.
++ *
++ * @NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED: Indicates whether or not multicast
++ *    packets should be send out as unicast to all stations (flag attribute).
++ *
++ * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also
++ *    used in various commands/events for specifying the BSSID.
++ *
++ * @NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI: Relative RSSI threshold by which
++ *    other BSSs has to be better or slightly worse than the current
++ *    connected BSS so that they get reported to user space.
++ *    This will give an opportunity to userspace to consider connecting to
++ *    other matching BSSs which have better or slightly worse RSSI than
++ *    the current connected BSS by using an offloaded operation to avoid
++ *    unnecessary wakeups.
++ *
++ * @NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST: When present the RSSI level for BSSs in
++ *    the specified band is to be adjusted before doing
++ *    %NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI based comparision to figure out
++ *    better BSSs. The attribute value is a packed structure
++ *    value as specified by &struct nl80211_bss_select_rssi_adjust.
++ *
++ * @NL80211_ATTR_TIMEOUT_REASON: The reason for which an operation timed out.
++ *    u32 attribute with an &enum nl80211_timeout_reason value. This is used,
++ *    e.g., with %NL80211_CMD_CONNECT event.
++ *
++ * @NL80211_ATTR_FILS_ERP_USERNAME: EAP Re-authentication Protocol (ERP)
++ *    username part of NAI used to refer keys rRK and rIK. This is used with
++ *    %NL80211_CMD_CONNECT.
++ *
++ * @NL80211_ATTR_FILS_ERP_REALM: EAP Re-authentication Protocol (ERP) realm part
++ *    of NAI specifying the domain name of the ER server. This is used with
++ *    %NL80211_CMD_CONNECT.
 + *
-+ * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
-+ *    with the Authentication transaction sequence number field.
++ * @NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM: Unsigned 16-bit ERP next sequence number
++ *    to use in ERP messages. This is used in generating the FILS wrapped data
++ *    for FILS authentication and is used with %NL80211_CMD_CONNECT.
 + *
-+ * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
-+ *    association request when used with NL80211_CMD_NEW_STATION)
++ * @NL80211_ATTR_FILS_ERP_RRK: ERP re-authentication Root Key (rRK) for the
++ *    NAI specified by %NL80211_ATTR_FILS_ERP_USERNAME and
++ *    %NL80211_ATTR_FILS_ERP_REALM. This is used for generating rIK and rMSK
++ *    from successful FILS authentication and is used with
++ *    %NL80211_CMD_CONNECT.
 + *
-+ * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32)
++ * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertized by a FILS AP
++ *    identifying the scope of PMKSAs. This is used with
++ *    @NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA.
 + *
-+ * @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_PMK: attribute for passing PMK key material. Used with
++ *    %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID.
++ *    For %NL80211_CMD_CONNECT it is used to provide PSK for offloading 4-way
++ *    handshake for WPA/WPA2-PSK networks. For 802.1X authentication it is
++ *    used with %NL80211_CMD_SET_PMK. For offloaded FT support this attribute
++ *    specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME is included as well.
 + *
++ * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to
++ *    indicate that it supports multiple active scheduled scan requests.
++ * @NL80211_ATTR_SCHED_SCAN_MAX_REQS: indicates maximum number of scheduled
++ *    scan request that may be active for the device (u32).
++ *
++ * @NL80211_ATTR_WANT_1X_4WAY_HS: flag attribute which user-space can include
++ *    in %NL80211_CMD_CONNECT to indicate that for 802.1X authentication it
++ *    wants to use the supported offload of the 4-way handshake.
++ * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT.
++ * @NL80211_ATTR_PORT_AUTHORIZED: flag attribute used in %NL80211_CMD_ROAMED
++ *    notification indicating that that 802.1X authentication was done by
++ *    the driver or is not needed (because roaming used the Fast Transition
++ *    protocol).
++ *
++ * @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
-  */
-@@ -1506,6 +1565,23 @@ enum nl80211_attrs {
+@@ -2195,7 +2400,7 @@ enum nl80211_attrs {
+       NL80211_ATTR_CONN_FAILED_REASON,
+-      NL80211_ATTR_SAE_DATA,
++      NL80211_ATTR_AUTH_DATA,
  
-       NL80211_ATTR_USER_REG_HINT_TYPE,
+       NL80211_ATTR_VHT_CAPABILITY,
  
-+      NL80211_ATTR_CONN_FAILED_REASON,
+@@ -2332,10 +2537,39 @@ enum nl80211_attrs {
+       NL80211_ATTR_MESH_PEER_AID,
+       NL80211_ATTR_NAN_MASTER_PREF,
+-      NL80211_ATTR_NAN_DUAL,
++      NL80211_ATTR_BANDS,
+       NL80211_ATTR_NAN_FUNC,
+       NL80211_ATTR_NAN_MATCH,
++      NL80211_ATTR_FILS_KEK,
++      NL80211_ATTR_FILS_NONCES,
++
++      NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED,
++
++      NL80211_ATTR_BSSID,
++
++      NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI,
++      NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST,
 +
-+      NL80211_ATTR_SAE_DATA,
++      NL80211_ATTR_TIMEOUT_REASON,
 +
-+      NL80211_ATTR_VHT_CAPABILITY,
++      NL80211_ATTR_FILS_ERP_USERNAME,
++      NL80211_ATTR_FILS_ERP_REALM,
++      NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM,
++      NL80211_ATTR_FILS_ERP_RRK,
++      NL80211_ATTR_FILS_CACHE_ID,
 +
-+      NL80211_ATTR_SCAN_FLAGS,
++      NL80211_ATTR_PMK,
 +
-+      NL80211_ATTR_CHANNEL_WIDTH,
-+      NL80211_ATTR_CENTER_FREQ1,
-+      NL80211_ATTR_CENTER_FREQ2,
++      NL80211_ATTR_SCHED_SCAN_MULTI,
++      NL80211_ATTR_SCHED_SCAN_MAX_REQS,
 +
-+      NL80211_ATTR_P2P_CTWINDOW,
-+      NL80211_ATTR_P2P_OPPPS,
++      NL80211_ATTR_WANT_1X_4WAY_HS,
++      NL80211_ATTR_PMKR0_NAME,
++      NL80211_ATTR_PORT_AUTHORIZED,
 +
 +      NL80211_ATTR_WIPHY_ANTENNA_GAIN,
 +
        /* add attributes here, update the policy in nl80211.c */
  
        __NL80211_ATTR_AFTER_LAST,
-@@ -1549,6 +1625,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
+@@ -2347,6 +2581,7 @@ enum nl80211_attrs {
+ #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
+ #define       NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
+ #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
++#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
  
- #define NL80211_MAX_NR_CIPHER_SUITES          5
- #define NL80211_MAX_NR_AKM_SUITES             2
-@@ -1575,6 +1652,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 +1674,7 @@ enum nl80211_iftype {
-       NL80211_IFTYPE_MESH_POINT,
-       NL80211_IFTYPE_P2P_CLIENT,
-       NL80211_IFTYPE_P2P_GO,
-+      NL80211_IFTYPE_P2P_DEVICE,
+ /*
+  * Allow user space programs to use #ifdef on new attributes by defining them
+@@ -3019,6 +3254,7 @@ enum nl80211_reg_rule_attr {
+  * @__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.
++ *    (This cannot be used together with BSSID.)
+  * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a
+  *    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
+@@ -3027,6 +3263,15 @@ enum nl80211_reg_rule_attr {
+  *    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_RELATIVE_RSSI: Flag indicating whether
++ *    %NL80211_SCHED_SCAN_MATCH_ATTR_RSSI to be used as absolute RSSI or
++ *    relative to current bss's RSSI.
++ * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST: When present the RSSI level for
++ *    BSS-es in the specified band is to be adjusted before doing
++ *    RSSI-based BSS selection. The attribute value is a packed structure
++ *    value as specified by &struct nl80211_bss_select_rssi_adjust.
++ * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching
++ *    (this cannot be used together with SSID).
+  * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
+  *    attribute number currently defined
+  * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
+@@ -3036,6 +3281,9 @@ enum nl80211_sched_scan_match_attr {
+       NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
+       NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
++      NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
++      NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
++      NL80211_SCHED_SCAN_MATCH_ATTR_BSSID,
  
        /* keep last */
-       NUM_NL80211_IFTYPES,
-@@ -1664,10 +1746,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 +1764,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,
+       __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
+@@ -3660,6 +3908,9 @@ enum nl80211_bss_status {
+  * @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_FILS_SK: Fast Initial Link Setup shared key
++ * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
++ * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
+  * @__NL80211_AUTHTYPE_NUM: internal
+  * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
+  * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
+@@ -3672,6 +3923,9 @@ enum nl80211_auth_type {
+       NL80211_AUTHTYPE_FT,
+       NL80211_AUTHTYPE_NETWORK_EAP,
+       NL80211_AUTHTYPE_SAE,
++      NL80211_AUTHTYPE_FILS_SK,
++      NL80211_AUTHTYPE_FILS_SK_PFS,
++      NL80211_AUTHTYPE_FILS_PK,
  
        /* keep last */
-       __NL80211_RATE_INFO_AFTER_LAST,
-@@ -1744,6 +1836,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
+       __NL80211_AUTHTYPE_NUM,
+@@ -3839,7 +4093,10 @@ enum nl80211_ps_state {
+  * @__NL80211_ATTR_CQM_INVALID: invalid
+  * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm. This value specifies
+  *    the threshold for the RSSI level at which an event will be sent. Zero
+- *    to disable.
++ *    to disable.  Alternatively, if %NL80211_EXT_FEATURE_CQM_RSSI_LIST is
++ *    set, multiple values can be supplied as a low-to-high sorted array of
++ *    threshold values in dBm.  Events will be sent when the RSSI value
++ *    crosses any of the thresholds.
+  * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm. This value specifies
+  *    the minimum amount the RSSI level must change after an event before a
+  *    new event may be issued (to reduce effects of RSSI oscillation).
+@@ -3859,6 +4116,8 @@ enum nl80211_ps_state {
+  *    %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting.
+  * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon
+  *    loss event
++ * @NL80211_ATTR_CQM_RSSI_LEVEL: the RSSI value in dBm that triggered the
++ *    RSSI threshold event.
+  * @__NL80211_ATTR_CQM_AFTER_LAST: internal
+  * @NL80211_ATTR_CQM_MAX: highest key attribute
   */
-@@ -1768,6 +1862,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,
+@@ -3872,6 +4131,7 @@ enum nl80211_attr_cqm {
+       NL80211_ATTR_CQM_TXE_PKTS,
+       NL80211_ATTR_CQM_TXE_INTVL,
+       NL80211_ATTR_CQM_BEACON_LOSS_EVENT,
++      NL80211_ATTR_CQM_RSSI_LEVEL,
  
        /* keep last */
-       __NL80211_STA_INFO_AFTER_LAST,
-@@ -2385,6 +2481,15 @@ enum nl80211_ac {
- #define NL80211_TXQ_Q_BE      NL80211_AC_BE
- #define NL80211_TXQ_Q_BK      NL80211_AC_BK
+       __NL80211_ATTR_CQM_AFTER_LAST,
+@@ -4280,6 +4540,9 @@ enum nl80211_iface_limit_attrs {
+  *    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.
++ * @NL80211_IFACE_COMB_BI_MIN_GCD: u32 attribute specifying the minimum GCD of
++ *    different beacon intervals supported by all the interface combinations
++ *    in this group (if not present, all beacon intervals be identical).
+  * @NUM_NL80211_IFACE_COMB: number of attributes
+  * @MAX_NL80211_IFACE_COMB: highest attribute number
+  *
+@@ -4287,8 +4550,8 @@ enum nl80211_iface_limit_attrs {
+  *    limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2
+  *    => allows an AP and a STA that must match BIs
+  *
+- *    numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8
+- *    => allows 8 of AP/GO
++ *    numbers = [ #{AP, P2P-GO} <= 8 ], BI min gcd, channels = 1, max = 8,
++ *    => allows 8 of AP/GO that can have BI gcd >= min gcd
+  *
+  *    numbers = [ #{STA} <= 2 ], channels = 2, max = 2
+  *    => allows two STAs on different channels
+@@ -4314,6 +4577,7 @@ enum nl80211_if_combination_attrs {
+       NL80211_IFACE_COMB_NUM_CHANNELS,
+       NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
+       NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
++      NL80211_IFACE_COMB_BI_MIN_GCD,
  
-+/**
-+ * 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 +2498,32 @@ enum nl80211_channel_type {
+       /* keep last */
+       NUM_NL80211_IFACE_COMB,
+@@ -4634,6 +4898,27 @@ enum nl80211_feature_flags {
+  *    configuration (AP/mesh) with HT rates.
+  * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate
+  *    configuration (AP/mesh) with VHT rates.
++ * @NL80211_EXT_FEATURE_FILS_STA: This driver supports Fast Initial Link Setup
++ *    with user space SME (NL80211_CMD_AUTHENTICATE) in station mode.
++ * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA: This driver supports randomized TA
++ *    in @NL80211_CMD_FRAME while not associated.
++ * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED: This driver supports
++ *    randomized TA in @NL80211_CMD_FRAME while associated.
++ * @NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI: The driver supports sched_scan
++ *    for reporting BSSs with better RSSI than the current connected BSS
++ *    (%NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI).
++ * @NL80211_EXT_FEATURE_CQM_RSSI_LIST: With this driver the
++ *    %NL80211_ATTR_CQM_RSSI_THOLD attribute accepts a list of zero or more
++ *    RSSI threshold values to monitor rather than exactly one threshold.
++ * @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD: Driver SME supports FILS shared key
++ *    authentication with %NL80211_CMD_CONNECT.
++ * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK: Device wants to do 4-way
++ *    handshake with PSK in station mode (PSK is passed as part of the connect
++ *    and associate commands), doing it in the host might not be supported.
++ * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X: Device wants to do doing 4-way
++ *    handshake with 802.1X in station mode (will pass EAP frames to the host
++ *    and accept the set_pmk/del_pmk commands), doing it in the host might not
++ *    be supported.
+  *
+  * @NUM_NL80211_EXT_FEATURES: number of extended features.
+  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
+@@ -4648,6 +4933,14 @@ enum nl80211_ext_feature_index {
+       NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
+       NL80211_EXT_FEATURE_BEACON_RATE_HT,
+       NL80211_EXT_FEATURE_BEACON_RATE_VHT,
++      NL80211_EXT_FEATURE_FILS_STA,
++      NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,
++      NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,
++      NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI,
++      NL80211_EXT_FEATURE_CQM_RSSI_LIST,
++      NL80211_EXT_FEATURE_FILS_SK_OFFLOAD,
++      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK,
++      NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X,
+       /* add new features before the definition below */
+       NUM_NL80211_EXT_FEATURES,
+@@ -4687,6 +4980,21 @@ enum nl80211_connect_failed_reason {
  };
  
  /**
-+ * enum nl80211_chan_width - channel width definitions
-+ *
-+ * These values are used with the %NL80211_ATTR_CHANNEL_WIDTH
-+ * attribute.
++ * enum nl80211_timeout_reason - timeout reasons
 + *
-+ * @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
++ * @NL80211_TIMEOUT_UNSPECIFIED: Timeout reason unspecified.
++ * @NL80211_TIMEOUT_SCAN: Scan (AP discovery) timed out.
++ * @NL80211_TIMEOUT_AUTH: Authentication timed out.
++ * @NL80211_TIMEOUT_ASSOC: Association timed out.
 + */
-+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,
++enum nl80211_timeout_reason {
++      NL80211_TIMEOUT_UNSPECIFIED,
++      NL80211_TIMEOUT_SCAN,
++      NL80211_TIMEOUT_AUTH,
++      NL80211_TIMEOUT_ASSOC,
 +};
 +
 +/**
-  * enum nl80211_bss - netlink attributes for a BSS
+  * enum nl80211_scan_flags -  scan request control flags
   *
-  * @__NL80211_BSS_INVALID: invalid
-@@ -2460,6 +2591,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 +2603,7 @@ enum nl80211_auth_type {
-       NL80211_AUTHTYPE_SHARED_KEY,
-       NL80211_AUTHTYPE_FT,
-       NL80211_AUTHTYPE_NETWORK_EAP,
-+      NL80211_AUTHTYPE_SAE,
-       /* keep last */
-       __NL80211_AUTHTYPE_NUM,
-@@ -2994,12 +3127,40 @@ 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
+  * Scan request control flags are used to control the handling
+@@ -4768,12 +5076,17 @@ enum nl80211_smps_mode {
+  *    change to the channel status.
+  * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is
+  *    over, channel becomes usable.
++ * @NL80211_RADAR_PRE_CAC_EXPIRED: Channel Availability Check done on this
++ *    non-operating channel is expired and no longer valid. New CAC must
++ *    be done on this channel before starting the operation. This is not
++ *    applicable for ETSI dfs domain where pre-CAC is valid for ever.
   */
- 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,
+ enum nl80211_radar_event {
+       NL80211_RADAR_DETECTED,
+       NL80211_RADAR_CAC_FINISHED,
+       NL80211_RADAR_CAC_ABORTED,
+       NL80211_RADAR_NOP_FINISHED,
++      NL80211_RADAR_PRE_CAC_EXPIRED,
  };
  
  /**
-@@ -3023,4 +3184,36 @@ enum nl80211_probe_resp_offload_support_
-       NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U =     1<<3,
+@@ -4900,8 +5213,9 @@ enum nl80211_sched_scan_plan {
+ /**
+  * struct nl80211_bss_select_rssi_adjust - RSSI adjustment parameters.
+  *
+- * @band: band of BSS that must match for RSSI value adjustment.
+- * @delta: value used to adjust the RSSI value of matching BSS.
++ * @band: band of BSS that must match for RSSI value adjustment. The value
++ *    of this field is according to &enum nl80211_band.
++ * @delta: value used to adjust the RSSI value of matching BSS in dB.
+  */
+ struct nl80211_bss_select_rssi_adjust {
+       __u8 band;
+@@ -4942,21 +5256,6 @@ enum nl80211_bss_select_attr {
  };
  
-+/**
-+ * 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: Client's MAC is in the AP's blocklist.
-+ */
-+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,
-+};
-+
- #endif /* __LINUX_NL80211_H */
+ /**
+- * enum nl80211_nan_dual_band_conf - NAN dual band configuration
+- *
+- * Defines the NAN dual band mode of operation
+- *
+- * @NL80211_NAN_BAND_DEFAULT: device default mode
+- * @NL80211_NAN_BAND_2GHZ: 2.4GHz mode
+- * @NL80211_NAN_BAND_5GHZ: 5GHz mode
+-  */
+-enum nl80211_nan_dual_band_conf {
+-      NL80211_NAN_BAND_DEFAULT        = 1 << 0,
+-      NL80211_NAN_BAND_2GHZ           = 1 << 1,
+-      NL80211_NAN_BAND_5GHZ           = 1 << 2,
+-};
+-
+-/**
+  * enum nl80211_nan_function_type - NAN function type
+  *
+  * Defines the function type of a NAN function