1859 lines · c
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */2/*3 * Copyright (C) 2015-2017 Intel Deutschland GmbH4 * Copyright (C) 2018-2022 Intel Corporation5 * Copyright (C) 2024 Intel Corporation6 */7#ifndef __iwl_fw_api_location_h__8#define __iwl_fw_api_location_h__9 10/**11 * enum iwl_location_subcmd_ids - location group command IDs12 */13enum iwl_location_subcmd_ids {14 /**15 * @TOF_RANGE_REQ_CMD: TOF ranging request,16 * uses one of &struct iwl_tof_range_req_cmd_v5,17 * &struct iwl_tof_range_req_cmd_v7,18 * &struct iwl_tof_range_req_cmd_v8,19 * &struct iwl_tof_range_req_cmd_v9,20 * &struct iwl_tof_range_req_cmd_v11,21 * &struct iwl_tof_range_req_cmd_v722 */23 TOF_RANGE_REQ_CMD = 0x0,24 /**25 * @TOF_CONFIG_CMD: TOF configuration, uses &struct iwl_tof_config_cmd26 */27 TOF_CONFIG_CMD = 0x1,28 /**29 * @TOF_RANGE_ABORT_CMD: abort ongoing ranging, uses30 * &struct iwl_tof_range_abort_cmd31 */32 TOF_RANGE_ABORT_CMD = 0x2,33 /**34 * @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config,35 * uses &struct iwl_tof_range_req_ext_cmd36 */37 TOF_RANGE_REQ_EXT_CMD = 0x3,38 /**39 * @TOF_RESPONDER_CONFIG_CMD: FTM responder configuration, one of40 * &struct iwl_tof_responder_config_cmd_v6,41 * &struct iwl_tof_responder_config_cmd_v7,42 * &struct iwl_tof_responder_config_cmd_v8 or43 * &struct iwl_tof_responder_config_cmd_v944 */45 TOF_RESPONDER_CONFIG_CMD = 0x4,46 /**47 * @TOF_RESPONDER_DYN_CONFIG_CMD: FTM dynamic configuration,48 * uses &struct iwl_tof_responder_dyn_config_cmd49 */50 TOF_RESPONDER_DYN_CONFIG_CMD = 0x5,51 /**52 * @CSI_HEADER_NOTIFICATION: CSI header53 */54 CSI_HEADER_NOTIFICATION = 0xFA,55 /**56 * @CSI_CHUNKS_NOTIFICATION: CSI chunk,57 * uses &struct iwl_csi_chunk_notification58 */59 CSI_CHUNKS_NOTIFICATION = 0xFB,60 /**61 * @TOF_LC_NOTIF: used for LCI/civic location, contains just62 * the action frame63 */64 TOF_LC_NOTIF = 0xFC,65 /**66 * @TOF_RESPONDER_STATS: FTM responder statistics notification,67 * uses &struct iwl_ftm_responder_stats68 */69 TOF_RESPONDER_STATS = 0xFD,70 /**71 * @TOF_MCSI_DEBUG_NOTIF: MCSI debug notification, uses72 * &struct iwl_tof_mcsi_notif73 */74 TOF_MCSI_DEBUG_NOTIF = 0xFE,75 /**76 * @TOF_RANGE_RESPONSE_NOTIF: ranging response, using one of77 * &struct iwl_tof_range_rsp_ntfy_v5,78 * &struct iwl_tof_range_rsp_ntfy_v6,79 * &struct iwl_tof_range_rsp_ntfy_v7 or80 * &struct iwl_tof_range_rsp_ntfy_v881 */82 TOF_RANGE_RESPONSE_NOTIF = 0xFF,83};84 85/**86 * struct iwl_tof_config_cmd - ToF configuration87 * @tof_disabled: indicates if ToF is disabled (or not)88 * @one_sided_disabled: indicates if one-sided is disabled (or not)89 * @is_debug_mode: indiciates if debug mode is active90 * @is_buf_required: indicates if channel estimation buffer is required91 */92struct iwl_tof_config_cmd {93 u8 tof_disabled;94 u8 one_sided_disabled;95 u8 is_debug_mode;96 u8 is_buf_required;97} __packed;98 99/**100 * enum iwl_tof_bandwidth - values for iwl_tof_range_req_ap_entry.bandwidth101 * @IWL_TOF_BW_20_LEGACY: 20 MHz non-HT102 * @IWL_TOF_BW_20_HT: 20 MHz HT103 * @IWL_TOF_BW_40: 40 MHz104 * @IWL_TOF_BW_80: 80 MHz105 * @IWL_TOF_BW_160: 160 MHz106 * @IWL_TOF_BW_NUM: number of tof bandwidths107 */108enum iwl_tof_bandwidth {109 IWL_TOF_BW_20_LEGACY,110 IWL_TOF_BW_20_HT,111 IWL_TOF_BW_40,112 IWL_TOF_BW_80,113 IWL_TOF_BW_160,114 IWL_TOF_BW_NUM,115}; /* LOCAT_BW_TYPE_E */116 117/*118 * enum iwl_tof_algo_type - Algorithym type for range measurement request119 */120enum iwl_tof_algo_type {121 IWL_TOF_ALGO_TYPE_MAX_LIKE = 0,122 IWL_TOF_ALGO_TYPE_LINEAR_REG = 1,123 IWL_TOF_ALGO_TYPE_FFT = 2,124 125 /* Keep last */126 IWL_TOF_ALGO_TYPE_INVALID,127}; /* ALGO_TYPE_E */128 129/*130 * enum iwl_tof_mcsi_ntfy - Enable/Disable MCSI notifications131 */132enum iwl_tof_mcsi_enable {133 IWL_TOF_MCSI_DISABLED = 0,134 IWL_TOF_MCSI_ENABLED = 1,135}; /* MCSI_ENABLE_E */136 137/**138 * enum iwl_tof_responder_cmd_valid_field - valid fields in the responder cfg139 * @IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO: channel info is valid140 * @IWL_TOF_RESPONDER_CMD_VALID_TOA_OFFSET: ToA offset is valid141 * @IWL_TOF_RESPONDER_CMD_VALID_COMMON_CALIB: common calibration mode is valid142 * @IWL_TOF_RESPONDER_CMD_VALID_SPECIFIC_CALIB: spefici calibration mode is143 * valid144 * @IWL_TOF_RESPONDER_CMD_VALID_BSSID: BSSID is valid145 * @IWL_TOF_RESPONDER_CMD_VALID_TX_ANT: TX antenna is valid146 * @IWL_TOF_RESPONDER_CMD_VALID_ALGO_TYPE: algorithm type is valid147 * @IWL_TOF_RESPONDER_CMD_VALID_NON_ASAP_SUPPORT: non-ASAP support is valid148 * @IWL_TOF_RESPONDER_CMD_VALID_STATISTICS_REPORT_SUPPORT: statistics report149 * support is valid150 * @IWL_TOF_RESPONDER_CMD_VALID_MCSI_NOTIF_SUPPORT: MCSI notification support151 * is valid152 * @IWL_TOF_RESPONDER_CMD_VALID_FAST_ALGO_SUPPORT: fast algorithm support153 * is valid154 * @IWL_TOF_RESPONDER_CMD_VALID_RETRY_ON_ALGO_FAIL: retry on algorithm failure155 * is valid156 * @IWL_TOF_RESPONDER_CMD_VALID_STA_ID: station ID is valid157 * @IWL_TOF_RESPONDER_CMD_VALID_NDP_SUPPORT: enable/disable NDP ranging support158 * is valid159 * @IWL_TOF_RESPONDER_CMD_VALID_NDP_PARAMS: NDP parameters are valid160 * @IWL_TOF_RESPONDER_CMD_VALID_LMR_FEEDBACK: LMR feedback support is valid161 * @IWL_TOF_RESPONDER_CMD_VALID_SESSION_ID: session id flag is valid162 * @IWL_TOF_RESPONDER_CMD_VALID_BSS_COLOR: the bss_color field is valid163 * @IWL_TOF_RESPONDER_CMD_VALID_MIN_MAX_TIME_BETWEEN_MSR: the164 * min_time_between_msr and max_time_between_msr fields are valid165 */166enum iwl_tof_responder_cmd_valid_field {167 IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO = BIT(0),168 IWL_TOF_RESPONDER_CMD_VALID_TOA_OFFSET = BIT(1),169 IWL_TOF_RESPONDER_CMD_VALID_COMMON_CALIB = BIT(2),170 IWL_TOF_RESPONDER_CMD_VALID_SPECIFIC_CALIB = BIT(3),171 IWL_TOF_RESPONDER_CMD_VALID_BSSID = BIT(4),172 IWL_TOF_RESPONDER_CMD_VALID_TX_ANT = BIT(5),173 IWL_TOF_RESPONDER_CMD_VALID_ALGO_TYPE = BIT(6),174 IWL_TOF_RESPONDER_CMD_VALID_NON_ASAP_SUPPORT = BIT(7),175 IWL_TOF_RESPONDER_CMD_VALID_STATISTICS_REPORT_SUPPORT = BIT(8),176 IWL_TOF_RESPONDER_CMD_VALID_MCSI_NOTIF_SUPPORT = BIT(9),177 IWL_TOF_RESPONDER_CMD_VALID_FAST_ALGO_SUPPORT = BIT(10),178 IWL_TOF_RESPONDER_CMD_VALID_RETRY_ON_ALGO_FAIL = BIT(11),179 IWL_TOF_RESPONDER_CMD_VALID_STA_ID = BIT(12),180 IWL_TOF_RESPONDER_CMD_VALID_NDP_SUPPORT = BIT(22),181 IWL_TOF_RESPONDER_CMD_VALID_NDP_PARAMS = BIT(23),182 IWL_TOF_RESPONDER_CMD_VALID_LMR_FEEDBACK = BIT(24),183 IWL_TOF_RESPONDER_CMD_VALID_SESSION_ID = BIT(25),184 IWL_TOF_RESPONDER_CMD_VALID_BSS_COLOR = BIT(26),185 IWL_TOF_RESPONDER_CMD_VALID_MIN_MAX_TIME_BETWEEN_MSR = BIT(27),186};187 188/**189 * enum iwl_tof_responder_cfg_flags - responder configuration flags190 * @IWL_TOF_RESPONDER_FLAGS_NON_ASAP_SUPPORT: non-ASAP support191 * @IWL_TOF_RESPONDER_FLAGS_REPORT_STATISTICS: report statistics192 * @IWL_TOF_RESPONDER_FLAGS_REPORT_MCSI: report MCSI193 * @IWL_TOF_RESPONDER_FLAGS_ALGO_TYPE: algorithm type194 * @IWL_TOF_RESPONDER_FLAGS_TOA_OFFSET_MODE: ToA offset mode195 * @IWL_TOF_RESPONDER_FLAGS_COMMON_CALIB_MODE: common calibration mode196 * @IWL_TOF_RESPONDER_FLAGS_SPECIFIC_CALIB_MODE: specific calibration mode197 * @IWL_TOF_RESPONDER_FLAGS_FAST_ALGO_SUPPORT: fast algorithm support198 * @IWL_TOF_RESPONDER_FLAGS_RETRY_ON_ALGO_FAIL: retry on algorithm fail199 * @IWL_TOF_RESPONDER_FLAGS_FTM_TX_ANT: TX antenna mask200 * @IWL_TOF_RESPONDER_FLAGS_NDP_SUPPORT: support NDP ranging201 * @IWL_TOF_RESPONDER_FLAGS_LMR_FEEDBACK: request for LMR feedback if the202 * initiator supports it203 * @IWL_TOF_RESPONDER_FLAGS_SESSION_ID: send the session id in the initial FTM204 * frame.205 */206enum iwl_tof_responder_cfg_flags {207 IWL_TOF_RESPONDER_FLAGS_NON_ASAP_SUPPORT = BIT(0),208 IWL_TOF_RESPONDER_FLAGS_REPORT_STATISTICS = BIT(1),209 IWL_TOF_RESPONDER_FLAGS_REPORT_MCSI = BIT(2),210 IWL_TOF_RESPONDER_FLAGS_ALGO_TYPE = BIT(3) | BIT(4) | BIT(5),211 IWL_TOF_RESPONDER_FLAGS_TOA_OFFSET_MODE = BIT(6),212 IWL_TOF_RESPONDER_FLAGS_COMMON_CALIB_MODE = BIT(7),213 IWL_TOF_RESPONDER_FLAGS_SPECIFIC_CALIB_MODE = BIT(8),214 IWL_TOF_RESPONDER_FLAGS_FAST_ALGO_SUPPORT = BIT(9),215 IWL_TOF_RESPONDER_FLAGS_RETRY_ON_ALGO_FAIL = BIT(10),216 IWL_TOF_RESPONDER_FLAGS_FTM_TX_ANT = RATE_MCS_ANT_AB_MSK,217 IWL_TOF_RESPONDER_FLAGS_NDP_SUPPORT = BIT(24),218 IWL_TOF_RESPONDER_FLAGS_LMR_FEEDBACK = BIT(25),219 IWL_TOF_RESPONDER_FLAGS_SESSION_ID = BIT(27),220};221 222/**223 * struct iwl_tof_responder_config_cmd_v6 - ToF AP mode (for debug)224 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field225 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags226 * @bandwidth: current AP Bandwidth: &enum iwl_tof_bandwidth227 * @rate: current AP rate228 * @channel_num: current AP Channel229 * @ctrl_ch_position: coding of the control channel position relative to230 * the center frequency, see iwl_mvm_get_ctrl_pos()231 * @sta_id: index of the AP STA when in AP mode232 * @reserved1: reserved233 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug234 * purposes, simulating station movement by adding various values235 * to this field236 * @common_calib: XVT: common calibration value237 * @specific_calib: XVT: specific calibration value238 * @bssid: Current AP BSSID239 * @reserved2: reserved240 */241struct iwl_tof_responder_config_cmd_v6 {242 __le32 cmd_valid_fields;243 __le32 responder_cfg_flags;244 u8 bandwidth;245 u8 rate;246 u8 channel_num;247 u8 ctrl_ch_position;248 u8 sta_id;249 u8 reserved1;250 __le16 toa_offset;251 __le16 common_calib;252 __le16 specific_calib;253 u8 bssid[ETH_ALEN];254 __le16 reserved2;255} __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_6 */256 257/**258 * struct iwl_tof_responder_config_cmd_v7 - ToF AP mode (for debug)259 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field260 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags261 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.262 * bits 4 - 7: &enum iwl_location_bw.263 * @rate: current AP rate264 * @channel_num: current AP Channel265 * @ctrl_ch_position: coding of the control channel position relative to266 * the center frequency, see iwl_mvm_get_ctrl_pos()267 * @sta_id: index of the AP STA when in AP mode268 * @reserved1: reserved269 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug270 * purposes, simulating station movement by adding various values271 * to this field272 * @common_calib: XVT: common calibration value273 * @specific_calib: XVT: specific calibration value274 * @bssid: Current AP BSSID275 * @reserved2: reserved276 */277struct iwl_tof_responder_config_cmd_v7 {278 __le32 cmd_valid_fields;279 __le32 responder_cfg_flags;280 u8 format_bw;281 u8 rate;282 u8 channel_num;283 u8 ctrl_ch_position;284 u8 sta_id;285 u8 reserved1;286 __le16 toa_offset;287 __le16 common_calib;288 __le16 specific_calib;289 u8 bssid[ETH_ALEN];290 __le16 reserved2;291} __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_7 */292 293#define IWL_RESPONDER_STS_POS 3294#define IWL_RESPONDER_TOTAL_LTF_POS 6295 296/**297 * struct iwl_tof_responder_config_cmd_v8 - ToF AP mode (for debug)298 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field299 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags300 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.301 * bits 4 - 7: &enum iwl_location_bw.302 * @rate: current AP rate303 * @channel_num: current AP Channel304 * @ctrl_ch_position: coding of the control channel position relative to305 * the center frequency, see iwl_mvm_get_ctrl_pos()306 * @sta_id: index of the AP STA when in AP mode307 * @reserved1: reserved308 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug309 * purposes, simulating station movement by adding various values310 * to this field311 * @common_calib: XVT: common calibration value312 * @specific_calib: XVT: specific calibration value313 * @bssid: Current AP BSSID314 * @r2i_ndp_params: parameters for R2I NDP.315 * bits 0 - 2: max number of LTF repetitions316 * bits 3 - 5: max number of spatial streams (supported values are < 2)317 * bits 6 - 7: max number of total LTFs see318 * &enum ieee80211_range_params_max_total_ltf319 * @i2r_ndp_params: parameters for I2R NDP.320 * bits 0 - 2: max number of LTF repetitions321 * bits 3 - 5: max number of spatial streams322 * bits 6 - 7: max number of total LTFs see323 * &enum ieee80211_range_params_max_total_ltf324 */325struct iwl_tof_responder_config_cmd_v8 {326 __le32 cmd_valid_fields;327 __le32 responder_cfg_flags;328 u8 format_bw;329 u8 rate;330 u8 channel_num;331 u8 ctrl_ch_position;332 u8 sta_id;333 u8 reserved1;334 __le16 toa_offset;335 __le16 common_calib;336 __le16 specific_calib;337 u8 bssid[ETH_ALEN];338 u8 r2i_ndp_params;339 u8 i2r_ndp_params;340} __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_8 */341 342/**343 * struct iwl_tof_responder_config_cmd_v9 - ToF AP mode (for debug)344 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field345 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags346 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.347 * bits 4 - 7: &enum iwl_location_bw.348 * @bss_color: current AP bss_color349 * @channel_num: current AP Channel350 * @ctrl_ch_position: coding of the control channel position relative to351 * the center frequency, see iwl_mvm_get_ctrl_pos()352 * @sta_id: index of the AP STA when in AP mode353 * @reserved1: reserved354 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug355 * purposes, simulating station movement by adding various values356 * to this field357 * @common_calib: XVT: common calibration value358 * @specific_calib: XVT: specific calibration value359 * @bssid: Current AP BSSID360 * @r2i_ndp_params: parameters for R2I NDP.361 * bits 0 - 2: max number of LTF repetitions362 * bits 3 - 5: max number of spatial streams (supported values are < 2)363 * bits 6 - 7: max number of total LTFs see364 * &enum ieee80211_range_params_max_total_ltf365 * @i2r_ndp_params: parameters for I2R NDP.366 * bits 0 - 2: max number of LTF repetitions367 * bits 3 - 5: max number of spatial streams368 * bits 6 - 7: max number of total LTFs see369 * &enum ieee80211_range_params_max_total_ltf370 * @min_time_between_msr: for non trigger based NDP ranging, minimum time371 * between measurements in milliseconds.372 * @max_time_between_msr: for non trigger based NDP ranging, maximum time373 * between measurements in milliseconds.374 */375struct iwl_tof_responder_config_cmd_v9 {376 __le32 cmd_valid_fields;377 __le32 responder_cfg_flags;378 u8 format_bw;379 u8 bss_color;380 u8 channel_num;381 u8 ctrl_ch_position;382 u8 sta_id;383 u8 reserved1;384 __le16 toa_offset;385 __le16 common_calib;386 __le16 specific_calib;387 u8 bssid[ETH_ALEN];388 u8 r2i_ndp_params;389 u8 i2r_ndp_params;390 __le16 min_time_between_msr;391 __le16 max_time_between_msr;392} __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_8 */393 394/**395 * struct iwl_tof_responder_config_cmd - ToF AP mode396 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field397 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags398 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.399 * bits 4 - 7: &enum iwl_location_bw.400 * @bss_color: current AP bss_color401 * @channel_num: current AP Channel402 * @ctrl_ch_position: coding of the control channel position relative to403 * the center frequency, see iwl_mvm_get_ctrl_pos()404 * @sta_id: index of the AP STA when in AP mode405 * @band: current AP band406 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug407 * purposes, simulating station movement by adding various values408 * to this field409 * @common_calib: XVT: common calibration value410 * @specific_calib: XVT: specific calibration value411 * @bssid: Current AP BSSID412 * @r2i_ndp_params: parameters for R2I NDP.413 * bits 0 - 2: max number of LTF repetitions414 * bits 3 - 5: max number of spatial streams (supported values are < 2)415 * bits 6 - 7: max number of total LTFs see416 * &enum ieee80211_range_params_max_total_ltf417 * @i2r_ndp_params: parameters for I2R NDP.418 * bits 0 - 2: max number of LTF repetitions419 * bits 3 - 5: max number of spatial streams420 * bits 6 - 7: max number of total LTFs see421 * &enum ieee80211_range_params_max_total_ltf422 * @min_time_between_msr: for non trigger based NDP ranging, minimum time423 * between measurements in milliseconds.424 * @max_time_between_msr: for non trigger based NDP ranging, maximum time425 * between measurements in milliseconds.426 */427struct iwl_tof_responder_config_cmd {428 __le32 cmd_valid_fields;429 __le32 responder_cfg_flags;430 u8 format_bw;431 u8 bss_color;432 u8 channel_num;433 u8 ctrl_ch_position;434 u8 sta_id;435 u8 band;436 __le16 toa_offset;437 __le16 common_calib;438 __le16 specific_calib;439 u8 bssid[ETH_ALEN];440 u8 r2i_ndp_params;441 u8 i2r_ndp_params;442 __le16 min_time_between_msr;443 __le16 max_time_between_msr;444} __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_10 */445 446#define IWL_LCI_CIVIC_IE_MAX_SIZE 400447 448/**449 * struct iwl_tof_responder_dyn_config_cmd_v2 - Dynamic responder settings450 * @lci_len: The length of the 1st (LCI) part in the @lci_civic buffer451 * @civic_len: The length of the 2nd (CIVIC) part in the @lci_civic buffer452 * @lci_civic: The LCI/CIVIC buffer. LCI data (if exists) comes first, then, if453 * needed, 0-padding such that the next part is dword-aligned, then CIVIC454 * data (if exists) follows, and then 0-padding again to complete a455 * 4-multiple long buffer.456 */457struct iwl_tof_responder_dyn_config_cmd_v2 {458 __le32 lci_len;459 __le32 civic_len;460 u8 lci_civic[];461} __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */462 463#define IWL_LCI_MAX_SIZE 160464#define IWL_CIVIC_MAX_SIZE 160465#define HLTK_11AZ_LEN 32466 467/**468 * enum iwl_responder_dyn_cfg_valid_flags - valid flags for dyn_config_cmd469 * @IWL_RESPONDER_DYN_CFG_VALID_LCI: LCI data is valid470 * @IWL_RESPONDER_DYN_CFG_VALID_CIVIC: Civic data is valid471 * @IWL_RESPONDER_DYN_CFG_VALID_PASN_STA: the pasn_addr, HLTK and cipher fields472 * are valid.473 */474enum iwl_responder_dyn_cfg_valid_flags {475 IWL_RESPONDER_DYN_CFG_VALID_LCI = BIT(0),476 IWL_RESPONDER_DYN_CFG_VALID_CIVIC = BIT(1),477 IWL_RESPONDER_DYN_CFG_VALID_PASN_STA = BIT(2),478};479 480/**481 * struct iwl_tof_responder_dyn_config_cmd - Dynamic responder settings482 * @cipher: The negotiated cipher. see &enum iwl_location_cipher.483 * @valid_flags: flags indicating which fields in the command are valid. see484 * &enum iwl_responder_dyn_cfg_valid_flags.485 * @lci_len: length of the LCI data in bytes486 * @civic_len: length of the Civic data in bytes487 * @lci_buf: the LCI buffer488 * @civic_buf: the Civic buffer489 * @hltk_buf: HLTK for secure LTF bits generation for the specified station490 * @addr: mac address of the station for which to use the HLTK491 * @reserved: for alignment492 */493struct iwl_tof_responder_dyn_config_cmd {494 u8 cipher;495 u8 valid_flags;496 u8 lci_len;497 u8 civic_len;498 u8 lci_buf[IWL_LCI_MAX_SIZE];499 u8 civic_buf[IWL_LCI_MAX_SIZE];500 u8 hltk_buf[HLTK_11AZ_LEN];501 u8 addr[ETH_ALEN];502 u8 reserved[2];503} __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_3 */504 505/**506 * struct iwl_tof_range_req_ext_cmd - extended range req for WLS507 * @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF508 * @reserved: reserved509 * @min_delta_ftm: Minimal time between two consecutive measurements,510 * in units of 100us. 0 means no preference by station511 * @ftm_format_and_bw20M: FTM Channel Spacing/Format for 20MHz: recommended512 * value be sent to the AP513 * @ftm_format_and_bw40M: FTM Channel Spacing/Format for 40MHz: recommended514 * value to be sent to the AP515 * @ftm_format_and_bw80M: FTM Channel Spacing/Format for 80MHz: recommended516 * value to be sent to the AP517 */518struct iwl_tof_range_req_ext_cmd {519 __le16 tsf_timer_offset_msec;520 __le16 reserved;521 u8 min_delta_ftm;522 u8 ftm_format_and_bw20M;523 u8 ftm_format_and_bw40M;524 u8 ftm_format_and_bw80M;525} __packed;526 527/**528 * enum iwl_tof_location_query - values for query bitmap529 * @IWL_TOF_LOC_LCI: query LCI530 * @IWL_TOF_LOC_CIVIC: query civic531 */532enum iwl_tof_location_query {533 IWL_TOF_LOC_LCI = 0x01,534 IWL_TOF_LOC_CIVIC = 0x02,535};536 537 /**538 * struct iwl_tof_range_req_ap_entry_v2 - AP configuration parameters539 * @channel_num: Current AP Channel540 * @bandwidth: Current AP Bandwidth. One of iwl_tof_bandwidth.541 * @tsf_delta_direction: TSF relatively to the subject AP542 * @ctrl_ch_position: Coding of the control channel position relative to the543 * center frequency, see iwl_mvm_get_ctrl_pos().544 * @bssid: AP's BSSID545 * @measure_type: Measurement type: 0 - two sided, 1 - One sided546 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of the547 * number of measurement iterations (min 2^0 = 1, max 2^14)548 * @burst_period: Recommended value to be sent to the AP. Measurement549 * periodicity In units of 100ms. ignored if num_of_bursts = 0550 * @samples_per_burst: 2-sided: the number of FTMs pairs in single Burst (1-31);551 * 1-sided: how many rts/cts pairs should be used per burst.552 * @retries_per_sample: Max number of retries that the LMAC should send553 * in case of no replies by the AP.554 * @tsf_delta: TSF Delta in units of microseconds.555 * The difference between the AP TSF and the device local clock.556 * @location_req: Location Request Bit[0] LCI should be sent in the FTMR;557 * Bit[1] Civic should be sent in the FTMR558 * @asap_mode: 0 - non asap mode, 1 - asap mode (not relevant for one sided)559 * @enable_dyn_ack: Enable Dynamic ACK BW.560 * 0: Initiator interact with regular AP;561 * 1: Initiator interact with Responder machine: need to send the562 * Initiator Acks with HT 40MHz / 80MHz, since the Responder should563 * use it for its ch est measurement (this flag will be set when we564 * configure the opposite machine to be Responder).565 * @rssi: Last received value566 * legal values: -128-0 (0x7f). above 0x0 indicating an invalid value.567 * @algo_type: &enum iwl_tof_algo_type568 * @notify_mcsi: &enum iwl_tof_mcsi_ntfy.569 * @reserved: For alignment and future use570 */571struct iwl_tof_range_req_ap_entry_v2 {572 u8 channel_num;573 u8 bandwidth;574 u8 tsf_delta_direction;575 u8 ctrl_ch_position;576 u8 bssid[ETH_ALEN];577 u8 measure_type;578 u8 num_of_bursts;579 __le16 burst_period;580 u8 samples_per_burst;581 u8 retries_per_sample;582 __le32 tsf_delta;583 u8 location_req;584 u8 asap_mode;585 u8 enable_dyn_ack;586 s8 rssi;587 u8 algo_type;588 u8 notify_mcsi;589 __le16 reserved;590} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_2 */591 592/**593 * enum iwl_initiator_ap_flags - per responder FTM configuration flags594 * @IWL_INITIATOR_AP_FLAGS_ASAP: Request for ASAP measurement.595 * @IWL_INITIATOR_AP_FLAGS_LCI_REQUEST: Request for LCI information596 * @IWL_INITIATOR_AP_FLAGS_CIVIC_REQUEST: Request for CIVIC information597 * @IWL_INITIATOR_AP_FLAGS_DYN_ACK: Send HT/VHT ack for FTM frames. If not set,598 * 20Mhz dup acks will be sent.599 * @IWL_INITIATOR_AP_FLAGS_ALGO_LR: Use LR algo type for rtt calculation.600 * Default algo type is ML.601 * @IWL_INITIATOR_AP_FLAGS_ALGO_FFT: Use FFT algo type for rtt calculation.602 * Default algo type is ML.603 * @IWL_INITIATOR_AP_FLAGS_MCSI_REPORT: Send the MCSI for each FTM frame to the604 * driver.605 * @IWL_INITIATOR_AP_FLAGS_NON_TB: Use non trigger based flow606 * @IWL_INITIATOR_AP_FLAGS_TB: Use trigger based flow607 * @IWL_INITIATOR_AP_FLAGS_SECURED: request secure LTF measurement608 * @IWL_INITIATOR_AP_FLAGS_LMR_FEEDBACK: Send LMR feedback609 * @IWL_INITIATOR_AP_FLAGS_USE_CALIB: Use calibration values from the request610 * instead of fw internal values.611 * @IWL_INITIATOR_AP_FLAGS_PMF: request to protect the negotiation and LMR612 * frames with protected management frames.613 * @IWL_INITIATOR_AP_FLAGS_TERMINATE_ON_LMR_FEEDBACK: terminate the session if614 * the responder asked for LMR feedback although the initiator did not set615 * the LMR feedback bit in the FTM request. If not set, the initiator will616 * continue with the session and will provide the LMR feedback.617 * @IWL_INITIATOR_AP_FLAGS_TEST_INCORRECT_SAC: send an incorrect SAC in the618 * first NDP exchange. This is used for testing.619 */620enum iwl_initiator_ap_flags {621 IWL_INITIATOR_AP_FLAGS_ASAP = BIT(1),622 IWL_INITIATOR_AP_FLAGS_LCI_REQUEST = BIT(2),623 IWL_INITIATOR_AP_FLAGS_CIVIC_REQUEST = BIT(3),624 IWL_INITIATOR_AP_FLAGS_DYN_ACK = BIT(4),625 IWL_INITIATOR_AP_FLAGS_ALGO_LR = BIT(5),626 IWL_INITIATOR_AP_FLAGS_ALGO_FFT = BIT(6),627 IWL_INITIATOR_AP_FLAGS_MCSI_REPORT = BIT(8),628 IWL_INITIATOR_AP_FLAGS_NON_TB = BIT(9),629 IWL_INITIATOR_AP_FLAGS_TB = BIT(10),630 IWL_INITIATOR_AP_FLAGS_SECURED = BIT(11),631 IWL_INITIATOR_AP_FLAGS_LMR_FEEDBACK = BIT(12),632 IWL_INITIATOR_AP_FLAGS_USE_CALIB = BIT(13),633 IWL_INITIATOR_AP_FLAGS_PMF = BIT(14),634 IWL_INITIATOR_AP_FLAGS_TERMINATE_ON_LMR_FEEDBACK = BIT(15),635 IWL_INITIATOR_AP_FLAGS_TEST_INCORRECT_SAC = BIT(16),636};637 638/**639 * struct iwl_tof_range_req_ap_entry_v3 - AP configuration parameters640 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.641 * @channel_num: AP Channel number642 * @bandwidth: AP bandwidth. One of iwl_tof_bandwidth.643 * @ctrl_ch_position: Coding of the control channel position relative to the644 * center frequency, see iwl_mvm_get_ctrl_pos().645 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no646 * reply from the AP.647 * @bssid: AP's BSSID648 * @burst_period: Recommended value to be sent to the AP. Measurement649 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0650 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);651 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of652 * the number of measurement iterations (min 2^0 = 1, max 2^14)653 * @reserved: For alignment and future use654 * @tsf_delta: not in use655 */656struct iwl_tof_range_req_ap_entry_v3 {657 __le32 initiator_ap_flags;658 u8 channel_num;659 u8 bandwidth;660 u8 ctrl_ch_position;661 u8 ftmr_max_retries;662 u8 bssid[ETH_ALEN];663 __le16 burst_period;664 u8 samples_per_burst;665 u8 num_of_bursts;666 __le16 reserved;667 __le32 tsf_delta;668} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_3 */669 670/**671 * enum iwl_location_frame_format - location frame formats672 * @IWL_LOCATION_FRAME_FORMAT_LEGACY: legacy673 * @IWL_LOCATION_FRAME_FORMAT_HT: HT674 * @IWL_LOCATION_FRAME_FORMAT_VHT: VHT675 * @IWL_LOCATION_FRAME_FORMAT_HE: HE676 */677enum iwl_location_frame_format {678 IWL_LOCATION_FRAME_FORMAT_LEGACY,679 IWL_LOCATION_FRAME_FORMAT_HT,680 IWL_LOCATION_FRAME_FORMAT_VHT,681 IWL_LOCATION_FRAME_FORMAT_HE,682};683 684/**685 * enum iwl_location_bw - location bandwidth selection686 * @IWL_LOCATION_BW_20MHZ: 20MHz687 * @IWL_LOCATION_BW_40MHZ: 40MHz688 * @IWL_LOCATION_BW_80MHZ: 80MHz689 * @IWL_LOCATION_BW_160MHZ: 160MHz690 */691enum iwl_location_bw {692 IWL_LOCATION_BW_20MHZ,693 IWL_LOCATION_BW_40MHZ,694 IWL_LOCATION_BW_80MHZ,695 IWL_LOCATION_BW_160MHZ,696};697 698#define TK_11AZ_LEN 32699 700#define LOCATION_BW_POS 4701 702/**703 * struct iwl_tof_range_req_ap_entry_v4 - AP configuration parameters704 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.705 * @channel_num: AP Channel number706 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.707 * bits 4 - 7: &enum iwl_location_bw.708 * @ctrl_ch_position: Coding of the control channel position relative to the709 * center frequency, see iwl_mvm_get_ctrl_pos().710 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no711 * reply from the AP.712 * @bssid: AP's BSSID713 * @burst_period: Recommended value to be sent to the AP. Measurement714 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0715 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);716 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of717 * the number of measurement iterations (min 2^0 = 1, max 2^14)718 * @reserved: For alignment and future use719 * @hltk: HLTK to be used for secured 11az measurement720 * @tk: TK to be used for secured 11az measurement721 */722struct iwl_tof_range_req_ap_entry_v4 {723 __le32 initiator_ap_flags;724 u8 channel_num;725 u8 format_bw;726 u8 ctrl_ch_position;727 u8 ftmr_max_retries;728 u8 bssid[ETH_ALEN];729 __le16 burst_period;730 u8 samples_per_burst;731 u8 num_of_bursts;732 __le16 reserved;733 u8 hltk[HLTK_11AZ_LEN];734 u8 tk[TK_11AZ_LEN];735} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_4 */736 737/**738 * enum iwl_location_cipher - location cipher selection739 * @IWL_LOCATION_CIPHER_CCMP_128: CCMP 128740 * @IWL_LOCATION_CIPHER_GCMP_128: GCMP 128741 * @IWL_LOCATION_CIPHER_GCMP_256: GCMP 256742 * @IWL_LOCATION_CIPHER_INVALID: security is not used.743 * @IWL_LOCATION_CIPHER_MAX: maximum value for this enum.744 */745enum iwl_location_cipher {746 IWL_LOCATION_CIPHER_CCMP_128,747 IWL_LOCATION_CIPHER_GCMP_128,748 IWL_LOCATION_CIPHER_GCMP_256,749 IWL_LOCATION_CIPHER_INVALID,750 IWL_LOCATION_CIPHER_MAX,751};752 753/**754 * struct iwl_tof_range_req_ap_entry_v6 - AP configuration parameters755 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.756 * @channel_num: AP Channel number757 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.758 * bits 4 - 7: &enum iwl_location_bw.759 * @ctrl_ch_position: Coding of the control channel position relative to the760 * center frequency, see iwl_mvm_get_ctrl_pos().761 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no762 * reply from the AP.763 * @bssid: AP's BSSID764 * @burst_period: Recommended value to be sent to the AP. Measurement765 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0766 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);767 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of768 * the number of measurement iterations (min 2^0 = 1, max 2^14)769 * @sta_id: the station id of the AP. Only relevant when associated to the AP,770 * otherwise should be set to &IWL_MVM_INVALID_STA.771 * @cipher: pairwise cipher suite for secured measurement.772 * &enum iwl_location_cipher.773 * @hltk: HLTK to be used for secured 11az measurement774 * @tk: TK to be used for secured 11az measurement775 * @calib: An array of calibration values per FTM rx bandwidth.776 * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the777 * calibration value that corresponds to the rx bandwidth of the FTM778 * frame.779 * @beacon_interval: beacon interval of the AP in TUs. Only required if780 * &IWL_INITIATOR_AP_FLAGS_TB is set.781 */782struct iwl_tof_range_req_ap_entry_v6 {783 __le32 initiator_ap_flags;784 u8 channel_num;785 u8 format_bw;786 u8 ctrl_ch_position;787 u8 ftmr_max_retries;788 u8 bssid[ETH_ALEN];789 __le16 burst_period;790 u8 samples_per_burst;791 u8 num_of_bursts;792 u8 sta_id;793 u8 cipher;794 u8 hltk[HLTK_11AZ_LEN];795 u8 tk[TK_11AZ_LEN];796 __le16 calib[IWL_TOF_BW_NUM];797 __le16 beacon_interval;798} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_6 */799 800/**801 * struct iwl_tof_range_req_ap_entry_v7 - AP configuration parameters802 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.803 * @channel_num: AP Channel number804 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.805 * bits 4 - 7: &enum iwl_location_bw.806 * @ctrl_ch_position: Coding of the control channel position relative to the807 * center frequency, see iwl_mvm_get_ctrl_pos().808 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no809 * reply from the AP.810 * @bssid: AP's BSSID811 * @burst_period: Recommended value to be sent to the AP. Measurement812 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0813 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);814 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of815 * the number of measurement iterations (min 2^0 = 1, max 2^14)816 * @sta_id: the station id of the AP. Only relevant when associated to the AP,817 * otherwise should be set to &IWL_MVM_INVALID_STA.818 * @cipher: pairwise cipher suite for secured measurement.819 * &enum iwl_location_cipher.820 * @hltk: HLTK to be used for secured 11az measurement821 * @tk: TK to be used for secured 11az measurement822 * @calib: An array of calibration values per FTM rx bandwidth.823 * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the824 * calibration value that corresponds to the rx bandwidth of the FTM825 * frame.826 * @beacon_interval: beacon interval of the AP in TUs. Only required if827 * &IWL_INITIATOR_AP_FLAGS_TB is set.828 * @rx_pn: the next expected PN for protected management frames Rx. LE byte829 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id830 * is set to &IWL_MVM_INVALID_STA.831 * @tx_pn: the next PN to use for protected management frames Tx. LE byte832 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id833 * is set to &IWL_MVM_INVALID_STA.834 */835struct iwl_tof_range_req_ap_entry_v7 {836 __le32 initiator_ap_flags;837 u8 channel_num;838 u8 format_bw;839 u8 ctrl_ch_position;840 u8 ftmr_max_retries;841 u8 bssid[ETH_ALEN];842 __le16 burst_period;843 u8 samples_per_burst;844 u8 num_of_bursts;845 u8 sta_id;846 u8 cipher;847 u8 hltk[HLTK_11AZ_LEN];848 u8 tk[TK_11AZ_LEN];849 __le16 calib[IWL_TOF_BW_NUM];850 __le16 beacon_interval;851 u8 rx_pn[IEEE80211_CCMP_PN_LEN];852 u8 tx_pn[IEEE80211_CCMP_PN_LEN];853} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_7 */854 855#define IWL_LOCATION_MAX_STS_POS 3856#define IWL_LOCATION_TOTAL_LTF_POS 6857 858/**859 * struct iwl_tof_range_req_ap_entry_v8 - AP configuration parameters860 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.861 * @channel_num: AP Channel number862 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.863 * bits 4 - 7: &enum iwl_location_bw.864 * @ctrl_ch_position: Coding of the control channel position relative to the865 * center frequency, see iwl_mvm_get_ctrl_pos().866 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no867 * reply from the AP.868 * @bssid: AP's BSSID869 * @burst_period: Recommended value to be sent to the AP. Measurement870 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0871 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);872 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of873 * the number of measurement iterations (min 2^0 = 1, max 2^14)874 * @sta_id: the station id of the AP. Only relevant when associated to the AP,875 * otherwise should be set to &IWL_MVM_INVALID_STA.876 * @cipher: pairwise cipher suite for secured measurement.877 * &enum iwl_location_cipher.878 * @hltk: HLTK to be used for secured 11az measurement879 * @tk: TK to be used for secured 11az measurement880 * @calib: An array of calibration values per FTM rx bandwidth.881 * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the882 * calibration value that corresponds to the rx bandwidth of the FTM883 * frame.884 * @beacon_interval: beacon interval of the AP in TUs. Only required if885 * &IWL_INITIATOR_AP_FLAGS_TB is set.886 * @rx_pn: the next expected PN for protected management frames Rx. LE byte887 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id888 * is set to &IWL_MVM_INVALID_STA.889 * @tx_pn: the next PN to use for protected management frames Tx. LE byte890 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id891 * is set to &IWL_MVM_INVALID_STA.892 * @r2i_ndp_params: parameters for R2I NDP ranging negotiation.893 * bits 0 - 2: max LTF repetitions894 * bits 3 - 5: max number of spatial streams895 * bits 6 - 7: reserved896 * @i2r_ndp_params: parameters for I2R NDP ranging negotiation.897 * bits 0 - 2: max LTF repetitions898 * bits 3 - 5: max number of spatial streams (supported values are < 2)899 * bits 6 - 7: reserved900 * @r2i_max_total_ltf: R2I Max Total LTFs for NDP ranging negotiation.901 * One of &enum ieee80211_range_params_max_total_ltf.902 * @i2r_max_total_ltf: I2R Max Total LTFs for NDP ranging negotiation.903 * One of &enum ieee80211_range_params_max_total_ltf.904 */905struct iwl_tof_range_req_ap_entry_v8 {906 __le32 initiator_ap_flags;907 u8 channel_num;908 u8 format_bw;909 u8 ctrl_ch_position;910 u8 ftmr_max_retries;911 u8 bssid[ETH_ALEN];912 __le16 burst_period;913 u8 samples_per_burst;914 u8 num_of_bursts;915 u8 sta_id;916 u8 cipher;917 u8 hltk[HLTK_11AZ_LEN];918 u8 tk[TK_11AZ_LEN];919 __le16 calib[IWL_TOF_BW_NUM];920 __le16 beacon_interval;921 u8 rx_pn[IEEE80211_CCMP_PN_LEN];922 u8 tx_pn[IEEE80211_CCMP_PN_LEN];923 u8 r2i_ndp_params;924 u8 i2r_ndp_params;925 u8 r2i_max_total_ltf;926 u8 i2r_max_total_ltf;927} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_8 */928 929/**930 * struct iwl_tof_range_req_ap_entry_v9 - AP configuration parameters931 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.932 * @channel_num: AP Channel number933 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.934 * bits 4 - 7: &enum iwl_location_bw.935 * @ctrl_ch_position: Coding of the control channel position relative to the936 * center frequency, see iwl_mvm_get_ctrl_pos().937 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no938 * reply from the AP.939 * @bssid: AP's BSSID940 * @burst_period: For EDCA based ranging: Recommended value to be sent to the941 * AP. Measurement periodicity In units of 100ms. ignored if942 * num_of_bursts_exp = 0.943 * For non trigger based NDP ranging, the maximum time between944 * measurements in units of milliseconds.945 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);946 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of947 * the number of measurement iterations (min 2^0 = 1, max 2^14)948 * @sta_id: the station id of the AP. Only relevant when associated to the AP,949 * otherwise should be set to &IWL_MVM_INVALID_STA.950 * @cipher: pairwise cipher suite for secured measurement.951 * &enum iwl_location_cipher.952 * @hltk: HLTK to be used for secured 11az measurement953 * @tk: TK to be used for secured 11az measurement954 * @calib: An array of calibration values per FTM rx bandwidth.955 * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the956 * calibration value that corresponds to the rx bandwidth of the FTM957 * frame.958 * @beacon_interval: beacon interval of the AP in TUs. Only required if959 * &IWL_INITIATOR_AP_FLAGS_TB is set.960 * @bss_color: the BSS color of the responder. Only valid if961 * &IWL_INITIATOR_AP_FLAGS_TB or &IWL_INITIATOR_AP_FLAGS_NON_TB is set.962 * @rx_pn: the next expected PN for protected management frames Rx. LE byte963 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id964 * is set to &IWL_MVM_INVALID_STA.965 * @tx_pn: the next PN to use for protected management frames Tx. LE byte966 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id967 * is set to &IWL_MVM_INVALID_STA.968 * @r2i_ndp_params: parameters for R2I NDP ranging negotiation.969 * bits 0 - 2: max LTF repetitions970 * bits 3 - 5: max number of spatial streams971 * bits 6 - 7: reserved972 * @i2r_ndp_params: parameters for I2R NDP ranging negotiation.973 * bits 0 - 2: max LTF repetitions974 * bits 3 - 5: max number of spatial streams (supported values are < 2)975 * bits 6 - 7: reserved976 * @r2i_max_total_ltf: R2I Max Total LTFs for NDP ranging negotiation.977 * One of &enum ieee80211_range_params_max_total_ltf.978 * @i2r_max_total_ltf: I2R Max Total LTFs for NDP ranging negotiation.979 * One of &enum ieee80211_range_params_max_total_ltf.980 * @bss_color: the BSS color of the responder. Only valid if981 * &IWL_INITIATOR_AP_FLAGS_NON_TB or &IWL_INITIATOR_AP_FLAGS_TB is set.982 * @band: 0 for 5.2 GHz, 1 for 2.4 GHz, 2 for 6GHz983 * @min_time_between_msr: For non trigger based NDP ranging, the minimum time984 * between measurements in units of milliseconds985 */986struct iwl_tof_range_req_ap_entry_v9 {987 __le32 initiator_ap_flags;988 u8 channel_num;989 u8 format_bw;990 u8 ctrl_ch_position;991 u8 ftmr_max_retries;992 u8 bssid[ETH_ALEN];993 __le16 burst_period;994 u8 samples_per_burst;995 u8 num_of_bursts;996 u8 sta_id;997 u8 cipher;998 u8 hltk[HLTK_11AZ_LEN];999 u8 tk[TK_11AZ_LEN];1000 __le16 calib[IWL_TOF_BW_NUM];1001 u16 beacon_interval;1002 u8 rx_pn[IEEE80211_CCMP_PN_LEN];1003 u8 tx_pn[IEEE80211_CCMP_PN_LEN];1004 u8 r2i_ndp_params;1005 u8 i2r_ndp_params;1006 u8 r2i_max_total_ltf;1007 u8 i2r_max_total_ltf;1008 u8 bss_color;1009 u8 band;1010 __le16 min_time_between_msr;1011} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_9 */1012 1013/**1014 * struct iwl_tof_range_req_ap_entry_v10 - AP configuration parameters1015 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.1016 * @band: 0 for 5.2 GHz, 1 for 2.4 GHz, 2 for 6GHz1017 * @channel_num: AP Channel number1018 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.1019 * bits 4 - 7: &enum iwl_location_bw.1020 * @ctrl_ch_position: Coding of the control channel position relative to the1021 * center frequency, see iwl_mvm_get_ctrl_pos().1022 * @bssid: AP's BSSID1023 * @burst_period: For EDCA based ranging: Recommended value to be sent to the1024 * AP. Measurement periodicity In units of 100ms. ignored if1025 * num_of_bursts_exp = 0.1026 * For non trigger based NDP ranging, the maximum time between1027 * measurements in units of milliseconds.1028 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);1029 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of1030 * the number of measurement iterations (min 2^0 = 1, max 2^14)1031 * @sta_id: the station id of the AP. Only relevant when associated to the AP,1032 * otherwise should be set to &IWL_MVM_INVALID_STA.1033 * @cipher: pairwise cipher suite for secured measurement.1034 * &enum iwl_location_cipher.1035 * @hltk: HLTK to be used for secured 11az measurement1036 * @tk: TK to be used for secured 11az measurement1037 * @calib: An array of calibration values per FTM rx bandwidth.1038 * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the1039 * calibration value that corresponds to the rx bandwidth of the FTM1040 * frame.1041 * @beacon_interval: beacon interval of the AP in TUs. Only required if1042 * &IWL_INITIATOR_AP_FLAGS_TB is set.1043 * @rx_pn: the next expected PN for protected management frames Rx. LE byte1044 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id1045 * is set to &IWL_MVM_INVALID_STA.1046 * @tx_pn: the next PN to use for protected management frames Tx. LE byte1047 * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id1048 * is set to &IWL_MVM_INVALID_STA.1049 * @r2i_ndp_params: parameters for R2I NDP ranging negotiation.1050 * bits 0 - 2: max LTF repetitions1051 * bits 3 - 5: max number of spatial streams1052 * bits 6 - 7: max total LTFs. One of1053 * &enum ieee80211_range_params_max_total_ltf.1054 * @i2r_ndp_params: parameters for I2R NDP ranging negotiation.1055 * bits 0 - 2: max LTF repetitions1056 * bits 3 - 5: max number of spatial streams (supported values are < 2)1057 * bits 6 - 7: max total LTFs. One of1058 * &enum ieee80211_range_params_max_total_ltf.1059 * @min_time_between_msr: For non trigger based NDP ranging, the minimum time1060 * between measurements in units of milliseconds1061 */1062struct iwl_tof_range_req_ap_entry_v10 {1063 __le32 initiator_ap_flags;1064 u8 band;1065 u8 channel_num;1066 u8 format_bw;1067 u8 ctrl_ch_position;1068 u8 bssid[ETH_ALEN];1069 __le16 burst_period;1070 u8 samples_per_burst;1071 u8 num_of_bursts;1072 u8 sta_id;1073 u8 cipher;1074 u8 hltk[HLTK_11AZ_LEN];1075 u8 tk[TK_11AZ_LEN];1076 __le16 calib[IWL_TOF_BW_NUM];1077 __le16 beacon_interval;1078 u8 rx_pn[IEEE80211_CCMP_PN_LEN];1079 u8 tx_pn[IEEE80211_CCMP_PN_LEN];1080 u8 r2i_ndp_params;1081 u8 i2r_ndp_params;1082 __le16 min_time_between_msr;1083} __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_9 */1084 1085/**1086 * enum iwl_tof_response_mode1087 * @IWL_MVM_TOF_RESPONSE_ASAP: report each AP measurement separately as soon as1088 * possible (not supported for this release)1089 * @IWL_MVM_TOF_RESPONSE_TIMEOUT: report all AP measurements as a batch upon1090 * timeout expiration1091 * @IWL_MVM_TOF_RESPONSE_COMPLETE: report all AP measurements as a batch at the1092 * earlier of: measurements completion / timeout1093 * expiration.1094 */1095enum iwl_tof_response_mode {1096 IWL_MVM_TOF_RESPONSE_ASAP,1097 IWL_MVM_TOF_RESPONSE_TIMEOUT,1098 IWL_MVM_TOF_RESPONSE_COMPLETE,1099};1100 1101/**1102 * enum iwl_tof_initiator_flags1103 *1104 * @IWL_TOF_INITIATOR_FLAGS_FAST_ALGO_DISABLED: disable fast algo, meaning run1105 * the algo on ant A+B, instead of only one of them.1106 * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_A: open RX antenna A for FTMs RX1107 * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_B: open RX antenna B for FTMs RX1108 * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_C: open RX antenna C for FTMs RX1109 * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_A: use antenna A fo TX ACKs during FTM1110 * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_B: use antenna B fo TX ACKs during FTM1111 * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_C: use antenna C fo TX ACKs during FTM1112 * @IWL_TOF_INITIATOR_FLAGS_MACADDR_RANDOM: use random mac address for FTM1113 * @IWL_TOF_INITIATOR_FLAGS_SPECIFIC_CALIB: use the specific calib value from1114 * the range request command1115 * @IWL_TOF_INITIATOR_FLAGS_COMMON_CALIB: use the common calib value from the1116 * ragne request command1117 * @IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT: support non-asap measurements1118 */1119enum iwl_tof_initiator_flags {1120 IWL_TOF_INITIATOR_FLAGS_FAST_ALGO_DISABLED = BIT(0),1121 IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_A = BIT(1),1122 IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_B = BIT(2),1123 IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_C = BIT(3),1124 IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_A = BIT(4),1125 IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_B = BIT(5),1126 IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_C = BIT(6),1127 IWL_TOF_INITIATOR_FLAGS_MACADDR_RANDOM = BIT(7),1128 IWL_TOF_INITIATOR_FLAGS_SPECIFIC_CALIB = BIT(15),1129 IWL_TOF_INITIATOR_FLAGS_COMMON_CALIB = BIT(16),1130 IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT = BIT(20),1131}; /* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */1132 1133#define IWL_MVM_TOF_MAX_APS 51134#define IWL_MVM_TOF_MAX_TWO_SIDED_APS 51135 1136/**1137 * struct iwl_tof_range_req_cmd_v5 - start measurement cmd1138 * @initiator_flags: see flags @ iwl_tof_initiator_flags1139 * @request_id: A Token incremented per request. The same Token will be1140 * sent back in the range response1141 * @initiator: 0- NW initiated, 1 - Client Initiated1142 * @one_sided_los_disable: '0'- run ML-Algo for both ToF/OneSided,1143 * '1' - run ML-Algo for ToF only1144 * @req_timeout: Requested timeout of the response in units of 100ms.1145 * This is equivalent to the session time configured to the1146 * LMAC in Initiator Request1147 * @report_policy: Supported partially for this release: For current release -1148 * the range report will be uploaded as a batch when ready or1149 * when the session is done (successfully / partially).1150 * one of iwl_tof_response_mode.1151 * @reserved0: reserved1152 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1153 * @macaddr_random: '0' Use default source MAC address (i.e. p2_p),1154 * '1' Use MAC Address randomization according to the below1155 * @range_req_bssid: ranging request BSSID1156 * @macaddr_template: MAC address template to use for non-randomized bits1157 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1158 * Bits set to 1 shall be randomized by the UMAC1159 * @ftm_rx_chains: Rx chain to open to receive Responder's FTMs (XVT)1160 * @ftm_tx_chains: Tx chain to send the ack to the Responder FTM (XVT)1161 * @common_calib: The common calib value to inject to this measurement calc1162 * @specific_calib: The specific calib value to inject to this measurement calc1163 * @ap: per-AP request data1164 */1165struct iwl_tof_range_req_cmd_v5 {1166 __le32 initiator_flags;1167 u8 request_id;1168 u8 initiator;1169 u8 one_sided_los_disable;1170 u8 req_timeout;1171 u8 report_policy;1172 u8 reserved0;1173 u8 num_of_ap;1174 u8 macaddr_random;1175 u8 range_req_bssid[ETH_ALEN];1176 u8 macaddr_template[ETH_ALEN];1177 u8 macaddr_mask[ETH_ALEN];1178 u8 ftm_rx_chains;1179 u8 ftm_tx_chains;1180 __le16 common_calib;1181 __le16 specific_calib;1182 struct iwl_tof_range_req_ap_entry_v2 ap[IWL_MVM_TOF_MAX_APS];1183} __packed;1184/* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */1185 1186/**1187 * struct iwl_tof_range_req_cmd_v7 - start measurement cmd1188 * @initiator_flags: see flags @ iwl_tof_initiator_flags1189 * @request_id: A Token incremented per request. The same Token will be1190 * sent back in the range response1191 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1192 * @range_req_bssid: ranging request BSSID1193 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1194 * Bits set to 1 shall be randomized by the UMAC1195 * @macaddr_template: MAC address template to use for non-randomized bits1196 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1197 * This is the session time for completing the measurement.1198 * @tsf_mac_id: report the measurement start time for each ap in terms of the1199 * TSF of this mac id. 0xff to disable TSF reporting.1200 * @common_calib: The common calib value to inject to this measurement calc1201 * @specific_calib: The specific calib value to inject to this measurement calc1202 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.1203 */1204struct iwl_tof_range_req_cmd_v7 {1205 __le32 initiator_flags;1206 u8 request_id;1207 u8 num_of_ap;1208 u8 range_req_bssid[ETH_ALEN];1209 u8 macaddr_mask[ETH_ALEN];1210 u8 macaddr_template[ETH_ALEN];1211 __le32 req_timeout_ms;1212 __le32 tsf_mac_id;1213 __le16 common_calib;1214 __le16 specific_calib;1215 struct iwl_tof_range_req_ap_entry_v3 ap[IWL_MVM_TOF_MAX_APS];1216} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_7 */1217 1218/**1219 * struct iwl_tof_range_req_cmd_v8 - start measurement cmd1220 * @initiator_flags: see flags @ iwl_tof_initiator_flags1221 * @request_id: A Token incremented per request. The same Token will be1222 * sent back in the range response1223 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1224 * @range_req_bssid: ranging request BSSID1225 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1226 * Bits set to 1 shall be randomized by the UMAC1227 * @macaddr_template: MAC address template to use for non-randomized bits1228 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1229 * This is the session time for completing the measurement.1230 * @tsf_mac_id: report the measurement start time for each ap in terms of the1231 * TSF of this mac id. 0xff to disable TSF reporting.1232 * @common_calib: The common calib value to inject to this measurement calc1233 * @specific_calib: The specific calib value to inject to this measurement calc1234 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.1235 */1236struct iwl_tof_range_req_cmd_v8 {1237 __le32 initiator_flags;1238 u8 request_id;1239 u8 num_of_ap;1240 u8 range_req_bssid[ETH_ALEN];1241 u8 macaddr_mask[ETH_ALEN];1242 u8 macaddr_template[ETH_ALEN];1243 __le32 req_timeout_ms;1244 __le32 tsf_mac_id;1245 __le16 common_calib;1246 __le16 specific_calib;1247 struct iwl_tof_range_req_ap_entry_v4 ap[IWL_MVM_TOF_MAX_APS];1248} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_8 */1249 1250/**1251 * struct iwl_tof_range_req_cmd_v9 - start measurement cmd1252 * @initiator_flags: see flags @ iwl_tof_initiator_flags1253 * @request_id: A Token incremented per request. The same Token will be1254 * sent back in the range response1255 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1256 * @range_req_bssid: ranging request BSSID1257 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1258 * Bits set to 1 shall be randomized by the UMAC1259 * @macaddr_template: MAC address template to use for non-randomized bits1260 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1261 * This is the session time for completing the measurement.1262 * @tsf_mac_id: report the measurement start time for each ap in terms of the1263 * TSF of this mac id. 0xff to disable TSF reporting.1264 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.1265 */1266struct iwl_tof_range_req_cmd_v9 {1267 __le32 initiator_flags;1268 u8 request_id;1269 u8 num_of_ap;1270 u8 range_req_bssid[ETH_ALEN];1271 u8 macaddr_mask[ETH_ALEN];1272 u8 macaddr_template[ETH_ALEN];1273 __le32 req_timeout_ms;1274 __le32 tsf_mac_id;1275 struct iwl_tof_range_req_ap_entry_v6 ap[IWL_MVM_TOF_MAX_APS];1276} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_9 */1277 1278/**1279 * struct iwl_tof_range_req_cmd_v11 - start measurement cmd1280 * @initiator_flags: see flags @ iwl_tof_initiator_flags1281 * @request_id: A Token incremented per request. The same Token will be1282 * sent back in the range response1283 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1284 * @range_req_bssid: ranging request BSSID1285 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1286 * Bits set to 1 shall be randomized by the UMAC1287 * @macaddr_template: MAC address template to use for non-randomized bits1288 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1289 * This is the session time for completing the measurement.1290 * @tsf_mac_id: report the measurement start time for each ap in terms of the1291 * TSF of this mac id. 0xff to disable TSF reporting.1292 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.1293 */1294struct iwl_tof_range_req_cmd_v11 {1295 __le32 initiator_flags;1296 u8 request_id;1297 u8 num_of_ap;1298 u8 range_req_bssid[ETH_ALEN];1299 u8 macaddr_mask[ETH_ALEN];1300 u8 macaddr_template[ETH_ALEN];1301 __le32 req_timeout_ms;1302 __le32 tsf_mac_id;1303 struct iwl_tof_range_req_ap_entry_v7 ap[IWL_MVM_TOF_MAX_APS];1304} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_11 */1305 1306/**1307 * struct iwl_tof_range_req_cmd_v12 - start measurement cmd1308 * @initiator_flags: see flags @ iwl_tof_initiator_flags1309 * @request_id: A Token incremented per request. The same Token will be1310 * sent back in the range response1311 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1312 * @range_req_bssid: ranging request BSSID1313 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1314 * Bits set to 1 shall be randomized by the UMAC1315 * @macaddr_template: MAC address template to use for non-randomized bits1316 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1317 * This is the session time for completing the measurement.1318 * @tsf_mac_id: report the measurement start time for each ap in terms of the1319 * TSF of this mac id. 0xff to disable TSF reporting.1320 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.1321 */1322struct iwl_tof_range_req_cmd_v12 {1323 __le32 initiator_flags;1324 u8 request_id;1325 u8 num_of_ap;1326 u8 range_req_bssid[ETH_ALEN];1327 u8 macaddr_mask[ETH_ALEN];1328 u8 macaddr_template[ETH_ALEN];1329 __le32 req_timeout_ms;1330 __le32 tsf_mac_id;1331 struct iwl_tof_range_req_ap_entry_v8 ap[IWL_MVM_TOF_MAX_APS];1332} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_12 */1333 1334/**1335 * struct iwl_tof_range_req_cmd_v13 - start measurement cmd1336 * @initiator_flags: see flags @ iwl_tof_initiator_flags1337 * @request_id: A Token incremented per request. The same Token will be1338 * sent back in the range response1339 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1340 * @range_req_bssid: ranging request BSSID1341 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1342 * Bits set to 1 shall be randomized by the UMAC1343 * @macaddr_template: MAC address template to use for non-randomized bits1344 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1345 * This is the session time for completing the measurement.1346 * @tsf_mac_id: report the measurement start time for each ap in terms of the1347 * TSF of this mac id. 0xff to disable TSF reporting.1348 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v9.1349 */1350struct iwl_tof_range_req_cmd_v13 {1351 __le32 initiator_flags;1352 u8 request_id;1353 u8 num_of_ap;1354 u8 range_req_bssid[ETH_ALEN];1355 u8 macaddr_mask[ETH_ALEN];1356 u8 macaddr_template[ETH_ALEN];1357 __le32 req_timeout_ms;1358 __le32 tsf_mac_id;1359 struct iwl_tof_range_req_ap_entry_v9 ap[IWL_MVM_TOF_MAX_APS];1360} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_13 */1361 1362/**1363 * struct iwl_tof_range_req_cmd_v14 - start measurement cmd1364 * @initiator_flags: see flags @ iwl_tof_initiator_flags1365 * @request_id: A Token incremented per request. The same Token will be1366 * sent back in the range response1367 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1368 * @range_req_bssid: ranging request BSSID1369 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.1370 * Bits set to 1 shall be randomized by the UMAC1371 * @macaddr_template: MAC address template to use for non-randomized bits1372 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.1373 * This is the session time for completing the measurement.1374 * @tsf_mac_id: report the measurement start time for each ap in terms of the1375 * TSF of this mac id. 0xff to disable TSF reporting.1376 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v10.1377 */1378struct iwl_tof_range_req_cmd_v14 {1379 __le32 initiator_flags;1380 u8 request_id;1381 u8 num_of_ap;1382 u8 range_req_bssid[ETH_ALEN];1383 u8 macaddr_mask[ETH_ALEN];1384 u8 macaddr_template[ETH_ALEN];1385 __le32 req_timeout_ms;1386 __le32 tsf_mac_id;1387 struct iwl_tof_range_req_ap_entry_v10 ap[IWL_MVM_TOF_MAX_APS];1388} __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_13 */1389 1390/*1391 * enum iwl_tof_range_request_status - status of the sent request1392 * @IWL_TOF_RANGE_REQUEST_STATUS_SUCCESSFUL - FW successfully received the1393 * request1394 * @IWL_TOF_RANGE_REQUEST_STATUS_BUSY - FW is busy with a previous request, the1395 * sent request will not be handled1396 */1397enum iwl_tof_range_request_status {1398 IWL_TOF_RANGE_REQUEST_STATUS_SUCCESS,1399 IWL_TOF_RANGE_REQUEST_STATUS_BUSY,1400};1401 1402/**1403 * enum iwl_tof_entry_status1404 *1405 * @IWL_TOF_ENTRY_SUCCESS: successful measurement.1406 * @IWL_TOF_ENTRY_GENERAL_FAILURE: General failure.1407 * @IWL_TOF_ENTRY_NO_RESPONSE: Responder didn't reply to the request.1408 * @IWL_TOF_ENTRY_REQUEST_REJECTED: Responder rejected the request.1409 * @IWL_TOF_ENTRY_NOT_SCHEDULED: Time event was scheduled but not called yet.1410 * @IWL_TOF_ENTRY_TIMING_MEASURE_TIMEOUT: Time event triggered but no1411 * measurement was completed.1412 * @IWL_TOF_ENTRY_TARGET_DIFF_CH_CANNOT_CHANGE: No range due inability to switch1413 * from the primary channel.1414 * @IWL_TOF_ENTRY_RANGE_NOT_SUPPORTED: Device doesn't support FTM.1415 * @IWL_TOF_ENTRY_REQUEST_ABORT_UNKNOWN_REASON: Request aborted due to unknown1416 * reason.1417 * @IWL_TOF_ENTRY_LOCATION_INVALID_T1_T4_TIME_STAMP: Failure due to invalid1418 * T1/T4.1419 * @IWL_TOF_ENTRY_11MC_PROTOCOL_FAILURE: Failure due to invalid FTM frame1420 * structure.1421 * @IWL_TOF_ENTRY_REQUEST_CANNOT_SCHED: Request cannot be scheduled.1422 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE: Responder cannot serve the1423 * initiator for some period, period supplied in @refusal_period.1424 * @IWL_TOF_ENTRY_BAD_REQUEST_ARGS: Bad request arguments.1425 * @IWL_TOF_ENTRY_WIFI_NOT_ENABLED: Wifi not enabled.1426 * @IWL_TOF_ENTRY_RESPONDER_OVERRIDE_PARAMS: Responder override the original1427 * parameters within the current session.1428 */1429enum iwl_tof_entry_status {1430 IWL_TOF_ENTRY_SUCCESS = 0,1431 IWL_TOF_ENTRY_GENERAL_FAILURE = 1,1432 IWL_TOF_ENTRY_NO_RESPONSE = 2,1433 IWL_TOF_ENTRY_REQUEST_REJECTED = 3,1434 IWL_TOF_ENTRY_NOT_SCHEDULED = 4,1435 IWL_TOF_ENTRY_TIMING_MEASURE_TIMEOUT = 5,1436 IWL_TOF_ENTRY_TARGET_DIFF_CH_CANNOT_CHANGE = 6,1437 IWL_TOF_ENTRY_RANGE_NOT_SUPPORTED = 7,1438 IWL_TOF_ENTRY_REQUEST_ABORT_UNKNOWN_REASON = 8,1439 IWL_TOF_ENTRY_LOCATION_INVALID_T1_T4_TIME_STAMP = 9,1440 IWL_TOF_ENTRY_11MC_PROTOCOL_FAILURE = 10,1441 IWL_TOF_ENTRY_REQUEST_CANNOT_SCHED = 11,1442 IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE = 12,1443 IWL_TOF_ENTRY_BAD_REQUEST_ARGS = 13,1444 IWL_TOF_ENTRY_WIFI_NOT_ENABLED = 14,1445 IWL_TOF_ENTRY_RESPONDER_OVERRIDE_PARAMS = 15,1446}; /* LOCATION_RANGE_RSP_AP_ENTRY_NTFY_API_S_VER_2 */1447 1448/**1449 * struct iwl_tof_range_rsp_ap_entry_ntfy_v3 - AP parameters (response)1450 * @bssid: BSSID of the AP1451 * @measure_status: current APs measurement status, one of1452 * &enum iwl_tof_entry_status.1453 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz1454 * @rtt: The Round Trip Time that took for the last measurement for1455 * current AP [pSec]1456 * @rtt_variance: The Variance of the RTT values measured for current AP1457 * @rtt_spread: The Difference between the maximum and the minimum RTT1458 * values measured for current AP in the current session [pSec]1459 * @rssi: RSSI as uploaded in the Channel Estimation notification1460 * @rssi_spread: The Difference between the maximum and the minimum RSSI values1461 * measured for current AP in the current session1462 * @reserved: reserved1463 * @refusal_period: refusal period in case of1464 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]1465 * @range: Measured range [cm]1466 * @range_variance: Measured range variance [cm]1467 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was1468 * uploaded by the LMAC1469 * @t2t3_initiator: as calculated from the algo in the initiator1470 * @t1t4_responder: as calculated from the algo in the responder1471 * @common_calib: Calib val that was used in for this AP measurement1472 * @specific_calib: val that was used in for this AP measurement1473 * @papd_calib_output: The result of the tof papd calibration that was injected1474 * into the algorithm.1475 */1476struct iwl_tof_range_rsp_ap_entry_ntfy_v3 {1477 u8 bssid[ETH_ALEN];1478 u8 measure_status;1479 u8 measure_bw;1480 __le32 rtt;1481 __le32 rtt_variance;1482 __le32 rtt_spread;1483 s8 rssi;1484 u8 rssi_spread;1485 u8 reserved;1486 u8 refusal_period;1487 __le32 range;1488 __le32 range_variance;1489 __le32 timestamp;1490 __le32 t2t3_initiator;1491 __le32 t1t4_responder;1492 __le16 common_calib;1493 __le16 specific_calib;1494 __le32 papd_calib_output;1495} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_3 */1496 1497/**1498 * struct iwl_tof_range_rsp_ap_entry_ntfy_v4 - AP parameters (response)1499 * @bssid: BSSID of the AP1500 * @measure_status: current APs measurement status, one of1501 * &enum iwl_tof_entry_status.1502 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz1503 * @rtt: The Round Trip Time that took for the last measurement for1504 * current AP [pSec]1505 * @rtt_variance: The Variance of the RTT values measured for current AP1506 * @rtt_spread: The Difference between the maximum and the minimum RTT1507 * values measured for current AP in the current session [pSec]1508 * @rssi: RSSI as uploaded in the Channel Estimation notification1509 * @rssi_spread: The Difference between the maximum and the minimum RSSI values1510 * measured for current AP in the current session1511 * @last_burst: 1 if no more FTM sessions are scheduled for this responder1512 * @refusal_period: refusal period in case of1513 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]1514 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was1515 * uploaded by the LMAC1516 * @start_tsf: measurement start time in TSF of the mac specified in the range1517 * request1518 * @rx_rate_n_flags: rate and flags of the last FTM frame received from this1519 * responder1520 * @tx_rate_n_flags: rate and flags of the last ack sent to this responder1521 * @t2t3_initiator: as calculated from the algo in the initiator1522 * @t1t4_responder: as calculated from the algo in the responder1523 * @common_calib: Calib val that was used in for this AP measurement1524 * @specific_calib: val that was used in for this AP measurement1525 * @papd_calib_output: The result of the tof papd calibration that was injected1526 * into the algorithm.1527 */1528struct iwl_tof_range_rsp_ap_entry_ntfy_v4 {1529 u8 bssid[ETH_ALEN];1530 u8 measure_status;1531 u8 measure_bw;1532 __le32 rtt;1533 __le32 rtt_variance;1534 __le32 rtt_spread;1535 s8 rssi;1536 u8 rssi_spread;1537 u8 last_burst;1538 u8 refusal_period;1539 __le32 timestamp;1540 __le32 start_tsf;1541 __le32 rx_rate_n_flags;1542 __le32 tx_rate_n_flags;1543 __le32 t2t3_initiator;1544 __le32 t1t4_responder;1545 __le16 common_calib;1546 __le16 specific_calib;1547 __le32 papd_calib_output;1548} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_4 */1549 1550/**1551 * struct iwl_tof_range_rsp_ap_entry_ntfy_v5 - AP parameters (response)1552 * @bssid: BSSID of the AP1553 * @measure_status: current APs measurement status, one of1554 * &enum iwl_tof_entry_status.1555 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz1556 * @rtt: The Round Trip Time that took for the last measurement for1557 * current AP [pSec]1558 * @rtt_variance: The Variance of the RTT values measured for current AP1559 * @rtt_spread: The Difference between the maximum and the minimum RTT1560 * values measured for current AP in the current session [pSec]1561 * @rssi: RSSI as uploaded in the Channel Estimation notification1562 * @rssi_spread: The Difference between the maximum and the minimum RSSI values1563 * measured for current AP in the current session1564 * @last_burst: 1 if no more FTM sessions are scheduled for this responder1565 * @refusal_period: refusal period in case of1566 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]1567 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was1568 * uploaded by the LMAC1569 * @start_tsf: measurement start time in TSF of the mac specified in the range1570 * request1571 * @rx_rate_n_flags: rate and flags of the last FTM frame received from this1572 * responder1573 * @tx_rate_n_flags: rate and flags of the last ack sent to this responder1574 * @t2t3_initiator: as calculated from the algo in the initiator1575 * @t1t4_responder: as calculated from the algo in the responder1576 * @common_calib: Calib val that was used in for this AP measurement1577 * @specific_calib: val that was used in for this AP measurement1578 * @papd_calib_output: The result of the tof papd calibration that was injected1579 * into the algorithm.1580 * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.1581 * @reserved: for alignment1582 */1583struct iwl_tof_range_rsp_ap_entry_ntfy_v5 {1584 u8 bssid[ETH_ALEN];1585 u8 measure_status;1586 u8 measure_bw;1587 __le32 rtt;1588 __le32 rtt_variance;1589 __le32 rtt_spread;1590 s8 rssi;1591 u8 rssi_spread;1592 u8 last_burst;1593 u8 refusal_period;1594 __le32 timestamp;1595 __le32 start_tsf;1596 __le32 rx_rate_n_flags;1597 __le32 tx_rate_n_flags;1598 __le32 t2t3_initiator;1599 __le32 t1t4_responder;1600 __le16 common_calib;1601 __le16 specific_calib;1602 __le32 papd_calib_output;1603 u8 rttConfidence;1604 u8 reserved[3];1605} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */1606 1607/**1608 * struct iwl_tof_range_rsp_ap_entry_ntfy_v6 - AP parameters (response)1609 * @bssid: BSSID of the AP1610 * @measure_status: current APs measurement status, one of1611 * &enum iwl_tof_entry_status.1612 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz1613 * @rtt: The Round Trip Time that took for the last measurement for1614 * current AP [pSec]1615 * @rtt_variance: The Variance of the RTT values measured for current AP1616 * @rtt_spread: The Difference between the maximum and the minimum RTT1617 * values measured for current AP in the current session [pSec]1618 * @rssi: RSSI as uploaded in the Channel Estimation notification1619 * @rssi_spread: The Difference between the maximum and the minimum RSSI values1620 * measured for current AP in the current session1621 * @last_burst: 1 if no more FTM sessions are scheduled for this responder1622 * @refusal_period: refusal period in case of1623 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]1624 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was1625 * uploaded by the LMAC1626 * @start_tsf: measurement start time in TSF of the mac specified in the range1627 * request1628 * @rx_rate_n_flags: rate and flags of the last FTM frame received from this1629 * responder1630 * @tx_rate_n_flags: rate and flags of the last ack sent to this responder1631 * @t2t3_initiator: as calculated from the algo in the initiator1632 * @t1t4_responder: as calculated from the algo in the responder1633 * @common_calib: Calib val that was used in for this AP measurement1634 * @specific_calib: val that was used in for this AP measurement1635 * @papd_calib_output: The result of the tof papd calibration that was injected1636 * into the algorithm.1637 * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.1638 * @reserved: for alignment1639 * @rx_pn: the last PN used for this responder Rx in case PMF is configured in1640 * LE byte order.1641 * @tx_pn: the last PN used for this responder Tx in case PMF is configured in1642 * LE byte order.1643 */1644struct iwl_tof_range_rsp_ap_entry_ntfy_v6 {1645 u8 bssid[ETH_ALEN];1646 u8 measure_status;1647 u8 measure_bw;1648 __le32 rtt;1649 __le32 rtt_variance;1650 __le32 rtt_spread;1651 s8 rssi;1652 u8 rssi_spread;1653 u8 last_burst;1654 u8 refusal_period;1655 __le32 timestamp;1656 __le32 start_tsf;1657 __le32 rx_rate_n_flags;1658 __le32 tx_rate_n_flags;1659 __le32 t2t3_initiator;1660 __le32 t1t4_responder;1661 __le16 common_calib;1662 __le16 specific_calib;1663 __le32 papd_calib_output;1664 u8 rttConfidence;1665 u8 reserved[3];1666 u8 rx_pn[IEEE80211_CCMP_PN_LEN];1667 u8 tx_pn[IEEE80211_CCMP_PN_LEN];1668} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_6,1669 LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_7 */1670 1671 1672/**1673 * enum iwl_tof_response_status - tof response status1674 *1675 * @IWL_TOF_RESPONSE_SUCCESS: successful range.1676 * @IWL_TOF_RESPONSE_TIMEOUT: request aborted due to timeout expiration.1677 * partial result of ranges done so far is included in the response.1678 * @IWL_TOF_RESPONSE_ABORTED: Measurement aborted by command.1679 * @IWL_TOF_RESPONSE_FAILED: Measurement request command failed.1680 */1681enum iwl_tof_response_status {1682 IWL_TOF_RESPONSE_SUCCESS = 0,1683 IWL_TOF_RESPONSE_TIMEOUT = 1,1684 IWL_TOF_RESPONSE_ABORTED = 4,1685 IWL_TOF_RESPONSE_FAILED = 5,1686}; /* LOCATION_RNG_RSP_STATUS */1687 1688/**1689 * struct iwl_tof_range_rsp_ntfy_v5 - ranging response notification1690 * @request_id: A Token ID of the corresponding Range request1691 * @request_status: status of current measurement session, one of1692 * &enum iwl_tof_response_status.1693 * @last_in_batch: reprot policy (when not all responses are uploaded at once)1694 * @num_of_aps: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)1695 * @ap: per-AP data1696 */1697struct iwl_tof_range_rsp_ntfy_v5 {1698 u8 request_id;1699 u8 request_status;1700 u8 last_in_batch;1701 u8 num_of_aps;1702 struct iwl_tof_range_rsp_ap_entry_ntfy_v3 ap[IWL_MVM_TOF_MAX_APS];1703} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_5 */1704 1705/**1706 * struct iwl_tof_range_rsp_ntfy_v6 - ranging response notification1707 * @request_id: A Token ID of the corresponding Range request1708 * @num_of_aps: Number of APs results1709 * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.1710 * @reserved: reserved1711 * @ap: per-AP data1712 */1713struct iwl_tof_range_rsp_ntfy_v6 {1714 u8 request_id;1715 u8 num_of_aps;1716 u8 last_report;1717 u8 reserved;1718 struct iwl_tof_range_rsp_ap_entry_ntfy_v4 ap[IWL_MVM_TOF_MAX_APS];1719} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */1720 1721/**1722 * struct iwl_tof_range_rsp_ntfy_v7 - ranging response notification1723 * @request_id: A Token ID of the corresponding Range request1724 * @num_of_aps: Number of APs results1725 * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.1726 * @reserved: reserved1727 * @ap: per-AP data1728 */1729struct iwl_tof_range_rsp_ntfy_v7 {1730 u8 request_id;1731 u8 num_of_aps;1732 u8 last_report;1733 u8 reserved;1734 struct iwl_tof_range_rsp_ap_entry_ntfy_v5 ap[IWL_MVM_TOF_MAX_APS];1735} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */1736 1737/**1738 * struct iwl_tof_range_rsp_ntfy_v8 - ranging response notification1739 * @request_id: A Token ID of the corresponding Range request1740 * @num_of_aps: Number of APs results1741 * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.1742 * @reserved: reserved1743 * @ap: per-AP data1744 */1745struct iwl_tof_range_rsp_ntfy_v8 {1746 u8 request_id;1747 u8 num_of_aps;1748 u8 last_report;1749 u8 reserved;1750 struct iwl_tof_range_rsp_ap_entry_ntfy_v6 ap[IWL_MVM_TOF_MAX_APS];1751} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8,1752 LOCATION_RANGE_RSP_NTFY_API_S_VER_9 */1753 1754#define IWL_MVM_TOF_MCSI_BUF_SIZE (245)1755/**1756 * struct iwl_tof_mcsi_notif - used for debug1757 * @token: token ID for the current session1758 * @role: '0' - initiator, '1' - responder1759 * @reserved: reserved1760 * @initiator_bssid: initiator machine1761 * @responder_bssid: responder machine1762 * @mcsi_buffer: debug data1763 */1764struct iwl_tof_mcsi_notif {1765 u8 token;1766 u8 role;1767 __le16 reserved;1768 u8 initiator_bssid[ETH_ALEN];1769 u8 responder_bssid[ETH_ALEN];1770 u8 mcsi_buffer[IWL_MVM_TOF_MCSI_BUF_SIZE * 4];1771} __packed;1772 1773/**1774 * struct iwl_tof_range_abort_cmd1775 * @request_id: corresponds to a range request1776 * @reserved: reserved1777 */1778struct iwl_tof_range_abort_cmd {1779 u8 request_id;1780 u8 reserved[3];1781} __packed;1782 1783enum ftm_responder_stats_flags {1784 FTM_RESP_STAT_NON_ASAP_STARTED = BIT(0),1785 FTM_RESP_STAT_NON_ASAP_IN_WIN = BIT(1),1786 FTM_RESP_STAT_NON_ASAP_OUT_WIN = BIT(2),1787 FTM_RESP_STAT_TRIGGER_DUP = BIT(3),1788 FTM_RESP_STAT_DUP = BIT(4),1789 FTM_RESP_STAT_DUP_IN_WIN = BIT(5),1790 FTM_RESP_STAT_DUP_OUT_WIN = BIT(6),1791 FTM_RESP_STAT_SCHED_SUCCESS = BIT(7),1792 FTM_RESP_STAT_ASAP_REQ = BIT(8),1793 FTM_RESP_STAT_NON_ASAP_REQ = BIT(9),1794 FTM_RESP_STAT_ASAP_RESP = BIT(10),1795 FTM_RESP_STAT_NON_ASAP_RESP = BIT(11),1796 FTM_RESP_STAT_FAIL_INITIATOR_INACTIVE = BIT(12),1797 FTM_RESP_STAT_FAIL_INITIATOR_OUT_WIN = BIT(13),1798 FTM_RESP_STAT_FAIL_INITIATOR_RETRY_LIM = BIT(14),1799 FTM_RESP_STAT_FAIL_NEXT_SERVED = BIT(15),1800 FTM_RESP_STAT_FAIL_TRIGGER_ERR = BIT(16),1801 FTM_RESP_STAT_FAIL_GC = BIT(17),1802 FTM_RESP_STAT_SUCCESS = BIT(18),1803 FTM_RESP_STAT_INTEL_IE = BIT(19),1804 FTM_RESP_STAT_INITIATOR_ACTIVE = BIT(20),1805 FTM_RESP_STAT_MEASUREMENTS_AVAILABLE = BIT(21),1806 FTM_RESP_STAT_TRIGGER_UNKNOWN = BIT(22),1807 FTM_RESP_STAT_PROCESS_FAIL = BIT(23),1808 FTM_RESP_STAT_ACK = BIT(24),1809 FTM_RESP_STAT_NACK = BIT(25),1810 FTM_RESP_STAT_INVALID_INITIATOR_ID = BIT(26),1811 FTM_RESP_STAT_TIMER_MIN_DELTA = BIT(27),1812 FTM_RESP_STAT_INITIATOR_REMOVED = BIT(28),1813 FTM_RESP_STAT_INITIATOR_ADDED = BIT(29),1814 FTM_RESP_STAT_ERR_LIST_FULL = BIT(30),1815 FTM_RESP_STAT_INITIATOR_SCHED_NOW = BIT(31),1816}; /* RESP_IND_E */1817 1818/**1819 * struct iwl_ftm_responder_stats - FTM responder statistics1820 * @addr: initiator address1821 * @success_ftm: number of successful ftm frames1822 * @ftm_per_burst: num of FTM frames that were received1823 * @flags: &enum ftm_responder_stats_flags1824 * @duration: actual duration of FTM1825 * @allocated_duration: time that was allocated for this FTM session1826 * @bw: FTM request bandwidth1827 * @rate: FTM request rate1828 * @reserved: for alingment and future use1829 */1830struct iwl_ftm_responder_stats {1831 u8 addr[ETH_ALEN];1832 u8 success_ftm;1833 u8 ftm_per_burst;1834 __le32 flags;1835 __le32 duration;1836 __le32 allocated_duration;1837 u8 bw;1838 u8 rate;1839 __le16 reserved;1840} __packed; /* TOF_RESPONDER_STATISTICS_NTFY_S_VER_2 */1841 1842#define IWL_CSI_MAX_EXPECTED_CHUNKS 161843 1844#define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_1 0x00031845#define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_1 0x000c1846 1847#define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_2 0x00ff1848#define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_2 0xff001849 1850struct iwl_csi_chunk_notification {1851 __le32 token;1852 __le16 seq;1853 __le16 ctl;1854 __le32 size;1855 u8 data[];1856} __packed; /* CSI_CHUNKS_HDR_NTFY_API_S_VER_1/VER_2 */1857 1858#endif /* __iwl_fw_api_location_h__ */1859