]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
update nl80211.h
authorJohannes Berg <johannes.berg@intel.com>
Mon, 8 Nov 2021 08:42:47 +0000 (09:42 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Nov 2021 08:42:54 +0000 (09:42 +0100)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
nl80211.h

index c2efea98e060b38929e8e930aba05b505e3eaebb..61cab81e920de9aa7fef5640de75e5659fb498a7 100644 (file)
--- a/nl80211.h
+++ b/nl80211.h
  * the interface goes down.
  */
 
+/**
+ * DOC: FILS shared key crypto offload
+ *
+ * This feature is applicable to drivers running in AP mode.
+ *
+ * FILS shared key crypto offload can be advertised by drivers by setting
+ * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD flag. The drivers that support
+ * FILS shared key crypto offload should be able to encrypt and decrypt
+ * association frames for FILS shared key authentication as per IEEE 802.11ai.
+ * With this capability, for FILS key derivation, drivers depend on userspace.
+ *
+ * After FILS key derivation, userspace shares the FILS AAD details with the
+ * driver and the driver stores the same to use in decryption of association
+ * request and in encryption of association response. The below parameters
+ * should be given to the driver in %NL80211_CMD_SET_FILS_AAD.
+ *     %NL80211_ATTR_MAC - STA MAC address, used for storing FILS AAD per STA
+ *     %NL80211_ATTR_FILS_KEK - Used for encryption or decryption
+ *     %NL80211_ATTR_FILS_NONCES - Used for encryption or decryption
+ *                     (STA Nonce 16 bytes followed by AP Nonce 16 bytes)
+ *
+ * Once the association is done, the driver cleans the FILS AAD data.
+ */
+
 /**
  * enum nl80211_commands - supported nl80211 commands
  *
  * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes
  *     %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from
  *     userspace to request deletion of a virtual interface, then requires
- *     attribute %NL80211_ATTR_IFINDEX.
+ *     attribute %NL80211_ATTR_IFINDEX. If multiple BSSID advertisements are
+ *     enabled using %NL80211_ATTR_MBSSID_CONFIG, %NL80211_ATTR_MBSSID_ELEMS,
+ *     and if this command is used for the transmitting interface, then all
+ *     the non-transmitting interfaces are deleted as well.
  *
  * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
  *     by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
  * @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change
  *     has completed
  *
+ * @NL80211_CMD_SET_FILS_AAD: Set FILS AAD data to the driver using -
+ *     &NL80211_ATTR_MAC - for STA MAC address
+ *     &NL80211_ATTR_FILS_KEK - for KEK
+ *     &NL80211_ATTR_FILS_NONCES - for FILS Nonces
+ *             (STA Nonce 16 bytes followed by AP Nonce 16 bytes)
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -1440,6 +1472,8 @@ enum nl80211_commands {
        NL80211_CMD_COLOR_CHANGE_ABORTED,
        NL80211_CMD_COLOR_CHANGE_COMPLETED,
 
+       NL80211_CMD_SET_FILS_AAD,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -2593,6 +2627,18 @@ enum nl80211_commands {
  * @NL80211_ATTR_COLOR_CHANGE_ELEMS: Nested set of attributes containing the IE
  *     information for the time while performing a color switch.
  *
+ * @NL80211_ATTR_MBSSID_CONFIG: Nested attribute for multiple BSSID
+ *     advertisements (MBSSID) parameters in AP mode.
+ *     Kernel uses this attribute to indicate the driver's support for MBSSID
+ *     and enhanced multi-BSSID advertisements (EMA AP) to the userspace.
+ *     Userspace should use this attribute to configure per interface MBSSID
+ *     parameters.
+ *     See &enum nl80211_mbssid_config_attributes for details.
+ *
+ * @NL80211_ATTR_MBSSID_ELEMS: Nested parameter to pass multiple BSSID elements.
+ *     Mandatory parameter for the transmitting interface to enable MBSSID.
+ *     Optional for the non-transmitting interfaces.
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3096,6 +3142,9 @@ enum nl80211_attrs {
        NL80211_ATTR_COLOR_CHANGE_COLOR,
        NL80211_ATTR_COLOR_CHANGE_ELEMS,
 
+       NL80211_ATTR_MBSSID_CONFIG,
+       NL80211_ATTR_MBSSID_ELEMS,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -4929,6 +4978,7 @@ enum nl80211_txrate_gi {
  * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
  * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
  * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs
+ * @NL80211_BAND_LC: light communication band (placeholder)
  * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
  *     since newer kernel versions may support more bands
  */
@@ -4938,6 +4988,7 @@ enum nl80211_band {
        NL80211_BAND_60GHZ,
        NL80211_BAND_6GHZ,
        NL80211_BAND_S1GHZ,
+       NL80211_BAND_LC,
 
        NUM_NL80211_BANDS,
 };
@@ -5995,6 +6046,11 @@ enum nl80211_feature_flags {
  * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision
  *     detection and change announcemnts.
  *
+ * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD: Driver running in AP mode supports
+ *     FILS encryption and decryption for (Re)Association Request and Response
+ *     frames. Userspace has to share FILS AAD details to the driver by using
+ *     @NL80211_CMD_SET_FILS_AAD.
+ *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  */
@@ -6060,6 +6116,7 @@ enum nl80211_ext_feature_index {
        NL80211_EXT_FEATURE_SECURE_RTT,
        NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
        NL80211_EXT_FEATURE_BSS_COLOR,
+       NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
@@ -7349,4 +7406,60 @@ enum nl80211_sar_specs_attrs {
        NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
 };
 
+/**
+ * enum nl80211_mbssid_config_attributes - multiple BSSID (MBSSID) and enhanced
+ * multi-BSSID advertisements (EMA) in AP mode.
+ * Kernel uses some of these attributes to advertise driver's support for
+ * MBSSID and EMA.
+ * Remaining attributes should be used by the userspace to configure the
+ * features.
+ *
+ * @__NL80211_MBSSID_CONFIG_ATTR_INVALID: Invalid
+ *
+ * @NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES: Used by the kernel to advertise
+ *     the maximum number of MBSSID interfaces supported by the driver.
+ *     Driver should indicate MBSSID support by setting
+ *     wiphy->mbssid_max_interfaces to a value more than or equal to 2.
+ *
+ * @NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY: Used by the kernel
+ *     to advertise the maximum profile periodicity supported by the driver
+ *     if EMA is enabled. Driver should indicate EMA support to the userspace
+ *     by setting wiphy->ema_max_profile_periodicity to
+ *     a non-zero value.
+ *
+ * @NL80211_MBSSID_CONFIG_ATTR_INDEX: Mandatory parameter to pass the index of
+ *     this BSS (u8) in the multiple BSSID set.
+ *     Value must be set to 0 for the transmitting interface and non-zero for
+ *     all non-transmitting interfaces. The userspace will be responsible
+ *     for using unique indices for the interfaces.
+ *     Range: 0 to wiphy->mbssid_max_interfaces-1.
+ *
+ * @NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX: Mandatory parameter for
+ *     a non-transmitted profile which provides the interface index (u32) of
+ *     the transmitted profile. The value must match one of the interface
+ *     indices advertised by the kernel. Optional if the interface being set up
+ *     is the transmitting one, however, if provided then the value must match
+ *     the interface index of the same.
+ *
+ * @NL80211_MBSSID_CONFIG_ATTR_EMA: Flag used to enable EMA AP feature.
+ *     Setting this flag is permitted only if the driver advertises EMA support
+ *     by setting wiphy->ema_max_profile_periodicity to non-zero.
+ *
+ * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal
+ * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute
+ */
+enum nl80211_mbssid_config_attributes {
+       __NL80211_MBSSID_CONFIG_ATTR_INVALID,
+
+       NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES,
+       NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY,
+       NL80211_MBSSID_CONFIG_ATTR_INDEX,
+       NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX,
+       NL80211_MBSSID_CONFIG_ATTR_EMA,
+
+       /* keep last */
+       __NL80211_MBSSID_CONFIG_ATTR_LAST,
+       NL80211_MBSSID_CONFIG_ATTR_MAX = __NL80211_MBSSID_CONFIG_ATTR_LAST - 1,
+};
+
 #endif /* __LINUX_NL80211_H */