]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
update nl80211.h main master
authorZong-Zhe Yang <kevin_yang@realtek.com>
Fri, 19 Sep 2025 10:24:47 +0000 (12:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 19 Sep 2025 10:25:49 +0000 (12:25 +0200)
Also deal with the new extended feature bit.

Change-Id: Id06da594a39791509b85ffee09d310cb3ec7ca39
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
[squash, use current wireless-next version]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
info.c
nl80211.h

diff --git a/info.c b/info.c
index 18dcd368d0f821fe894feed9922f4e623f67f127..5ce3f78688a0a3bf20615902fe5e7a9b12515d1d 100644 (file)
--- a/info.c
+++ b/info.c
@@ -174,6 +174,7 @@ static void ext_feat_print(enum nl80211_ext_feature_index idx)
        ext_feat_case(OWE_OFFLOAD_AP, "OWE DH element handling offload (AP)");
        ext_feat_case(DFS_CONCURRENT, "DFS channel use under concurrent DFS master");
        ext_feat_case(SPP_AMSDU_SUPPORT, "SPP A-MSDU support");
+       ext_feat_case(BEACON_RATE_EHT, "EHT beacon rate support (AP/mesh)");
        }
 }
 
index d1a14f2892d9ee4d3077ad73e90f729bf70c7c53..8134f10e4e6c02d48a9089d6c8c8be52f73881a5 100644 (file)
--- a/nl80211.h
+++ b/nl80211.h
  *     %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.
+ *     decide what to use. Additional cluster configuration may be
+ *     optionally provided with %NL80211_ATTR_NAN_CONFIG.
+ *     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
  *     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).
+ *     Additional parameters may be provided with
+ *     %NL80211_ATTR_NAN_CONFIG. User space should provide all previously
+ *     configured nested attributes under %NL80211_ATTR_NAN_CONFIG, even if
+ *     only a subset was changed.
  * @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported.
  *     This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
  *     %NL80211_ATTR_COOKIE.
  *     control EPCS configuration. Used to notify userland on the current state
  *     of EPCS.
  *
