1 /******************************************************************************
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
9 * Copyright (C) 2018 Intel Corporation
10 * Copyright (C) 2019 Intel Corporation
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of version 2 of the GNU General Public License as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * The full GNU General Public License is included in this distribution
22 * in the file called COPYING.
24 * Contact Information:
25 * Intel Linux Wireless <linuxwifi@intel.com>
26 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
30 * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
31 * Copyright (C) 2018 Intel Corporation
32 * Copyright (C) 2019 Intel Corporation
33 * All rights reserved.
35 * Redistribution and use in source and binary forms, with or without
36 * modification, are permitted provided that the following conditions
39 * * Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * * Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in
43 * the documentation and/or other materials provided with the
45 * * Neither the name Intel Corporation nor the names of its
46 * contributors may be used to endorse or promote products derived
47 * from this software without specific prior written permission.
49 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
53 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
54 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
55 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
57 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
59 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 *****************************************************************************/
62 #ifndef __iwl_fw_api_location_h__
63 #define __iwl_fw_api_location_h__
66 * enum iwl_location_subcmd_ids - location group command IDs
68 enum iwl_location_subcmd_ids
{
70 * @TOF_RANGE_REQ_CMD: TOF ranging request,
71 * uses &struct iwl_tof_range_req_cmd
73 TOF_RANGE_REQ_CMD
= 0x0,
75 * @TOF_CONFIG_CMD: TOF configuration, uses &struct iwl_tof_config_cmd
79 * @TOF_RANGE_ABORT_CMD: abort ongoing ranging, uses
80 * &struct iwl_tof_range_abort_cmd
82 TOF_RANGE_ABORT_CMD
= 0x2,
84 * @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config,
85 * uses &struct iwl_tof_range_req_ext_cmd
87 TOF_RANGE_REQ_EXT_CMD
= 0x3,
89 * @TOF_RESPONDER_CONFIG_CMD: FTM responder configuration,
90 * uses &struct iwl_tof_responder_config_cmd
92 TOF_RESPONDER_CONFIG_CMD
= 0x4,
94 * @TOF_RESPONDER_DYN_CONFIG_CMD: FTM dynamic configuration,
95 * uses &struct iwl_tof_responder_dyn_config_cmd
97 TOF_RESPONDER_DYN_CONFIG_CMD
= 0x5,
99 * @CSI_HEADER_NOTIFICATION: CSI header
101 CSI_HEADER_NOTIFICATION
= 0xFA,
103 * @CSI_CHUNKS_NOTIFICATION: CSI chunk,
104 * uses &struct iwl_csi_chunk_notification
106 CSI_CHUNKS_NOTIFICATION
= 0xFB,
108 * @TOF_LC_NOTIF: used for LCI/civic location, contains just
113 * @TOF_RESPONDER_STATS: FTM responder statistics notification,
114 * uses &struct iwl_ftm_responder_stats
116 TOF_RESPONDER_STATS
= 0xFD,
118 * @TOF_MCSI_DEBUG_NOTIF: MCSI debug notification, uses
119 * &struct iwl_tof_mcsi_notif
121 TOF_MCSI_DEBUG_NOTIF
= 0xFE,
123 * @TOF_RANGE_RESPONSE_NOTIF: ranging response, using
124 * &struct iwl_tof_range_rsp_ntfy
126 TOF_RANGE_RESPONSE_NOTIF
= 0xFF,
130 * struct iwl_tof_config_cmd - ToF configuration
131 * @tof_disabled: indicates if ToF is disabled (or not)
132 * @one_sided_disabled: indicates if one-sided is disabled (or not)
133 * @is_debug_mode: indiciates if debug mode is active
134 * @is_buf_required: indicates if channel estimation buffer is required
136 struct iwl_tof_config_cmd
{
138 u8 one_sided_disabled
;
144 * enum iwl_tof_bandwidth - values for iwl_tof_range_req_ap_entry.bandwidth
145 * @IWL_TOF_BW_20_LEGACY: 20 MHz non-HT
146 * @IWL_TOF_BW_20_HT: 20 MHz HT
147 * @IWL_TOF_BW_40: 40 MHz
148 * @IWL_TOF_BW_80: 80 MHz
149 * @IWL_TOF_BW_160: 160 MHz
151 enum iwl_tof_bandwidth
{
152 IWL_TOF_BW_20_LEGACY
,
157 }; /* LOCAT_BW_TYPE_E */
160 * enum iwl_tof_algo_type - Algorithym type for range measurement request
162 enum iwl_tof_algo_type
{
163 IWL_TOF_ALGO_TYPE_MAX_LIKE
= 0,
164 IWL_TOF_ALGO_TYPE_LINEAR_REG
= 1,
165 IWL_TOF_ALGO_TYPE_FFT
= 2,
168 IWL_TOF_ALGO_TYPE_INVALID
,
172 * enum iwl_tof_mcsi_ntfy - Enable/Disable MCSI notifications
174 enum iwl_tof_mcsi_enable
{
175 IWL_TOF_MCSI_DISABLED
= 0,
176 IWL_TOF_MCSI_ENABLED
= 1,
177 }; /* MCSI_ENABLE_E */
180 * enum iwl_tof_responder_cmd_valid_field - valid fields in the responder cfg
181 * @IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO: channel info is valid
182 * @IWL_TOF_RESPONDER_CMD_VALID_TOA_OFFSET: ToA offset is valid
183 * @IWL_TOF_RESPONDER_CMD_VALID_COMMON_CALIB: common calibration mode is valid
184 * @IWL_TOF_RESPONDER_CMD_VALID_SPECIFIC_CALIB: spefici calibration mode is
186 * @IWL_TOF_RESPONDER_CMD_VALID_BSSID: BSSID is valid
187 * @IWL_TOF_RESPONDER_CMD_VALID_TX_ANT: TX antenna is valid
188 * @IWL_TOF_RESPONDER_CMD_VALID_ALGO_TYPE: algorithm type is valid
189 * @IWL_TOF_RESPONDER_CMD_VALID_NON_ASAP_SUPPORT: non-ASAP support is valid
190 * @IWL_TOF_RESPONDER_CMD_VALID_STATISTICS_REPORT_SUPPORT: statistics report
192 * @IWL_TOF_RESPONDER_CMD_VALID_MCSI_NOTIF_SUPPORT: MCSI notification support
194 * @IWL_TOF_RESPONDER_CMD_VALID_FAST_ALGO_SUPPORT: fast algorithm support
196 * @IWL_TOF_RESPONDER_CMD_VALID_RETRY_ON_ALGO_FAIL: retry on algorithm failure
198 * @IWL_TOF_RESPONDER_CMD_VALID_STA_ID: station ID is valid
200 enum iwl_tof_responder_cmd_valid_field
{
201 IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO
= BIT(0),
202 IWL_TOF_RESPONDER_CMD_VALID_TOA_OFFSET
= BIT(1),
203 IWL_TOF_RESPONDER_CMD_VALID_COMMON_CALIB
= BIT(2),
204 IWL_TOF_RESPONDER_CMD_VALID_SPECIFIC_CALIB
= BIT(3),
205 IWL_TOF_RESPONDER_CMD_VALID_BSSID
= BIT(4),
206 IWL_TOF_RESPONDER_CMD_VALID_TX_ANT
= BIT(5),
207 IWL_TOF_RESPONDER_CMD_VALID_ALGO_TYPE
= BIT(6),
208 IWL_TOF_RESPONDER_CMD_VALID_NON_ASAP_SUPPORT
= BIT(7),
209 IWL_TOF_RESPONDER_CMD_VALID_STATISTICS_REPORT_SUPPORT
= BIT(8),
210 IWL_TOF_RESPONDER_CMD_VALID_MCSI_NOTIF_SUPPORT
= BIT(9),
211 IWL_TOF_RESPONDER_CMD_VALID_FAST_ALGO_SUPPORT
= BIT(10),
212 IWL_TOF_RESPONDER_CMD_VALID_RETRY_ON_ALGO_FAIL
= BIT(11),
213 IWL_TOF_RESPONDER_CMD_VALID_STA_ID
= BIT(12),
217 * enum iwl_tof_responder_cfg_flags - responder configuration flags
218 * @IWL_TOF_RESPONDER_FLAGS_NON_ASAP_SUPPORT: non-ASAP support
219 * @IWL_TOF_RESPONDER_FLAGS_REPORT_STATISTICS: report statistics
220 * @IWL_TOF_RESPONDER_FLAGS_REPORT_MCSI: report MCSI
221 * @IWL_TOF_RESPONDER_FLAGS_ALGO_TYPE: algorithm type
222 * @IWL_TOF_RESPONDER_FLAGS_TOA_OFFSET_MODE: ToA offset mode
223 * @IWL_TOF_RESPONDER_FLAGS_COMMON_CALIB_MODE: common calibration mode
224 * @IWL_TOF_RESPONDER_FLAGS_SPECIFIC_CALIB_MODE: specific calibration mode
225 * @IWL_TOF_RESPONDER_FLAGS_FAST_ALGO_SUPPORT: fast algorithm support
226 * @IWL_TOF_RESPONDER_FLAGS_RETRY_ON_ALGO_FAIL: retry on algorithm fail
227 * @IWL_TOF_RESPONDER_FLAGS_FTM_TX_ANT: TX antenna mask
229 enum iwl_tof_responder_cfg_flags
{
230 IWL_TOF_RESPONDER_FLAGS_NON_ASAP_SUPPORT
= BIT(0),
231 IWL_TOF_RESPONDER_FLAGS_REPORT_STATISTICS
= BIT(1),
232 IWL_TOF_RESPONDER_FLAGS_REPORT_MCSI
= BIT(2),
233 IWL_TOF_RESPONDER_FLAGS_ALGO_TYPE
= BIT(3) | BIT(4) | BIT(5),
234 IWL_TOF_RESPONDER_FLAGS_TOA_OFFSET_MODE
= BIT(6),
235 IWL_TOF_RESPONDER_FLAGS_COMMON_CALIB_MODE
= BIT(7),
236 IWL_TOF_RESPONDER_FLAGS_SPECIFIC_CALIB_MODE
= BIT(8),
237 IWL_TOF_RESPONDER_FLAGS_FAST_ALGO_SUPPORT
= BIT(9),
238 IWL_TOF_RESPONDER_FLAGS_RETRY_ON_ALGO_FAIL
= BIT(10),
239 IWL_TOF_RESPONDER_FLAGS_FTM_TX_ANT
= RATE_MCS_ANT_ABC_MSK
,
243 * struct iwl_tof_responder_config_cmd_v6 - ToF AP mode (for debug)
244 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field
245 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags
246 * @bandwidth: current AP Bandwidth: &enum iwl_tof_bandwidth
247 * @rate: current AP rate
248 * @channel_num: current AP Channel
249 * @ctrl_ch_position: coding of the control channel position relative to
250 * the center frequency, see iwl_mvm_get_ctrl_pos()
251 * @sta_id: index of the AP STA when in AP mode
252 * @reserved1: reserved
253 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug
254 * purposes, simulating station movement by adding various values
256 * @common_calib: XVT: common calibration value
257 * @specific_calib: XVT: specific calibration value
258 * @bssid: Current AP BSSID
259 * @reserved2: reserved
261 struct iwl_tof_responder_config_cmd_v6
{
262 __le32 cmd_valid_fields
;
263 __le32 responder_cfg_flags
;
272 __le16 specific_calib
;
275 } __packed
; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_6 */
278 * struct iwl_tof_responder_config_cmd - ToF AP mode (for debug)
279 * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field
280 * @responder_cfg_flags: &iwl_tof_responder_cfg_flags
281 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.
282 * bits 4 - 7: &enum iwl_location_bw.
283 * @rate: current AP rate
284 * @channel_num: current AP Channel
285 * @ctrl_ch_position: coding of the control channel position relative to
286 * the center frequency, see iwl_mvm_get_ctrl_pos()
287 * @sta_id: index of the AP STA when in AP mode
288 * @reserved1: reserved
289 * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug
290 * purposes, simulating station movement by adding various values
292 * @common_calib: XVT: common calibration value
293 * @specific_calib: XVT: specific calibration value
294 * @bssid: Current AP BSSID
295 * @reserved2: reserved
297 struct iwl_tof_responder_config_cmd
{
298 __le32 cmd_valid_fields
;
299 __le32 responder_cfg_flags
;
308 __le16 specific_calib
;
311 } __packed
; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_6 */
313 #define IWL_LCI_CIVIC_IE_MAX_SIZE 400
316 * struct iwl_tof_responder_dyn_config_cmd - Dynamic responder settings
317 * @lci_len: The length of the 1st (LCI) part in the @lci_civic buffer
318 * @civic_len: The length of the 2nd (CIVIC) part in the @lci_civic buffer
319 * @lci_civic: The LCI/CIVIC buffer. LCI data (if exists) comes first, then, if
320 * needed, 0-padding such that the next part is dword-aligned, then CIVIC
321 * data (if exists) follows, and then 0-padding again to complete a
322 * 4-multiple long buffer.
324 struct iwl_tof_responder_dyn_config_cmd
{
328 } __packed
; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */
331 * struct iwl_tof_range_req_ext_cmd - extended range req for WLS
332 * @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF
333 * @reserved: reserved
334 * @min_delta_ftm: Minimal time between two consecutive measurements,
335 * in units of 100us. 0 means no preference by station
336 * @ftm_format_and_bw20M: FTM Channel Spacing/Format for 20MHz: recommended
337 * value be sent to the AP
338 * @ftm_format_and_bw40M: FTM Channel Spacing/Format for 40MHz: recommended
339 * value to be sent to the AP
340 * @ftm_format_and_bw80M: FTM Channel Spacing/Format for 80MHz: recommended
341 * value to be sent to the AP
343 struct iwl_tof_range_req_ext_cmd
{
344 __le16 tsf_timer_offset_msec
;
347 u8 ftm_format_and_bw20M
;
348 u8 ftm_format_and_bw40M
;
349 u8 ftm_format_and_bw80M
;
353 * enum iwl_tof_location_query - values for query bitmap
354 * @IWL_TOF_LOC_LCI: query LCI
355 * @IWL_TOF_LOC_CIVIC: query civic
357 enum iwl_tof_location_query
{
358 IWL_TOF_LOC_LCI
= 0x01,
359 IWL_TOF_LOC_CIVIC
= 0x02,
363 * struct iwl_tof_range_req_ap_entry_v2 - AP configuration parameters
364 * @channel_num: Current AP Channel
365 * @bandwidth: Current AP Bandwidth. One of iwl_tof_bandwidth.
366 * @tsf_delta_direction: TSF relatively to the subject AP
367 * @ctrl_ch_position: Coding of the control channel position relative to the
368 * center frequency, see iwl_mvm_get_ctrl_pos().
370 * @measure_type: Measurement type: 0 - two sided, 1 - One sided
371 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of the
372 * number of measurement iterations (min 2^0 = 1, max 2^14)
373 * @burst_period: Recommended value to be sent to the AP. Measurement
374 * periodicity In units of 100ms. ignored if num_of_bursts = 0
375 * @samples_per_burst: 2-sided: the number of FTMs pairs in single Burst (1-31);
376 * 1-sided: how many rts/cts pairs should be used per burst.
377 * @retries_per_sample: Max number of retries that the LMAC should send
378 * in case of no replies by the AP.
379 * @tsf_delta: TSF Delta in units of microseconds.
380 * The difference between the AP TSF and the device local clock.
381 * @location_req: Location Request Bit[0] LCI should be sent in the FTMR;
382 * Bit[1] Civic should be sent in the FTMR
383 * @asap_mode: 0 - non asap mode, 1 - asap mode (not relevant for one sided)
384 * @enable_dyn_ack: Enable Dynamic ACK BW.
385 * 0: Initiator interact with regular AP;
386 * 1: Initiator interact with Responder machine: need to send the
387 * Initiator Acks with HT 40MHz / 80MHz, since the Responder should
388 * use it for its ch est measurement (this flag will be set when we
389 * configure the opposite machine to be Responder).
390 * @rssi: Last received value
391 * legal values: -128-0 (0x7f). above 0x0 indicating an invalid value.
392 * @algo_type: &enum iwl_tof_algo_type
393 * @notify_mcsi: &enum iwl_tof_mcsi_ntfy.
394 * @reserved: For alignment and future use
396 struct iwl_tof_range_req_ap_entry_v2
{
399 u8 tsf_delta_direction
;
405 u8 samples_per_burst
;
406 u8 retries_per_sample
;
415 } __packed
; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_2 */
418 * enum iwl_initiator_ap_flags - per responder FTM configuration flags
419 * @IWL_INITIATOR_AP_FLAGS_ASAP: Request for ASAP measurement.
420 * @IWL_INITIATOR_AP_FLAGS_LCI_REQUEST: Request for LCI information
421 * @IWL_INITIATOR_AP_FLAGS_CIVIC_REQUEST: Request for CIVIC information
422 * @IWL_INITIATOR_AP_FLAGS_DYN_ACK: Send HT/VHT ack for FTM frames. If not set,
423 * 20Mhz dup acks will be sent.
424 * @IWL_INITIATOR_AP_FLAGS_ALGO_LR: Use LR algo type for rtt calculation.
425 * Default algo type is ML.
426 * @IWL_INITIATOR_AP_FLAGS_ALGO_FFT: Use FFT algo type for rtt calculation.
427 * Default algo type is ML.
428 * @IWL_INITIATOR_AP_FLAGS_MCSI_REPORT: Send the MCSI for each FTM frame to the
430 * @IWL_INITIATOR_AP_FLAGS_NON_TB: Use non trigger based flow
431 * @IWL_INITIATOR_AP_FLAGS_TB: Use trigger based flow
432 * @IWL_INITIATOR_AP_FLAGS_SECURED: request secured measurement
434 enum iwl_initiator_ap_flags
{
435 IWL_INITIATOR_AP_FLAGS_ASAP
= BIT(1),
436 IWL_INITIATOR_AP_FLAGS_LCI_REQUEST
= BIT(2),
437 IWL_INITIATOR_AP_FLAGS_CIVIC_REQUEST
= BIT(3),
438 IWL_INITIATOR_AP_FLAGS_DYN_ACK
= BIT(4),
439 IWL_INITIATOR_AP_FLAGS_ALGO_LR
= BIT(5),
440 IWL_INITIATOR_AP_FLAGS_ALGO_FFT
= BIT(6),
441 IWL_INITIATOR_AP_FLAGS_MCSI_REPORT
= BIT(8),
442 IWL_INITIATOR_AP_FLAGS_NON_TB
= BIT(9),
443 IWL_INITIATOR_AP_FLAGS_TB
= BIT(10),
444 IWL_INITIATOR_AP_FLAGS_SECURED
= BIT(11),
448 * struct iwl_tof_range_req_ap_entry_v3 - AP configuration parameters
449 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.
450 * @channel_num: AP Channel number
451 * @bandwidth: AP bandwidth. One of iwl_tof_bandwidth.
452 * @ctrl_ch_position: Coding of the control channel position relative to the
453 * center frequency, see iwl_mvm_get_ctrl_pos().
454 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no
457 * @burst_period: Recommended value to be sent to the AP. Measurement
458 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0
459 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);
460 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of
461 * the number of measurement iterations (min 2^0 = 1, max 2^14)
462 * @reserved: For alignment and future use
463 * @tsf_delta: not in use
465 struct iwl_tof_range_req_ap_entry_v3
{
466 __le32 initiator_ap_flags
;
473 u8 samples_per_burst
;
477 } __packed
; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_3 */
480 * enum iwl_location_frame_format - location frame formats
481 * @IWL_LOCATION_FRAME_FORMAT_LEGACY: legacy
482 * @IWL_LOCATION_FRAME_FORMAT_HT: HT
483 * @IWL_LOCATION_FRAME_FORMAT_VHT: VHT
484 * @IWL_LOCATION_FRAME_FORMAT_HE: HE
486 enum iwl_location_frame_format
{
487 IWL_LOCATION_FRAME_FORMAT_LEGACY
,
488 IWL_LOCATION_FRAME_FORMAT_HT
,
489 IWL_LOCATION_FRAME_FORMAT_VHT
,
490 IWL_LOCATION_FRAME_FORMAT_HE
,
494 * enum iwl_location_bw - location bandwidth selection
495 * @IWL_LOCATION_BW_20MHZ: 20MHz
496 * @IWL_LOCATION_BW_40MHZ: 40MHz
497 * @IWL_LOCATION_BW_80MHZ: 80MHz
499 enum iwl_location_bw
{
500 IWL_LOCATION_BW_20MHZ
,
501 IWL_LOCATION_BW_40MHZ
,
502 IWL_LOCATION_BW_80MHZ
,
505 #define HLTK_11AZ_LEN 32
506 #define TK_11AZ_LEN 32
508 #define LOCATION_BW_POS 4
511 * struct iwl_tof_range_req_ap_entry - AP configuration parameters
512 * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.
513 * @channel_num: AP Channel number
514 * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.
515 * bits 4 - 7: &enum iwl_location_bw.
516 * @ctrl_ch_position: Coding of the control channel position relative to the
517 * center frequency, see iwl_mvm_get_ctrl_pos().
518 * @ftmr_max_retries: Max number of retries to send the FTMR in case of no
521 * @burst_period: Recommended value to be sent to the AP. Measurement
522 * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0
523 * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);
524 * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of
525 * the number of measurement iterations (min 2^0 = 1, max 2^14)
526 * @reserved: For alignment and future use
527 * @hltk: HLTK to be used for secured 11az measurement
528 * @tk: TK to be used for secured 11az measurement
530 struct iwl_tof_range_req_ap_entry
{
531 __le32 initiator_ap_flags
;
538 u8 samples_per_burst
;
541 u8 hltk
[HLTK_11AZ_LEN
];
543 } __packed
; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_4 */
546 * enum iwl_tof_response_mode
547 * @IWL_MVM_TOF_RESPONSE_ASAP: report each AP measurement separately as soon as
548 * possible (not supported for this release)
549 * @IWL_MVM_TOF_RESPONSE_TIMEOUT: report all AP measurements as a batch upon
551 * @IWL_MVM_TOF_RESPONSE_COMPLETE: report all AP measurements as a batch at the
552 * earlier of: measurements completion / timeout
555 enum iwl_tof_response_mode
{
556 IWL_MVM_TOF_RESPONSE_ASAP
,
557 IWL_MVM_TOF_RESPONSE_TIMEOUT
,
558 IWL_MVM_TOF_RESPONSE_COMPLETE
,
562 * enum iwl_tof_initiator_flags
564 * @IWL_TOF_INITIATOR_FLAGS_FAST_ALGO_DISABLED: disable fast algo, meaning run
565 * the algo on ant A+B, instead of only one of them.
566 * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_A: open RX antenna A for FTMs RX
567 * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_B: open RX antenna B for FTMs RX
568 * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_C: open RX antenna C for FTMs RX
569 * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_A: use antenna A fo TX ACKs during FTM
570 * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_B: use antenna B fo TX ACKs during FTM
571 * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_C: use antenna C fo TX ACKs during FTM
572 * @IWL_TOF_INITIATOR_FLAGS_MACADDR_RANDOM: use random mac address for FTM
573 * @IWL_TOF_INITIATOR_FLAGS_SPECIFIC_CALIB: use the specific calib value from
574 * the range request command
575 * @IWL_TOF_INITIATOR_FLAGS_COMMON_CALIB: use the common calib value from the
576 * ragne request command
577 * @IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT: support non-asap measurements
579 enum iwl_tof_initiator_flags
{
580 IWL_TOF_INITIATOR_FLAGS_FAST_ALGO_DISABLED
= BIT(0),
581 IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_A
= BIT(1),
582 IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_B
= BIT(2),
583 IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_C
= BIT(3),
584 IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_A
= BIT(4),
585 IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_B
= BIT(5),
586 IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_C
= BIT(6),
587 IWL_TOF_INITIATOR_FLAGS_MACADDR_RANDOM
= BIT(7),
588 IWL_TOF_INITIATOR_FLAGS_SPECIFIC_CALIB
= BIT(15),
589 IWL_TOF_INITIATOR_FLAGS_COMMON_CALIB
= BIT(16),
590 IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT
= BIT(20),
591 }; /* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */
593 #define IWL_MVM_TOF_MAX_APS 5
594 #define IWL_MVM_TOF_MAX_TWO_SIDED_APS 5
597 * struct iwl_tof_range_req_cmd_v5 - start measurement cmd
598 * @initiator_flags: see flags @ iwl_tof_initiator_flags
599 * @request_id: A Token incremented per request. The same Token will be
600 * sent back in the range response
601 * @initiator: 0- NW initiated, 1 - Client Initiated
602 * @one_sided_los_disable: '0'- run ML-Algo for both ToF/OneSided,
603 * '1' - run ML-Algo for ToF only
604 * @req_timeout: Requested timeout of the response in units of 100ms.
605 * This is equivalent to the session time configured to the
606 * LMAC in Initiator Request
607 * @report_policy: Supported partially for this release: For current release -
608 * the range report will be uploaded as a batch when ready or
609 * when the session is done (successfully / partially).
610 * one of iwl_tof_response_mode.
611 * @reserved0: reserved
612 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
613 * @macaddr_random: '0' Use default source MAC address (i.e. p2_p),
614 * '1' Use MAC Address randomization according to the below
615 * @range_req_bssid: ranging request BSSID
616 * @macaddr_template: MAC address template to use for non-randomized bits
617 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
618 * Bits set to 1 shall be randomized by the UMAC
619 * @ftm_rx_chains: Rx chain to open to receive Responder's FTMs (XVT)
620 * @ftm_tx_chains: Tx chain to send the ack to the Responder FTM (XVT)
621 * @common_calib: The common calib value to inject to this measurement calc
622 * @specific_calib: The specific calib value to inject to this measurement calc
623 * @ap: per-AP request data
625 struct iwl_tof_range_req_cmd_v5
{
626 __le32 initiator_flags
;
629 u8 one_sided_los_disable
;
635 u8 range_req_bssid
[ETH_ALEN
];
636 u8 macaddr_template
[ETH_ALEN
];
637 u8 macaddr_mask
[ETH_ALEN
];
641 __le16 specific_calib
;
642 struct iwl_tof_range_req_ap_entry_v2 ap
[IWL_MVM_TOF_MAX_APS
];
644 /* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */
647 * struct iwl_tof_range_req_cmd_v7 - start measurement cmd
648 * @initiator_flags: see flags @ iwl_tof_initiator_flags
649 * @request_id: A Token incremented per request. The same Token will be
650 * sent back in the range response
651 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
652 * @range_req_bssid: ranging request BSSID
653 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
654 * Bits set to 1 shall be randomized by the UMAC
655 * @macaddr_template: MAC address template to use for non-randomized bits
656 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.
657 * This is the session time for completing the measurement.
658 * @tsf_mac_id: report the measurement start time for each ap in terms of the
659 * TSF of this mac id. 0xff to disable TSF reporting.
660 * @common_calib: The common calib value to inject to this measurement calc
661 * @specific_calib: The specific calib value to inject to this measurement calc
662 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.
664 struct iwl_tof_range_req_cmd_v7
{
665 __le32 initiator_flags
;
668 u8 range_req_bssid
[ETH_ALEN
];
669 u8 macaddr_mask
[ETH_ALEN
];
670 u8 macaddr_template
[ETH_ALEN
];
671 __le32 req_timeout_ms
;
674 __le16 specific_calib
;
675 struct iwl_tof_range_req_ap_entry_v3 ap
[IWL_MVM_TOF_MAX_APS
];
676 } __packed
; /* LOCATION_RANGE_REQ_CMD_API_S_VER_7 */
679 * struct iwl_tof_range_req_cmd - start measurement cmd
680 * @initiator_flags: see flags @ iwl_tof_initiator_flags
681 * @request_id: A Token incremented per request. The same Token will be
682 * sent back in the range response
683 * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
684 * @range_req_bssid: ranging request BSSID
685 * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
686 * Bits set to 1 shall be randomized by the UMAC
687 * @macaddr_template: MAC address template to use for non-randomized bits
688 * @req_timeout_ms: Requested timeout of the response in units of milliseconds.
689 * This is the session time for completing the measurement.
690 * @tsf_mac_id: report the measurement start time for each ap in terms of the
691 * TSF of this mac id. 0xff to disable TSF reporting.
692 * @common_calib: The common calib value to inject to this measurement calc
693 * @specific_calib: The specific calib value to inject to this measurement calc
694 * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.
696 struct iwl_tof_range_req_cmd
{
697 __le32 initiator_flags
;
700 u8 range_req_bssid
[ETH_ALEN
];
701 u8 macaddr_mask
[ETH_ALEN
];
702 u8 macaddr_template
[ETH_ALEN
];
703 __le32 req_timeout_ms
;
706 __le16 specific_calib
;
707 struct iwl_tof_range_req_ap_entry ap
[IWL_MVM_TOF_MAX_APS
];
708 } __packed
; /* LOCATION_RANGE_REQ_CMD_API_S_VER_8 */
711 * enum iwl_tof_range_request_status - status of the sent request
712 * @IWL_TOF_RANGE_REQUEST_STATUS_SUCCESSFUL - FW successfully received the
714 * @IWL_TOF_RANGE_REQUEST_STATUS_BUSY - FW is busy with a previous request, the
715 * sent request will not be handled
717 enum iwl_tof_range_request_status
{
718 IWL_TOF_RANGE_REQUEST_STATUS_SUCCESS
,
719 IWL_TOF_RANGE_REQUEST_STATUS_BUSY
,
723 * enum iwl_tof_entry_status
725 * @IWL_TOF_ENTRY_SUCCESS: successful measurement.
726 * @IWL_TOF_ENTRY_GENERAL_FAILURE: General failure.
727 * @IWL_TOF_ENTRY_NO_RESPONSE: Responder didn't reply to the request.
728 * @IWL_TOF_ENTRY_REQUEST_REJECTED: Responder rejected the request.
729 * @IWL_TOF_ENTRY_NOT_SCHEDULED: Time event was scheduled but not called yet.
730 * @IWL_TOF_ENTRY_TIMING_MEASURE_TIMEOUT: Time event triggered but no
731 * measurement was completed.
732 * @IWL_TOF_ENTRY_TARGET_DIFF_CH_CANNOT_CHANGE: No range due inability to switch
733 * from the primary channel.
734 * @IWL_TOF_ENTRY_RANGE_NOT_SUPPORTED: Device doesn't support FTM.
735 * @IWL_TOF_ENTRY_REQUEST_ABORT_UNKNOWN_REASON: Request aborted due to unknown
737 * @IWL_TOF_ENTRY_LOCATION_INVALID_T1_T4_TIME_STAMP: Failure due to invalid
739 * @IWL_TOF_ENTRY_11MC_PROTOCOL_FAILURE: Failure due to invalid FTM frame
741 * @IWL_TOF_ENTRY_REQUEST_CANNOT_SCHED: Request cannot be scheduled.
742 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE: Responder cannot serve the
743 * initiator for some period, period supplied in @refusal_period.
744 * @IWL_TOF_ENTRY_BAD_REQUEST_ARGS: Bad request arguments.
745 * @IWL_TOF_ENTRY_WIFI_NOT_ENABLED: Wifi not enabled.
746 * @IWL_TOF_ENTRY_RESPONDER_OVERRIDE_PARAMS: Responder override the original
747 * parameters within the current session.
749 enum iwl_tof_entry_status
{
750 IWL_TOF_ENTRY_SUCCESS
= 0,
751 IWL_TOF_ENTRY_GENERAL_FAILURE
= 1,
752 IWL_TOF_ENTRY_NO_RESPONSE
= 2,
753 IWL_TOF_ENTRY_REQUEST_REJECTED
= 3,
754 IWL_TOF_ENTRY_NOT_SCHEDULED
= 4,
755 IWL_TOF_ENTRY_TIMING_MEASURE_TIMEOUT
= 5,
756 IWL_TOF_ENTRY_TARGET_DIFF_CH_CANNOT_CHANGE
= 6,
757 IWL_TOF_ENTRY_RANGE_NOT_SUPPORTED
= 7,
758 IWL_TOF_ENTRY_REQUEST_ABORT_UNKNOWN_REASON
= 8,
759 IWL_TOF_ENTRY_LOCATION_INVALID_T1_T4_TIME_STAMP
= 9,
760 IWL_TOF_ENTRY_11MC_PROTOCOL_FAILURE
= 10,
761 IWL_TOF_ENTRY_REQUEST_CANNOT_SCHED
= 11,
762 IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE
= 12,
763 IWL_TOF_ENTRY_BAD_REQUEST_ARGS
= 13,
764 IWL_TOF_ENTRY_WIFI_NOT_ENABLED
= 14,
765 IWL_TOF_ENTRY_RESPONDER_OVERRIDE_PARAMS
= 15,
766 }; /* LOCATION_RANGE_RSP_AP_ENTRY_NTFY_API_S_VER_2 */
769 * struct iwl_tof_range_rsp_ap_entry_ntfy_v3 - AP parameters (response)
770 * @bssid: BSSID of the AP
771 * @measure_status: current APs measurement status, one of
772 * &enum iwl_tof_entry_status.
773 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz
774 * @rtt: The Round Trip Time that took for the last measurement for
776 * @rtt_variance: The Variance of the RTT values measured for current AP
777 * @rtt_spread: The Difference between the maximum and the minimum RTT
778 * values measured for current AP in the current session [pSec]
779 * @rssi: RSSI as uploaded in the Channel Estimation notification
780 * @rssi_spread: The Difference between the maximum and the minimum RSSI values
781 * measured for current AP in the current session
782 * @reserved: reserved
783 * @refusal_period: refusal period in case of
784 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]
785 * @range: Measured range [cm]
786 * @range_variance: Measured range variance [cm]
787 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was
788 * uploaded by the LMAC
789 * @t2t3_initiator: as calculated from the algo in the initiator
790 * @t1t4_responder: as calculated from the algo in the responder
791 * @common_calib: Calib val that was used in for this AP measurement
792 * @specific_calib: val that was used in for this AP measurement
793 * @papd_calib_output: The result of the tof papd calibration that was injected
794 * into the algorithm.
796 struct iwl_tof_range_rsp_ap_entry_ntfy_v3
{
808 __le32 range_variance
;
810 __le32 t2t3_initiator
;
811 __le32 t1t4_responder
;
813 __le16 specific_calib
;
814 __le32 papd_calib_output
;
815 } __packed
; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_3 */
818 * struct iwl_tof_range_rsp_ap_entry_ntfy_v4 - AP parameters (response)
819 * @bssid: BSSID of the AP
820 * @measure_status: current APs measurement status, one of
821 * &enum iwl_tof_entry_status.
822 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz
823 * @rtt: The Round Trip Time that took for the last measurement for
825 * @rtt_variance: The Variance of the RTT values measured for current AP
826 * @rtt_spread: The Difference between the maximum and the minimum RTT
827 * values measured for current AP in the current session [pSec]
828 * @rssi: RSSI as uploaded in the Channel Estimation notification
829 * @rssi_spread: The Difference between the maximum and the minimum RSSI values
830 * measured for current AP in the current session
831 * @last_burst: 1 if no more FTM sessions are scheduled for this responder
832 * @refusal_period: refusal period in case of
833 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]
834 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was
835 * uploaded by the LMAC
836 * @start_tsf: measurement start time in TSF of the mac specified in the range
838 * @rx_rate_n_flags: rate and flags of the last FTM frame received from this
840 * @tx_rate_n_flags: rate and flags of the last ack sent to this responder
841 * @t2t3_initiator: as calculated from the algo in the initiator
842 * @t1t4_responder: as calculated from the algo in the responder
843 * @common_calib: Calib val that was used in for this AP measurement
844 * @specific_calib: val that was used in for this AP measurement
845 * @papd_calib_output: The result of the tof papd calibration that was injected
846 * into the algorithm.
848 struct iwl_tof_range_rsp_ap_entry_ntfy_v4
{
861 __le32 rx_rate_n_flags
;
862 __le32 tx_rate_n_flags
;
863 __le32 t2t3_initiator
;
864 __le32 t1t4_responder
;
866 __le16 specific_calib
;
867 __le32 papd_calib_output
;
868 } __packed
; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_4 */
871 * struct iwl_tof_range_rsp_ap_entry_ntfy - AP parameters (response)
872 * @bssid: BSSID of the AP
873 * @measure_status: current APs measurement status, one of
874 * &enum iwl_tof_entry_status.
875 * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz
876 * @rtt: The Round Trip Time that took for the last measurement for
878 * @rtt_variance: The Variance of the RTT values measured for current AP
879 * @rtt_spread: The Difference between the maximum and the minimum RTT
880 * values measured for current AP in the current session [pSec]
881 * @rssi: RSSI as uploaded in the Channel Estimation notification
882 * @rssi_spread: The Difference between the maximum and the minimum RSSI values
883 * measured for current AP in the current session
884 * @last_burst: 1 if no more FTM sessions are scheduled for this responder
885 * @refusal_period: refusal period in case of
886 * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]
887 * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was
888 * uploaded by the LMAC
889 * @start_tsf: measurement start time in TSF of the mac specified in the range
891 * @rx_rate_n_flags: rate and flags of the last FTM frame received from this
893 * @tx_rate_n_flags: rate and flags of the last ack sent to this responder
894 * @t2t3_initiator: as calculated from the algo in the initiator
895 * @t1t4_responder: as calculated from the algo in the responder
896 * @common_calib: Calib val that was used in for this AP measurement
897 * @specific_calib: val that was used in for this AP measurement
898 * @papd_calib_output: The result of the tof papd calibration that was injected
899 * into the algorithm.
900 * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.
901 * @reserved: for alignment
903 struct iwl_tof_range_rsp_ap_entry_ntfy
{
916 __le32 rx_rate_n_flags
;
917 __le32 tx_rate_n_flags
;
918 __le32 t2t3_initiator
;
919 __le32 t1t4_responder
;
921 __le16 specific_calib
;
922 __le32 papd_calib_output
;
925 } __packed
; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */
928 * enum iwl_tof_response_status - tof response status
930 * @IWL_TOF_RESPONSE_SUCCESS: successful range.
931 * @IWL_TOF_RESPONSE_TIMEOUT: request aborted due to timeout expiration.
932 * partial result of ranges done so far is included in the response.
933 * @IWL_TOF_RESPONSE_ABORTED: Measurement aborted by command.
934 * @IWL_TOF_RESPONSE_FAILED: Measurement request command failed.
936 enum iwl_tof_response_status
{
937 IWL_TOF_RESPONSE_SUCCESS
= 0,
938 IWL_TOF_RESPONSE_TIMEOUT
= 1,
939 IWL_TOF_RESPONSE_ABORTED
= 4,
940 IWL_TOF_RESPONSE_FAILED
= 5,
941 }; /* LOCATION_RNG_RSP_STATUS */
944 * struct iwl_tof_range_rsp_ntfy_v5 - ranging response notification
945 * @request_id: A Token ID of the corresponding Range request
946 * @request_status: status of current measurement session, one of
947 * &enum iwl_tof_response_status.
948 * @last_in_batch: reprot policy (when not all responses are uploaded at once)
949 * @num_of_aps: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
952 struct iwl_tof_range_rsp_ntfy_v5
{
957 struct iwl_tof_range_rsp_ap_entry_ntfy_v3 ap
[IWL_MVM_TOF_MAX_APS
];
958 } __packed
; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_5 */
961 * struct iwl_tof_range_rsp_ntfy_v6 - ranging response notification
962 * @request_id: A Token ID of the corresponding Range request
963 * @num_of_aps: Number of APs results
964 * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
965 * @reserved: reserved
968 struct iwl_tof_range_rsp_ntfy_v6
{
973 struct iwl_tof_range_rsp_ap_entry_ntfy_v4 ap
[IWL_MVM_TOF_MAX_APS
];
974 } __packed
; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */
977 * struct iwl_tof_range_rsp_ntfy - ranging response notification
978 * @request_id: A Token ID of the corresponding Range request
979 * @num_of_aps: Number of APs results
980 * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
981 * @reserved: reserved
984 struct iwl_tof_range_rsp_ntfy
{
989 struct iwl_tof_range_rsp_ap_entry_ntfy ap
[IWL_MVM_TOF_MAX_APS
];
990 } __packed
; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */
992 #define IWL_MVM_TOF_MCSI_BUF_SIZE (245)
994 * struct iwl_tof_mcsi_notif - used for debug
995 * @token: token ID for the current session
996 * @role: '0' - initiator, '1' - responder
997 * @reserved: reserved
998 * @initiator_bssid: initiator machine
999 * @responder_bssid: responder machine
1000 * @mcsi_buffer: debug data
1002 struct iwl_tof_mcsi_notif
{
1006 u8 initiator_bssid
[ETH_ALEN
];
1007 u8 responder_bssid
[ETH_ALEN
];
1008 u8 mcsi_buffer
[IWL_MVM_TOF_MCSI_BUF_SIZE
* 4];
1012 * struct iwl_tof_range_abort_cmd
1013 * @request_id: corresponds to a range request
1014 * @reserved: reserved
1016 struct iwl_tof_range_abort_cmd
{
1021 enum ftm_responder_stats_flags
{
1022 FTM_RESP_STAT_NON_ASAP_STARTED
= BIT(0),
1023 FTM_RESP_STAT_NON_ASAP_IN_WIN
= BIT(1),
1024 FTM_RESP_STAT_NON_ASAP_OUT_WIN
= BIT(2),
1025 FTM_RESP_STAT_TRIGGER_DUP
= BIT(3),
1026 FTM_RESP_STAT_DUP
= BIT(4),
1027 FTM_RESP_STAT_DUP_IN_WIN
= BIT(5),
1028 FTM_RESP_STAT_DUP_OUT_WIN
= BIT(6),
1029 FTM_RESP_STAT_SCHED_SUCCESS
= BIT(7),
1030 FTM_RESP_STAT_ASAP_REQ
= BIT(8),
1031 FTM_RESP_STAT_NON_ASAP_REQ
= BIT(9),
1032 FTM_RESP_STAT_ASAP_RESP
= BIT(10),
1033 FTM_RESP_STAT_NON_ASAP_RESP
= BIT(11),
1034 FTM_RESP_STAT_FAIL_INITIATOR_INACTIVE
= BIT(12),
1035 FTM_RESP_STAT_FAIL_INITIATOR_OUT_WIN
= BIT(13),
1036 FTM_RESP_STAT_FAIL_INITIATOR_RETRY_LIM
= BIT(14),
1037 FTM_RESP_STAT_FAIL_NEXT_SERVED
= BIT(15),
1038 FTM_RESP_STAT_FAIL_TRIGGER_ERR
= BIT(16),
1039 FTM_RESP_STAT_FAIL_GC
= BIT(17),
1040 FTM_RESP_STAT_SUCCESS
= BIT(18),
1041 FTM_RESP_STAT_INTEL_IE
= BIT(19),
1042 FTM_RESP_STAT_INITIATOR_ACTIVE
= BIT(20),
1043 FTM_RESP_STAT_MEASUREMENTS_AVAILABLE
= BIT(21),
1044 FTM_RESP_STAT_TRIGGER_UNKNOWN
= BIT(22),
1045 FTM_RESP_STAT_PROCESS_FAIL
= BIT(23),
1046 FTM_RESP_STAT_ACK
= BIT(24),
1047 FTM_RESP_STAT_NACK
= BIT(25),
1048 FTM_RESP_STAT_INVALID_INITIATOR_ID
= BIT(26),
1049 FTM_RESP_STAT_TIMER_MIN_DELTA
= BIT(27),
1050 FTM_RESP_STAT_INITIATOR_REMOVED
= BIT(28),
1051 FTM_RESP_STAT_INITIATOR_ADDED
= BIT(29),
1052 FTM_RESP_STAT_ERR_LIST_FULL
= BIT(30),
1053 FTM_RESP_STAT_INITIATOR_SCHED_NOW
= BIT(31),
1057 * struct iwl_ftm_responder_stats - FTM responder statistics
1058 * @addr: initiator address
1059 * @success_ftm: number of successful ftm frames
1060 * @ftm_per_burst: num of FTM frames that were received
1061 * @flags: &enum ftm_responder_stats_flags
1062 * @duration: actual duration of FTM
1063 * @allocated_duration: time that was allocated for this FTM session
1064 * @bw: FTM request bandwidth
1065 * @rate: FTM request rate
1066 * @reserved: for alingment and future use
1068 struct iwl_ftm_responder_stats
{
1074 __le32 allocated_duration
;
1078 } __packed
; /* TOF_RESPONDER_STATISTICS_NTFY_S_VER_2 */
1080 #define IWL_CSI_MAX_EXPECTED_CHUNKS 16
1082 #define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_1 0x0003
1083 #define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_1 0x000c
1085 #define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_2 0x00ff
1086 #define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_2 0xff00
1088 struct iwl_csi_chunk_notification
{
1094 } __packed
; /* CSI_CHUNKS_HDR_NTFY_API_S_VER_1/VER_2 */
1096 #endif /* __iwl_fw_api_location_h__ */