]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
update nl80211.h
authorJohannes Berg <johannes.berg@intel.com>
Mon, 11 Dec 2017 12:23:25 +0000 (13:23 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Dec 2017 12:23:30 +0000 (13:23 +0100)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
nl80211.h

index cd4dfef58fabbc52c37c36cec2a5195ec95c6410..f882fe1f9709d889036ad2131ce1cde98e9fd60e 100644 (file)
--- a/nl80211.h
+++ b/nl80211.h
  * Multiple such rules can be created.
  */
 
+/**
+ * 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
  *
  *     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.
  * @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
  *     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.
+ *     When establishing a security association, drivers that support 4 way
+ *     handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when
+ *     the 4 way handshake is completed successfully.
+ * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself.
+ *     When a security association was established with the new AP (e.g. if
+ *     the FT protocol was used for roaming or the driver completed the 4 way
+ *     handshake), this event should be followed by an
+ *     %NL80211_CMD_PORT_AUTHORIZED event.
  * @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
  *     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_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_PORT_AUTHORIZED: An event that indicates that the 4 way
+ *     handshake was completed successfully by the driver. The BSSID is
+ *     specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake
+ *     offload should send this event after indicating 802.11 association with
+ *     &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed
+ *     &NL80211_CMD_DISCONNECT should be indicated instead.
+ *
+ * @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded.
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -1100,6 +1191,13 @@ enum nl80211_commands {
 
        NL80211_CMD_UPDATE_CONNECT_PARAMS,
 
+       NL80211_CMD_SET_PMK,
+       NL80211_CMD_DEL_PMK,
+
+       NL80211_CMD_PORT_AUTHORIZED,
+
+       NL80211_CMD_RELOAD_REGDB,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -1322,8 +1420,12 @@ 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 and %NL80211_CMD_CONNECT requests
+ *     this attribute can be used with %NL80211_CMD_ASSOCIATE and
+ *     %NL80211_CMD_CONNECT requests. %NL80211_MFP_OPTIONAL is not allowed for
+ *     %NL80211_CMD_ASSOCIATE since user space SME is expected and hence, it
+ *     must have decided whether to use management frame protection or not.
+ *     Setting %NL80211_MFP_OPTIONAL with a %NL80211_CMD_CONNECT request will
+ *     let the driver (or the firmware) decide whether to use MFP or not.
  *
  * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
  *     &struct nl80211_sta_flag_update.
@@ -1824,11 +1926,10 @@ 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.
  *
@@ -2012,6 +2113,46 @@ enum nl80211_commands {
  *     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_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_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_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_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: (reserved)
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2423,6 +2564,21 @@ enum nl80211_attrs {
 
        NL80211_ATTR_TIMEOUT_REASON,
 
+       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_PMK,
+
+       NL80211_ATTR_SCHED_SCAN_MULTI,
+       NL80211_ATTR_SCHED_SCAN_MAX_REQS,
+
+       NL80211_ATTR_WANT_1X_4WAY_HS,
+       NL80211_ATTR_PMKR0_NAME,
+       NL80211_ATTR_PORT_AUTHORIZED,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -3107,6 +3263,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
@@ -3122,6 +3279,8 @@ enum nl80211_reg_rule_attr {
  *     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
@@ -3133,6 +3292,7 @@ enum nl80211_sched_scan_match_attr {
        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 */
        __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@@ -3801,10 +3961,12 @@ enum nl80211_key_type {
  * enum nl80211_mfp - Management frame protection state
  * @NL80211_MFP_NO: Management frame protection not used
  * @NL80211_MFP_REQUIRED: Management frame protection required
+ * @NL80211_MFP_OPTIONAL: Management frame protection is optional
  */
 enum nl80211_mfp {
        NL80211_MFP_NO,
        NL80211_MFP_REQUIRED,
+       NL80211_MFP_OPTIONAL,
 };
 
 enum nl80211_wpa_versions {
@@ -4759,6 +4921,26 @@ enum nl80211_feature_flags {
  * @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.
+ * @NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME: Driver is capable of overriding
+ *     the max channel attribute in the FILS request params IE with the
+ *     actual dwell time.
+ * @NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP: Driver accepts broadcast probe
+ *     response
+ * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE: Driver supports sending
+ *     the first probe request in each channel at rate of at least 5.5Mbps.
+ * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: Driver supports
+ *     probe request tx deferral and suppression
+ * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL
+ *     value in %NL80211_ATTR_USE_MFP.
  *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4778,6 +4960,14 @@ enum nl80211_ext_feature_index {
        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,
+       NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME,
+       NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP,
+       NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,
+       NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
+       NL80211_EXT_FEATURE_MFP_OPTIONAL,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
@@ -4854,12 +5044,28 @@ enum nl80211_timeout_reason {
  *     locally administered 1, multicast 0) is assumed.
  *     This flag must not be requested when the feature isn't supported, check
  *     the nl80211 feature flags for the device.
+ * @NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME: fill the dwell time in the FILS
+ *     request parameters IE in the probe request
+ * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses
+ * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at
+ *     rate of at least 5.5M. In case non OCE AP is dicovered in the channel,
+ *     only the first probe req in the channel will be sent in high rate.
+ * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request
+ *     tx deferral (dot11FILSProbeDelay shall be set to 15ms)
+ *     and suppression (if it has received a broadcast Probe Response frame,
+ *     Beacon frame or FILS Discovery frame from an AP that the STA considers
+ *     a suitable candidate for (re-)association - suitable in terms of
+ *     SSID and/or RSSI
  */
 enum nl80211_scan_flags {
-       NL80211_SCAN_FLAG_LOW_PRIORITY                  = 1<<0,
-       NL80211_SCAN_FLAG_FLUSH                         = 1<<1,
-       NL80211_SCAN_FLAG_AP                            = 1<<2,
-       NL80211_SCAN_FLAG_RANDOM_ADDR                   = 1<<3,
+       NL80211_SCAN_FLAG_LOW_PRIORITY                          = 1<<0,
+       NL80211_SCAN_FLAG_FLUSH                                 = 1<<1,
+       NL80211_SCAN_FLAG_AP                                    = 1<<2,
+       NL80211_SCAN_FLAG_RANDOM_ADDR                           = 1<<3,
+       NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME                 = 1<<4,
+       NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP               = 1<<5,
+       NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE            = 1<<6,
+       NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION    = 1<<7,
 };
 
 /**