+ * @NL80211_CMD_NAN_NEXT_DW_NOTIFICATION: This command is used to notify
+ *     user space about the next NAN Discovery Window (DW). User space may use
+ *     it to prepare frames to be sent in the next DW.
+ *     %NL80211_ATTR_WIPHY_FREQ is used to indicate the frequency of the next
+ *     DW. SDF transmission should be requested with %NL80211_CMD_FRAME and
+ *     the device/driver shall take care of the actual transmission timing.
+ *     This notification is only sent to the NAN interface owning socket
+ *     (see %NL80211_ATTR_SOCKET_OWNER flag).
+ * @NL80211_CMD_NAN_CLUSTER_JOINED: This command is used to notify
+ *     user space that the NAN new cluster has been joined. The cluster ID is
+ *     indicated by %NL80211_ATTR_MAC.
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -1604,6 +1621,9 @@ enum nl80211_commands {
        NL80211_CMD_ASSOC_MLO_RECONF,
        NL80211_CMD_EPCS_CFG,
 
+       NL80211_CMD_NAN_NEXT_DW_NOTIFICATION,
+       NL80211_CMD_NAN_CLUSTER_JOINED,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -1943,8 +1963,9 @@ enum nl80211_commands {
  *     The driver must also specify support for this with the extended
  *     features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
  *     NL80211_EXT_FEATURE_BEACON_RATE_HT,
- *     NL80211_EXT_FEATURE_BEACON_RATE_VHT and
- *     NL80211_EXT_FEATURE_BEACON_RATE_HE.
+ *     NL80211_EXT_FEATURE_BEACON_RATE_VHT,
+ *     NL80211_EXT_FEATURE_BEACON_RATE_HE and
+ *     NL80211_EXT_FEATURE_BEACON_RATE_EHT.
  *
  * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
  *     at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
@@ -2283,7 +2304,8 @@ enum nl80211_commands {
  * @NL80211_ATTR_PEER_AID: Association ID for the peer TDLS station (u16).
  *     This is similar to @NL80211_ATTR_STA_AID but with a difference of being
  *     allowed to be used with the first @NL80211_CMD_SET_STATION command to
- *     update a TDLS peer STA entry.
+ *     update a TDLS peer STA entry. For S1G interfaces, this is limited to
+ *     1600 for the current mac80211 implementation.
  *
  * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.
  *
@@ -2928,6 +2950,29 @@ enum nl80211_commands {
  *     required alongside this attribute. Refer to
  *     @enum nl80211_s1g_short_beacon_attrs for the attribute definitions.
  *
+ * @NL80211_ATTR_BSS_PARAM: nested attribute used with %NL80211_CMD_GET_WIPHY
+ *     which indicates which BSS parameters can be modified. The attribute can
+ *     also be used as flag attribute by user-space in %NL80211_CMD_SET_BSS to
+ *     indicate that it wants strict checking on the BSS parameters to be
+ *     modified.
+ *
+ * @NL80211_ATTR_NAN_CONFIG: Nested attribute for
+ *     extended NAN cluster configuration. This is used with
+ *     %NL80211_CMD_START_NAN and %NL80211_CMD_CHANGE_NAN_CONFIG.
+ *     See &enum nl80211_nan_conf_attributes for details.
+ *     This attribute is optional.
+ * @NL80211_ATTR_NAN_NEW_CLUSTER: Flag attribute indicating that a new
+ *     NAN cluster has been created. This is used with
+ *     %NL80211_CMD_NAN_CLUSTER_JOINED
+ * @NL80211_ATTR_NAN_CAPABILITIES: Nested attribute for NAN capabilities.
+ *     This is used with %NL80211_CMD_GET_WIPHY to indicate the NAN
+ *     capabilities supported by the driver. See &enum nl80211_nan_capabilities
+ *     for details.
+ *
+ * @NL80211_ATTR_S1G_PRIMARY_2MHZ: flag attribute indicating that the S1G
+ *     primary channel is 2 MHz wide, and the control channel designates
+ *     the 1 MHz primary subchannel within that 2 MHz primary.
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3489,6 +3534,12 @@ enum nl80211_attrs {
 
        NL80211_ATTR_S1G_LONG_BEACON_PERIOD,
        NL80211_ATTR_S1G_SHORT_BEACON,
+       NL80211_ATTR_BSS_PARAM,
+       NL80211_ATTR_NAN_CONFIG,
+       NL80211_ATTR_NAN_NEW_CLUSTER,
+       NL80211_ATTR_NAN_CAPABILITIES,
+
+       NL80211_ATTR_S1G_PRIMARY_2MHZ,
 
        /* add attributes here, update the policy in nl80211.c */
 
@@ -3735,6 +3786,22 @@ enum nl80211_eht_gi {
        NL80211_RATE_INFO_EHT_GI_3_2,
 };
 
+/**
+ * enum nl80211_eht_ltf - EHT long training field
+ * @NL80211_RATE_INFO_EHT_1XLTF: 3.2 usec
+ * @NL80211_RATE_INFO_EHT_2XLTF: 6.4 usec
+ * @NL80211_RATE_INFO_EHT_4XLTF: 12.8 usec
+ * @NL80211_RATE_INFO_EHT_6XLTF: 19.2 usec
+ * @NL80211_RATE_INFO_EHT_8XLTF: 25.6 usec
+ */
+enum nl80211_eht_ltf {
+       NL80211_RATE_INFO_EHT_1XLTF,
+       NL80211_RATE_INFO_EHT_2XLTF,
+       NL80211_RATE_INFO_EHT_4XLTF,
+       NL80211_RATE_INFO_EHT_6XLTF,
+       NL80211_RATE_INFO_EHT_8XLTF,
+};
+
 /**
  * enum nl80211_eht_ru_alloc - EHT RU allocation values
  * @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation
@@ -4371,6 +4438,12 @@ enum nl80211_wmm_rule {
  *     very low power (VLP) AP, despite being NO_IR.
  * @NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY: This channel can be active in
  *     20 MHz bandwidth, despite being NO_IR.
+ * @NL80211_FREQUENCY_ATTR_NO_4MHZ: 4 MHz operation is not allowed on this
+ *     channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_NO_8MHZ: 8 MHz operation is not allowed on this
+ *     channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_NO_16MHZ: 16 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
@@ -4416,6 +4489,9 @@ enum nl80211_frequency_attr {
        NL80211_FREQUENCY_ATTR_CAN_MONITOR,
        NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP,
        NL80211_FREQUENCY_ATTR_ALLOW_20MHZ_ACTIVITY,
+       NL80211_FREQUENCY_ATTR_NO_4MHZ,
+       NL80211_FREQUENCY_ATTR_NO_8MHZ,
+       NL80211_FREQUENCY_ATTR_NO_16MHZ,
 
        /* keep last */
        __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -5481,6 +5557,10 @@ enum nl80211_key_attributes {
  *     see &struct nl80211_txrate_he
  * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.
  * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.
+ * @NL80211_TXRATE_EHT: EHT rates allowed for TX rate selection,
+ *     see &struct nl80211_txrate_eht
+ * @NL80211_TXRATE_EHT_GI: configure EHT GI, (u8, see &enum nl80211_eht_gi)
+ * @NL80211_TXRATE_EHT_LTF: configure EHT LTF, (u8, see &enum nl80211_eht_ltf)
  * @__NL80211_TXRATE_AFTER_LAST: internal
  * @NL80211_TXRATE_MAX: highest TX rate attribute
  */
@@ -5493,6 +5573,9 @@ enum nl80211_tx_rate_attributes {
        NL80211_TXRATE_HE,
        NL80211_TXRATE_HE_GI,
        NL80211_TXRATE_HE_LTF,
+       NL80211_TXRATE_EHT,
+       NL80211_TXRATE_EHT_GI,
+       NL80211_TXRATE_EHT_LTF,
 
        /* keep last */
        __NL80211_TXRATE_AFTER_LAST,
@@ -5525,6 +5608,15 @@ enum nl80211_txrate_gi {
        NL80211_TXRATE_FORCE_LGI,
 };
 
+#define NL80211_EHT_NSS_MAX             16
+/**
+ * struct nl80211_txrate_eht - EHT MCS/NSS txrate bitmap
+ * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
+ */
+struct nl80211_txrate_eht {
+       __u16 mcs[NL80211_EHT_NSS_MAX];
+};
+
 /**
  * enum nl80211_band - Frequency band
  * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
@@ -6649,6 +6741,9 @@ enum nl80211_feature_flags {
  *     (signaling and payload protected) A-MSDUs and this shall be advertised
  *     in the RSNXE.
  *
+ * @NL80211_EXT_FEATURE_BEACON_RATE_EHT: Driver supports beacon rate
+ *     configuration (AP/mesh) with EHT rates.
+ *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  */
@@ -6724,6 +6819,7 @@ enum nl80211_ext_feature_index {
        NL80211_EXT_FEATURE_OWE_OFFLOAD_AP,
        NL80211_EXT_FEATURE_DFS_CONCURRENT,
        NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
+       NL80211_EXT_FEATURE_BEACON_RATE_EHT,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
@@ -7278,6 +7374,105 @@ enum nl80211_nan_match_attributes {
        NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
 };
 
+/**
+ * enum nl80211_nan_band_conf_attributes - NAN band configuration attributes
+ * @__NL80211_NAN_BAND_CONF_INVALID: Invalid.
+ * @NL80211_NAN_BAND_CONF_BAND: Band for which the configuration is
+ *     being set. The value is according to &enum nl80211_band (u8).
+ * @NL80211_NAN_BAND_CONF_FREQ: Discovery frequency. This attribute shall not
+ *     be present on 2.4 GHZ band. On 5 GHz band its presence is optional.
+ *     The allowed values are 5220 (channel 44) or 5745 (channel 149).
+ *     If not present, channel 149 is used if allowed, otherwise channel 44
+ *     will be selected. The value is in MHz (u16).
+ * @NL80211_NAN_BAND_CONF_RSSI_CLOSE: RSSI close threshold used for NAN state
+ *     transition algorithm as described in chapters 3.3.6 and 3.3.7 "NAN
+ *     Device Role and State Transition" of Wi-Fi Aware (TM) Specification
+ *     v4.0. If not specified, default device value is used. The value should
+ *     be greater than -60 dBm (s8).
+ * @NL80211_NAN_BAND_CONF_RSSI_MIDDLE: RSSI middle threshold used for NAN state
+ *     transition algorithm as described in chapters 3.3.6 and 3.3.7 "NAN
+ *     Device Role and State Transition" of Wi-Fi Aware (TM) Specification
+ *     v4.0. If not present, default device value is used. The value should be
+ *     greater than -75 dBm and less than %NL80211_NAN_BAND_CONF_RSSI_CLOSE
+ *     (s8).
+ * @NL80211_NAN_BAND_CONF_WAKE_DW: Committed DW information (values 0-5).
+ *     Value 0 means that the device will not wake up during the
+ *     discovery window. Values 1-5 mean that the device will wake up
+ *     during each 2^(n - 1) discovery window, where n is the value of
+ *     this attribute. Setting this attribute to 0 is not allowed on
+ *     2.4 GHz band (u8). This is an optional parameter (default is 1).
+ * @NL80211_NAN_BAND_CONF_DISABLE_SCAN: Optional flag attribute to disable
+ *     scanning (for cluster merge) on the band. If set, the device will not
+ *     scan on this band anymore. Disabling scanning on 2.4 GHz band is not
+ *     allowed.
+ * @NUM_NL80211_NAN_BAND_CONF_ATTR: Internal.
+ * @NL80211_NAN_BAND_CONF_ATTR_MAX: Highest NAN band configuration attribute.
+ *
+ * These attributes are used to configure NAN band-specific parameters. Note,
+ * that both RSSI attributes should be configured (or both left unset).
+ */
+enum nl80211_nan_band_conf_attributes {
+       __NL80211_NAN_BAND_CONF_INVALID,
+       NL80211_NAN_BAND_CONF_BAND,
+       NL80211_NAN_BAND_CONF_FREQ,
+       NL80211_NAN_BAND_CONF_RSSI_CLOSE,
+       NL80211_NAN_BAND_CONF_RSSI_MIDDLE,
+       NL80211_NAN_BAND_CONF_WAKE_DW,
+       NL80211_NAN_BAND_CONF_DISABLE_SCAN,
+
+       /* keep last */
+       NUM_NL80211_NAN_BAND_CONF_ATTR,
+       NL80211_NAN_BAND_CONF_ATTR_MAX = NUM_NL80211_NAN_BAND_CONF_ATTR - 1,
+};
+
+/**
+ * enum nl80211_nan_conf_attributes - NAN configuration attributes
+ * @__NL80211_NAN_CONF_INVALID: Invalid attribute, used for validation.
+ * @NL80211_NAN_CONF_CLUSTER_ID: ID for the NAN cluster. This is a MAC
+ *     address that can take values from 50-6F-9A-01-00-00 to
+ *     50-6F-9A-01-FF-FF. This attribute is optional. If not present,
+ *     a random Cluster ID will be chosen.
+ * @NL80211_NAN_CONF_EXTRA_ATTRS: Additional NAN attributes to be
+ *     published in the beacons. This is an optional byte array.
+ * @NL80211_NAN_CONF_VENDOR_ELEMS: Vendor-specific elements that will
+ *     be published in the beacons. This is an optional byte array.
+ * @NL80211_NAN_CONF_BAND_CONFIGS: This is a nested array attribute,
+ *     containing multiple entries for each supported band. Each band
+ *     configuration consists of &enum nl80211_nan_band_conf_attributes.
+ * @NL80211_NAN_CONF_SCAN_PERIOD: Scan period in seconds. If not configured,
+ *     device default is used. Zero value will disable scanning.
+ *     This is u16 (optional).
+ * @NL80211_NAN_CONF_SCAN_DWELL_TIME: Scan dwell time in TUs per channel.
+ *     Only non-zero values are valid. If not configured the device default
+ *     value is used. This is u16 (optional)
+ * @NL80211_NAN_CONF_DISCOVERY_BEACON_INTERVAL: Discovery beacon interval
+ *     in TUs. Valid range is 50-200 TUs. If not configured the device default
+ *     value is used. This is u8 (optional)
+ * @NL80211_NAN_CONF_NOTIFY_DW: If set, the driver will notify userspace about
+ *     the upcoming discovery window with
+ *     %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION.
+ *     This is a flag attribute.
+ * @NUM_NL80211_NAN_CONF_ATTR: Internal.
+ * @NL80211_NAN_CONF_ATTR_MAX: Highest NAN configuration attribute.
+ *
+ * These attributes are used to configure NAN-specific parameters.
+ */
+enum nl80211_nan_conf_attributes {
+       __NL80211_NAN_CONF_INVALID,
+       NL80211_NAN_CONF_CLUSTER_ID,
+       NL80211_NAN_CONF_EXTRA_ATTRS,
+       NL80211_NAN_CONF_VENDOR_ELEMS,
+       NL80211_NAN_CONF_BAND_CONFIGS,
+       NL80211_NAN_CONF_SCAN_PERIOD,
+       NL80211_NAN_CONF_SCAN_DWELL_TIME,
+       NL80211_NAN_CONF_DISCOVERY_BEACON_INTERVAL,
+       NL80211_NAN_CONF_NOTIFY_DW,
+
+       /* keep last */
+       NUM_NL80211_NAN_CONF_ATTR,
+       NL80211_NAN_CONF_ATTR_MAX = NUM_NL80211_NAN_CONF_ATTR - 1,
+};
+
 /**
  * enum nl80211_external_auth_action - Action to perform with external
  *     authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
@@ -8187,4 +8382,54 @@ enum nl80211_s1g_short_beacon_attrs {
                __NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1
 };
 
+/**
+ * enum nl80211_nan_capabilities - NAN (Neighbor Aware Networking)
+ *     capabilities.
+ *
+ * @__NL80211_NAN_CAPABILITIES_INVALID: Invalid.
+ * @NL80211_NAN_CAPA_CONFIGURABLE_SYNC: Flag attribute indicating that
+ *     the device supports configurable synchronization. If set, the device
+ *     should be able to handle %NL80211_ATTR_NAN_CONFIG
+ *     attribute in the %NL80211_CMD_START_NAN (and change) command.
+ * @NL80211_NAN_CAPA_USERSPACE_DE: Flag attribute indicating that
+ *     NAN Discovery Engine (DE) is not offloaded and the driver assumes
+ *     user space DE implementation. When set, %NL80211_CMD_ADD_NAN_FUNCTION,
+ *     %NL80211_CMD_DEL_NAN_FUNCTION and %NL80211_CMD_NAN_MATCH commands
+ *     should not be used. In addition, the device/driver should support
+ *     sending discovery window (DW) notifications using
+ *     %NL80211_CMD_NAN_NEXT_DW_NOTIFICATION and handling transmission and
+ *     reception of NAN SDF frames on NAN device interface during DW windows.
+ *     (%NL80211_CMD_FRAME is used to transmit SDFs)
+ * @NL80211_NAN_CAPA_OP_MODE: u8 attribute indicating the supported operation
+ *     modes as defined in Wi-Fi Aware (TM) specification Table 81 (Operation
+ *     Mode field format).
+ * @NL80211_NAN_CAPA_NUM_ANTENNAS: u8 attribute indicating the number of
+ *     TX and RX antennas supported by the device. Lower nibble indicates
+ *     the number of TX antennas and upper nibble indicates the number of RX
+ *     antennas. Value 0 indicates the information is not available.
+ *     See table 79 of Wi-Fi Aware (TM) specification (Number of
+ *     Antennas field).
+ * @NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME: u16 attribute indicating the
+ *     maximum time in microseconds that the device requires to switch
+ *     channels.
+ * @NL80211_NAN_CAPA_CAPABILITIES: u8 attribute containing the
+ *     capabilities of the device as defined in Wi-Fi Aware (TM)
+ *     specification Table 79 (Capabilities field).
+ * @__NL80211_NAN_CAPABILITIES_LAST: Internal
+ * @NL80211_NAN_CAPABILITIES_MAX: Highest NAN capability attribute.
+ */
+enum nl80211_nan_capabilities {
+       __NL80211_NAN_CAPABILITIES_INVALID,
+
+       NL80211_NAN_CAPA_CONFIGURABLE_SYNC,
+       NL80211_NAN_CAPA_USERSPACE_DE,
+       NL80211_NAN_CAPA_OP_MODE,
+       NL80211_NAN_CAPA_NUM_ANTENNAS,
+       NL80211_NAN_CAPA_MAX_CHANNEL_SWITCH_TIME,
+       NL80211_NAN_CAPA_CAPABILITIES,
+       /* keep last */
+       __NL80211_NAN_CAPABILITIES_LAST,
+       NL80211_NAN_CAPABILITIES_MAX = __NL80211_NAN_CAPABILITIES_LAST - 1,
+};
+
 #endif /* __LINUX_NL80211_H */