summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-05-06 17:29:32 +0300
committerJakub Kicinski <kuba@kernel.org>2026-05-06 17:29:33 +0300
commit2281958e60079e063bd6e9e5e46e8786a9853ea8 (patch)
tree90258aebb65930997010c02fde5c9fd15f7941f7 /include
parent7e0cccae6b45b12eaf71fc3ab8eb133bb50b28ad (diff)
parent89e367a90c1a877ca9c5d75d3848582d80fd0e60 (diff)
downloadlinux-2281958e60079e063bd6e9e5e46e8786a9853ea8.tar.xz
Merge tag 'wireless-next-2026-05-06' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
Johannes Berg says: ==================== Lots of new content in cfg80211/mac80211, notably - more NAN work, mostly complete now (also hwsim) - more UHR work (e.g. non-primary channel access), this will continue for a while - FTM ranging APIs * tag 'wireless-next-2026-05-06' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (70 commits) wifi: mac80211: explicitly disable FTM responder on AP stop wifi: iwlwifi: don't blindly start the responder upon BSS_CHANGED_FTM_RESPONDER wifi: mac80211_hwsim: claim HT STBC capability wifi: mac80211_hwsim: enable NAN_DATA interface simulation support wifi: mac80211_hwsim: Support Tx of multicast data on NAN wifi: mac80211_hwsim: Do not declare support for NDPE wifi: mac80211_hwsim: Declare support for secure NAN wifi: mac80211_hwsim: add NAN data path TX/RX support wifi: mac80211_hwsim: set HAS_RATE_CONTROL when using NAN wifi: mac80211_hwsim: implement NAN schedule callbacks wifi: mac80211_hwsim: add NAN PHY capabilities wifi: mac80211_hwsim: add NAN_DATA interface limits wifi: mac80211_hwsim: implement NAN synchronization wifi: mac80211_hwsim: protect tsf_offset using a spinlock wifi: mac80211_hwsim: only RX on NAN when active on a slot wifi: mac80211_hwsim: select NAN TX channel based on current TSF wifi: mac80211_hwsim: limit TX of frames to the NAN DW wifi: cfg80211: don't allow NAN DATA on multi radio devices wifi: mac80211: check AP using NPCA has NPCA capability wifi: mac80211: don't parse full UHR operation from beacons ... ==================== Link: https://patch.msgid.link/20260506111147.224296-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee80211-eht.h14
-rw-r--r--include/linux/ieee80211-uhr.h55
-rw-r--r--include/linux/ieee80211.h1
-rw-r--r--include/net/cfg80211.h251
-rw-r--r--include/net/mac80211.h64
-rw-r--r--include/uapi/linux/nl80211.h293
6 files changed, 620 insertions, 58 deletions
diff --git a/include/linux/ieee80211-eht.h b/include/linux/ieee80211-eht.h
index 335e78bd4b5d..87d92fb86fab 100644
--- a/include/linux/ieee80211-eht.h
+++ b/include/linux/ieee80211-eht.h
@@ -9,7 +9,7 @@
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright (c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright (c) 2018 - 2025 Intel Corporation
+ * Copyright (c) 2018 - 2026 Intel Corporation
*/
#ifndef LINUX_IEEE80211_EHT_H
@@ -750,11 +750,13 @@ static inline u16 ieee80211_mle_get_mld_capa_op(const u8 *data)
}
/* Defined in Figure 9-1074t in P802.11be_D7.0 */
-#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_PARAM_UPDATE 0x0001
-#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_RECO_MAX_LINKS_MASK 0x001e
-#define IEEE80211_EHT_ML_EXT_MLD_CAPA_NSTR_UPDATE 0x0020
-#define IEEE80211_EHT_ML_EXT_MLD_CAPA_EMLSR_ENA_ON_ONE_LINK 0x0040
-#define IEEE80211_EHT_ML_EXT_MLD_CAPA_BTM_MLD_RECO_MULTI_AP 0x0080
+#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_PARAM_UPDATE 0x0001
+#define IEEE80211_EHT_ML_EXT_MLD_CAPA_OP_RECO_MAX_LINKS_MASK 0x001e
+#define IEEE80211_EHT_ML_EXT_MLD_CAPA_NSTR_UPDATE 0x0020
+#define IEEE80211_EHT_ML_EXT_MLD_CAPA_EMLSR_ENA_ON_ONE_LINK 0x0040
+#define IEEE80211_EHT_ML_EXT_MLD_CAPA_BTM_MLD_RECO_MULTI_AP 0x0080
+/* defined by UHR Draft P802.11bn_D1.3 Figure 9-1147 */
+#define IEEE80211_UHR_ML_EXT_MLD_CAPA_ML_PM 0x0100
/**
* ieee80211_mle_get_ext_mld_capa_op - returns the extended MLD capabilities
diff --git a/include/linux/ieee80211-uhr.h b/include/linux/ieee80211-uhr.h
index d199f3ebdba0..f4f4bd8256df 100644
--- a/include/linux/ieee80211-uhr.h
+++ b/include/linux/ieee80211-uhr.h
@@ -372,6 +372,12 @@ ieee80211_uhr_npca_dis_subch_bitmap(const struct ieee80211_uhr_operation *oper)
#define IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES 0x08
#define IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES 0x10
+struct ieee80211_uhr_cap_dbe {
+ u8 cap;
+ /* present 0, 1 or 2 times depending on _PRES bits */
+ struct ieee80211_eht_mcs_nss_supp_bw eht_mcs_map[];
+} __packed;
+
/**
* enum ieee80211_uhr_dbe_max_supported_bw - DBE Maximum Supported Bandwidth
*
@@ -394,12 +400,6 @@ struct ieee80211_uhr_cap_mac {
u8 mac_cap[5];
} __packed;
-struct ieee80211_uhr_cap {
- struct ieee80211_uhr_cap_mac mac;
- /* DBE, PHY capabilities */
- u8 variable[];
-} __packed;
-
#define IEEE80211_UHR_PHY_CAP_MAX_NSS_RX_SND_NDP_LE80 0x01
#define IEEE80211_UHR_PHY_CAP_MAX_NSS_RX_DL_MU_LE80 0x02
#define IEEE80211_UHR_PHY_CAP_MAX_NSS_RX_SND_NDP_160 0x04
@@ -413,11 +413,18 @@ struct ieee80211_uhr_cap_phy {
u8 cap;
} __packed;
+struct ieee80211_uhr_cap {
+ struct ieee80211_uhr_cap_mac mac;
+ struct ieee80211_uhr_cap_phy phy;
+ /* optional DBE capabilities */
+ u8 variable[];
+} __packed;
+
static inline bool ieee80211_uhr_capa_size_ok(const u8 *data, u8 len,
bool from_ap)
{
const struct ieee80211_uhr_cap *cap = (const void *)data;
- size_t needed = sizeof(*cap) + sizeof(struct ieee80211_uhr_cap_phy);
+ size_t needed = sizeof(*cap);
if (len < needed)
return false;
@@ -427,44 +434,24 @@ static inline bool ieee80211_uhr_capa_size_ok(const u8 *data, u8 len,
* in the UHR MAC Capabilities Information field.
*/
if (from_ap && cap->mac.mac_cap[1] & IEEE80211_UHR_MAC_CAP1_DBE_SUPP) {
- u8 dbe;
+ const struct ieee80211_uhr_cap_dbe *dbe;
- needed += 1;
+ needed += sizeof(struct ieee80211_uhr_cap_dbe);
if (len < needed)
return false;
- dbe = cap->variable[0];
+ dbe = (const void *)cap->variable;
- if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES)
- needed += 3;
+ if (dbe->cap & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES)
+ needed += sizeof(dbe->eht_mcs_map[0]);
- if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES)
- needed += 3;
+ if (dbe->cap & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES)
+ needed += sizeof(dbe->eht_mcs_map[0]);
}
return len >= needed;
}
-static inline const struct ieee80211_uhr_cap_phy *
-ieee80211_uhr_phy_cap(const struct ieee80211_uhr_cap *cap, bool from_ap)
-{
- u8 offs = 0;
-
- if (from_ap && cap->mac.mac_cap[1] & IEEE80211_UHR_MAC_CAP1_DBE_SUPP) {
- u8 dbe = cap->variable[0];
-
- offs += 1;
-
- if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_160_PRES)
- offs += 3;
-
- if (dbe & IEEE80211_UHR_MAC_CAP_DBE_EHT_MCS_MAP_320_PRES)
- offs += 3;
- }
-
- return (const void *)&cap->variable[offs];
-}
-
#define IEEE80211_SMD_INFO_CAPA_DL_DATA_FWD 0x01
#define IEEE80211_SMD_INFO_CAPA_MAX_NUM_PREP 0x0E
#define IEEE80211_SMD_INFO_CAPA_TYPE 0x10
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 23f9df9be837..11106589acc6 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2236,6 +2236,7 @@ struct ieee80211_multiple_bssid_configuration {
#define WLAN_AKM_SUITE_WFA_DPP SUITE(WLAN_OUI_WFA, 2)
#define WLAN_MAX_KEY_LEN 32
+#define WLAN_MAX_SECURE_LTF_KEYSEED_LEN 48
#define WLAN_PMK_NAME_LEN 16
#define WLAN_PMKID_LEN 16
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index a40ab36b8edb..ddcf559430dd 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -830,6 +830,8 @@ struct vif_params {
* @seq_len: length of @seq.
* @vlan_id: vlan_id for VLAN group key (if nonzero)
* @mode: key install mode (RX_TX, NO_TX or SET_TX)
+ * @ltf_keyseed: LTF key seed material
+ * @ltf_keyseed_len: length of LTF key seed material
*/
struct key_params {
const u8 *key;
@@ -839,11 +841,18 @@ struct key_params {
u16 vlan_id;
u32 cipher;
enum nl80211_key_mode mode;
+ const u8 *ltf_keyseed;
+ size_t ltf_keyseed_len;
};
/**
* struct cfg80211_chan_def - channel definition
* @chan: the (control) channel
+ * @npca_chan: the NPCA primary channel
+ * Note that if DBE is in use, this channel may appear to be
+ * inside the primary half of the chandef. Implementations
+ * can use the position of this channel to understand how
+ * NPCA is used.
* @width: channel width
* @center_freq1: center frequency of first segment
* @center_freq2: center frequency of second segment
@@ -856,18 +865,24 @@ struct key_params {
* @punctured: mask of the punctured 20 MHz subchannels, with
* bits turned on being disabled (punctured); numbered
* from lower to higher frequency (like in the spec)
+ * @npca_punctured: NPCA puncturing bitmap, like @punctured but for
+ * NPCA transmissions. If NPCA is used (@npca_chan is not %NULL)
+ * this will be a superset of the @punctured bimap.
+ * Note that if DBE is used, this bitmap is also shifted to be in
+ * accordance with the overall chandef bandwidth.
* @s1g_primary_2mhz: Indicates if the control channel pointed to
* by 'chan' exists as a 1MHz primary subchannel within an
* S1G 2MHz primary channel.
*/
struct cfg80211_chan_def {
struct ieee80211_channel *chan;
+ struct ieee80211_channel *npca_chan;
enum nl80211_chan_width width;
u32 center_freq1;
u32 center_freq2;
struct ieee80211_edmg edmg;
u16 freq1_offset;
- u16 punctured;
+ u16 punctured, npca_punctured;
bool s1g_primary_2mhz;
};
@@ -1014,7 +1029,9 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
chandef1->freq1_offset == chandef2->freq1_offset &&
chandef1->center_freq2 == chandef2->center_freq2 &&
chandef1->punctured == chandef2->punctured &&
- chandef1->s1g_primary_2mhz == chandef2->s1g_primary_2mhz);
+ chandef1->s1g_primary_2mhz == chandef2->s1g_primary_2mhz &&
+ chandef1->npca_chan == chandef2->npca_chan &&
+ chandef1->npca_punctured == chandef2->npca_punctured);
}
/**
@@ -1144,6 +1161,36 @@ int cfg80211_chandef_primary(const struct cfg80211_chan_def *chandef,
u16 *punctured);
/**
+ * cfg80211_chandef_npca_valid - check that NPCA information is valid
+ * @wiphy: the wiphy to check for, for channel pointer lookup
+ * @chandef: the BSS channel chandef to check against
+ * @npca: NPCA information, can be %NULL in which case this
+ * always returns %true
+ *
+ * Note that DBE must not have been configured into the chandef yet
+ * before checking NPCA, i.e. @chandef must represent the BSS channel.
+ *
+ * Returns: %true if the NPCA channel and puncturing bitmap are valid
+ * according to the chandef, %false otherwise
+ */
+bool cfg80211_chandef_npca_valid(struct wiphy *wiphy,
+ const struct cfg80211_chan_def *chandef,
+ const struct ieee80211_uhr_npca_info *npca);
+
+/**
+ * cfg80211_chandef_add_npca - parse and add NPCA information to chandef
+ * @wiphy: the wiphy this will be used for, for channel pointer lookup
+ * @chandef: the chandef to modify, must be a valid chandef without NPCA
+ * @npca: the NPCA information, can be %NULL
+ *
+ * Returns: 0 if the NPCA information was added and the resulting
+ * chandef is valid, a negative error code on errors
+ */
+int cfg80211_chandef_add_npca(struct wiphy *wiphy,
+ struct cfg80211_chan_def *chandef,
+ const struct ieee80211_uhr_npca_info *npca);
+
+/**
* nl80211_send_chandef - sends the channel definition.
* @msg: the msg to send channel definition
* @chandef: the channel definition to check
@@ -4436,6 +4483,25 @@ struct cfg80211_ftm_responder_stats {
* (must have either this or @rtt_avg)
* @dist_variance: variance of distances measured (see also @rtt_variance)
* @dist_spread: spread of distances measured (see also @rtt_spread)
+ * @tx_ltf_repetition_count: negotiated value of number of tx ltf repetitions
+ * in NDP frames
+ * @rx_ltf_repetition_count: negotiated value of number of rx ltf repetitions
+ * in NDP frames
+ * @max_time_between_measurements: the negotiated maximum interval (in units of
+ * 10 ms) by which the ISTA must complete the next measurement cycle.
+ * @min_time_between_measurements: the negotiated minimum interval (in units of
+ * 100 us) between two consecutive range measurements initiated by the
+ * ISTA.
+ * @num_tx_spatial_streams: number of Tx space-time streams used in the NDP
+ * frame during the measurement sounding phase.
+ * @num_rx_spatial_streams: number of Rx space-time streams used in the NDP
+ * frame during the measurement sounding phase.
+ * @nominal_time: negotiated nominal duration between adjacent availability
+ * windows in units of milliseconds (u32).
+ * @availability_window: negotiated availability window time used in this
+ * session in units of milliseconds (u8).
+ * @chan_width: band width used for measurement.
+ * @preamble: preamble used for measurement.
* @num_ftmr_attempts_valid: @num_ftmr_attempts is valid
* @num_ftmr_successes_valid: @num_ftmr_successes is valid
* @rssi_avg_valid: @rssi_avg is valid
@@ -4448,6 +4514,18 @@ struct cfg80211_ftm_responder_stats {
* @dist_avg_valid: @dist_avg is valid
* @dist_variance_valid: @dist_variance is valid
* @dist_spread_valid: @dist_spread is valid
+ * @tx_ltf_repetition_count_valid: @tx_ltf_repetition_count is valid
+ * @rx_ltf_repetition_count_valid: @rx_ltf_repetition_count is valid
+ * @max_time_between_measurements_valid: @max_time_between_measurements is valid
+ * @min_time_between_measurements_valid: @min_time_between_measurements is valid
+ * @num_tx_spatial_streams_valid: @num_tx_spatial_streams is valid
+ * @num_rx_spatial_streams_valid: @num_rx_spatial_streams is valid
+ * @nominal_time_valid: @nominal_time is valid
+ * @availability_window_valid: @availability_window is valid
+ * @chan_width_valid: @chan_width is valid.
+ * @preamble_valid: @preamble is valid.
+ * @is_delayed_lmr: indicates if the reported LMR is of the current burst or the
+ * previous burst, flag.
*/
struct cfg80211_pmsr_ftm_result {
const u8 *lci;
@@ -4471,8 +4549,18 @@ struct cfg80211_pmsr_ftm_result {
s64 dist_avg;
s64 dist_variance;
s64 dist_spread;
+ u32 tx_ltf_repetition_count;
+ u32 rx_ltf_repetition_count;
+ u32 max_time_between_measurements;
+ u32 min_time_between_measurements;
+ u8 num_tx_spatial_streams;
+ u8 num_rx_spatial_streams;
+ u32 nominal_time;
+ u8 availability_window;
+ enum nl80211_chan_width chan_width;
+ enum nl80211_preamble preamble;
- u16 num_ftmr_attempts_valid:1,
+ u32 num_ftmr_attempts_valid:1,
num_ftmr_successes_valid:1,
rssi_avg_valid:1,
rssi_spread_valid:1,
@@ -4483,7 +4571,18 @@ struct cfg80211_pmsr_ftm_result {
rtt_spread_valid:1,
dist_avg_valid:1,
dist_variance_valid:1,
- dist_spread_valid:1;
+ dist_spread_valid:1,
+ tx_ltf_repetition_count_valid:1,
+ rx_ltf_repetition_count_valid:1,
+ max_time_between_measurements_valid:1,
+ min_time_between_measurements_valid:1,
+ num_tx_spatial_streams_valid:1,
+ num_rx_spatial_streams_valid:1,
+ nominal_time_valid:1,
+ availability_window_valid:1,
+ chan_width_valid:1,
+ preamble_valid:1,
+ is_delayed_lmr:1;
};
/**
@@ -4527,7 +4626,8 @@ struct cfg80211_pmsr_result {
* @burst_duration: burst duration. If @trigger_based or @non_trigger_based is
* set, this is the burst duration in milliseconds, and zero means the
* device should pick an appropriate value based on @ftms_per_burst.
- * @ftms_per_burst: number of FTMs per burst
+ * @ftms_per_burst: number of FTMs per burst. If set to 0, the firmware or
+ * driver can automatically select an appropriate value.
* @ftmr_retries: number of retries for FTM request
* @request_lci: request LCI information
* @request_civicloc: request civic location information
@@ -4544,6 +4644,48 @@ struct cfg80211_pmsr_result {
* @bss_color: the bss color of the responder. Optional. Set to zero to
* indicate the driver should set the BSS color. Only valid if
* @non_trigger_based or @trigger_based is set.
+ * @request_type: ranging request type, one of
+ * &enum nl80211_peer_measurement_ftm_req_type. Defaults to
+ * %NL80211_PMSR_FTM_REQ_TYPE_INFRA if not specified.
+ * @min_time_between_measurements: minimum time between two consecutive range
+ * measurements in units of 100 microseconds, for non-trigger based
+ * ranging. Should be set as short as possible to minimize turnaround
+ * time, since two-way ranging with delayed LMR requires two measurements.
+ * Only valid if @non_trigger_based is set.
+ * @max_time_between_measurements: maximum time between two consecutive range
+ * measurements in units of 10 milliseconds, for non-trigger based
+ * ranging. Acts as a session timeout; if exceeded, the ranging session
+ * should be terminated. Only valid if @non_trigger_based is set.
+ * @availability_window: duration of the availability window (AW) in units of
+ * 1 millisecond (0-255 ms). Only valid if @non_trigger_based is set.
+ * If set to 0, the firmware or driver can automatically select an
+ * appropriate value.
+ * @nominal_time: Nominal duration between adjacent availability windows
+ * in units of milli seconds. Only valid if @non_trigger_based is set.
+ * If set to 0, the firmware or driver can automatically select an
+ * appropriate value.
+ * @num_measurements: number of Availability Windows (AWs) to schedule
+ * for non-trigger-based ranging. Each AW may contain multiple FTM
+ * exchanges as configured by @ftms_per_burst. Only valid if
+ * @non_trigger_based is set. If set to 0, the firmware or driver
+ * can automatically select an appropriate value.
+ * @ingress_distance: optional ingress threshold in units of mm. When set,
+ * the measurement result of the peer needs to be indicated if the device
+ * moves into this range. Measurement results need to be sent on a burst
+ * index basis in this case.
+ * @egress_distance: optional egress threshold in units of mm. When set,
+ * the measurement result of the peer needs to be indicated if the device
+ * moves out of this range. Measurement results need to be sent on a burst
+ * index basis in this case.
+ * If neither or only one of @ingress_distance and @egress_distance
+ * is set, only the specified threshold is used. If both are set, both
+ * thresholds are applied. If neither is set, results are reported without
+ * threshold filtering.
+ * @pd_suppress_range_results: flag to suppress ranging results for PD
+ * requests. When set, the device performs ranging measurements to
+ * provide ranging services to a peer (e.g. in RSTA role) but does
+ * not report the measurement results to userspace. Only valid when
+ * @request_type is %NL80211_PMSR_FTM_REQ_TYPE_PD.
*
* See also nl80211 for the respective attribute documentation.
*/
@@ -4563,6 +4705,16 @@ struct cfg80211_pmsr_ftm_request_peer {
u8 ftms_per_burst;
u8 ftmr_retries;
u8 bss_color;
+
+ u32 request_type;
+ u32 min_time_between_measurements;
+ u32 max_time_between_measurements;
+ u8 availability_window;
+ u32 nominal_time;
+ u32 num_measurements;
+ u64 ingress_distance;
+ u64 egress_distance;
+ u8 pd_suppress_range_results:1;
};
/**
@@ -5088,6 +5240,9 @@ struct mgmt_frame_regs {
* links by calling cfg80211_mlo_reconf_add_done(). When calling
* cfg80211_mlo_reconf_add_done() the bss pointer must be given for each
* link for which MLO reconfiguration 'add' operation was requested.
+ *
+ * @start_pd: Start the PD interface.
+ * @stop_pd: Stop the PD interface.
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -5270,7 +5425,7 @@ struct cfg80211_ops {
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
unsigned int duration,
- u64 *cookie);
+ u64 *cookie, const u8 *rx_addr);
int (*cancel_remain_on_channel)(struct wiphy *wiphy,
struct wireless_dev *wdev,
u64 cookie);
@@ -5464,6 +5619,8 @@ struct cfg80211_ops {
struct cfg80211_ml_reconf_req *req);
int (*set_epcs)(struct wiphy *wiphy, struct net_device *dev,
bool val);
+ int (*start_pd)(struct wiphy *wiphy, struct wireless_dev *wdev);
+ void (*stop_pd)(struct wiphy *wiphy, struct wireless_dev *wdev);
};
/*
@@ -5855,6 +6012,7 @@ struct wiphy_vendor_command {
* @extended_capabilities_len: length of the extended capabilities
* @eml_capabilities: EML capabilities (for MLO)
* @mld_capa_and_ops: MLD capabilities and operations (for MLO)
+ * @ext_mld_capa_and_ops: Extended MLD capabilities and operations (for MLO)
*/
struct wiphy_iftype_ext_capab {
enum nl80211_iftype iftype;
@@ -5863,6 +6021,7 @@ struct wiphy_iftype_ext_capab {
u8 extended_capabilities_len;
u16 eml_capabilities;
u16 mld_capa_and_ops;
+ u16 ext_mld_capa_and_ops;
};
/**
@@ -5906,7 +6065,53 @@ cfg80211_get_iftype_ext_capa(struct wiphy *wiphy, enum nl80211_iftype type);
* (0 means unknown)
* @ftm.max_total_ltf_rx: maximum total number of LTFs that can be received
* (0 means unknown)
- * @ftm.support_rsta: supports operating as RSTA in PMSR FTM request
+ * @ftm.ista: initiator role capabilities
+ * @ftm.ista.support_ntb: supports operating as ISTA in PMSR FTM request for
+ * NTB ranging.
+ * @ftm.ista.support_tb: supports operating as ISTA in PMSR FTM request for
+ * TB ranging.
+ * @ftm.ista.support_edca: supports operating as ISTA in PMSR FTM request for
+ * EDCA based ranging.
+ * @ftm.ista.max_peers: maximum number of peers supported in the ISTA role.
+ * If zero, no role-specific peer limit applies.
+ * @ftm.rsta: responder role capabilities
+ * @ftm.rsta.support_ntb: supports operating as RSTA in PMSR FTM request for
+ * NTB ranging.
+ * @ftm.rsta.support_tb: supports operating as RSTA in PMSR FTM request for
+ * TB ranging.
+ * @ftm.rsta.support_edca: supports operating as RSTA in PMSR FTM request for
+ * EDCA based ranging.
+ * @ftm.rsta.max_peers: maximum number of peers supported in the RSTA role.
+ * If zero, no role-specific peer limit applies.
+ * @ftm.max_no_of_tx_antennas: maximum number of transmit antennas supported for
+ * EDCA based ranging (0 means unknown)
+ * @ftm.max_no_of_rx_antennas: maximum number of receive antennas supported for
+ * EDCA based ranging (0 means unknown)
+ * @ftm.min_allowed_ranging_interval_edca: Minimum EDCA ranging
+ * interval supported by the device in milli seconds. (0 means unknown).
+ * Applications can use this value to estimate the burst period to be
+ * given in the FTM request for the EDCA based ranging case. If
+ * non-zero, this value will be used to validate the burst period in
+ * the FTM request.
+ * @ftm.min_allowed_ranging_interval_ntb: Minimum NTB ranging
+ * interval supported by the device in milli seconds. (0 means unknown).
+ * Applications can use this value to estimate the burst period to be
+ * given in the FTM request for the NTB ranging case. If non-zero,
+ * this value will be used to validate the nominal time in the FTM
+ * request.
+ * @ftm.type: ranging type capabilities
+ * @ftm.type.infra_support: supports infrastructure ranging (STA-to-AP or
+ * AP-to-STA) as part of Proximity Detection
+ * @ftm.type.pd_support: supports peer-to-peer ranging as mentioned in the
+ * specification "PR Implementation Consideration Draft 1.9 rev 1" where
+ * PD stands for proximity detection
+ * @ftm.concurrent_ista_rsta_support: indicates if the device can
+ * simultaneously act as initiator and responder in a multi-peer
+ * measurement request. Only valid if @ftm.rsta_support is set.
+ * @ftm.pd_preambles: bitmap of preambles supported (&enum nl80211_preamble)
+ * for PD ranging requests. Ignored if @ftm.type.pd_support is not set.
+ * @ftm.pd_bandwidths: bitmap of bandwidths supported (&enum nl80211_chan_width)
+ * for PD ranging requests. Ignored if @ftm.type.pd_support is not set.
*/
struct cfg80211_pmsr_capabilities {
unsigned int max_peers;
@@ -5932,7 +6137,29 @@ struct cfg80211_pmsr_capabilities {
u8 max_rx_sts;
u8 max_total_ltf_tx;
u8 max_total_ltf_rx;
- u8 support_rsta:1;
+ struct {
+ u8 support_ntb:1,
+ support_tb:1,
+ support_edca:1;
+ u32 max_peers;
+ } ista;
+ struct {
+ u8 support_ntb:1,
+ support_tb:1,
+ support_edca:1;
+ u32 max_peers;
+ } rsta;
+ u8 max_no_of_tx_antennas;
+ u8 max_no_of_rx_antennas;
+ u32 min_allowed_ranging_interval_edca;
+ u32 min_allowed_ranging_interval_ntb;
+ struct {
+ u8 infra_support:1,
+ pd_support:1;
+ } type;
+ u8 concurrent_ista_rsta_support:1;
+ u32 pd_preambles;
+ u32 pd_bandwidths;
} ftm;
};
@@ -6027,7 +6254,7 @@ enum wiphy_nan_flags {
* nibble indicates the number of TX antennas and upper nibble indicates the
* number of RX antennas. Value 0 indicates the information is not
* available.
- * @max_channel_switch_time: maximum channel switch time in milliseconds.
+ * @max_channel_switch_time: maximum channel switch time in microseconds.
* @dev_capabilities: NAN device capabilities as defined in Wi-Fi Aware (TM)
* specification Table 79 (Capabilities field).
* @phy: Band-agnostic capabilities for NAN data interfaces. Since NAN
@@ -8305,6 +8532,7 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr);
* as the AC bitmap in the QoS info field
* @req_ies: information elements from the (Re)Association Request frame
* @req_ies_len: length of req_ies data
+ * @assoc_encrypted: indicate if the (re)association exchange is encrypted.
* @ap_mld_addr: AP MLD address (in case of MLO)
* @links: per-link information indexed by link ID, use links[0] for
* non-MLO connections
@@ -8319,6 +8547,7 @@ struct cfg80211_rx_assoc_resp_data {
const u8 *req_ies;
size_t req_ies_len;
int uapsd_queues;
+ bool assoc_encrypted;
const u8 *ap_mld_addr;
struct {
u8 addr[ETH_ALEN] __aligned(2);
@@ -8838,6 +9067,9 @@ struct cfg80211_fils_resp_params {
* @links.status: per-link status code, to report a status code that's not
* %WLAN_STATUS_SUCCESS for a given link, it must also be in the
* @valid_links bitmap and may have a BSS pointer (which is then released)
+ * @assoc_encrypted: The driver should set this flag to indicate that the
+ * (Re)Association Request/Response frames are transmitted encrypted over
+ * the air.
*/
struct cfg80211_connect_resp_params {
int status;
@@ -8847,6 +9079,7 @@ struct cfg80211_connect_resp_params {
size_t resp_ie_len;
struct cfg80211_fils_resp_params fils;
enum nl80211_timeout_reason timeout_reason;
+ bool assoc_encrypted;
const u8 *ap_mld_addr;
u16 valid_links;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 02318a4be0e1..4fb579805e0f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -218,6 +218,8 @@ struct ieee80211_low_level_stats {
* bandwidth) OFDMA settings need to be changed
* @IEEE80211_CHANCTX_CHANGE_PUNCTURING: The punctured channel(s) bitmap
* was changed.
+ * @IEEE80211_CHANCTX_CHANGE_NPCA: NPCA configuration changed
+ * @IEEE80211_CHANCTX_CHANGE_NPCA_PUNCT: NPCA puncturing changed
*/
enum ieee80211_chanctx_change {
IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0),
@@ -227,6 +229,8 @@ enum ieee80211_chanctx_change {
IEEE80211_CHANCTX_CHANGE_MIN_DEF = BIT(4),
IEEE80211_CHANCTX_CHANGE_AP = BIT(5),
IEEE80211_CHANCTX_CHANGE_PUNCTURING = BIT(6),
+ IEEE80211_CHANCTX_CHANGE_NPCA = BIT(7),
+ IEEE80211_CHANCTX_CHANGE_NPCA_PUNCT = BIT(8),
};
/**
@@ -234,10 +238,13 @@ enum ieee80211_chanctx_change {
* @oper: channel definition to use for operation
* @ap: the channel definition of the AP, if any
* (otherwise the chan member is %NULL)
+ * @require_npca: If NPCA is configured, require it to
+ * remain, this is used by AP interfaces
*/
struct ieee80211_chan_req {
struct cfg80211_chan_def oper;
struct cfg80211_chan_def ap;
+ bool require_npca;
};
/**
@@ -366,6 +373,7 @@ struct ieee80211_vif_chanctx_switch {
* @BSS_CHANGED_MLD_TTLM: negotiated TID to link mapping was changed
* @BSS_CHANGED_TPE: transmit power envelope changed
* @BSS_CHANGED_NAN_LOCAL_SCHED: NAN local schedule changed (NAN mode only)
+ * @BSS_CHANGED_NPCA: NPCA parameters changed
*/
enum ieee80211_bss_change {
BSS_CHANGED_ASSOC = 1<<0,
@@ -404,6 +412,7 @@ enum ieee80211_bss_change {
BSS_CHANGED_MLD_TTLM = BIT_ULL(34),
BSS_CHANGED_TPE = BIT_ULL(35),
BSS_CHANGED_NAN_LOCAL_SCHED = BIT_ULL(36),
+ BSS_CHANGED_NPCA = BIT_ULL(37),
/* when adding here, make sure to change ieee80211_reconfig */
};
@@ -590,6 +599,26 @@ struct ieee80211_parsed_tpe {
};
/**
+ * struct ieee80211_bss_npca_params - NPCA parameters
+ * @min_dur_thresh: NPCA minimum duration threshold (512 + 128*n usec)
+ * @switch_delay: NPCA switch delay (units of 4 usec)
+ * @switch_back_delay: NPCA switch back delay (units of 4 usec)
+ * @init_qsrc: initial QSRC value
+ * @moplen: indicates MOPLEN NPCA is permitted in the BSS
+ * @enabled: NPCA is enabled for this link
+ *
+ * Note: the individual values (except @enabled) are in spec representation.
+ */
+struct ieee80211_bss_npca_params {
+ u32 min_dur_thresh:4,
+ switch_delay:6,
+ switch_back_delay:6,
+ init_qsrc:2,
+ moplen:1,
+ enabled:1;
+};
+
+/**
* struct ieee80211_bss_conf - holds the BSS's changing parameters
*
* This structure keeps information about a BSS (and an association
@@ -763,6 +792,7 @@ struct ieee80211_parsed_tpe {
* (as opposed to hearing its value from another link's beacon).
* @s1g_long_beacon_period: number of beacon intervals between each long
* beacon transmission.
+ * @npca: NPCA parameters
*/
struct ieee80211_bss_conf {
struct ieee80211_vif *vif;
@@ -866,6 +896,8 @@ struct ieee80211_bss_conf {
u8 bss_param_ch_cnt_link_id;
u8 s1g_long_beacon_period;
+
+ struct ieee80211_bss_npca_params npca;
};
#define IEEE80211_NAN_MAX_CHANNELS 3
@@ -2674,6 +2706,8 @@ struct ieee80211_link_sta {
* @epp_peer: indicates that the peer is an EPP peer.
* @nmi: For NDI stations, pointer to the NMI station of the peer.
* @nan_sched: NAN peer schedule for this station. Valid only for NMI stations.
+ * @ext_mld_capa_ops: the MLD's extended MLD capabilities and operations
+ * NOTE: currently only tracked for AP STAs
*/
struct ieee80211_sta {
u8 addr[ETH_ALEN] __aligned(2);
@@ -2698,6 +2732,7 @@ struct ieee80211_sta {
struct ieee80211_txq *txq[IEEE80211_NUM_TIDS + 1];
u16 valid_links;
+ u16 ext_mld_capa_ops;
bool epp_peer;
struct ieee80211_link_sta deflink;
struct ieee80211_link_sta __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS];
@@ -7892,6 +7927,35 @@ void ieee80211_nan_func_match(struct ieee80211_vif *vif,
void ieee80211_nan_sched_update_done(struct ieee80211_vif *vif);
/**
+ * ieee80211_nan_cluster_joined - notify about NAN cluster join.
+ *
+ * This function is used to notify mac80211 about NAN cluster join.
+ *
+ * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @cluster_id: the cluster ID that was joined
+ * @new_cluster: true if this is a new cluster
+ * @gfp: allocation flags
+ */
+void ieee80211_nan_cluster_joined(struct ieee80211_vif *vif,
+ const u8 *cluster_id, bool new_cluster,
+ gfp_t gfp);
+
+/**
+ * ieee80211_nan_try_evacuate - try to evacuate a NAN channel
+ *
+ * This function tries to evacuate a NAN channel that is using the given
+ * channel context, to free up channel context resources.
+ *
+ * @hw: pointer as obtained from ieee80211_alloc_hw()
+ * @conf: the channel context configuration to try to evacuate. If %NULL,
+ * the NAN channel that has the fewest slots scheduled will be evacuated.
+ *
+ * Return: %true if a channel was evacuated, %false otherwise
+ */
+bool ieee80211_nan_try_evacuate(struct ieee80211_hw *hw,
+ struct ieee80211_chanctx_conf *conf);
+
+/**
* ieee80211_calc_rx_airtime - calculate estimated transmission airtime for RX.
*
* This function calculates the estimated airtime usage of a frame based on the
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 072b383d7d3c..9998f6c0a665 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -729,7 +729,9 @@
* 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
* driver to schedule this time due to other concurrent needs for the
- * radio).
+ * radio). An optional attribute %NL80211_ATTR_MAC can be used to filter
+ * incoming frames during remain-on-channel, such that frames
+ * addressed to the specified destination MAC are reported.
* When called, this operation returns a cookie (%NL80211_ATTR_COOKIE)
* that will be included with any events pertaining to this request;
* the cookie is also used to cancel the request.
@@ -1417,6 +1419,12 @@
* identifying the evacuated channel.
* User space may reconfigure the local schedule in response to this
* notification.
+ * @NL80211_CMD_START_PD: Start PD operation, identified by its
+ * %NL80211_ATTR_WDEV interface. This interface must have been previously
+ * created with %NL80211_CMD_NEW_INTERFACE.
+ * @NL80211_CMD_STOP_PD: Stop the PD operation, identified by
+ * its %NL80211_ATTR_WDEV interface.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -1692,6 +1700,9 @@ enum nl80211_commands {
NL80211_CMD_NAN_CHANNEL_EVAC,
+ NL80211_CMD_START_PD,
+ NL80211_CMD_STOP_PD,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -2993,11 +3004,13 @@ enum nl80211_commands {
* @NL80211_ATTR_EPCS: Flag attribute indicating that EPCS is enabled for a
* station interface.
*
- * @NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS: Extended MLD capabilities and
- * operations that userspace implements to use during association/ML
- * link reconfig, currently only "BTM MLD Recommendation For Multiple
- * APs Support". Drivers may set additional flags that they support
- * in the kernel or device.
+ * @NL80211_ATTR_EXT_MLD_CAPA_AND_OPS: Extended MLD capabilities and operations.
+ * For association and link reconfiguration, indicates extra capabilities
+ * that userspace implements, currently only "BTM MLD Recommendation For
+ * Multiple APs Support".
+ * For wiphy information, additional flags that drivers will set, but
+ * this is informational only for userspace (it's not expected to set
+ * these.)
*
* @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
* of the radio in interest. Internally a value of -1 is used to
@@ -3142,6 +3155,16 @@ enum nl80211_commands {
* association response etc., since it's abridged in the beacon. Used
* for START_AP etc.
*
+ * @NL80211_ATTR_ASSOC_ENCRYPTED: Flag attribute, used only with the
+ * %NL80211_CMD_CONNECT event in SME-in-driver mode. The driver should
+ * set this flag to indicate that both the (Re)Association Request frame
+ * and the corresponding (Re)Association Response frame are transmitted
+ * encrypted over the air. Enhanced Privacy Protection (EPP), as defined
+ * in IEEE P802.11bi/D4.0, mandates this encryption.
+ *
+ * @NL80211_ATTR_NPCA_PRIMARY_FREQ: NPCA primary channel (u32)
+ * @NL80211_ATTR_NPCA_PUNCT_BITMAP: NPCA puncturing bitmap (u32)
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3697,7 +3720,7 @@ enum nl80211_attrs {
NL80211_ATTR_MLO_RECONF_REM_LINKS,
NL80211_ATTR_EPCS,
- NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
+ NL80211_ATTR_EXT_MLD_CAPA_AND_OPS,
NL80211_ATTR_WIPHY_RADIO_INDEX,
@@ -3735,6 +3758,11 @@ enum nl80211_attrs {
NL80211_ATTR_NAN_MAX_CHAN_SWITCH_TIME,
NL80211_ATTR_NAN_PEER_MAPS,
+ NL80211_ATTR_ASSOC_ENCRYPTED,
+
+ NL80211_ATTR_NPCA_PRIMARY_FREQ,
+ NL80211_ATTR_NPCA_PUNCT_BITMAP,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -3749,6 +3777,7 @@ enum nl80211_attrs {
#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
+#define NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS NL80211_ATTR_EXT_MLD_CAPA_AND_OPS
/*
* Allow user space programs to use #ifdef on new attributes by defining them
@@ -3831,6 +3860,7 @@ enum nl80211_attrs {
* @NL80211_IFTYPE_NAN_DATA: NAN data interface type (netdev); NAN data
* interfaces can only be brought up (IFF_UP) when a NAN interface
* already exists and NAN has been started (using %NL80211_CMD_START_NAN).
+ * @NL80211_IFTYPE_PD: PD device interface type (not a netdev)
* @NL80211_IFTYPE_MAX: highest interface type number currently defined
* @NUM_NL80211_IFTYPES: number of defined interface types
*
@@ -3853,6 +3883,7 @@ enum nl80211_iftype {
NL80211_IFTYPE_OCB,
NL80211_IFTYPE_NAN,
NL80211_IFTYPE_NAN_DATA,
+ NL80211_IFTYPE_PD,
/* keep last */
NUM_NL80211_IFTYPES,
@@ -5792,6 +5823,18 @@ enum nl80211_key_default_types {
* @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
* Defaults to @NL80211_KEY_RX_TX.
* @NL80211_KEY_DEFAULT_BEACON: flag indicating default Beacon frame key
+ * @NL80211_KEY_LTF_SEED: LTF key seed is used by the driver to generate
+ * secure LTF keys used in case of peer measurement request with FTM
+ * request type as either %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
+ * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED. Secure LTF key seeds
+ * will help enable PHY security in peer measurement session.
+ * The LTF key seed is installed along with the TK (Temporal Key) using
+ * %NL80211_CMD_NEW_KEY. The TK is configured using the
+ * %NL80211_ATTR_KEY_DATA attribute, while the LTF key seed is configured
+ * using this attribute. Both keys must be configured before initiation
+ * of peer measurement to ensure peer measurement session is secure.
+ * Only valid if %NL80211_EXT_FEATURE_SET_KEY_LTF_SEED is set. This
+ * attribute is restricted to pairwise keys (%NL80211_KEYTYPE_PAIRWISE).
*
* @__NL80211_KEY_AFTER_LAST: internal
* @NL80211_KEY_MAX: highest key attribute
@@ -5808,6 +5851,7 @@ enum nl80211_key_attributes {
NL80211_KEY_DEFAULT_TYPES,
NL80211_KEY_MODE,
NL80211_KEY_DEFAULT_BEACON,
+ NL80211_KEY_LTF_SEED,
/* keep last */
__NL80211_KEY_AFTER_LAST,
@@ -7031,6 +7075,16 @@ enum nl80211_feature_flags {
* (NL80211_CMD_AUTHENTICATE) in non-AP STA mode, as specified in
* "IEEE P802.11bi/D4.0, 12.16.5".
*
+ * @NL80211_EXT_FEATURE_ROC_ADDR_FILTER: Driver supports MAC address
+ * filtering during remain-on-channel. When %NL80211_ATTR_MAC is
+ * provided with %NL80211_CMD_REMAIN_ON_CHANNEL, the driver will
+ * forward frames with a matching MAC address to userspace during
+ * the off-channel period.
+ *
+ * @NL80211_EXT_FEATURE_SET_KEY_LTF_SEED: Driver supports installing the
+ * LTF key seed via %NL80211_KEY_LTF_SEED. The seed is used to generate
+ * secure LTF keys for secure LTF measurement sessions.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -7110,6 +7164,8 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_EPPKE,
NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION,
NL80211_EXT_FEATURE_IEEE8021X_AUTH,
+ NL80211_EXT_FEATURE_ROC_ADDR_FILTER,
+ NL80211_EXT_FEATURE_SET_KEY_LTF_SEED,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
@@ -7963,6 +8019,26 @@ enum nl80211_peer_measurement_resp {
};
/**
+ * enum nl80211_peer_measurement_ftm_req_type - FTM ranging request type,
+ * used with %NL80211_PMSR_PEER_ATTR_REQ_TYPE
+ *
+ * @NL80211_PMSR_FTM_REQ_TYPE_INFRA: infrastructure ranging, i.e. STA-to-AP
+ * @NL80211_PMSR_FTM_REQ_TYPE_PD: peer-to-peer ranging as defined in the
+ * Wi-Fi Alliance specification "Proximity Ranging (PR) Implementation
+ * Consideration Draft 1.9 Rev 1"
+ * @NUM_NL80211_PMSR_FTM_REQ_TYPE: internal
+ * @NL80211_PMSR_FTM_REQ_TYPE_MAX: highest request type value
+ */
+enum nl80211_peer_measurement_ftm_req_type {
+ NL80211_PMSR_FTM_REQ_TYPE_INFRA,
+ NL80211_PMSR_FTM_REQ_TYPE_PD,
+
+ /* keep last */
+ NUM_NL80211_PMSR_FTM_REQ_TYPE,
+ NL80211_PMSR_FTM_REQ_TYPE_MAX = NUM_NL80211_PMSR_FTM_REQ_TYPE - 1
+};
+
+/**
* enum nl80211_peer_measurement_peer_attrs - peer attributes for measurement
* @__NL80211_PMSR_PEER_ATTR_INVALID: invalid
*
@@ -7975,6 +8051,9 @@ enum nl80211_peer_measurement_resp {
* @NL80211_PMSR_PEER_ATTR_RESP: This is a nested attribute indexed by
* measurement type, with attributes from the
* &enum nl80211_peer_measurement_resp inside.
+ * @NL80211_PMSR_PEER_ATTR_REQ_TYPE: u32 attribute specifying the ranging
+ * request type, using values from &enum nl80211_peer_measurement_ftm_req_type.
+ * If absent, defaults to %NL80211_PMSR_FTM_REQ_TYPE_INFRA.
*
* @NUM_NL80211_PMSR_PEER_ATTRS: internal
* @NL80211_PMSR_PEER_ATTR_MAX: highest attribute number
@@ -7986,6 +8065,7 @@ enum nl80211_peer_measurement_peer_attrs {
NL80211_PMSR_PEER_ATTR_CHAN,
NL80211_PMSR_PEER_ATTR_REQ,
NL80211_PMSR_PEER_ATTR_RESP,
+ NL80211_PMSR_PEER_ATTR_REQ_TYPE,
/* keep last */
NUM_NL80211_PMSR_PEER_ATTRS,
@@ -8012,6 +8092,18 @@ enum nl80211_peer_measurement_peer_attrs {
* meaningless, just a list of peers to measure with, with the
* sub-attributes taken from
* &enum nl80211_peer_measurement_peer_attrs.
+ * @NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE: u32 attribute indicating the
+ * maximum number of peers supported when the device operates in the
+ * ISTA (Initiator STA) role. If absent, no role-specific peer limit
+ * applies. The sum of %NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE and
+ * %NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE is enforced when the device
+ * supports concurrent ISTA/RSTA operation.
+ * @NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE: u32 attribute indicating the
+ * maximum number of peers supported when the device operates in the
+ * RSTA (Responder STA) role. If absent, no role-specific peer limit
+ * applies. The sum of %NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE and
+ * %NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE is enforced when the device
+ * supports concurrent ISTA/RSTA operation.
*
* @NUM_NL80211_PMSR_ATTR: internal
* @NL80211_PMSR_ATTR_MAX: highest attribute number
@@ -8024,6 +8116,8 @@ enum nl80211_peer_measurement_attrs {
NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR,
NL80211_PMSR_ATTR_TYPE_CAPA,
NL80211_PMSR_ATTR_PEERS,
+ NL80211_PMSR_ATTR_MAX_PEER_ISTA_ROLE,
+ NL80211_PMSR_ATTR_MAX_PEER_RSTA_ROLE,
/* keep last */
NUM_NL80211_PMSR_ATTR,
@@ -8082,6 +8176,54 @@ enum nl80211_peer_measurement_attrs {
* This limits the allowed combinations of LTF repetitions and STS.
* @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT: flag attribute indicating the
* device supports operating as the RSTA in PMSR FTM request
+ * @NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS: nested attribute containing ISTA
+ * (initiator) role capabilities. Uses the same sub-attributes as
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS: nested attribute containing RSTA
+ * (responder) role capabilities.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB: flag attribute (used inside
+ * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating NTB ranging support.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_TB: flag attribute (used inside
+ * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating TB ranging support.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_EDCA: flag attribute (used inside
+ * %NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS or
+ * %NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS) indicating EDCA based ranging
+ * support.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS: nested attribute containing ranging
+ * type capabilities. Uses sub-attributes from
+ * &enum nl80211_peer_measurement_ftm_type_capa.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_CONCURRENT_ISTA_RSTA_SUPPORT: flag attribute
+ * indicating that the device can simultaneously act as initiator and
+ * responder in a multi-peer measurement request. Only valid if
+ * @NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT is set.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_TX_ANTENNAS: u32 attribute indicating
+ * the maximum number of transmit antennas supported for EDCA based ranging
+ * (0 means unknown)
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_RX_ANTENNAS: u32 attribute indicating
+ * the maximum number of receive antennas supported for EDCA based ranging
+ * (0 means unknown)
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_EDCA: u32 attribute indicating
+ * the minimum EDCA ranging interval supported by the device
+ * in milli seconds. (0 means unknown). Applications can use this value
+ * to estimate the burst period to be given in the FTM request for the
+ * EDCA based ranging case. If non-zero, this value will be used to
+ * validate the burst period in the FTM request.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_NTB: u32 attribute indicating
+ * the minimum NTB ranging interval supported by the device
+ * in milli seconds. (0 means unknown). Applications can use this value
+ * to estimate the burst period to be given in the FTM request for the
+ * NTB ranging case. If non-zero, this value will be used to validate
+ * the nominal time in the FTM request.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_PD_PREAMBLES: u32 bitmap of values from
+ * &enum nl80211_preamble indicating the supported preambles for PD
+ * ranging requests. Only valid if %NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT
+ * is set.
+ * @NL80211_PMSR_FTM_CAPA_ATTR_PD_BANDWIDTHS: u32 bitmap of values from
+ * &enum nl80211_chan_width indicating the supported channel bandwidths
+ * for PD ranging requests. Only valid if
+ * %NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT is set.
*
* @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
* @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
@@ -8107,6 +8249,19 @@ enum nl80211_peer_measurement_ftm_capa {
NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX,
NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX,
NL80211_PMSR_FTM_CAPA_ATTR_RSTA_SUPPORT,
+ NL80211_PMSR_FTM_CAPA_ATTR_ISTA_CAPS,
+ NL80211_PMSR_FTM_CAPA_ATTR_RSTA_CAPS,
+ NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_NTB,
+ NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_TB,
+ NL80211_PMSR_FTM_CAPA_ATTR_SUPPORT_EDCA,
+ NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS,
+ NL80211_PMSR_FTM_CAPA_ATTR_CONCURRENT_ISTA_RSTA_SUPPORT,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_TX_ANTENNAS,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_NUM_RX_ANTENNAS,
+ NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_EDCA,
+ NL80211_PMSR_FTM_CAPA_ATTR_MIN_INTERVAL_NTB,
+ NL80211_PMSR_FTM_CAPA_ATTR_PD_PREAMBLES,
+ NL80211_PMSR_FTM_CAPA_ATTR_PD_BANDWIDTHS,
/* keep last */
NUM_NL80211_PMSR_FTM_CAPA_ATTR,
@@ -8114,6 +8269,33 @@ enum nl80211_peer_measurement_ftm_capa {
};
/**
+ * enum nl80211_peer_measurement_ftm_type_capa - FTM ranging type capability
+ * sub-attributes, used inside %NL80211_PMSR_FTM_CAPA_ATTR_TYPE_CAPS
+ * @__NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INVALID: invalid
+ *
+ * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT: flag attribute indicating
+ * that the device supports infrastructure ranging (STA-to-AP or
+ * AP-to-STA) as part of Proximity Detection
+ * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT: flag attribute indicating that
+ * the device supports peer-to-peer ranging as mentioned in the
+ * specification "PR Implementation Consideration Draft 1.9 rev 1" where
+ * PD stands for proximity detection
+ *
+ * @NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR: internal
+ * @NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX: highest attribute number
+ */
+enum nl80211_peer_measurement_ftm_type_capa {
+ __NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INVALID,
+
+ NL80211_PMSR_FTM_TYPE_CAPA_ATTR_INFRA_SUPPORT,
+ NL80211_PMSR_FTM_TYPE_CAPA_ATTR_PD_SUPPORT,
+
+ /* keep last */
+ NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR,
+ NL80211_PMSR_FTM_TYPE_CAPA_ATTR_MAX = NUM_NL80211_PMSR_FTM_TYPE_CAPA_ATTR - 1
+};
+
+/**
* enum nl80211_peer_measurement_ftm_req - FTM request attributes
* @__NL80211_PMSR_FTM_REQ_ATTR_INVALID: invalid
*
@@ -8131,9 +8313,11 @@ enum nl80211_peer_measurement_ftm_capa {
* default 15 i.e. "no preference"). For non-EDCA ranging, this is the
* burst duration in milliseconds (optional with default 0, i.e. let the
* device decide).
- * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
- * requested per burst
+ * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: (Optional) number of successful
+ * FTM frames requested per burst
* (u8, 0-31, optional with default 0 i.e. "no preference")
+ * If the attribute is absent ("no preference"), the driver or firmware can
+ * choose a suitable value.
* @NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES: number of FTMR frame retries
* (u8, default 3)
* @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag)
@@ -8167,6 +8351,50 @@ enum nl80211_peer_measurement_ftm_capa {
* Only valid if %NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK is set (so the
* RSTA will have the measurement results to report back in the FTM
* response).
+ * @NL80211_PMSR_FTM_REQ_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS: minimum time
+ * between two consecutive range measurements in units of 100 microseconds,
+ * for non-trigger based ranging (u32). Should be set as short as possible
+ * to minimize turnaround time, since two-way ranging with delayed LMR
+ * requires two measurements. Only valid if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * @NL80211_PMSR_FTM_REQ_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS: maximum time
+ * between two consecutive range measurements in units of 10 milliseconds,
+ * for non-trigger based ranging (u32). Acts as a session timeout; if
+ * exceeded, the ranging session should be terminated. Only valid if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * @NL80211_PMSR_FTM_REQ_ATTR_NOMINAL_TIME: The nominal time field shall be
+ * set to the nominal duration between adjacent Availability Windows in
+ * units of milli seconds (u32). Mandatory if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * @NL80211_PMSR_FTM_REQ_ATTR_AW_DURATION: (Optional) The AW duration field
+ * shall be set to the duration of the AW in units of 1ms (0-255 ms) (u32).
+ * Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * If the attribute is absent ("no preference"), the driver or firmware
+ * can choose a suitable value.
+ * @NL80211_PMSR_FTM_REQ_ATTR_NUM_MEASUREMENTS: (Optional) number of
+ * Availability Windows (AWs) to schedule for non-trigger-based ranging.
+ * Each AW may contain multiple FTM exchanges as configured by
+ * %NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST. Only valid if
+ * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
+ * If the attribute is absent ("no preference"), the driver or firmware
+ * can choose a suitable value.
+ * @NL80211_PMSR_FTM_REQ_ATTR_PAD: ignore, for u64/s64 padding only.
+ * @NL80211_PMSR_FTM_REQ_ATTR_INGRESS: optional u64 attribute in units of mm.
+ * When specified, the measurement result of the peer needs to be
+ * indicated if the device moves into this range.
+ * @NL80211_PMSR_FTM_REQ_ATTR_EGRESS: optional u64 attribute in units of mm.
+ * When specified, the measurement result of the peer needs to be
+ * indicated if the device moves out of this range.
+ * If neither or only one of @NL80211_PMSR_FTM_REQ_ATTR_INGRESS and
+ * @NL80211_PMSR_FTM_REQ_ATTR_EGRESS is specified, only the specified
+ * threshold is used. If both are specified, both thresholds are applied.
+ * If neither is specified, results are reported without threshold
+ * filtering.
+ * @NL80211_PMSR_FTM_REQ_ATTR_PD_SUPPRESS_RESULTS: Flag to suppress ranging
+ * results for PD requests. When set, ranging measurements are performed
+ * but results are not reported to userspace, regardless of ranging role
+ * or type. Only valid when %NL80211_PMSR_PEER_ATTR_REQ_TYPE is set to
+ * %NL80211_PMSR_FTM_REQ_TYPE_PD.
*
* @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
* @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -8188,6 +8416,15 @@ enum nl80211_peer_measurement_ftm_req {
NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
NL80211_PMSR_FTM_REQ_ATTR_RSTA,
+ NL80211_PMSR_FTM_REQ_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_REQ_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_REQ_ATTR_NOMINAL_TIME,
+ NL80211_PMSR_FTM_REQ_ATTR_AW_DURATION,
+ NL80211_PMSR_FTM_REQ_ATTR_NUM_MEASUREMENTS,
+ NL80211_PMSR_FTM_REQ_ATTR_PAD,
+ NL80211_PMSR_FTM_REQ_ATTR_INGRESS,
+ NL80211_PMSR_FTM_REQ_ATTR_EGRESS,
+ NL80211_PMSR_FTM_REQ_ATTR_PD_SUPPRESS_RESULTS,
/* keep last */
NUM_NL80211_PMSR_FTM_REQ_ATTR,
@@ -8274,6 +8511,33 @@ enum nl80211_peer_measurement_ftm_failure_reasons {
* @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only
* @NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD: actual burst period used by
* the responder (similar to request, u16)
+ * @NL80211_PMSR_FTM_RESP_ATTR_TX_LTF_REPETITION_COUNT: negotiated value of
+ * number of tx ltf repetitions in NDP frames (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_RX_LTF_REPETITION_COUNT: negotiated value of
+ * number of rx ltf repetitions in NDP frames (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS: negotiated value
+ * where latest time by which the ISTA needs to complete the next round of
+ * measurements, in units of 10 ms (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS: negotiated
+ * minimum time between two consecutive range measurements initiated by an
+ * ISTA, in units of 100 us (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_TX_SPATIAL_STREAMS: number of Tx space-time
+ * streams used in NDP frames during the measurement sounding phase
+ * (u32, optional).
+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_RX_SPATIAL_STREAMS: number of Rx space-time
+ * streams used in the NDP frames during the measurement sounding phase
+ * (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_NOMINAL_TIME: negotiated nominal time used in
+ * this session in milliseconds. (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_AVAILABILITY_WINDOW: negotiated availability
+ * window time used in this session, in units of milli seconds.
+ * (u32, optional)
+ * @NL80211_PMSR_FTM_RESP_ATTR_CHANNEL_WIDTH: u32 attribute indicating channel
+ * width used for measurement, see &enum nl80211_chan_width (optional).
+ * @NL80211_PMSR_FTM_RESP_ATTR_PREAMBLE: u32 attribute indicating the preamble
+ * type used for the measurement, see &enum nl80211_preamble (optional).
+ * @NL80211_PMSR_FTM_RESP_ATTR_IS_DELAYED_LMR: flag, indicates if the
+ * current result is delayed LMR data.
*
* @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
* @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
@@ -8303,6 +8567,17 @@ enum nl80211_peer_measurement_ftm_resp {
NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
NL80211_PMSR_FTM_RESP_ATTR_PAD,
NL80211_PMSR_FTM_RESP_ATTR_BURST_PERIOD,
+ NL80211_PMSR_FTM_RESP_ATTR_TX_LTF_REPETITION_COUNT,
+ NL80211_PMSR_FTM_RESP_ATTR_RX_LTF_REPETITION_COUNT,
+ NL80211_PMSR_FTM_RESP_ATTR_MAX_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_RESP_ATTR_MIN_TIME_BETWEEN_MEASUREMENTS,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_TX_SPATIAL_STREAMS,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_RX_SPATIAL_STREAMS,
+ NL80211_PMSR_FTM_RESP_ATTR_NOMINAL_TIME,
+ NL80211_PMSR_FTM_RESP_ATTR_AVAILABILITY_WINDOW,
+ NL80211_PMSR_FTM_RESP_ATTR_CHANNEL_WIDTH,
+ NL80211_PMSR_FTM_RESP_ATTR_PREAMBLE,
+ NL80211_PMSR_FTM_RESP_ATTR_IS_DELAYED_LMR,
/* keep last */
NUM_NL80211_PMSR_FTM_RESP_ATTR,