1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2bfcc09ddSBjoern A. Zeeb /* 3bfcc09ddSBjoern A. Zeeb * Copyright (C) 2015-2017 Intel Deutschland GmbH 49af1bba4SBjoern A. Zeeb * Copyright (C) 2018-2022 Intel Corporation 5*a4128aadSBjoern A. Zeeb * Copyright (C) 2024 Intel Corporation 6bfcc09ddSBjoern A. Zeeb */ 7bfcc09ddSBjoern A. Zeeb #ifndef __iwl_fw_api_location_h__ 8bfcc09ddSBjoern A. Zeeb #define __iwl_fw_api_location_h__ 9bfcc09ddSBjoern A. Zeeb 10bfcc09ddSBjoern A. Zeeb /** 11bfcc09ddSBjoern A. Zeeb * enum iwl_location_subcmd_ids - location group command IDs 12bfcc09ddSBjoern A. Zeeb */ 13bfcc09ddSBjoern A. Zeeb enum iwl_location_subcmd_ids { 14bfcc09ddSBjoern A. Zeeb /** 15bfcc09ddSBjoern A. Zeeb * @TOF_RANGE_REQ_CMD: TOF ranging request, 16bfcc09ddSBjoern A. Zeeb * uses one of &struct iwl_tof_range_req_cmd_v5, 17bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_range_req_cmd_v7, 18bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_range_req_cmd_v8, 19bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_range_req_cmd_v9, 20bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_range_req_cmd_v11, 21bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_range_req_cmd_v7 22bfcc09ddSBjoern A. Zeeb */ 23bfcc09ddSBjoern A. Zeeb TOF_RANGE_REQ_CMD = 0x0, 24bfcc09ddSBjoern A. Zeeb /** 25bfcc09ddSBjoern A. Zeeb * @TOF_CONFIG_CMD: TOF configuration, uses &struct iwl_tof_config_cmd 26bfcc09ddSBjoern A. Zeeb */ 27bfcc09ddSBjoern A. Zeeb TOF_CONFIG_CMD = 0x1, 28bfcc09ddSBjoern A. Zeeb /** 29bfcc09ddSBjoern A. Zeeb * @TOF_RANGE_ABORT_CMD: abort ongoing ranging, uses 30bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_range_abort_cmd 31bfcc09ddSBjoern A. Zeeb */ 32bfcc09ddSBjoern A. Zeeb TOF_RANGE_ABORT_CMD = 0x2, 33bfcc09ddSBjoern A. Zeeb /** 34bfcc09ddSBjoern A. Zeeb * @TOF_RANGE_REQ_EXT_CMD: TOF extended ranging config, 35bfcc09ddSBjoern A. Zeeb * uses &struct iwl_tof_range_req_ext_cmd 36bfcc09ddSBjoern A. Zeeb */ 37bfcc09ddSBjoern A. Zeeb TOF_RANGE_REQ_EXT_CMD = 0x3, 38bfcc09ddSBjoern A. Zeeb /** 399af1bba4SBjoern A. Zeeb * @TOF_RESPONDER_CONFIG_CMD: FTM responder configuration, one of 409af1bba4SBjoern A. Zeeb * &struct iwl_tof_responder_config_cmd_v6, 419af1bba4SBjoern A. Zeeb * &struct iwl_tof_responder_config_cmd_v7, 429af1bba4SBjoern A. Zeeb * &struct iwl_tof_responder_config_cmd_v8 or 439af1bba4SBjoern A. Zeeb * &struct iwl_tof_responder_config_cmd_v9 44bfcc09ddSBjoern A. Zeeb */ 45bfcc09ddSBjoern A. Zeeb TOF_RESPONDER_CONFIG_CMD = 0x4, 46bfcc09ddSBjoern A. Zeeb /** 47bfcc09ddSBjoern A. Zeeb * @TOF_RESPONDER_DYN_CONFIG_CMD: FTM dynamic configuration, 48bfcc09ddSBjoern A. Zeeb * uses &struct iwl_tof_responder_dyn_config_cmd 49bfcc09ddSBjoern A. Zeeb */ 50bfcc09ddSBjoern A. Zeeb TOF_RESPONDER_DYN_CONFIG_CMD = 0x5, 51bfcc09ddSBjoern A. Zeeb /** 52bfcc09ddSBjoern A. Zeeb * @CSI_HEADER_NOTIFICATION: CSI header 53bfcc09ddSBjoern A. Zeeb */ 54bfcc09ddSBjoern A. Zeeb CSI_HEADER_NOTIFICATION = 0xFA, 55bfcc09ddSBjoern A. Zeeb /** 56bfcc09ddSBjoern A. Zeeb * @CSI_CHUNKS_NOTIFICATION: CSI chunk, 57bfcc09ddSBjoern A. Zeeb * uses &struct iwl_csi_chunk_notification 58bfcc09ddSBjoern A. Zeeb */ 59bfcc09ddSBjoern A. Zeeb CSI_CHUNKS_NOTIFICATION = 0xFB, 60bfcc09ddSBjoern A. Zeeb /** 61bfcc09ddSBjoern A. Zeeb * @TOF_LC_NOTIF: used for LCI/civic location, contains just 62bfcc09ddSBjoern A. Zeeb * the action frame 63bfcc09ddSBjoern A. Zeeb */ 64bfcc09ddSBjoern A. Zeeb TOF_LC_NOTIF = 0xFC, 65bfcc09ddSBjoern A. Zeeb /** 66bfcc09ddSBjoern A. Zeeb * @TOF_RESPONDER_STATS: FTM responder statistics notification, 67bfcc09ddSBjoern A. Zeeb * uses &struct iwl_ftm_responder_stats 68bfcc09ddSBjoern A. Zeeb */ 69bfcc09ddSBjoern A. Zeeb TOF_RESPONDER_STATS = 0xFD, 70bfcc09ddSBjoern A. Zeeb /** 71bfcc09ddSBjoern A. Zeeb * @TOF_MCSI_DEBUG_NOTIF: MCSI debug notification, uses 72bfcc09ddSBjoern A. Zeeb * &struct iwl_tof_mcsi_notif 73bfcc09ddSBjoern A. Zeeb */ 74bfcc09ddSBjoern A. Zeeb TOF_MCSI_DEBUG_NOTIF = 0xFE, 75bfcc09ddSBjoern A. Zeeb /** 769af1bba4SBjoern A. Zeeb * @TOF_RANGE_RESPONSE_NOTIF: ranging response, using one of 779af1bba4SBjoern A. Zeeb * &struct iwl_tof_range_rsp_ntfy_v5, 789af1bba4SBjoern A. Zeeb * &struct iwl_tof_range_rsp_ntfy_v6, 799af1bba4SBjoern A. Zeeb * &struct iwl_tof_range_rsp_ntfy_v7 or 809af1bba4SBjoern A. Zeeb * &struct iwl_tof_range_rsp_ntfy_v8 81bfcc09ddSBjoern A. Zeeb */ 82bfcc09ddSBjoern A. Zeeb TOF_RANGE_RESPONSE_NOTIF = 0xFF, 83bfcc09ddSBjoern A. Zeeb }; 84bfcc09ddSBjoern A. Zeeb 85bfcc09ddSBjoern A. Zeeb /** 86bfcc09ddSBjoern A. Zeeb * struct iwl_tof_config_cmd - ToF configuration 87bfcc09ddSBjoern A. Zeeb * @tof_disabled: indicates if ToF is disabled (or not) 88bfcc09ddSBjoern A. Zeeb * @one_sided_disabled: indicates if one-sided is disabled (or not) 89bfcc09ddSBjoern A. Zeeb * @is_debug_mode: indiciates if debug mode is active 90bfcc09ddSBjoern A. Zeeb * @is_buf_required: indicates if channel estimation buffer is required 91bfcc09ddSBjoern A. Zeeb */ 92bfcc09ddSBjoern A. Zeeb struct iwl_tof_config_cmd { 93bfcc09ddSBjoern A. Zeeb u8 tof_disabled; 94bfcc09ddSBjoern A. Zeeb u8 one_sided_disabled; 95bfcc09ddSBjoern A. Zeeb u8 is_debug_mode; 96bfcc09ddSBjoern A. Zeeb u8 is_buf_required; 97bfcc09ddSBjoern A. Zeeb } __packed; 98bfcc09ddSBjoern A. Zeeb 99bfcc09ddSBjoern A. Zeeb /** 100bfcc09ddSBjoern A. Zeeb * enum iwl_tof_bandwidth - values for iwl_tof_range_req_ap_entry.bandwidth 101bfcc09ddSBjoern A. Zeeb * @IWL_TOF_BW_20_LEGACY: 20 MHz non-HT 102bfcc09ddSBjoern A. Zeeb * @IWL_TOF_BW_20_HT: 20 MHz HT 103bfcc09ddSBjoern A. Zeeb * @IWL_TOF_BW_40: 40 MHz 104bfcc09ddSBjoern A. Zeeb * @IWL_TOF_BW_80: 80 MHz 105bfcc09ddSBjoern A. Zeeb * @IWL_TOF_BW_160: 160 MHz 106bfcc09ddSBjoern A. Zeeb * @IWL_TOF_BW_NUM: number of tof bandwidths 107bfcc09ddSBjoern A. Zeeb */ 108bfcc09ddSBjoern A. Zeeb enum iwl_tof_bandwidth { 109bfcc09ddSBjoern A. Zeeb IWL_TOF_BW_20_LEGACY, 110bfcc09ddSBjoern A. Zeeb IWL_TOF_BW_20_HT, 111bfcc09ddSBjoern A. Zeeb IWL_TOF_BW_40, 112bfcc09ddSBjoern A. Zeeb IWL_TOF_BW_80, 113bfcc09ddSBjoern A. Zeeb IWL_TOF_BW_160, 114bfcc09ddSBjoern A. Zeeb IWL_TOF_BW_NUM, 115bfcc09ddSBjoern A. Zeeb }; /* LOCAT_BW_TYPE_E */ 116bfcc09ddSBjoern A. Zeeb 117bfcc09ddSBjoern A. Zeeb /* 118bfcc09ddSBjoern A. Zeeb * enum iwl_tof_algo_type - Algorithym type for range measurement request 119bfcc09ddSBjoern A. Zeeb */ 120bfcc09ddSBjoern A. Zeeb enum iwl_tof_algo_type { 121bfcc09ddSBjoern A. Zeeb IWL_TOF_ALGO_TYPE_MAX_LIKE = 0, 122bfcc09ddSBjoern A. Zeeb IWL_TOF_ALGO_TYPE_LINEAR_REG = 1, 123bfcc09ddSBjoern A. Zeeb IWL_TOF_ALGO_TYPE_FFT = 2, 124bfcc09ddSBjoern A. Zeeb 125bfcc09ddSBjoern A. Zeeb /* Keep last */ 126bfcc09ddSBjoern A. Zeeb IWL_TOF_ALGO_TYPE_INVALID, 127bfcc09ddSBjoern A. Zeeb }; /* ALGO_TYPE_E */ 128bfcc09ddSBjoern A. Zeeb 129bfcc09ddSBjoern A. Zeeb /* 130bfcc09ddSBjoern A. Zeeb * enum iwl_tof_mcsi_ntfy - Enable/Disable MCSI notifications 131bfcc09ddSBjoern A. Zeeb */ 132bfcc09ddSBjoern A. Zeeb enum iwl_tof_mcsi_enable { 133bfcc09ddSBjoern A. Zeeb IWL_TOF_MCSI_DISABLED = 0, 134bfcc09ddSBjoern A. Zeeb IWL_TOF_MCSI_ENABLED = 1, 135bfcc09ddSBjoern A. Zeeb }; /* MCSI_ENABLE_E */ 136bfcc09ddSBjoern A. Zeeb 137bfcc09ddSBjoern A. Zeeb /** 138bfcc09ddSBjoern A. Zeeb * enum iwl_tof_responder_cmd_valid_field - valid fields in the responder cfg 139bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO: channel info is valid 140bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_TOA_OFFSET: ToA offset is valid 141bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_COMMON_CALIB: common calibration mode is valid 142bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_SPECIFIC_CALIB: spefici calibration mode is 143bfcc09ddSBjoern A. Zeeb * valid 144bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_BSSID: BSSID is valid 145bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_TX_ANT: TX antenna is valid 146bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_ALGO_TYPE: algorithm type is valid 147bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_NON_ASAP_SUPPORT: non-ASAP support is valid 148bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_STATISTICS_REPORT_SUPPORT: statistics report 149bfcc09ddSBjoern A. Zeeb * support is valid 150bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_MCSI_NOTIF_SUPPORT: MCSI notification support 151bfcc09ddSBjoern A. Zeeb * is valid 152bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_FAST_ALGO_SUPPORT: fast algorithm support 153bfcc09ddSBjoern A. Zeeb * is valid 154bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_RETRY_ON_ALGO_FAIL: retry on algorithm failure 155bfcc09ddSBjoern A. Zeeb * is valid 156bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_STA_ID: station ID is valid 157bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_NDP_SUPPORT: enable/disable NDP ranging support 158bfcc09ddSBjoern A. Zeeb * is valid 159bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_NDP_PARAMS: NDP parameters are valid 160bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_LMR_FEEDBACK: LMR feedback support is valid 161bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_SESSION_ID: session id flag is valid 162bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_BSS_COLOR: the bss_color field is valid 163bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_CMD_VALID_MIN_MAX_TIME_BETWEEN_MSR: the 164bfcc09ddSBjoern A. Zeeb * min_time_between_msr and max_time_between_msr fields are valid 165bfcc09ddSBjoern A. Zeeb */ 166bfcc09ddSBjoern A. Zeeb enum iwl_tof_responder_cmd_valid_field { 167bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO = BIT(0), 168bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_TOA_OFFSET = BIT(1), 169bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_COMMON_CALIB = BIT(2), 170bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_SPECIFIC_CALIB = BIT(3), 171bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_BSSID = BIT(4), 172bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_TX_ANT = BIT(5), 173bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_ALGO_TYPE = BIT(6), 174bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_NON_ASAP_SUPPORT = BIT(7), 175bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_STATISTICS_REPORT_SUPPORT = BIT(8), 176bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_MCSI_NOTIF_SUPPORT = BIT(9), 177bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_FAST_ALGO_SUPPORT = BIT(10), 178bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_RETRY_ON_ALGO_FAIL = BIT(11), 179bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_STA_ID = BIT(12), 180bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_NDP_SUPPORT = BIT(22), 181bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_NDP_PARAMS = BIT(23), 182bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_LMR_FEEDBACK = BIT(24), 183bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_SESSION_ID = BIT(25), 184bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_BSS_COLOR = BIT(26), 185bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_CMD_VALID_MIN_MAX_TIME_BETWEEN_MSR = BIT(27), 186bfcc09ddSBjoern A. Zeeb }; 187bfcc09ddSBjoern A. Zeeb 188bfcc09ddSBjoern A. Zeeb /** 189bfcc09ddSBjoern A. Zeeb * enum iwl_tof_responder_cfg_flags - responder configuration flags 190bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_NON_ASAP_SUPPORT: non-ASAP support 191bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_REPORT_STATISTICS: report statistics 192bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_REPORT_MCSI: report MCSI 193bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_ALGO_TYPE: algorithm type 194bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_TOA_OFFSET_MODE: ToA offset mode 195bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_COMMON_CALIB_MODE: common calibration mode 196bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_SPECIFIC_CALIB_MODE: specific calibration mode 197bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_FAST_ALGO_SUPPORT: fast algorithm support 198bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_RETRY_ON_ALGO_FAIL: retry on algorithm fail 199bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_FTM_TX_ANT: TX antenna mask 200bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_NDP_SUPPORT: support NDP ranging 201bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_LMR_FEEDBACK: request for LMR feedback if the 202bfcc09ddSBjoern A. Zeeb * initiator supports it 203bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONDER_FLAGS_SESSION_ID: send the session id in the initial FTM 204bfcc09ddSBjoern A. Zeeb * frame. 205bfcc09ddSBjoern A. Zeeb */ 206bfcc09ddSBjoern A. Zeeb enum iwl_tof_responder_cfg_flags { 207bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_NON_ASAP_SUPPORT = BIT(0), 208bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_REPORT_STATISTICS = BIT(1), 209bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_REPORT_MCSI = BIT(2), 210bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_ALGO_TYPE = BIT(3) | BIT(4) | BIT(5), 211bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_TOA_OFFSET_MODE = BIT(6), 212bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_COMMON_CALIB_MODE = BIT(7), 213bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_SPECIFIC_CALIB_MODE = BIT(8), 214bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_FAST_ALGO_SUPPORT = BIT(9), 215bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_RETRY_ON_ALGO_FAIL = BIT(10), 216bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_FTM_TX_ANT = RATE_MCS_ANT_AB_MSK, 217bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_NDP_SUPPORT = BIT(24), 218bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_LMR_FEEDBACK = BIT(25), 219bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONDER_FLAGS_SESSION_ID = BIT(27), 220bfcc09ddSBjoern A. Zeeb }; 221bfcc09ddSBjoern A. Zeeb 222bfcc09ddSBjoern A. Zeeb /** 223bfcc09ddSBjoern A. Zeeb * struct iwl_tof_responder_config_cmd_v6 - ToF AP mode (for debug) 224bfcc09ddSBjoern A. Zeeb * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field 225bfcc09ddSBjoern A. Zeeb * @responder_cfg_flags: &iwl_tof_responder_cfg_flags 226bfcc09ddSBjoern A. Zeeb * @bandwidth: current AP Bandwidth: &enum iwl_tof_bandwidth 227bfcc09ddSBjoern A. Zeeb * @rate: current AP rate 228bfcc09ddSBjoern A. Zeeb * @channel_num: current AP Channel 229bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: coding of the control channel position relative to 230bfcc09ddSBjoern A. Zeeb * the center frequency, see iwl_mvm_get_ctrl_pos() 231bfcc09ddSBjoern A. Zeeb * @sta_id: index of the AP STA when in AP mode 232bfcc09ddSBjoern A. Zeeb * @reserved1: reserved 233bfcc09ddSBjoern A. Zeeb * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug 234bfcc09ddSBjoern A. Zeeb * purposes, simulating station movement by adding various values 235bfcc09ddSBjoern A. Zeeb * to this field 236bfcc09ddSBjoern A. Zeeb * @common_calib: XVT: common calibration value 237bfcc09ddSBjoern A. Zeeb * @specific_calib: XVT: specific calibration value 238bfcc09ddSBjoern A. Zeeb * @bssid: Current AP BSSID 239bfcc09ddSBjoern A. Zeeb * @reserved2: reserved 240bfcc09ddSBjoern A. Zeeb */ 241bfcc09ddSBjoern A. Zeeb struct iwl_tof_responder_config_cmd_v6 { 242bfcc09ddSBjoern A. Zeeb __le32 cmd_valid_fields; 243bfcc09ddSBjoern A. Zeeb __le32 responder_cfg_flags; 244bfcc09ddSBjoern A. Zeeb u8 bandwidth; 245bfcc09ddSBjoern A. Zeeb u8 rate; 246bfcc09ddSBjoern A. Zeeb u8 channel_num; 247bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 248bfcc09ddSBjoern A. Zeeb u8 sta_id; 249bfcc09ddSBjoern A. Zeeb u8 reserved1; 250bfcc09ddSBjoern A. Zeeb __le16 toa_offset; 251bfcc09ddSBjoern A. Zeeb __le16 common_calib; 252bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 253bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 254bfcc09ddSBjoern A. Zeeb __le16 reserved2; 255bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_6 */ 256bfcc09ddSBjoern A. Zeeb 257bfcc09ddSBjoern A. Zeeb /** 258bfcc09ddSBjoern A. Zeeb * struct iwl_tof_responder_config_cmd_v7 - ToF AP mode (for debug) 259bfcc09ddSBjoern A. Zeeb * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field 260bfcc09ddSBjoern A. Zeeb * @responder_cfg_flags: &iwl_tof_responder_cfg_flags 261bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 262bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 263bfcc09ddSBjoern A. Zeeb * @rate: current AP rate 264bfcc09ddSBjoern A. Zeeb * @channel_num: current AP Channel 265bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: coding of the control channel position relative to 266bfcc09ddSBjoern A. Zeeb * the center frequency, see iwl_mvm_get_ctrl_pos() 267bfcc09ddSBjoern A. Zeeb * @sta_id: index of the AP STA when in AP mode 268bfcc09ddSBjoern A. Zeeb * @reserved1: reserved 269bfcc09ddSBjoern A. Zeeb * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug 270bfcc09ddSBjoern A. Zeeb * purposes, simulating station movement by adding various values 271bfcc09ddSBjoern A. Zeeb * to this field 272bfcc09ddSBjoern A. Zeeb * @common_calib: XVT: common calibration value 273bfcc09ddSBjoern A. Zeeb * @specific_calib: XVT: specific calibration value 274bfcc09ddSBjoern A. Zeeb * @bssid: Current AP BSSID 275bfcc09ddSBjoern A. Zeeb * @reserved2: reserved 276bfcc09ddSBjoern A. Zeeb */ 277bfcc09ddSBjoern A. Zeeb struct iwl_tof_responder_config_cmd_v7 { 278bfcc09ddSBjoern A. Zeeb __le32 cmd_valid_fields; 279bfcc09ddSBjoern A. Zeeb __le32 responder_cfg_flags; 280bfcc09ddSBjoern A. Zeeb u8 format_bw; 281bfcc09ddSBjoern A. Zeeb u8 rate; 282bfcc09ddSBjoern A. Zeeb u8 channel_num; 283bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 284bfcc09ddSBjoern A. Zeeb u8 sta_id; 285bfcc09ddSBjoern A. Zeeb u8 reserved1; 286bfcc09ddSBjoern A. Zeeb __le16 toa_offset; 287bfcc09ddSBjoern A. Zeeb __le16 common_calib; 288bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 289bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 290bfcc09ddSBjoern A. Zeeb __le16 reserved2; 291bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_7 */ 292bfcc09ddSBjoern A. Zeeb 293bfcc09ddSBjoern A. Zeeb #define IWL_RESPONDER_STS_POS 3 294bfcc09ddSBjoern A. Zeeb #define IWL_RESPONDER_TOTAL_LTF_POS 6 295bfcc09ddSBjoern A. Zeeb 296bfcc09ddSBjoern A. Zeeb /** 297bfcc09ddSBjoern A. Zeeb * struct iwl_tof_responder_config_cmd_v8 - ToF AP mode (for debug) 298bfcc09ddSBjoern A. Zeeb * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field 299bfcc09ddSBjoern A. Zeeb * @responder_cfg_flags: &iwl_tof_responder_cfg_flags 300bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 301bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 302bfcc09ddSBjoern A. Zeeb * @rate: current AP rate 303bfcc09ddSBjoern A. Zeeb * @channel_num: current AP Channel 304bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: coding of the control channel position relative to 305bfcc09ddSBjoern A. Zeeb * the center frequency, see iwl_mvm_get_ctrl_pos() 306bfcc09ddSBjoern A. Zeeb * @sta_id: index of the AP STA when in AP mode 307bfcc09ddSBjoern A. Zeeb * @reserved1: reserved 308bfcc09ddSBjoern A. Zeeb * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug 309bfcc09ddSBjoern A. Zeeb * purposes, simulating station movement by adding various values 310bfcc09ddSBjoern A. Zeeb * to this field 311bfcc09ddSBjoern A. Zeeb * @common_calib: XVT: common calibration value 312bfcc09ddSBjoern A. Zeeb * @specific_calib: XVT: specific calibration value 313bfcc09ddSBjoern A. Zeeb * @bssid: Current AP BSSID 314bfcc09ddSBjoern A. Zeeb * @r2i_ndp_params: parameters for R2I NDP. 315bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max number of LTF repetitions 316bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams (supported values are < 2) 317bfcc09ddSBjoern A. Zeeb * bits 6 - 7: max number of total LTFs see 318bfcc09ddSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf 319bfcc09ddSBjoern A. Zeeb * @i2r_ndp_params: parameters for I2R NDP. 320bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max number of LTF repetitions 321bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams 322bfcc09ddSBjoern A. Zeeb * bits 6 - 7: max number of total LTFs see 323bfcc09ddSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf 324bfcc09ddSBjoern A. Zeeb */ 325bfcc09ddSBjoern A. Zeeb struct iwl_tof_responder_config_cmd_v8 { 326bfcc09ddSBjoern A. Zeeb __le32 cmd_valid_fields; 327bfcc09ddSBjoern A. Zeeb __le32 responder_cfg_flags; 328bfcc09ddSBjoern A. Zeeb u8 format_bw; 329bfcc09ddSBjoern A. Zeeb u8 rate; 330bfcc09ddSBjoern A. Zeeb u8 channel_num; 331bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 332bfcc09ddSBjoern A. Zeeb u8 sta_id; 333bfcc09ddSBjoern A. Zeeb u8 reserved1; 334bfcc09ddSBjoern A. Zeeb __le16 toa_offset; 335bfcc09ddSBjoern A. Zeeb __le16 common_calib; 336bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 337bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 338bfcc09ddSBjoern A. Zeeb u8 r2i_ndp_params; 339bfcc09ddSBjoern A. Zeeb u8 i2r_ndp_params; 340bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_8 */ 341bfcc09ddSBjoern A. Zeeb 342bfcc09ddSBjoern A. Zeeb /** 343bfcc09ddSBjoern A. Zeeb * struct iwl_tof_responder_config_cmd_v9 - ToF AP mode (for debug) 344bfcc09ddSBjoern A. Zeeb * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field 345bfcc09ddSBjoern A. Zeeb * @responder_cfg_flags: &iwl_tof_responder_cfg_flags 346bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 347bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 348bfcc09ddSBjoern A. Zeeb * @bss_color: current AP bss_color 349bfcc09ddSBjoern A. Zeeb * @channel_num: current AP Channel 350bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: coding of the control channel position relative to 351bfcc09ddSBjoern A. Zeeb * the center frequency, see iwl_mvm_get_ctrl_pos() 352bfcc09ddSBjoern A. Zeeb * @sta_id: index of the AP STA when in AP mode 353bfcc09ddSBjoern A. Zeeb * @reserved1: reserved 354bfcc09ddSBjoern A. Zeeb * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug 355bfcc09ddSBjoern A. Zeeb * purposes, simulating station movement by adding various values 356bfcc09ddSBjoern A. Zeeb * to this field 357bfcc09ddSBjoern A. Zeeb * @common_calib: XVT: common calibration value 358bfcc09ddSBjoern A. Zeeb * @specific_calib: XVT: specific calibration value 359bfcc09ddSBjoern A. Zeeb * @bssid: Current AP BSSID 360bfcc09ddSBjoern A. Zeeb * @r2i_ndp_params: parameters for R2I NDP. 361bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max number of LTF repetitions 362bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams (supported values are < 2) 363bfcc09ddSBjoern A. Zeeb * bits 6 - 7: max number of total LTFs see 364bfcc09ddSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf 365bfcc09ddSBjoern A. Zeeb * @i2r_ndp_params: parameters for I2R NDP. 366bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max number of LTF repetitions 367bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams 368bfcc09ddSBjoern A. Zeeb * bits 6 - 7: max number of total LTFs see 369bfcc09ddSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf 370bfcc09ddSBjoern A. Zeeb * @min_time_between_msr: for non trigger based NDP ranging, minimum time 371bfcc09ddSBjoern A. Zeeb * between measurements in milliseconds. 372bfcc09ddSBjoern A. Zeeb * @max_time_between_msr: for non trigger based NDP ranging, maximum time 373bfcc09ddSBjoern A. Zeeb * between measurements in milliseconds. 374bfcc09ddSBjoern A. Zeeb */ 375bfcc09ddSBjoern A. Zeeb struct iwl_tof_responder_config_cmd_v9 { 376bfcc09ddSBjoern A. Zeeb __le32 cmd_valid_fields; 377bfcc09ddSBjoern A. Zeeb __le32 responder_cfg_flags; 378bfcc09ddSBjoern A. Zeeb u8 format_bw; 379bfcc09ddSBjoern A. Zeeb u8 bss_color; 380bfcc09ddSBjoern A. Zeeb u8 channel_num; 381bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 382bfcc09ddSBjoern A. Zeeb u8 sta_id; 383bfcc09ddSBjoern A. Zeeb u8 reserved1; 384bfcc09ddSBjoern A. Zeeb __le16 toa_offset; 385bfcc09ddSBjoern A. Zeeb __le16 common_calib; 386bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 387bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 388bfcc09ddSBjoern A. Zeeb u8 r2i_ndp_params; 389bfcc09ddSBjoern A. Zeeb u8 i2r_ndp_params; 390bfcc09ddSBjoern A. Zeeb __le16 min_time_between_msr; 391bfcc09ddSBjoern A. Zeeb __le16 max_time_between_msr; 392bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_8 */ 393bfcc09ddSBjoern A. Zeeb 394*a4128aadSBjoern A. Zeeb /** 395*a4128aadSBjoern A. Zeeb * struct iwl_tof_responder_config_cmd - ToF AP mode 396*a4128aadSBjoern A. Zeeb * @cmd_valid_fields: &iwl_tof_responder_cmd_valid_field 397*a4128aadSBjoern A. Zeeb * @responder_cfg_flags: &iwl_tof_responder_cfg_flags 398*a4128aadSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 399*a4128aadSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 400*a4128aadSBjoern A. Zeeb * @bss_color: current AP bss_color 401*a4128aadSBjoern A. Zeeb * @channel_num: current AP Channel 402*a4128aadSBjoern A. Zeeb * @ctrl_ch_position: coding of the control channel position relative to 403*a4128aadSBjoern A. Zeeb * the center frequency, see iwl_mvm_get_ctrl_pos() 404*a4128aadSBjoern A. Zeeb * @sta_id: index of the AP STA when in AP mode 405*a4128aadSBjoern A. Zeeb * @band: current AP band 406*a4128aadSBjoern A. Zeeb * @toa_offset: Artificial addition [pSec] for the ToA - to be used for debug 407*a4128aadSBjoern A. Zeeb * purposes, simulating station movement by adding various values 408*a4128aadSBjoern A. Zeeb * to this field 409*a4128aadSBjoern A. Zeeb * @common_calib: XVT: common calibration value 410*a4128aadSBjoern A. Zeeb * @specific_calib: XVT: specific calibration value 411*a4128aadSBjoern A. Zeeb * @bssid: Current AP BSSID 412*a4128aadSBjoern A. Zeeb * @r2i_ndp_params: parameters for R2I NDP. 413*a4128aadSBjoern A. Zeeb * bits 0 - 2: max number of LTF repetitions 414*a4128aadSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams (supported values are < 2) 415*a4128aadSBjoern A. Zeeb * bits 6 - 7: max number of total LTFs see 416*a4128aadSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf 417*a4128aadSBjoern A. Zeeb * @i2r_ndp_params: parameters for I2R NDP. 418*a4128aadSBjoern A. Zeeb * bits 0 - 2: max number of LTF repetitions 419*a4128aadSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams 420*a4128aadSBjoern A. Zeeb * bits 6 - 7: max number of total LTFs see 421*a4128aadSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf 422*a4128aadSBjoern A. Zeeb * @min_time_between_msr: for non trigger based NDP ranging, minimum time 423*a4128aadSBjoern A. Zeeb * between measurements in milliseconds. 424*a4128aadSBjoern A. Zeeb * @max_time_between_msr: for non trigger based NDP ranging, maximum time 425*a4128aadSBjoern A. Zeeb * between measurements in milliseconds. 426*a4128aadSBjoern A. Zeeb */ 427*a4128aadSBjoern A. Zeeb struct iwl_tof_responder_config_cmd { 428*a4128aadSBjoern A. Zeeb __le32 cmd_valid_fields; 429*a4128aadSBjoern A. Zeeb __le32 responder_cfg_flags; 430*a4128aadSBjoern A. Zeeb u8 format_bw; 431*a4128aadSBjoern A. Zeeb u8 bss_color; 432*a4128aadSBjoern A. Zeeb u8 channel_num; 433*a4128aadSBjoern A. Zeeb u8 ctrl_ch_position; 434*a4128aadSBjoern A. Zeeb u8 sta_id; 435*a4128aadSBjoern A. Zeeb u8 band; 436*a4128aadSBjoern A. Zeeb __le16 toa_offset; 437*a4128aadSBjoern A. Zeeb __le16 common_calib; 438*a4128aadSBjoern A. Zeeb __le16 specific_calib; 439*a4128aadSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 440*a4128aadSBjoern A. Zeeb u8 r2i_ndp_params; 441*a4128aadSBjoern A. Zeeb u8 i2r_ndp_params; 442*a4128aadSBjoern A. Zeeb __le16 min_time_between_msr; 443*a4128aadSBjoern A. Zeeb __le16 max_time_between_msr; 444*a4128aadSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_CONFIG_CMD_API_S_VER_10 */ 445*a4128aadSBjoern A. Zeeb 446bfcc09ddSBjoern A. Zeeb #define IWL_LCI_CIVIC_IE_MAX_SIZE 400 447bfcc09ddSBjoern A. Zeeb 448bfcc09ddSBjoern A. Zeeb /** 449*a4128aadSBjoern A. Zeeb * struct iwl_tof_responder_dyn_config_cmd_v2 - Dynamic responder settings 450bfcc09ddSBjoern A. Zeeb * @lci_len: The length of the 1st (LCI) part in the @lci_civic buffer 451bfcc09ddSBjoern A. Zeeb * @civic_len: The length of the 2nd (CIVIC) part in the @lci_civic buffer 452bfcc09ddSBjoern A. Zeeb * @lci_civic: The LCI/CIVIC buffer. LCI data (if exists) comes first, then, if 453bfcc09ddSBjoern A. Zeeb * needed, 0-padding such that the next part is dword-aligned, then CIVIC 454bfcc09ddSBjoern A. Zeeb * data (if exists) follows, and then 0-padding again to complete a 455bfcc09ddSBjoern A. Zeeb * 4-multiple long buffer. 456bfcc09ddSBjoern A. Zeeb */ 457bfcc09ddSBjoern A. Zeeb struct iwl_tof_responder_dyn_config_cmd_v2 { 458bfcc09ddSBjoern A. Zeeb __le32 lci_len; 459bfcc09ddSBjoern A. Zeeb __le32 civic_len; 460bfcc09ddSBjoern A. Zeeb u8 lci_civic[]; 461bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_2 */ 462bfcc09ddSBjoern A. Zeeb 463bfcc09ddSBjoern A. Zeeb #define IWL_LCI_MAX_SIZE 160 464bfcc09ddSBjoern A. Zeeb #define IWL_CIVIC_MAX_SIZE 160 465bfcc09ddSBjoern A. Zeeb #define HLTK_11AZ_LEN 32 466bfcc09ddSBjoern A. Zeeb 467bfcc09ddSBjoern A. Zeeb /** 468bfcc09ddSBjoern A. Zeeb * enum iwl_responder_dyn_cfg_valid_flags - valid flags for dyn_config_cmd 469bfcc09ddSBjoern A. Zeeb * @IWL_RESPONDER_DYN_CFG_VALID_LCI: LCI data is valid 470bfcc09ddSBjoern A. Zeeb * @IWL_RESPONDER_DYN_CFG_VALID_CIVIC: Civic data is valid 471bfcc09ddSBjoern A. Zeeb * @IWL_RESPONDER_DYN_CFG_VALID_PASN_STA: the pasn_addr, HLTK and cipher fields 472bfcc09ddSBjoern A. Zeeb * are valid. 473bfcc09ddSBjoern A. Zeeb */ 474bfcc09ddSBjoern A. Zeeb enum iwl_responder_dyn_cfg_valid_flags { 475bfcc09ddSBjoern A. Zeeb IWL_RESPONDER_DYN_CFG_VALID_LCI = BIT(0), 476bfcc09ddSBjoern A. Zeeb IWL_RESPONDER_DYN_CFG_VALID_CIVIC = BIT(1), 477bfcc09ddSBjoern A. Zeeb IWL_RESPONDER_DYN_CFG_VALID_PASN_STA = BIT(2), 478bfcc09ddSBjoern A. Zeeb }; 479bfcc09ddSBjoern A. Zeeb 480bfcc09ddSBjoern A. Zeeb /** 481bfcc09ddSBjoern A. Zeeb * struct iwl_tof_responder_dyn_config_cmd - Dynamic responder settings 482bfcc09ddSBjoern A. Zeeb * @cipher: The negotiated cipher. see &enum iwl_location_cipher. 483bfcc09ddSBjoern A. Zeeb * @valid_flags: flags indicating which fields in the command are valid. see 484bfcc09ddSBjoern A. Zeeb * &enum iwl_responder_dyn_cfg_valid_flags. 485bfcc09ddSBjoern A. Zeeb * @lci_len: length of the LCI data in bytes 486bfcc09ddSBjoern A. Zeeb * @civic_len: length of the Civic data in bytes 487bfcc09ddSBjoern A. Zeeb * @lci_buf: the LCI buffer 488bfcc09ddSBjoern A. Zeeb * @civic_buf: the Civic buffer 489bfcc09ddSBjoern A. Zeeb * @hltk_buf: HLTK for secure LTF bits generation for the specified station 490bfcc09ddSBjoern A. Zeeb * @addr: mac address of the station for which to use the HLTK 491bfcc09ddSBjoern A. Zeeb * @reserved: for alignment 492bfcc09ddSBjoern A. Zeeb */ 493bfcc09ddSBjoern A. Zeeb struct iwl_tof_responder_dyn_config_cmd { 494bfcc09ddSBjoern A. Zeeb u8 cipher; 495bfcc09ddSBjoern A. Zeeb u8 valid_flags; 496bfcc09ddSBjoern A. Zeeb u8 lci_len; 497bfcc09ddSBjoern A. Zeeb u8 civic_len; 498bfcc09ddSBjoern A. Zeeb u8 lci_buf[IWL_LCI_MAX_SIZE]; 499bfcc09ddSBjoern A. Zeeb u8 civic_buf[IWL_LCI_MAX_SIZE]; 500bfcc09ddSBjoern A. Zeeb u8 hltk_buf[HLTK_11AZ_LEN]; 501bfcc09ddSBjoern A. Zeeb u8 addr[ETH_ALEN]; 502bfcc09ddSBjoern A. Zeeb u8 reserved[2]; 503bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_DYN_CONFIG_CMD_API_S_VER_3 */ 504bfcc09ddSBjoern A. Zeeb 505bfcc09ddSBjoern A. Zeeb /** 506bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ext_cmd - extended range req for WLS 507bfcc09ddSBjoern A. Zeeb * @tsf_timer_offset_msec: the recommended time offset (mSec) from the AP's TSF 508bfcc09ddSBjoern A. Zeeb * @reserved: reserved 509bfcc09ddSBjoern A. Zeeb * @min_delta_ftm: Minimal time between two consecutive measurements, 510bfcc09ddSBjoern A. Zeeb * in units of 100us. 0 means no preference by station 511bfcc09ddSBjoern A. Zeeb * @ftm_format_and_bw20M: FTM Channel Spacing/Format for 20MHz: recommended 512bfcc09ddSBjoern A. Zeeb * value be sent to the AP 513bfcc09ddSBjoern A. Zeeb * @ftm_format_and_bw40M: FTM Channel Spacing/Format for 40MHz: recommended 514bfcc09ddSBjoern A. Zeeb * value to be sent to the AP 515bfcc09ddSBjoern A. Zeeb * @ftm_format_and_bw80M: FTM Channel Spacing/Format for 80MHz: recommended 516bfcc09ddSBjoern A. Zeeb * value to be sent to the AP 517bfcc09ddSBjoern A. Zeeb */ 518bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ext_cmd { 519bfcc09ddSBjoern A. Zeeb __le16 tsf_timer_offset_msec; 520bfcc09ddSBjoern A. Zeeb __le16 reserved; 521bfcc09ddSBjoern A. Zeeb u8 min_delta_ftm; 522bfcc09ddSBjoern A. Zeeb u8 ftm_format_and_bw20M; 523bfcc09ddSBjoern A. Zeeb u8 ftm_format_and_bw40M; 524bfcc09ddSBjoern A. Zeeb u8 ftm_format_and_bw80M; 525bfcc09ddSBjoern A. Zeeb } __packed; 526bfcc09ddSBjoern A. Zeeb 527bfcc09ddSBjoern A. Zeeb /** 528bfcc09ddSBjoern A. Zeeb * enum iwl_tof_location_query - values for query bitmap 529bfcc09ddSBjoern A. Zeeb * @IWL_TOF_LOC_LCI: query LCI 530bfcc09ddSBjoern A. Zeeb * @IWL_TOF_LOC_CIVIC: query civic 531bfcc09ddSBjoern A. Zeeb */ 532bfcc09ddSBjoern A. Zeeb enum iwl_tof_location_query { 533bfcc09ddSBjoern A. Zeeb IWL_TOF_LOC_LCI = 0x01, 534bfcc09ddSBjoern A. Zeeb IWL_TOF_LOC_CIVIC = 0x02, 535bfcc09ddSBjoern A. Zeeb }; 536bfcc09ddSBjoern A. Zeeb 537bfcc09ddSBjoern A. Zeeb /** 538bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v2 - AP configuration parameters 539bfcc09ddSBjoern A. Zeeb * @channel_num: Current AP Channel 540bfcc09ddSBjoern A. Zeeb * @bandwidth: Current AP Bandwidth. One of iwl_tof_bandwidth. 541bfcc09ddSBjoern A. Zeeb * @tsf_delta_direction: TSF relatively to the subject AP 542bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 543bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 544bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 545bfcc09ddSBjoern A. Zeeb * @measure_type: Measurement type: 0 - two sided, 1 - One sided 546bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of the 547bfcc09ddSBjoern A. Zeeb * number of measurement iterations (min 2^0 = 1, max 2^14) 548bfcc09ddSBjoern A. Zeeb * @burst_period: Recommended value to be sent to the AP. Measurement 549bfcc09ddSBjoern A. Zeeb * periodicity In units of 100ms. ignored if num_of_bursts = 0 550bfcc09ddSBjoern A. Zeeb * @samples_per_burst: 2-sided: the number of FTMs pairs in single Burst (1-31); 551bfcc09ddSBjoern A. Zeeb * 1-sided: how many rts/cts pairs should be used per burst. 552bfcc09ddSBjoern A. Zeeb * @retries_per_sample: Max number of retries that the LMAC should send 553bfcc09ddSBjoern A. Zeeb * in case of no replies by the AP. 554bfcc09ddSBjoern A. Zeeb * @tsf_delta: TSF Delta in units of microseconds. 555bfcc09ddSBjoern A. Zeeb * The difference between the AP TSF and the device local clock. 556bfcc09ddSBjoern A. Zeeb * @location_req: Location Request Bit[0] LCI should be sent in the FTMR; 557bfcc09ddSBjoern A. Zeeb * Bit[1] Civic should be sent in the FTMR 558bfcc09ddSBjoern A. Zeeb * @asap_mode: 0 - non asap mode, 1 - asap mode (not relevant for one sided) 559bfcc09ddSBjoern A. Zeeb * @enable_dyn_ack: Enable Dynamic ACK BW. 560bfcc09ddSBjoern A. Zeeb * 0: Initiator interact with regular AP; 561bfcc09ddSBjoern A. Zeeb * 1: Initiator interact with Responder machine: need to send the 562bfcc09ddSBjoern A. Zeeb * Initiator Acks with HT 40MHz / 80MHz, since the Responder should 563bfcc09ddSBjoern A. Zeeb * use it for its ch est measurement (this flag will be set when we 564bfcc09ddSBjoern A. Zeeb * configure the opposite machine to be Responder). 565bfcc09ddSBjoern A. Zeeb * @rssi: Last received value 566bfcc09ddSBjoern A. Zeeb * legal values: -128-0 (0x7f). above 0x0 indicating an invalid value. 567bfcc09ddSBjoern A. Zeeb * @algo_type: &enum iwl_tof_algo_type 568bfcc09ddSBjoern A. Zeeb * @notify_mcsi: &enum iwl_tof_mcsi_ntfy. 569bfcc09ddSBjoern A. Zeeb * @reserved: For alignment and future use 570bfcc09ddSBjoern A. Zeeb */ 571bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v2 { 572bfcc09ddSBjoern A. Zeeb u8 channel_num; 573bfcc09ddSBjoern A. Zeeb u8 bandwidth; 574bfcc09ddSBjoern A. Zeeb u8 tsf_delta_direction; 575bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 576bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 577bfcc09ddSBjoern A. Zeeb u8 measure_type; 578bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 579bfcc09ddSBjoern A. Zeeb __le16 burst_period; 580bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 581bfcc09ddSBjoern A. Zeeb u8 retries_per_sample; 582bfcc09ddSBjoern A. Zeeb __le32 tsf_delta; 583bfcc09ddSBjoern A. Zeeb u8 location_req; 584bfcc09ddSBjoern A. Zeeb u8 asap_mode; 585bfcc09ddSBjoern A. Zeeb u8 enable_dyn_ack; 586bfcc09ddSBjoern A. Zeeb s8 rssi; 587bfcc09ddSBjoern A. Zeeb u8 algo_type; 588bfcc09ddSBjoern A. Zeeb u8 notify_mcsi; 589bfcc09ddSBjoern A. Zeeb __le16 reserved; 590bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_2 */ 591bfcc09ddSBjoern A. Zeeb 592bfcc09ddSBjoern A. Zeeb /** 593bfcc09ddSBjoern A. Zeeb * enum iwl_initiator_ap_flags - per responder FTM configuration flags 594bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_ASAP: Request for ASAP measurement. 595bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_LCI_REQUEST: Request for LCI information 596bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_CIVIC_REQUEST: Request for CIVIC information 597bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_DYN_ACK: Send HT/VHT ack for FTM frames. If not set, 598bfcc09ddSBjoern A. Zeeb * 20Mhz dup acks will be sent. 599bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_ALGO_LR: Use LR algo type for rtt calculation. 600bfcc09ddSBjoern A. Zeeb * Default algo type is ML. 601bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_ALGO_FFT: Use FFT algo type for rtt calculation. 602bfcc09ddSBjoern A. Zeeb * Default algo type is ML. 603bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_MCSI_REPORT: Send the MCSI for each FTM frame to the 604bfcc09ddSBjoern A. Zeeb * driver. 605bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_NON_TB: Use non trigger based flow 606bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_TB: Use trigger based flow 607bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_SECURED: request secure LTF measurement 608bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_LMR_FEEDBACK: Send LMR feedback 609bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_USE_CALIB: Use calibration values from the request 610bfcc09ddSBjoern A. Zeeb * instead of fw internal values. 611bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_PMF: request to protect the negotiation and LMR 612bfcc09ddSBjoern A. Zeeb * frames with protected management frames. 613bfcc09ddSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_TERMINATE_ON_LMR_FEEDBACK: terminate the session if 614bfcc09ddSBjoern A. Zeeb * the responder asked for LMR feedback although the initiator did not set 615bfcc09ddSBjoern A. Zeeb * the LMR feedback bit in the FTM request. If not set, the initiator will 616bfcc09ddSBjoern A. Zeeb * continue with the session and will provide the LMR feedback. 617*a4128aadSBjoern A. Zeeb * @IWL_INITIATOR_AP_FLAGS_TEST_INCORRECT_SAC: send an incorrect SAC in the 618*a4128aadSBjoern A. Zeeb * first NDP exchange. This is used for testing. 619bfcc09ddSBjoern A. Zeeb */ 620bfcc09ddSBjoern A. Zeeb enum iwl_initiator_ap_flags { 621bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_ASAP = BIT(1), 622bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_LCI_REQUEST = BIT(2), 623bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_CIVIC_REQUEST = BIT(3), 624bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_DYN_ACK = BIT(4), 625bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_ALGO_LR = BIT(5), 626bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_ALGO_FFT = BIT(6), 627bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_MCSI_REPORT = BIT(8), 628bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_NON_TB = BIT(9), 629bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_TB = BIT(10), 630bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_SECURED = BIT(11), 631bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_LMR_FEEDBACK = BIT(12), 632bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_USE_CALIB = BIT(13), 633bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_PMF = BIT(14), 634bfcc09ddSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_TERMINATE_ON_LMR_FEEDBACK = BIT(15), 635*a4128aadSBjoern A. Zeeb IWL_INITIATOR_AP_FLAGS_TEST_INCORRECT_SAC = BIT(16), 636bfcc09ddSBjoern A. Zeeb }; 637bfcc09ddSBjoern A. Zeeb 638bfcc09ddSBjoern A. Zeeb /** 639bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v3 - AP configuration parameters 640bfcc09ddSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 641bfcc09ddSBjoern A. Zeeb * @channel_num: AP Channel number 642bfcc09ddSBjoern A. Zeeb * @bandwidth: AP bandwidth. One of iwl_tof_bandwidth. 643bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 644bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 645bfcc09ddSBjoern A. Zeeb * @ftmr_max_retries: Max number of retries to send the FTMR in case of no 646bfcc09ddSBjoern A. Zeeb * reply from the AP. 647bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 648bfcc09ddSBjoern A. Zeeb * @burst_period: Recommended value to be sent to the AP. Measurement 649bfcc09ddSBjoern A. Zeeb * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0 650bfcc09ddSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 651bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 652bfcc09ddSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 653bfcc09ddSBjoern A. Zeeb * @reserved: For alignment and future use 654bfcc09ddSBjoern A. Zeeb * @tsf_delta: not in use 655bfcc09ddSBjoern A. Zeeb */ 656bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v3 { 657bfcc09ddSBjoern A. Zeeb __le32 initiator_ap_flags; 658bfcc09ddSBjoern A. Zeeb u8 channel_num; 659bfcc09ddSBjoern A. Zeeb u8 bandwidth; 660bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 661bfcc09ddSBjoern A. Zeeb u8 ftmr_max_retries; 662bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 663bfcc09ddSBjoern A. Zeeb __le16 burst_period; 664bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 665bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 666bfcc09ddSBjoern A. Zeeb __le16 reserved; 667bfcc09ddSBjoern A. Zeeb __le32 tsf_delta; 668bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_3 */ 669bfcc09ddSBjoern A. Zeeb 670bfcc09ddSBjoern A. Zeeb /** 671bfcc09ddSBjoern A. Zeeb * enum iwl_location_frame_format - location frame formats 672bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_FRAME_FORMAT_LEGACY: legacy 673bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_FRAME_FORMAT_HT: HT 674bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_FRAME_FORMAT_VHT: VHT 675bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_FRAME_FORMAT_HE: HE 676bfcc09ddSBjoern A. Zeeb */ 677bfcc09ddSBjoern A. Zeeb enum iwl_location_frame_format { 678bfcc09ddSBjoern A. Zeeb IWL_LOCATION_FRAME_FORMAT_LEGACY, 679bfcc09ddSBjoern A. Zeeb IWL_LOCATION_FRAME_FORMAT_HT, 680bfcc09ddSBjoern A. Zeeb IWL_LOCATION_FRAME_FORMAT_VHT, 681bfcc09ddSBjoern A. Zeeb IWL_LOCATION_FRAME_FORMAT_HE, 682bfcc09ddSBjoern A. Zeeb }; 683bfcc09ddSBjoern A. Zeeb 684bfcc09ddSBjoern A. Zeeb /** 685bfcc09ddSBjoern A. Zeeb * enum iwl_location_bw - location bandwidth selection 686bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_BW_20MHZ: 20MHz 687bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_BW_40MHZ: 40MHz 688bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_BW_80MHZ: 80MHz 689*a4128aadSBjoern A. Zeeb * @IWL_LOCATION_BW_160MHZ: 160MHz 690bfcc09ddSBjoern A. Zeeb */ 691bfcc09ddSBjoern A. Zeeb enum iwl_location_bw { 692bfcc09ddSBjoern A. Zeeb IWL_LOCATION_BW_20MHZ, 693bfcc09ddSBjoern A. Zeeb IWL_LOCATION_BW_40MHZ, 694bfcc09ddSBjoern A. Zeeb IWL_LOCATION_BW_80MHZ, 695bfcc09ddSBjoern A. Zeeb IWL_LOCATION_BW_160MHZ, 696bfcc09ddSBjoern A. Zeeb }; 697bfcc09ddSBjoern A. Zeeb 698bfcc09ddSBjoern A. Zeeb #define TK_11AZ_LEN 32 699bfcc09ddSBjoern A. Zeeb 700bfcc09ddSBjoern A. Zeeb #define LOCATION_BW_POS 4 701bfcc09ddSBjoern A. Zeeb 702bfcc09ddSBjoern A. Zeeb /** 703bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v4 - AP configuration parameters 704bfcc09ddSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 705bfcc09ddSBjoern A. Zeeb * @channel_num: AP Channel number 706bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 707bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 708bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 709bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 710bfcc09ddSBjoern A. Zeeb * @ftmr_max_retries: Max number of retries to send the FTMR in case of no 711bfcc09ddSBjoern A. Zeeb * reply from the AP. 712bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 713bfcc09ddSBjoern A. Zeeb * @burst_period: Recommended value to be sent to the AP. Measurement 714bfcc09ddSBjoern A. Zeeb * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0 715bfcc09ddSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 716bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 717bfcc09ddSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 718bfcc09ddSBjoern A. Zeeb * @reserved: For alignment and future use 719bfcc09ddSBjoern A. Zeeb * @hltk: HLTK to be used for secured 11az measurement 720bfcc09ddSBjoern A. Zeeb * @tk: TK to be used for secured 11az measurement 721bfcc09ddSBjoern A. Zeeb */ 722bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v4 { 723bfcc09ddSBjoern A. Zeeb __le32 initiator_ap_flags; 724bfcc09ddSBjoern A. Zeeb u8 channel_num; 725bfcc09ddSBjoern A. Zeeb u8 format_bw; 726bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 727bfcc09ddSBjoern A. Zeeb u8 ftmr_max_retries; 728bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 729bfcc09ddSBjoern A. Zeeb __le16 burst_period; 730bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 731bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 732bfcc09ddSBjoern A. Zeeb __le16 reserved; 733bfcc09ddSBjoern A. Zeeb u8 hltk[HLTK_11AZ_LEN]; 734bfcc09ddSBjoern A. Zeeb u8 tk[TK_11AZ_LEN]; 735bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_4 */ 736bfcc09ddSBjoern A. Zeeb 737bfcc09ddSBjoern A. Zeeb /** 738bfcc09ddSBjoern A. Zeeb * enum iwl_location_cipher - location cipher selection 739bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_CIPHER_CCMP_128: CCMP 128 740bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_CIPHER_GCMP_128: GCMP 128 741bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_CIPHER_GCMP_256: GCMP 256 742bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_CIPHER_INVALID: security is not used. 743bfcc09ddSBjoern A. Zeeb * @IWL_LOCATION_CIPHER_MAX: maximum value for this enum. 744bfcc09ddSBjoern A. Zeeb */ 745bfcc09ddSBjoern A. Zeeb enum iwl_location_cipher { 746bfcc09ddSBjoern A. Zeeb IWL_LOCATION_CIPHER_CCMP_128, 747bfcc09ddSBjoern A. Zeeb IWL_LOCATION_CIPHER_GCMP_128, 748bfcc09ddSBjoern A. Zeeb IWL_LOCATION_CIPHER_GCMP_256, 749bfcc09ddSBjoern A. Zeeb IWL_LOCATION_CIPHER_INVALID, 750bfcc09ddSBjoern A. Zeeb IWL_LOCATION_CIPHER_MAX, 751bfcc09ddSBjoern A. Zeeb }; 752bfcc09ddSBjoern A. Zeeb 753bfcc09ddSBjoern A. Zeeb /** 754bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v6 - AP configuration parameters 755bfcc09ddSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 756bfcc09ddSBjoern A. Zeeb * @channel_num: AP Channel number 757bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 758bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 759bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 760bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 761bfcc09ddSBjoern A. Zeeb * @ftmr_max_retries: Max number of retries to send the FTMR in case of no 762bfcc09ddSBjoern A. Zeeb * reply from the AP. 763bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 764bfcc09ddSBjoern A. Zeeb * @burst_period: Recommended value to be sent to the AP. Measurement 765bfcc09ddSBjoern A. Zeeb * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0 766bfcc09ddSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 767bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 768bfcc09ddSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 769bfcc09ddSBjoern A. Zeeb * @sta_id: the station id of the AP. Only relevant when associated to the AP, 770bfcc09ddSBjoern A. Zeeb * otherwise should be set to &IWL_MVM_INVALID_STA. 771bfcc09ddSBjoern A. Zeeb * @cipher: pairwise cipher suite for secured measurement. 772bfcc09ddSBjoern A. Zeeb * &enum iwl_location_cipher. 773bfcc09ddSBjoern A. Zeeb * @hltk: HLTK to be used for secured 11az measurement 774bfcc09ddSBjoern A. Zeeb * @tk: TK to be used for secured 11az measurement 775bfcc09ddSBjoern A. Zeeb * @calib: An array of calibration values per FTM rx bandwidth. 776bfcc09ddSBjoern A. Zeeb * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the 777bfcc09ddSBjoern A. Zeeb * calibration value that corresponds to the rx bandwidth of the FTM 778bfcc09ddSBjoern A. Zeeb * frame. 779bfcc09ddSBjoern A. Zeeb * @beacon_interval: beacon interval of the AP in TUs. Only required if 780bfcc09ddSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_TB is set. 781bfcc09ddSBjoern A. Zeeb */ 782bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v6 { 783bfcc09ddSBjoern A. Zeeb __le32 initiator_ap_flags; 784bfcc09ddSBjoern A. Zeeb u8 channel_num; 785bfcc09ddSBjoern A. Zeeb u8 format_bw; 786bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 787bfcc09ddSBjoern A. Zeeb u8 ftmr_max_retries; 788bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 789bfcc09ddSBjoern A. Zeeb __le16 burst_period; 790bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 791bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 792bfcc09ddSBjoern A. Zeeb u8 sta_id; 793bfcc09ddSBjoern A. Zeeb u8 cipher; 794bfcc09ddSBjoern A. Zeeb u8 hltk[HLTK_11AZ_LEN]; 795bfcc09ddSBjoern A. Zeeb u8 tk[TK_11AZ_LEN]; 796bfcc09ddSBjoern A. Zeeb __le16 calib[IWL_TOF_BW_NUM]; 797bfcc09ddSBjoern A. Zeeb __le16 beacon_interval; 798bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_6 */ 799bfcc09ddSBjoern A. Zeeb 800bfcc09ddSBjoern A. Zeeb /** 801bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v7 - AP configuration parameters 802bfcc09ddSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 803bfcc09ddSBjoern A. Zeeb * @channel_num: AP Channel number 804bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 805bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 806bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 807bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 808bfcc09ddSBjoern A. Zeeb * @ftmr_max_retries: Max number of retries to send the FTMR in case of no 809bfcc09ddSBjoern A. Zeeb * reply from the AP. 810bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 811bfcc09ddSBjoern A. Zeeb * @burst_period: Recommended value to be sent to the AP. Measurement 812bfcc09ddSBjoern A. Zeeb * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0 813bfcc09ddSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 814bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 815bfcc09ddSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 816bfcc09ddSBjoern A. Zeeb * @sta_id: the station id of the AP. Only relevant when associated to the AP, 817bfcc09ddSBjoern A. Zeeb * otherwise should be set to &IWL_MVM_INVALID_STA. 818bfcc09ddSBjoern A. Zeeb * @cipher: pairwise cipher suite for secured measurement. 819bfcc09ddSBjoern A. Zeeb * &enum iwl_location_cipher. 820bfcc09ddSBjoern A. Zeeb * @hltk: HLTK to be used for secured 11az measurement 821bfcc09ddSBjoern A. Zeeb * @tk: TK to be used for secured 11az measurement 822bfcc09ddSBjoern A. Zeeb * @calib: An array of calibration values per FTM rx bandwidth. 823bfcc09ddSBjoern A. Zeeb * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the 824bfcc09ddSBjoern A. Zeeb * calibration value that corresponds to the rx bandwidth of the FTM 825bfcc09ddSBjoern A. Zeeb * frame. 826bfcc09ddSBjoern A. Zeeb * @beacon_interval: beacon interval of the AP in TUs. Only required if 827bfcc09ddSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_TB is set. 828bfcc09ddSBjoern A. Zeeb * @rx_pn: the next expected PN for protected management frames Rx. LE byte 829bfcc09ddSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 830bfcc09ddSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 831bfcc09ddSBjoern A. Zeeb * @tx_pn: the next PN to use for protected management frames Tx. LE byte 832bfcc09ddSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 833bfcc09ddSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 834bfcc09ddSBjoern A. Zeeb */ 835bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v7 { 836bfcc09ddSBjoern A. Zeeb __le32 initiator_ap_flags; 837bfcc09ddSBjoern A. Zeeb u8 channel_num; 838bfcc09ddSBjoern A. Zeeb u8 format_bw; 839bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 840bfcc09ddSBjoern A. Zeeb u8 ftmr_max_retries; 841bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 842bfcc09ddSBjoern A. Zeeb __le16 burst_period; 843bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 844bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 845bfcc09ddSBjoern A. Zeeb u8 sta_id; 846bfcc09ddSBjoern A. Zeeb u8 cipher; 847bfcc09ddSBjoern A. Zeeb u8 hltk[HLTK_11AZ_LEN]; 848bfcc09ddSBjoern A. Zeeb u8 tk[TK_11AZ_LEN]; 849bfcc09ddSBjoern A. Zeeb __le16 calib[IWL_TOF_BW_NUM]; 850bfcc09ddSBjoern A. Zeeb __le16 beacon_interval; 851bfcc09ddSBjoern A. Zeeb u8 rx_pn[IEEE80211_CCMP_PN_LEN]; 852bfcc09ddSBjoern A. Zeeb u8 tx_pn[IEEE80211_CCMP_PN_LEN]; 853bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_7 */ 854bfcc09ddSBjoern A. Zeeb 855bfcc09ddSBjoern A. Zeeb #define IWL_LOCATION_MAX_STS_POS 3 856*a4128aadSBjoern A. Zeeb #define IWL_LOCATION_TOTAL_LTF_POS 6 857bfcc09ddSBjoern A. Zeeb 858bfcc09ddSBjoern A. Zeeb /** 859bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v8 - AP configuration parameters 860bfcc09ddSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 861bfcc09ddSBjoern A. Zeeb * @channel_num: AP Channel number 862bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 863bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 864bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 865bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 866bfcc09ddSBjoern A. Zeeb * @ftmr_max_retries: Max number of retries to send the FTMR in case of no 867bfcc09ddSBjoern A. Zeeb * reply from the AP. 868bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 869bfcc09ddSBjoern A. Zeeb * @burst_period: Recommended value to be sent to the AP. Measurement 870bfcc09ddSBjoern A. Zeeb * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0 871bfcc09ddSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 872bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 873bfcc09ddSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 874bfcc09ddSBjoern A. Zeeb * @sta_id: the station id of the AP. Only relevant when associated to the AP, 875bfcc09ddSBjoern A. Zeeb * otherwise should be set to &IWL_MVM_INVALID_STA. 876bfcc09ddSBjoern A. Zeeb * @cipher: pairwise cipher suite for secured measurement. 877bfcc09ddSBjoern A. Zeeb * &enum iwl_location_cipher. 878bfcc09ddSBjoern A. Zeeb * @hltk: HLTK to be used for secured 11az measurement 879bfcc09ddSBjoern A. Zeeb * @tk: TK to be used for secured 11az measurement 880bfcc09ddSBjoern A. Zeeb * @calib: An array of calibration values per FTM rx bandwidth. 881bfcc09ddSBjoern A. Zeeb * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the 882bfcc09ddSBjoern A. Zeeb * calibration value that corresponds to the rx bandwidth of the FTM 883bfcc09ddSBjoern A. Zeeb * frame. 884bfcc09ddSBjoern A. Zeeb * @beacon_interval: beacon interval of the AP in TUs. Only required if 885bfcc09ddSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_TB is set. 886bfcc09ddSBjoern A. Zeeb * @rx_pn: the next expected PN for protected management frames Rx. LE byte 887bfcc09ddSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 888bfcc09ddSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 889bfcc09ddSBjoern A. Zeeb * @tx_pn: the next PN to use for protected management frames Tx. LE byte 890bfcc09ddSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 891bfcc09ddSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 892bfcc09ddSBjoern A. Zeeb * @r2i_ndp_params: parameters for R2I NDP ranging negotiation. 893bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max LTF repetitions 894bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams 895bfcc09ddSBjoern A. Zeeb * bits 6 - 7: reserved 896bfcc09ddSBjoern A. Zeeb * @i2r_ndp_params: parameters for I2R NDP ranging negotiation. 897bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max LTF repetitions 898bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams (supported values are < 2) 899bfcc09ddSBjoern A. Zeeb * bits 6 - 7: reserved 900bfcc09ddSBjoern A. Zeeb * @r2i_max_total_ltf: R2I Max Total LTFs for NDP ranging negotiation. 901bfcc09ddSBjoern A. Zeeb * One of &enum ieee80211_range_params_max_total_ltf. 902bfcc09ddSBjoern A. Zeeb * @i2r_max_total_ltf: I2R Max Total LTFs for NDP ranging negotiation. 903bfcc09ddSBjoern A. Zeeb * One of &enum ieee80211_range_params_max_total_ltf. 904bfcc09ddSBjoern A. Zeeb */ 905bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v8 { 906bfcc09ddSBjoern A. Zeeb __le32 initiator_ap_flags; 907bfcc09ddSBjoern A. Zeeb u8 channel_num; 908bfcc09ddSBjoern A. Zeeb u8 format_bw; 909bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 910bfcc09ddSBjoern A. Zeeb u8 ftmr_max_retries; 911bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 912bfcc09ddSBjoern A. Zeeb __le16 burst_period; 913bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 914bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 915bfcc09ddSBjoern A. Zeeb u8 sta_id; 916bfcc09ddSBjoern A. Zeeb u8 cipher; 917bfcc09ddSBjoern A. Zeeb u8 hltk[HLTK_11AZ_LEN]; 918bfcc09ddSBjoern A. Zeeb u8 tk[TK_11AZ_LEN]; 919bfcc09ddSBjoern A. Zeeb __le16 calib[IWL_TOF_BW_NUM]; 920bfcc09ddSBjoern A. Zeeb __le16 beacon_interval; 921bfcc09ddSBjoern A. Zeeb u8 rx_pn[IEEE80211_CCMP_PN_LEN]; 922bfcc09ddSBjoern A. Zeeb u8 tx_pn[IEEE80211_CCMP_PN_LEN]; 923bfcc09ddSBjoern A. Zeeb u8 r2i_ndp_params; 924bfcc09ddSBjoern A. Zeeb u8 i2r_ndp_params; 925bfcc09ddSBjoern A. Zeeb u8 r2i_max_total_ltf; 926bfcc09ddSBjoern A. Zeeb u8 i2r_max_total_ltf; 927bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_8 */ 928bfcc09ddSBjoern A. Zeeb 929bfcc09ddSBjoern A. Zeeb /** 930bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v9 - AP configuration parameters 931bfcc09ddSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 932bfcc09ddSBjoern A. Zeeb * @channel_num: AP Channel number 933bfcc09ddSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 934bfcc09ddSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 935bfcc09ddSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 936bfcc09ddSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 937bfcc09ddSBjoern A. Zeeb * @ftmr_max_retries: Max number of retries to send the FTMR in case of no 938bfcc09ddSBjoern A. Zeeb * reply from the AP. 939bfcc09ddSBjoern A. Zeeb * @bssid: AP's BSSID 940bfcc09ddSBjoern A. Zeeb * @burst_period: For EDCA based ranging: Recommended value to be sent to the 941bfcc09ddSBjoern A. Zeeb * AP. Measurement periodicity In units of 100ms. ignored if 942bfcc09ddSBjoern A. Zeeb * num_of_bursts_exp = 0. 943bfcc09ddSBjoern A. Zeeb * For non trigger based NDP ranging, the maximum time between 944bfcc09ddSBjoern A. Zeeb * measurements in units of milliseconds. 945bfcc09ddSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 946bfcc09ddSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 947bfcc09ddSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 948bfcc09ddSBjoern A. Zeeb * @sta_id: the station id of the AP. Only relevant when associated to the AP, 949bfcc09ddSBjoern A. Zeeb * otherwise should be set to &IWL_MVM_INVALID_STA. 950bfcc09ddSBjoern A. Zeeb * @cipher: pairwise cipher suite for secured measurement. 951bfcc09ddSBjoern A. Zeeb * &enum iwl_location_cipher. 952bfcc09ddSBjoern A. Zeeb * @hltk: HLTK to be used for secured 11az measurement 953bfcc09ddSBjoern A. Zeeb * @tk: TK to be used for secured 11az measurement 954bfcc09ddSBjoern A. Zeeb * @calib: An array of calibration values per FTM rx bandwidth. 955bfcc09ddSBjoern A. Zeeb * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the 956bfcc09ddSBjoern A. Zeeb * calibration value that corresponds to the rx bandwidth of the FTM 957bfcc09ddSBjoern A. Zeeb * frame. 958bfcc09ddSBjoern A. Zeeb * @beacon_interval: beacon interval of the AP in TUs. Only required if 959bfcc09ddSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_TB is set. 960bfcc09ddSBjoern A. Zeeb * @bss_color: the BSS color of the responder. Only valid if 961bfcc09ddSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_TB or &IWL_INITIATOR_AP_FLAGS_NON_TB is set. 962bfcc09ddSBjoern A. Zeeb * @rx_pn: the next expected PN for protected management frames Rx. LE byte 963bfcc09ddSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 964bfcc09ddSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 965bfcc09ddSBjoern A. Zeeb * @tx_pn: the next PN to use for protected management frames Tx. LE byte 966bfcc09ddSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 967bfcc09ddSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 968bfcc09ddSBjoern A. Zeeb * @r2i_ndp_params: parameters for R2I NDP ranging negotiation. 969bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max LTF repetitions 970bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams 971bfcc09ddSBjoern A. Zeeb * bits 6 - 7: reserved 972bfcc09ddSBjoern A. Zeeb * @i2r_ndp_params: parameters for I2R NDP ranging negotiation. 973bfcc09ddSBjoern A. Zeeb * bits 0 - 2: max LTF repetitions 974bfcc09ddSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams (supported values are < 2) 975bfcc09ddSBjoern A. Zeeb * bits 6 - 7: reserved 976bfcc09ddSBjoern A. Zeeb * @r2i_max_total_ltf: R2I Max Total LTFs for NDP ranging negotiation. 977bfcc09ddSBjoern A. Zeeb * One of &enum ieee80211_range_params_max_total_ltf. 978bfcc09ddSBjoern A. Zeeb * @i2r_max_total_ltf: I2R Max Total LTFs for NDP ranging negotiation. 979bfcc09ddSBjoern A. Zeeb * One of &enum ieee80211_range_params_max_total_ltf. 980bfcc09ddSBjoern A. Zeeb * @bss_color: the BSS color of the responder. Only valid if 981bfcc09ddSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_NON_TB or &IWL_INITIATOR_AP_FLAGS_TB is set. 982bfcc09ddSBjoern A. Zeeb * @band: 0 for 5.2 GHz, 1 for 2.4 GHz, 2 for 6GHz 983bfcc09ddSBjoern A. Zeeb * @min_time_between_msr: For non trigger based NDP ranging, the minimum time 984bfcc09ddSBjoern A. Zeeb * between measurements in units of milliseconds 985bfcc09ddSBjoern A. Zeeb */ 986bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v9 { 987bfcc09ddSBjoern A. Zeeb __le32 initiator_ap_flags; 988bfcc09ddSBjoern A. Zeeb u8 channel_num; 989bfcc09ddSBjoern A. Zeeb u8 format_bw; 990bfcc09ddSBjoern A. Zeeb u8 ctrl_ch_position; 991bfcc09ddSBjoern A. Zeeb u8 ftmr_max_retries; 992bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 993bfcc09ddSBjoern A. Zeeb __le16 burst_period; 994bfcc09ddSBjoern A. Zeeb u8 samples_per_burst; 995bfcc09ddSBjoern A. Zeeb u8 num_of_bursts; 996bfcc09ddSBjoern A. Zeeb u8 sta_id; 997bfcc09ddSBjoern A. Zeeb u8 cipher; 998bfcc09ddSBjoern A. Zeeb u8 hltk[HLTK_11AZ_LEN]; 999bfcc09ddSBjoern A. Zeeb u8 tk[TK_11AZ_LEN]; 1000bfcc09ddSBjoern A. Zeeb __le16 calib[IWL_TOF_BW_NUM]; 1001bfcc09ddSBjoern A. Zeeb u16 beacon_interval; 1002bfcc09ddSBjoern A. Zeeb u8 rx_pn[IEEE80211_CCMP_PN_LEN]; 1003bfcc09ddSBjoern A. Zeeb u8 tx_pn[IEEE80211_CCMP_PN_LEN]; 1004bfcc09ddSBjoern A. Zeeb u8 r2i_ndp_params; 1005bfcc09ddSBjoern A. Zeeb u8 i2r_ndp_params; 1006bfcc09ddSBjoern A. Zeeb u8 r2i_max_total_ltf; 1007bfcc09ddSBjoern A. Zeeb u8 i2r_max_total_ltf; 1008bfcc09ddSBjoern A. Zeeb u8 bss_color; 1009bfcc09ddSBjoern A. Zeeb u8 band; 1010bfcc09ddSBjoern A. Zeeb __le16 min_time_between_msr; 1011bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_9 */ 1012bfcc09ddSBjoern A. Zeeb 1013bfcc09ddSBjoern A. Zeeb /** 1014*a4128aadSBjoern A. Zeeb * struct iwl_tof_range_req_ap_entry_v10 - AP configuration parameters 1015*a4128aadSBjoern A. Zeeb * @initiator_ap_flags: see &enum iwl_initiator_ap_flags. 1016*a4128aadSBjoern A. Zeeb * @band: 0 for 5.2 GHz, 1 for 2.4 GHz, 2 for 6GHz 1017*a4128aadSBjoern A. Zeeb * @channel_num: AP Channel number 1018*a4128aadSBjoern A. Zeeb * @format_bw: bits 0 - 3: &enum iwl_location_frame_format. 1019*a4128aadSBjoern A. Zeeb * bits 4 - 7: &enum iwl_location_bw. 1020*a4128aadSBjoern A. Zeeb * @ctrl_ch_position: Coding of the control channel position relative to the 1021*a4128aadSBjoern A. Zeeb * center frequency, see iwl_mvm_get_ctrl_pos(). 1022*a4128aadSBjoern A. Zeeb * @bssid: AP's BSSID 1023*a4128aadSBjoern A. Zeeb * @burst_period: For EDCA based ranging: Recommended value to be sent to the 1024*a4128aadSBjoern A. Zeeb * AP. Measurement periodicity In units of 100ms. ignored if 1025*a4128aadSBjoern A. Zeeb * num_of_bursts_exp = 0. 1026*a4128aadSBjoern A. Zeeb * For non trigger based NDP ranging, the maximum time between 1027*a4128aadSBjoern A. Zeeb * measurements in units of milliseconds. 1028*a4128aadSBjoern A. Zeeb * @samples_per_burst: the number of FTMs pairs in single Burst (1-31); 1029*a4128aadSBjoern A. Zeeb * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of 1030*a4128aadSBjoern A. Zeeb * the number of measurement iterations (min 2^0 = 1, max 2^14) 1031*a4128aadSBjoern A. Zeeb * @sta_id: the station id of the AP. Only relevant when associated to the AP, 1032*a4128aadSBjoern A. Zeeb * otherwise should be set to &IWL_MVM_INVALID_STA. 1033*a4128aadSBjoern A. Zeeb * @cipher: pairwise cipher suite for secured measurement. 1034*a4128aadSBjoern A. Zeeb * &enum iwl_location_cipher. 1035*a4128aadSBjoern A. Zeeb * @hltk: HLTK to be used for secured 11az measurement 1036*a4128aadSBjoern A. Zeeb * @tk: TK to be used for secured 11az measurement 1037*a4128aadSBjoern A. Zeeb * @calib: An array of calibration values per FTM rx bandwidth. 1038*a4128aadSBjoern A. Zeeb * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the 1039*a4128aadSBjoern A. Zeeb * calibration value that corresponds to the rx bandwidth of the FTM 1040*a4128aadSBjoern A. Zeeb * frame. 1041*a4128aadSBjoern A. Zeeb * @beacon_interval: beacon interval of the AP in TUs. Only required if 1042*a4128aadSBjoern A. Zeeb * &IWL_INITIATOR_AP_FLAGS_TB is set. 1043*a4128aadSBjoern A. Zeeb * @rx_pn: the next expected PN for protected management frames Rx. LE byte 1044*a4128aadSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 1045*a4128aadSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 1046*a4128aadSBjoern A. Zeeb * @tx_pn: the next PN to use for protected management frames Tx. LE byte 1047*a4128aadSBjoern A. Zeeb * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id 1048*a4128aadSBjoern A. Zeeb * is set to &IWL_MVM_INVALID_STA. 1049*a4128aadSBjoern A. Zeeb * @r2i_ndp_params: parameters for R2I NDP ranging negotiation. 1050*a4128aadSBjoern A. Zeeb * bits 0 - 2: max LTF repetitions 1051*a4128aadSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams 1052*a4128aadSBjoern A. Zeeb * bits 6 - 7: max total LTFs. One of 1053*a4128aadSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf. 1054*a4128aadSBjoern A. Zeeb * @i2r_ndp_params: parameters for I2R NDP ranging negotiation. 1055*a4128aadSBjoern A. Zeeb * bits 0 - 2: max LTF repetitions 1056*a4128aadSBjoern A. Zeeb * bits 3 - 5: max number of spatial streams (supported values are < 2) 1057*a4128aadSBjoern A. Zeeb * bits 6 - 7: max total LTFs. One of 1058*a4128aadSBjoern A. Zeeb * &enum ieee80211_range_params_max_total_ltf. 1059*a4128aadSBjoern A. Zeeb * @min_time_between_msr: For non trigger based NDP ranging, the minimum time 1060*a4128aadSBjoern A. Zeeb * between measurements in units of milliseconds 1061*a4128aadSBjoern A. Zeeb */ 1062*a4128aadSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v10 { 1063*a4128aadSBjoern A. Zeeb __le32 initiator_ap_flags; 1064*a4128aadSBjoern A. Zeeb u8 band; 1065*a4128aadSBjoern A. Zeeb u8 channel_num; 1066*a4128aadSBjoern A. Zeeb u8 format_bw; 1067*a4128aadSBjoern A. Zeeb u8 ctrl_ch_position; 1068*a4128aadSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 1069*a4128aadSBjoern A. Zeeb __le16 burst_period; 1070*a4128aadSBjoern A. Zeeb u8 samples_per_burst; 1071*a4128aadSBjoern A. Zeeb u8 num_of_bursts; 1072*a4128aadSBjoern A. Zeeb u8 sta_id; 1073*a4128aadSBjoern A. Zeeb u8 cipher; 1074*a4128aadSBjoern A. Zeeb u8 hltk[HLTK_11AZ_LEN]; 1075*a4128aadSBjoern A. Zeeb u8 tk[TK_11AZ_LEN]; 1076*a4128aadSBjoern A. Zeeb __le16 calib[IWL_TOF_BW_NUM]; 1077*a4128aadSBjoern A. Zeeb __le16 beacon_interval; 1078*a4128aadSBjoern A. Zeeb u8 rx_pn[IEEE80211_CCMP_PN_LEN]; 1079*a4128aadSBjoern A. Zeeb u8 tx_pn[IEEE80211_CCMP_PN_LEN]; 1080*a4128aadSBjoern A. Zeeb u8 r2i_ndp_params; 1081*a4128aadSBjoern A. Zeeb u8 i2r_ndp_params; 1082*a4128aadSBjoern A. Zeeb __le16 min_time_between_msr; 1083*a4128aadSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_9 */ 1084*a4128aadSBjoern A. Zeeb 1085*a4128aadSBjoern A. Zeeb /** 1086bfcc09ddSBjoern A. Zeeb * enum iwl_tof_response_mode 1087bfcc09ddSBjoern A. Zeeb * @IWL_MVM_TOF_RESPONSE_ASAP: report each AP measurement separately as soon as 1088bfcc09ddSBjoern A. Zeeb * possible (not supported for this release) 1089bfcc09ddSBjoern A. Zeeb * @IWL_MVM_TOF_RESPONSE_TIMEOUT: report all AP measurements as a batch upon 1090bfcc09ddSBjoern A. Zeeb * timeout expiration 1091bfcc09ddSBjoern A. Zeeb * @IWL_MVM_TOF_RESPONSE_COMPLETE: report all AP measurements as a batch at the 1092bfcc09ddSBjoern A. Zeeb * earlier of: measurements completion / timeout 1093bfcc09ddSBjoern A. Zeeb * expiration. 1094bfcc09ddSBjoern A. Zeeb */ 1095bfcc09ddSBjoern A. Zeeb enum iwl_tof_response_mode { 1096bfcc09ddSBjoern A. Zeeb IWL_MVM_TOF_RESPONSE_ASAP, 1097bfcc09ddSBjoern A. Zeeb IWL_MVM_TOF_RESPONSE_TIMEOUT, 1098bfcc09ddSBjoern A. Zeeb IWL_MVM_TOF_RESPONSE_COMPLETE, 1099bfcc09ddSBjoern A. Zeeb }; 1100bfcc09ddSBjoern A. Zeeb 1101bfcc09ddSBjoern A. Zeeb /** 1102bfcc09ddSBjoern A. Zeeb * enum iwl_tof_initiator_flags 1103bfcc09ddSBjoern A. Zeeb * 1104bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_FAST_ALGO_DISABLED: disable fast algo, meaning run 1105bfcc09ddSBjoern A. Zeeb * the algo on ant A+B, instead of only one of them. 1106bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_A: open RX antenna A for FTMs RX 1107bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_B: open RX antenna B for FTMs RX 1108bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_C: open RX antenna C for FTMs RX 1109bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_A: use antenna A fo TX ACKs during FTM 1110bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_B: use antenna B fo TX ACKs during FTM 1111bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_C: use antenna C fo TX ACKs during FTM 1112bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_MACADDR_RANDOM: use random mac address for FTM 1113bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_SPECIFIC_CALIB: use the specific calib value from 1114bfcc09ddSBjoern A. Zeeb * the range request command 1115bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_COMMON_CALIB: use the common calib value from the 1116bfcc09ddSBjoern A. Zeeb * ragne request command 1117bfcc09ddSBjoern A. Zeeb * @IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT: support non-asap measurements 1118bfcc09ddSBjoern A. Zeeb */ 1119bfcc09ddSBjoern A. Zeeb enum iwl_tof_initiator_flags { 1120bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_FAST_ALGO_DISABLED = BIT(0), 1121bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_A = BIT(1), 1122bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_B = BIT(2), 1123bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_RX_CHAIN_SEL_C = BIT(3), 1124bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_A = BIT(4), 1125bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_B = BIT(5), 1126bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_TX_CHAIN_SEL_C = BIT(6), 1127bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_MACADDR_RANDOM = BIT(7), 1128bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_SPECIFIC_CALIB = BIT(15), 1129bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_COMMON_CALIB = BIT(16), 1130bfcc09ddSBjoern A. Zeeb IWL_TOF_INITIATOR_FLAGS_NON_ASAP_SUPPORT = BIT(20), 1131bfcc09ddSBjoern A. Zeeb }; /* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */ 1132bfcc09ddSBjoern A. Zeeb 1133bfcc09ddSBjoern A. Zeeb #define IWL_MVM_TOF_MAX_APS 5 1134bfcc09ddSBjoern A. Zeeb #define IWL_MVM_TOF_MAX_TWO_SIDED_APS 5 1135bfcc09ddSBjoern A. Zeeb 1136bfcc09ddSBjoern A. Zeeb /** 1137bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v5 - start measurement cmd 1138bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1139bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1140bfcc09ddSBjoern A. Zeeb * sent back in the range response 1141bfcc09ddSBjoern A. Zeeb * @initiator: 0- NW initiated, 1 - Client Initiated 1142bfcc09ddSBjoern A. Zeeb * @one_sided_los_disable: '0'- run ML-Algo for both ToF/OneSided, 1143bfcc09ddSBjoern A. Zeeb * '1' - run ML-Algo for ToF only 1144bfcc09ddSBjoern A. Zeeb * @req_timeout: Requested timeout of the response in units of 100ms. 1145bfcc09ddSBjoern A. Zeeb * This is equivalent to the session time configured to the 1146bfcc09ddSBjoern A. Zeeb * LMAC in Initiator Request 1147bfcc09ddSBjoern A. Zeeb * @report_policy: Supported partially for this release: For current release - 1148bfcc09ddSBjoern A. Zeeb * the range report will be uploaded as a batch when ready or 1149bfcc09ddSBjoern A. Zeeb * when the session is done (successfully / partially). 1150bfcc09ddSBjoern A. Zeeb * one of iwl_tof_response_mode. 1151bfcc09ddSBjoern A. Zeeb * @reserved0: reserved 1152bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1153bfcc09ddSBjoern A. Zeeb * @macaddr_random: '0' Use default source MAC address (i.e. p2_p), 1154bfcc09ddSBjoern A. Zeeb * '1' Use MAC Address randomization according to the below 1155bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1156bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1157bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1158bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1159bfcc09ddSBjoern A. Zeeb * @ftm_rx_chains: Rx chain to open to receive Responder's FTMs (XVT) 1160bfcc09ddSBjoern A. Zeeb * @ftm_tx_chains: Tx chain to send the ack to the Responder FTM (XVT) 1161bfcc09ddSBjoern A. Zeeb * @common_calib: The common calib value to inject to this measurement calc 1162bfcc09ddSBjoern A. Zeeb * @specific_calib: The specific calib value to inject to this measurement calc 1163bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data 1164bfcc09ddSBjoern A. Zeeb */ 1165bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v5 { 1166bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1167bfcc09ddSBjoern A. Zeeb u8 request_id; 1168bfcc09ddSBjoern A. Zeeb u8 initiator; 1169bfcc09ddSBjoern A. Zeeb u8 one_sided_los_disable; 1170bfcc09ddSBjoern A. Zeeb u8 req_timeout; 1171bfcc09ddSBjoern A. Zeeb u8 report_policy; 1172bfcc09ddSBjoern A. Zeeb u8 reserved0; 1173bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1174bfcc09ddSBjoern A. Zeeb u8 macaddr_random; 1175bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1176bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1177bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1178bfcc09ddSBjoern A. Zeeb u8 ftm_rx_chains; 1179bfcc09ddSBjoern A. Zeeb u8 ftm_tx_chains; 1180bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1181bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1182bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v2 ap[IWL_MVM_TOF_MAX_APS]; 1183bfcc09ddSBjoern A. Zeeb } __packed; 1184bfcc09ddSBjoern A. Zeeb /* LOCATION_RANGE_REQ_CMD_API_S_VER_5 */ 1185bfcc09ddSBjoern A. Zeeb 1186bfcc09ddSBjoern A. Zeeb /** 1187bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v7 - start measurement cmd 1188bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1189bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1190bfcc09ddSBjoern A. Zeeb * sent back in the range response 1191bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1192bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1193bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1194bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1195bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1196bfcc09ddSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1197bfcc09ddSBjoern A. Zeeb * This is the session time for completing the measurement. 1198bfcc09ddSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1199bfcc09ddSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1200bfcc09ddSBjoern A. Zeeb * @common_calib: The common calib value to inject to this measurement calc 1201bfcc09ddSBjoern A. Zeeb * @specific_calib: The specific calib value to inject to this measurement calc 1202bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2. 1203bfcc09ddSBjoern A. Zeeb */ 1204bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v7 { 1205bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1206bfcc09ddSBjoern A. Zeeb u8 request_id; 1207bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1208bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1209bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1210bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1211bfcc09ddSBjoern A. Zeeb __le32 req_timeout_ms; 1212bfcc09ddSBjoern A. Zeeb __le32 tsf_mac_id; 1213bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1214bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1215bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v3 ap[IWL_MVM_TOF_MAX_APS]; 1216bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_7 */ 1217bfcc09ddSBjoern A. Zeeb 1218bfcc09ddSBjoern A. Zeeb /** 1219bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v8 - start measurement cmd 1220bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1221bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1222bfcc09ddSBjoern A. Zeeb * sent back in the range response 1223bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1224bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1225bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1226bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1227bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1228bfcc09ddSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1229bfcc09ddSBjoern A. Zeeb * This is the session time for completing the measurement. 1230bfcc09ddSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1231bfcc09ddSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1232bfcc09ddSBjoern A. Zeeb * @common_calib: The common calib value to inject to this measurement calc 1233bfcc09ddSBjoern A. Zeeb * @specific_calib: The specific calib value to inject to this measurement calc 1234bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2. 1235bfcc09ddSBjoern A. Zeeb */ 1236bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v8 { 1237bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1238bfcc09ddSBjoern A. Zeeb u8 request_id; 1239bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1240bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1241bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1242bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1243bfcc09ddSBjoern A. Zeeb __le32 req_timeout_ms; 1244bfcc09ddSBjoern A. Zeeb __le32 tsf_mac_id; 1245bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1246bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1247bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v4 ap[IWL_MVM_TOF_MAX_APS]; 1248bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_8 */ 1249bfcc09ddSBjoern A. Zeeb 1250bfcc09ddSBjoern A. Zeeb /** 1251bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v9 - start measurement cmd 1252bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1253bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1254bfcc09ddSBjoern A. Zeeb * sent back in the range response 1255bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1256bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1257bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1258bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1259bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1260bfcc09ddSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1261bfcc09ddSBjoern A. Zeeb * This is the session time for completing the measurement. 1262bfcc09ddSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1263bfcc09ddSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1264bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2. 1265bfcc09ddSBjoern A. Zeeb */ 1266bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v9 { 1267bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1268bfcc09ddSBjoern A. Zeeb u8 request_id; 1269bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1270bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1271bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1272bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1273bfcc09ddSBjoern A. Zeeb __le32 req_timeout_ms; 1274bfcc09ddSBjoern A. Zeeb __le32 tsf_mac_id; 1275bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v6 ap[IWL_MVM_TOF_MAX_APS]; 1276bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_9 */ 1277bfcc09ddSBjoern A. Zeeb 1278bfcc09ddSBjoern A. Zeeb /** 1279bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v11 - start measurement cmd 1280bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1281bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1282bfcc09ddSBjoern A. Zeeb * sent back in the range response 1283bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1284bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1285bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1286bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1287bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1288bfcc09ddSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1289bfcc09ddSBjoern A. Zeeb * This is the session time for completing the measurement. 1290bfcc09ddSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1291bfcc09ddSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1292bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2. 1293bfcc09ddSBjoern A. Zeeb */ 1294bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v11 { 1295bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1296bfcc09ddSBjoern A. Zeeb u8 request_id; 1297bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1298bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1299bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1300bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1301bfcc09ddSBjoern A. Zeeb __le32 req_timeout_ms; 1302bfcc09ddSBjoern A. Zeeb __le32 tsf_mac_id; 1303bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v7 ap[IWL_MVM_TOF_MAX_APS]; 1304bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_11 */ 1305bfcc09ddSBjoern A. Zeeb 1306bfcc09ddSBjoern A. Zeeb /** 1307bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v12 - start measurement cmd 1308bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1309bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1310bfcc09ddSBjoern A. Zeeb * sent back in the range response 1311bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1312bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1313bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1314bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1315bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1316bfcc09ddSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1317bfcc09ddSBjoern A. Zeeb * This is the session time for completing the measurement. 1318bfcc09ddSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1319bfcc09ddSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1320bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2. 1321bfcc09ddSBjoern A. Zeeb */ 1322bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v12 { 1323bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1324bfcc09ddSBjoern A. Zeeb u8 request_id; 1325bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1326bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1327bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1328bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1329bfcc09ddSBjoern A. Zeeb __le32 req_timeout_ms; 1330bfcc09ddSBjoern A. Zeeb __le32 tsf_mac_id; 1331bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v8 ap[IWL_MVM_TOF_MAX_APS]; 1332bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_12 */ 1333bfcc09ddSBjoern A. Zeeb 1334bfcc09ddSBjoern A. Zeeb /** 1335bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v13 - start measurement cmd 1336bfcc09ddSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1337bfcc09ddSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1338bfcc09ddSBjoern A. Zeeb * sent back in the range response 1339bfcc09ddSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1340bfcc09ddSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1341bfcc09ddSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1342bfcc09ddSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1343bfcc09ddSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1344bfcc09ddSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1345bfcc09ddSBjoern A. Zeeb * This is the session time for completing the measurement. 1346bfcc09ddSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1347bfcc09ddSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1348bfcc09ddSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v9. 1349bfcc09ddSBjoern A. Zeeb */ 1350bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v13 { 1351bfcc09ddSBjoern A. Zeeb __le32 initiator_flags; 1352bfcc09ddSBjoern A. Zeeb u8 request_id; 1353bfcc09ddSBjoern A. Zeeb u8 num_of_ap; 1354bfcc09ddSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1355bfcc09ddSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1356bfcc09ddSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1357bfcc09ddSBjoern A. Zeeb __le32 req_timeout_ms; 1358bfcc09ddSBjoern A. Zeeb __le32 tsf_mac_id; 1359bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v9 ap[IWL_MVM_TOF_MAX_APS]; 1360bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_13 */ 1361bfcc09ddSBjoern A. Zeeb 1362*a4128aadSBjoern A. Zeeb /** 1363*a4128aadSBjoern A. Zeeb * struct iwl_tof_range_req_cmd_v14 - start measurement cmd 1364*a4128aadSBjoern A. Zeeb * @initiator_flags: see flags @ iwl_tof_initiator_flags 1365*a4128aadSBjoern A. Zeeb * @request_id: A Token incremented per request. The same Token will be 1366*a4128aadSBjoern A. Zeeb * sent back in the range response 1367*a4128aadSBjoern A. Zeeb * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1368*a4128aadSBjoern A. Zeeb * @range_req_bssid: ranging request BSSID 1369*a4128aadSBjoern A. Zeeb * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template. 1370*a4128aadSBjoern A. Zeeb * Bits set to 1 shall be randomized by the UMAC 1371*a4128aadSBjoern A. Zeeb * @macaddr_template: MAC address template to use for non-randomized bits 1372*a4128aadSBjoern A. Zeeb * @req_timeout_ms: Requested timeout of the response in units of milliseconds. 1373*a4128aadSBjoern A. Zeeb * This is the session time for completing the measurement. 1374*a4128aadSBjoern A. Zeeb * @tsf_mac_id: report the measurement start time for each ap in terms of the 1375*a4128aadSBjoern A. Zeeb * TSF of this mac id. 0xff to disable TSF reporting. 1376*a4128aadSBjoern A. Zeeb * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v10. 1377*a4128aadSBjoern A. Zeeb */ 1378*a4128aadSBjoern A. Zeeb struct iwl_tof_range_req_cmd_v14 { 1379*a4128aadSBjoern A. Zeeb __le32 initiator_flags; 1380*a4128aadSBjoern A. Zeeb u8 request_id; 1381*a4128aadSBjoern A. Zeeb u8 num_of_ap; 1382*a4128aadSBjoern A. Zeeb u8 range_req_bssid[ETH_ALEN]; 1383*a4128aadSBjoern A. Zeeb u8 macaddr_mask[ETH_ALEN]; 1384*a4128aadSBjoern A. Zeeb u8 macaddr_template[ETH_ALEN]; 1385*a4128aadSBjoern A. Zeeb __le32 req_timeout_ms; 1386*a4128aadSBjoern A. Zeeb __le32 tsf_mac_id; 1387*a4128aadSBjoern A. Zeeb struct iwl_tof_range_req_ap_entry_v10 ap[IWL_MVM_TOF_MAX_APS]; 1388*a4128aadSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_REQ_CMD_API_S_VER_13 */ 1389*a4128aadSBjoern A. Zeeb 1390bfcc09ddSBjoern A. Zeeb /* 1391bfcc09ddSBjoern A. Zeeb * enum iwl_tof_range_request_status - status of the sent request 1392bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RANGE_REQUEST_STATUS_SUCCESSFUL - FW successfully received the 1393bfcc09ddSBjoern A. Zeeb * request 1394bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RANGE_REQUEST_STATUS_BUSY - FW is busy with a previous request, the 1395bfcc09ddSBjoern A. Zeeb * sent request will not be handled 1396bfcc09ddSBjoern A. Zeeb */ 1397bfcc09ddSBjoern A. Zeeb enum iwl_tof_range_request_status { 1398bfcc09ddSBjoern A. Zeeb IWL_TOF_RANGE_REQUEST_STATUS_SUCCESS, 1399bfcc09ddSBjoern A. Zeeb IWL_TOF_RANGE_REQUEST_STATUS_BUSY, 1400bfcc09ddSBjoern A. Zeeb }; 1401bfcc09ddSBjoern A. Zeeb 1402bfcc09ddSBjoern A. Zeeb /** 1403bfcc09ddSBjoern A. Zeeb * enum iwl_tof_entry_status 1404bfcc09ddSBjoern A. Zeeb * 1405bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_SUCCESS: successful measurement. 1406bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_GENERAL_FAILURE: General failure. 1407bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_NO_RESPONSE: Responder didn't reply to the request. 1408bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_REQUEST_REJECTED: Responder rejected the request. 1409bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_NOT_SCHEDULED: Time event was scheduled but not called yet. 1410bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_TIMING_MEASURE_TIMEOUT: Time event triggered but no 1411bfcc09ddSBjoern A. Zeeb * measurement was completed. 1412bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_TARGET_DIFF_CH_CANNOT_CHANGE: No range due inability to switch 1413bfcc09ddSBjoern A. Zeeb * from the primary channel. 1414bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RANGE_NOT_SUPPORTED: Device doesn't support FTM. 1415bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_REQUEST_ABORT_UNKNOWN_REASON: Request aborted due to unknown 1416bfcc09ddSBjoern A. Zeeb * reason. 1417bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_LOCATION_INVALID_T1_T4_TIME_STAMP: Failure due to invalid 1418bfcc09ddSBjoern A. Zeeb * T1/T4. 1419bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_11MC_PROTOCOL_FAILURE: Failure due to invalid FTM frame 1420bfcc09ddSBjoern A. Zeeb * structure. 1421bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_REQUEST_CANNOT_SCHED: Request cannot be scheduled. 1422bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE: Responder cannot serve the 1423bfcc09ddSBjoern A. Zeeb * initiator for some period, period supplied in @refusal_period. 1424bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_BAD_REQUEST_ARGS: Bad request arguments. 1425bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_WIFI_NOT_ENABLED: Wifi not enabled. 1426bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RESPONDER_OVERRIDE_PARAMS: Responder override the original 1427bfcc09ddSBjoern A. Zeeb * parameters within the current session. 1428bfcc09ddSBjoern A. Zeeb */ 1429bfcc09ddSBjoern A. Zeeb enum iwl_tof_entry_status { 1430bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_SUCCESS = 0, 1431bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_GENERAL_FAILURE = 1, 1432bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_NO_RESPONSE = 2, 1433bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_REQUEST_REJECTED = 3, 1434bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_NOT_SCHEDULED = 4, 1435bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_TIMING_MEASURE_TIMEOUT = 5, 1436bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_TARGET_DIFF_CH_CANNOT_CHANGE = 6, 1437bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_RANGE_NOT_SUPPORTED = 7, 1438bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_REQUEST_ABORT_UNKNOWN_REASON = 8, 1439bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_LOCATION_INVALID_T1_T4_TIME_STAMP = 9, 1440bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_11MC_PROTOCOL_FAILURE = 10, 1441bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_REQUEST_CANNOT_SCHED = 11, 1442bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE = 12, 1443bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_BAD_REQUEST_ARGS = 13, 1444bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_WIFI_NOT_ENABLED = 14, 1445bfcc09ddSBjoern A. Zeeb IWL_TOF_ENTRY_RESPONDER_OVERRIDE_PARAMS = 15, 1446bfcc09ddSBjoern A. Zeeb }; /* LOCATION_RANGE_RSP_AP_ENTRY_NTFY_API_S_VER_2 */ 1447bfcc09ddSBjoern A. Zeeb 1448bfcc09ddSBjoern A. Zeeb /** 1449bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ap_entry_ntfy_v3 - AP parameters (response) 1450bfcc09ddSBjoern A. Zeeb * @bssid: BSSID of the AP 1451bfcc09ddSBjoern A. Zeeb * @measure_status: current APs measurement status, one of 1452bfcc09ddSBjoern A. Zeeb * &enum iwl_tof_entry_status. 1453bfcc09ddSBjoern A. Zeeb * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz 1454bfcc09ddSBjoern A. Zeeb * @rtt: The Round Trip Time that took for the last measurement for 1455bfcc09ddSBjoern A. Zeeb * current AP [pSec] 1456bfcc09ddSBjoern A. Zeeb * @rtt_variance: The Variance of the RTT values measured for current AP 1457bfcc09ddSBjoern A. Zeeb * @rtt_spread: The Difference between the maximum and the minimum RTT 1458bfcc09ddSBjoern A. Zeeb * values measured for current AP in the current session [pSec] 1459bfcc09ddSBjoern A. Zeeb * @rssi: RSSI as uploaded in the Channel Estimation notification 1460bfcc09ddSBjoern A. Zeeb * @rssi_spread: The Difference between the maximum and the minimum RSSI values 1461bfcc09ddSBjoern A. Zeeb * measured for current AP in the current session 1462bfcc09ddSBjoern A. Zeeb * @reserved: reserved 1463bfcc09ddSBjoern A. Zeeb * @refusal_period: refusal period in case of 1464bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec] 1465bfcc09ddSBjoern A. Zeeb * @range: Measured range [cm] 1466bfcc09ddSBjoern A. Zeeb * @range_variance: Measured range variance [cm] 1467bfcc09ddSBjoern A. Zeeb * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was 1468bfcc09ddSBjoern A. Zeeb * uploaded by the LMAC 1469bfcc09ddSBjoern A. Zeeb * @t2t3_initiator: as calculated from the algo in the initiator 1470bfcc09ddSBjoern A. Zeeb * @t1t4_responder: as calculated from the algo in the responder 1471bfcc09ddSBjoern A. Zeeb * @common_calib: Calib val that was used in for this AP measurement 1472bfcc09ddSBjoern A. Zeeb * @specific_calib: val that was used in for this AP measurement 1473bfcc09ddSBjoern A. Zeeb * @papd_calib_output: The result of the tof papd calibration that was injected 1474bfcc09ddSBjoern A. Zeeb * into the algorithm. 1475bfcc09ddSBjoern A. Zeeb */ 1476bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v3 { 1477bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 1478bfcc09ddSBjoern A. Zeeb u8 measure_status; 1479bfcc09ddSBjoern A. Zeeb u8 measure_bw; 1480bfcc09ddSBjoern A. Zeeb __le32 rtt; 1481bfcc09ddSBjoern A. Zeeb __le32 rtt_variance; 1482bfcc09ddSBjoern A. Zeeb __le32 rtt_spread; 1483bfcc09ddSBjoern A. Zeeb s8 rssi; 1484bfcc09ddSBjoern A. Zeeb u8 rssi_spread; 1485bfcc09ddSBjoern A. Zeeb u8 reserved; 1486bfcc09ddSBjoern A. Zeeb u8 refusal_period; 1487bfcc09ddSBjoern A. Zeeb __le32 range; 1488bfcc09ddSBjoern A. Zeeb __le32 range_variance; 1489bfcc09ddSBjoern A. Zeeb __le32 timestamp; 1490bfcc09ddSBjoern A. Zeeb __le32 t2t3_initiator; 1491bfcc09ddSBjoern A. Zeeb __le32 t1t4_responder; 1492bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1493bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1494bfcc09ddSBjoern A. Zeeb __le32 papd_calib_output; 1495bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_3 */ 1496bfcc09ddSBjoern A. Zeeb 1497bfcc09ddSBjoern A. Zeeb /** 1498bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ap_entry_ntfy_v4 - AP parameters (response) 1499bfcc09ddSBjoern A. Zeeb * @bssid: BSSID of the AP 1500bfcc09ddSBjoern A. Zeeb * @measure_status: current APs measurement status, one of 1501bfcc09ddSBjoern A. Zeeb * &enum iwl_tof_entry_status. 1502bfcc09ddSBjoern A. Zeeb * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz 1503bfcc09ddSBjoern A. Zeeb * @rtt: The Round Trip Time that took for the last measurement for 1504bfcc09ddSBjoern A. Zeeb * current AP [pSec] 1505bfcc09ddSBjoern A. Zeeb * @rtt_variance: The Variance of the RTT values measured for current AP 1506bfcc09ddSBjoern A. Zeeb * @rtt_spread: The Difference between the maximum and the minimum RTT 1507bfcc09ddSBjoern A. Zeeb * values measured for current AP in the current session [pSec] 1508bfcc09ddSBjoern A. Zeeb * @rssi: RSSI as uploaded in the Channel Estimation notification 1509bfcc09ddSBjoern A. Zeeb * @rssi_spread: The Difference between the maximum and the minimum RSSI values 1510bfcc09ddSBjoern A. Zeeb * measured for current AP in the current session 1511bfcc09ddSBjoern A. Zeeb * @last_burst: 1 if no more FTM sessions are scheduled for this responder 1512bfcc09ddSBjoern A. Zeeb * @refusal_period: refusal period in case of 1513bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec] 1514bfcc09ddSBjoern A. Zeeb * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was 1515bfcc09ddSBjoern A. Zeeb * uploaded by the LMAC 1516bfcc09ddSBjoern A. Zeeb * @start_tsf: measurement start time in TSF of the mac specified in the range 1517bfcc09ddSBjoern A. Zeeb * request 1518bfcc09ddSBjoern A. Zeeb * @rx_rate_n_flags: rate and flags of the last FTM frame received from this 1519bfcc09ddSBjoern A. Zeeb * responder 1520bfcc09ddSBjoern A. Zeeb * @tx_rate_n_flags: rate and flags of the last ack sent to this responder 1521bfcc09ddSBjoern A. Zeeb * @t2t3_initiator: as calculated from the algo in the initiator 1522bfcc09ddSBjoern A. Zeeb * @t1t4_responder: as calculated from the algo in the responder 1523bfcc09ddSBjoern A. Zeeb * @common_calib: Calib val that was used in for this AP measurement 1524bfcc09ddSBjoern A. Zeeb * @specific_calib: val that was used in for this AP measurement 1525bfcc09ddSBjoern A. Zeeb * @papd_calib_output: The result of the tof papd calibration that was injected 1526bfcc09ddSBjoern A. Zeeb * into the algorithm. 1527bfcc09ddSBjoern A. Zeeb */ 1528bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v4 { 1529bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 1530bfcc09ddSBjoern A. Zeeb u8 measure_status; 1531bfcc09ddSBjoern A. Zeeb u8 measure_bw; 1532bfcc09ddSBjoern A. Zeeb __le32 rtt; 1533bfcc09ddSBjoern A. Zeeb __le32 rtt_variance; 1534bfcc09ddSBjoern A. Zeeb __le32 rtt_spread; 1535bfcc09ddSBjoern A. Zeeb s8 rssi; 1536bfcc09ddSBjoern A. Zeeb u8 rssi_spread; 1537bfcc09ddSBjoern A. Zeeb u8 last_burst; 1538bfcc09ddSBjoern A. Zeeb u8 refusal_period; 1539bfcc09ddSBjoern A. Zeeb __le32 timestamp; 1540bfcc09ddSBjoern A. Zeeb __le32 start_tsf; 1541bfcc09ddSBjoern A. Zeeb __le32 rx_rate_n_flags; 1542bfcc09ddSBjoern A. Zeeb __le32 tx_rate_n_flags; 1543bfcc09ddSBjoern A. Zeeb __le32 t2t3_initiator; 1544bfcc09ddSBjoern A. Zeeb __le32 t1t4_responder; 1545bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1546bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1547bfcc09ddSBjoern A. Zeeb __le32 papd_calib_output; 1548bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_4 */ 1549bfcc09ddSBjoern A. Zeeb 1550bfcc09ddSBjoern A. Zeeb /** 1551bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ap_entry_ntfy_v5 - AP parameters (response) 1552bfcc09ddSBjoern A. Zeeb * @bssid: BSSID of the AP 1553bfcc09ddSBjoern A. Zeeb * @measure_status: current APs measurement status, one of 1554bfcc09ddSBjoern A. Zeeb * &enum iwl_tof_entry_status. 1555bfcc09ddSBjoern A. Zeeb * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz 1556bfcc09ddSBjoern A. Zeeb * @rtt: The Round Trip Time that took for the last measurement for 1557bfcc09ddSBjoern A. Zeeb * current AP [pSec] 1558bfcc09ddSBjoern A. Zeeb * @rtt_variance: The Variance of the RTT values measured for current AP 1559bfcc09ddSBjoern A. Zeeb * @rtt_spread: The Difference between the maximum and the minimum RTT 1560bfcc09ddSBjoern A. Zeeb * values measured for current AP in the current session [pSec] 1561bfcc09ddSBjoern A. Zeeb * @rssi: RSSI as uploaded in the Channel Estimation notification 1562bfcc09ddSBjoern A. Zeeb * @rssi_spread: The Difference between the maximum and the minimum RSSI values 1563bfcc09ddSBjoern A. Zeeb * measured for current AP in the current session 1564bfcc09ddSBjoern A. Zeeb * @last_burst: 1 if no more FTM sessions are scheduled for this responder 1565bfcc09ddSBjoern A. Zeeb * @refusal_period: refusal period in case of 1566bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec] 1567bfcc09ddSBjoern A. Zeeb * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was 1568bfcc09ddSBjoern A. Zeeb * uploaded by the LMAC 1569bfcc09ddSBjoern A. Zeeb * @start_tsf: measurement start time in TSF of the mac specified in the range 1570bfcc09ddSBjoern A. Zeeb * request 1571bfcc09ddSBjoern A. Zeeb * @rx_rate_n_flags: rate and flags of the last FTM frame received from this 1572bfcc09ddSBjoern A. Zeeb * responder 1573bfcc09ddSBjoern A. Zeeb * @tx_rate_n_flags: rate and flags of the last ack sent to this responder 1574bfcc09ddSBjoern A. Zeeb * @t2t3_initiator: as calculated from the algo in the initiator 1575bfcc09ddSBjoern A. Zeeb * @t1t4_responder: as calculated from the algo in the responder 1576bfcc09ddSBjoern A. Zeeb * @common_calib: Calib val that was used in for this AP measurement 1577bfcc09ddSBjoern A. Zeeb * @specific_calib: val that was used in for this AP measurement 1578bfcc09ddSBjoern A. Zeeb * @papd_calib_output: The result of the tof papd calibration that was injected 1579bfcc09ddSBjoern A. Zeeb * into the algorithm. 1580bfcc09ddSBjoern A. Zeeb * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy. 1581bfcc09ddSBjoern A. Zeeb * @reserved: for alignment 1582bfcc09ddSBjoern A. Zeeb */ 1583bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v5 { 1584bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 1585bfcc09ddSBjoern A. Zeeb u8 measure_status; 1586bfcc09ddSBjoern A. Zeeb u8 measure_bw; 1587bfcc09ddSBjoern A. Zeeb __le32 rtt; 1588bfcc09ddSBjoern A. Zeeb __le32 rtt_variance; 1589bfcc09ddSBjoern A. Zeeb __le32 rtt_spread; 1590bfcc09ddSBjoern A. Zeeb s8 rssi; 1591bfcc09ddSBjoern A. Zeeb u8 rssi_spread; 1592bfcc09ddSBjoern A. Zeeb u8 last_burst; 1593bfcc09ddSBjoern A. Zeeb u8 refusal_period; 1594bfcc09ddSBjoern A. Zeeb __le32 timestamp; 1595bfcc09ddSBjoern A. Zeeb __le32 start_tsf; 1596bfcc09ddSBjoern A. Zeeb __le32 rx_rate_n_flags; 1597bfcc09ddSBjoern A. Zeeb __le32 tx_rate_n_flags; 1598bfcc09ddSBjoern A. Zeeb __le32 t2t3_initiator; 1599bfcc09ddSBjoern A. Zeeb __le32 t1t4_responder; 1600bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1601bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1602bfcc09ddSBjoern A. Zeeb __le32 papd_calib_output; 1603bfcc09ddSBjoern A. Zeeb u8 rttConfidence; 1604bfcc09ddSBjoern A. Zeeb u8 reserved[3]; 1605bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */ 1606bfcc09ddSBjoern A. Zeeb 1607bfcc09ddSBjoern A. Zeeb /** 1608bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ap_entry_ntfy_v6 - AP parameters (response) 1609bfcc09ddSBjoern A. Zeeb * @bssid: BSSID of the AP 1610bfcc09ddSBjoern A. Zeeb * @measure_status: current APs measurement status, one of 1611bfcc09ddSBjoern A. Zeeb * &enum iwl_tof_entry_status. 1612bfcc09ddSBjoern A. Zeeb * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz 1613bfcc09ddSBjoern A. Zeeb * @rtt: The Round Trip Time that took for the last measurement for 1614bfcc09ddSBjoern A. Zeeb * current AP [pSec] 1615bfcc09ddSBjoern A. Zeeb * @rtt_variance: The Variance of the RTT values measured for current AP 1616bfcc09ddSBjoern A. Zeeb * @rtt_spread: The Difference between the maximum and the minimum RTT 1617bfcc09ddSBjoern A. Zeeb * values measured for current AP in the current session [pSec] 1618bfcc09ddSBjoern A. Zeeb * @rssi: RSSI as uploaded in the Channel Estimation notification 1619bfcc09ddSBjoern A. Zeeb * @rssi_spread: The Difference between the maximum and the minimum RSSI values 1620bfcc09ddSBjoern A. Zeeb * measured for current AP in the current session 1621bfcc09ddSBjoern A. Zeeb * @last_burst: 1 if no more FTM sessions are scheduled for this responder 1622bfcc09ddSBjoern A. Zeeb * @refusal_period: refusal period in case of 1623bfcc09ddSBjoern A. Zeeb * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec] 1624bfcc09ddSBjoern A. Zeeb * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was 1625bfcc09ddSBjoern A. Zeeb * uploaded by the LMAC 1626bfcc09ddSBjoern A. Zeeb * @start_tsf: measurement start time in TSF of the mac specified in the range 1627bfcc09ddSBjoern A. Zeeb * request 1628bfcc09ddSBjoern A. Zeeb * @rx_rate_n_flags: rate and flags of the last FTM frame received from this 1629bfcc09ddSBjoern A. Zeeb * responder 1630bfcc09ddSBjoern A. Zeeb * @tx_rate_n_flags: rate and flags of the last ack sent to this responder 1631bfcc09ddSBjoern A. Zeeb * @t2t3_initiator: as calculated from the algo in the initiator 1632bfcc09ddSBjoern A. Zeeb * @t1t4_responder: as calculated from the algo in the responder 1633bfcc09ddSBjoern A. Zeeb * @common_calib: Calib val that was used in for this AP measurement 1634bfcc09ddSBjoern A. Zeeb * @specific_calib: val that was used in for this AP measurement 1635bfcc09ddSBjoern A. Zeeb * @papd_calib_output: The result of the tof papd calibration that was injected 1636bfcc09ddSBjoern A. Zeeb * into the algorithm. 1637bfcc09ddSBjoern A. Zeeb * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy. 1638bfcc09ddSBjoern A. Zeeb * @reserved: for alignment 1639bfcc09ddSBjoern A. Zeeb * @rx_pn: the last PN used for this responder Rx in case PMF is configured in 1640bfcc09ddSBjoern A. Zeeb * LE byte order. 1641bfcc09ddSBjoern A. Zeeb * @tx_pn: the last PN used for this responder Tx in case PMF is configured in 1642bfcc09ddSBjoern A. Zeeb * LE byte order. 1643bfcc09ddSBjoern A. Zeeb */ 1644bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v6 { 1645bfcc09ddSBjoern A. Zeeb u8 bssid[ETH_ALEN]; 1646bfcc09ddSBjoern A. Zeeb u8 measure_status; 1647bfcc09ddSBjoern A. Zeeb u8 measure_bw; 1648bfcc09ddSBjoern A. Zeeb __le32 rtt; 1649bfcc09ddSBjoern A. Zeeb __le32 rtt_variance; 1650bfcc09ddSBjoern A. Zeeb __le32 rtt_spread; 1651bfcc09ddSBjoern A. Zeeb s8 rssi; 1652bfcc09ddSBjoern A. Zeeb u8 rssi_spread; 1653bfcc09ddSBjoern A. Zeeb u8 last_burst; 1654bfcc09ddSBjoern A. Zeeb u8 refusal_period; 1655bfcc09ddSBjoern A. Zeeb __le32 timestamp; 1656bfcc09ddSBjoern A. Zeeb __le32 start_tsf; 1657bfcc09ddSBjoern A. Zeeb __le32 rx_rate_n_flags; 1658bfcc09ddSBjoern A. Zeeb __le32 tx_rate_n_flags; 1659bfcc09ddSBjoern A. Zeeb __le32 t2t3_initiator; 1660bfcc09ddSBjoern A. Zeeb __le32 t1t4_responder; 1661bfcc09ddSBjoern A. Zeeb __le16 common_calib; 1662bfcc09ddSBjoern A. Zeeb __le16 specific_calib; 1663bfcc09ddSBjoern A. Zeeb __le32 papd_calib_output; 1664bfcc09ddSBjoern A. Zeeb u8 rttConfidence; 1665bfcc09ddSBjoern A. Zeeb u8 reserved[3]; 1666bfcc09ddSBjoern A. Zeeb u8 rx_pn[IEEE80211_CCMP_PN_LEN]; 1667bfcc09ddSBjoern A. Zeeb u8 tx_pn[IEEE80211_CCMP_PN_LEN]; 1668bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_6, 1669bfcc09ddSBjoern A. Zeeb LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_7 */ 1670bfcc09ddSBjoern A. Zeeb 1671bfcc09ddSBjoern A. Zeeb 1672bfcc09ddSBjoern A. Zeeb /** 1673bfcc09ddSBjoern A. Zeeb * enum iwl_tof_response_status - tof response status 1674bfcc09ddSBjoern A. Zeeb * 1675bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONSE_SUCCESS: successful range. 1676bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONSE_TIMEOUT: request aborted due to timeout expiration. 1677bfcc09ddSBjoern A. Zeeb * partial result of ranges done so far is included in the response. 1678bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONSE_ABORTED: Measurement aborted by command. 1679bfcc09ddSBjoern A. Zeeb * @IWL_TOF_RESPONSE_FAILED: Measurement request command failed. 1680bfcc09ddSBjoern A. Zeeb */ 1681bfcc09ddSBjoern A. Zeeb enum iwl_tof_response_status { 1682bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONSE_SUCCESS = 0, 1683bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONSE_TIMEOUT = 1, 1684bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONSE_ABORTED = 4, 1685bfcc09ddSBjoern A. Zeeb IWL_TOF_RESPONSE_FAILED = 5, 1686bfcc09ddSBjoern A. Zeeb }; /* LOCATION_RNG_RSP_STATUS */ 1687bfcc09ddSBjoern A. Zeeb 1688bfcc09ddSBjoern A. Zeeb /** 1689bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ntfy_v5 - ranging response notification 1690bfcc09ddSBjoern A. Zeeb * @request_id: A Token ID of the corresponding Range request 1691bfcc09ddSBjoern A. Zeeb * @request_status: status of current measurement session, one of 1692bfcc09ddSBjoern A. Zeeb * &enum iwl_tof_response_status. 1693bfcc09ddSBjoern A. Zeeb * @last_in_batch: reprot policy (when not all responses are uploaded at once) 1694bfcc09ddSBjoern A. Zeeb * @num_of_aps: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS) 1695bfcc09ddSBjoern A. Zeeb * @ap: per-AP data 1696bfcc09ddSBjoern A. Zeeb */ 1697bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ntfy_v5 { 1698bfcc09ddSBjoern A. Zeeb u8 request_id; 1699bfcc09ddSBjoern A. Zeeb u8 request_status; 1700bfcc09ddSBjoern A. Zeeb u8 last_in_batch; 1701bfcc09ddSBjoern A. Zeeb u8 num_of_aps; 1702bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v3 ap[IWL_MVM_TOF_MAX_APS]; 1703bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_5 */ 1704bfcc09ddSBjoern A. Zeeb 1705bfcc09ddSBjoern A. Zeeb /** 1706bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ntfy_v6 - ranging response notification 1707bfcc09ddSBjoern A. Zeeb * @request_id: A Token ID of the corresponding Range request 1708bfcc09ddSBjoern A. Zeeb * @num_of_aps: Number of APs results 1709bfcc09ddSBjoern A. Zeeb * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise. 1710bfcc09ddSBjoern A. Zeeb * @reserved: reserved 1711bfcc09ddSBjoern A. Zeeb * @ap: per-AP data 1712bfcc09ddSBjoern A. Zeeb */ 1713bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ntfy_v6 { 1714bfcc09ddSBjoern A. Zeeb u8 request_id; 1715bfcc09ddSBjoern A. Zeeb u8 num_of_aps; 1716bfcc09ddSBjoern A. Zeeb u8 last_report; 1717bfcc09ddSBjoern A. Zeeb u8 reserved; 1718bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v4 ap[IWL_MVM_TOF_MAX_APS]; 1719bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */ 1720bfcc09ddSBjoern A. Zeeb 1721bfcc09ddSBjoern A. Zeeb /** 1722bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ntfy_v7 - ranging response notification 1723bfcc09ddSBjoern A. Zeeb * @request_id: A Token ID of the corresponding Range request 1724bfcc09ddSBjoern A. Zeeb * @num_of_aps: Number of APs results 1725bfcc09ddSBjoern A. Zeeb * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise. 1726bfcc09ddSBjoern A. Zeeb * @reserved: reserved 1727bfcc09ddSBjoern A. Zeeb * @ap: per-AP data 1728bfcc09ddSBjoern A. Zeeb */ 1729bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ntfy_v7 { 1730bfcc09ddSBjoern A. Zeeb u8 request_id; 1731bfcc09ddSBjoern A. Zeeb u8 num_of_aps; 1732bfcc09ddSBjoern A. Zeeb u8 last_report; 1733bfcc09ddSBjoern A. Zeeb u8 reserved; 1734bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v5 ap[IWL_MVM_TOF_MAX_APS]; 1735bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */ 1736bfcc09ddSBjoern A. Zeeb 1737bfcc09ddSBjoern A. Zeeb /** 1738bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_rsp_ntfy_v8 - ranging response notification 1739bfcc09ddSBjoern A. Zeeb * @request_id: A Token ID of the corresponding Range request 1740bfcc09ddSBjoern A. Zeeb * @num_of_aps: Number of APs results 1741bfcc09ddSBjoern A. Zeeb * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise. 1742bfcc09ddSBjoern A. Zeeb * @reserved: reserved 1743bfcc09ddSBjoern A. Zeeb * @ap: per-AP data 1744bfcc09ddSBjoern A. Zeeb */ 1745bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ntfy_v8 { 1746bfcc09ddSBjoern A. Zeeb u8 request_id; 1747bfcc09ddSBjoern A. Zeeb u8 num_of_aps; 1748bfcc09ddSBjoern A. Zeeb u8 last_report; 1749bfcc09ddSBjoern A. Zeeb u8 reserved; 1750bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_rsp_ap_entry_ntfy_v6 ap[IWL_MVM_TOF_MAX_APS]; 1751bfcc09ddSBjoern A. Zeeb } __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8, 1752bfcc09ddSBjoern A. Zeeb LOCATION_RANGE_RSP_NTFY_API_S_VER_9 */ 1753bfcc09ddSBjoern A. Zeeb 1754bfcc09ddSBjoern A. Zeeb #define IWL_MVM_TOF_MCSI_BUF_SIZE (245) 1755bfcc09ddSBjoern A. Zeeb /** 1756bfcc09ddSBjoern A. Zeeb * struct iwl_tof_mcsi_notif - used for debug 1757bfcc09ddSBjoern A. Zeeb * @token: token ID for the current session 1758bfcc09ddSBjoern A. Zeeb * @role: '0' - initiator, '1' - responder 1759bfcc09ddSBjoern A. Zeeb * @reserved: reserved 1760bfcc09ddSBjoern A. Zeeb * @initiator_bssid: initiator machine 1761bfcc09ddSBjoern A. Zeeb * @responder_bssid: responder machine 1762bfcc09ddSBjoern A. Zeeb * @mcsi_buffer: debug data 1763bfcc09ddSBjoern A. Zeeb */ 1764bfcc09ddSBjoern A. Zeeb struct iwl_tof_mcsi_notif { 1765bfcc09ddSBjoern A. Zeeb u8 token; 1766bfcc09ddSBjoern A. Zeeb u8 role; 1767bfcc09ddSBjoern A. Zeeb __le16 reserved; 1768bfcc09ddSBjoern A. Zeeb u8 initiator_bssid[ETH_ALEN]; 1769bfcc09ddSBjoern A. Zeeb u8 responder_bssid[ETH_ALEN]; 1770bfcc09ddSBjoern A. Zeeb u8 mcsi_buffer[IWL_MVM_TOF_MCSI_BUF_SIZE * 4]; 1771bfcc09ddSBjoern A. Zeeb } __packed; 1772bfcc09ddSBjoern A. Zeeb 1773bfcc09ddSBjoern A. Zeeb /** 1774bfcc09ddSBjoern A. Zeeb * struct iwl_tof_range_abort_cmd 1775bfcc09ddSBjoern A. Zeeb * @request_id: corresponds to a range request 1776bfcc09ddSBjoern A. Zeeb * @reserved: reserved 1777bfcc09ddSBjoern A. Zeeb */ 1778bfcc09ddSBjoern A. Zeeb struct iwl_tof_range_abort_cmd { 1779bfcc09ddSBjoern A. Zeeb u8 request_id; 1780bfcc09ddSBjoern A. Zeeb u8 reserved[3]; 1781bfcc09ddSBjoern A. Zeeb } __packed; 1782bfcc09ddSBjoern A. Zeeb 1783bfcc09ddSBjoern A. Zeeb enum ftm_responder_stats_flags { 1784bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_NON_ASAP_STARTED = BIT(0), 1785bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_NON_ASAP_IN_WIN = BIT(1), 1786bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_NON_ASAP_OUT_WIN = BIT(2), 1787bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_TRIGGER_DUP = BIT(3), 1788bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_DUP = BIT(4), 1789bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_DUP_IN_WIN = BIT(5), 1790bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_DUP_OUT_WIN = BIT(6), 1791bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_SCHED_SUCCESS = BIT(7), 1792bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_ASAP_REQ = BIT(8), 1793bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_NON_ASAP_REQ = BIT(9), 1794bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_ASAP_RESP = BIT(10), 1795bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_NON_ASAP_RESP = BIT(11), 1796bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_FAIL_INITIATOR_INACTIVE = BIT(12), 1797bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_FAIL_INITIATOR_OUT_WIN = BIT(13), 1798bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_FAIL_INITIATOR_RETRY_LIM = BIT(14), 1799bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_FAIL_NEXT_SERVED = BIT(15), 1800bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_FAIL_TRIGGER_ERR = BIT(16), 1801bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_FAIL_GC = BIT(17), 1802bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_SUCCESS = BIT(18), 1803bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_INTEL_IE = BIT(19), 1804bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_INITIATOR_ACTIVE = BIT(20), 1805bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_MEASUREMENTS_AVAILABLE = BIT(21), 1806bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_TRIGGER_UNKNOWN = BIT(22), 1807bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_PROCESS_FAIL = BIT(23), 1808bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_ACK = BIT(24), 1809bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_NACK = BIT(25), 1810bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_INVALID_INITIATOR_ID = BIT(26), 1811bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_TIMER_MIN_DELTA = BIT(27), 1812bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_INITIATOR_REMOVED = BIT(28), 1813bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_INITIATOR_ADDED = BIT(29), 1814bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_ERR_LIST_FULL = BIT(30), 1815bfcc09ddSBjoern A. Zeeb FTM_RESP_STAT_INITIATOR_SCHED_NOW = BIT(31), 1816bfcc09ddSBjoern A. Zeeb }; /* RESP_IND_E */ 1817bfcc09ddSBjoern A. Zeeb 1818bfcc09ddSBjoern A. Zeeb /** 1819bfcc09ddSBjoern A. Zeeb * struct iwl_ftm_responder_stats - FTM responder statistics 1820bfcc09ddSBjoern A. Zeeb * @addr: initiator address 1821bfcc09ddSBjoern A. Zeeb * @success_ftm: number of successful ftm frames 1822bfcc09ddSBjoern A. Zeeb * @ftm_per_burst: num of FTM frames that were received 1823bfcc09ddSBjoern A. Zeeb * @flags: &enum ftm_responder_stats_flags 1824bfcc09ddSBjoern A. Zeeb * @duration: actual duration of FTM 1825bfcc09ddSBjoern A. Zeeb * @allocated_duration: time that was allocated for this FTM session 1826bfcc09ddSBjoern A. Zeeb * @bw: FTM request bandwidth 1827bfcc09ddSBjoern A. Zeeb * @rate: FTM request rate 1828bfcc09ddSBjoern A. Zeeb * @reserved: for alingment and future use 1829bfcc09ddSBjoern A. Zeeb */ 1830bfcc09ddSBjoern A. Zeeb struct iwl_ftm_responder_stats { 1831bfcc09ddSBjoern A. Zeeb u8 addr[ETH_ALEN]; 1832bfcc09ddSBjoern A. Zeeb u8 success_ftm; 1833bfcc09ddSBjoern A. Zeeb u8 ftm_per_burst; 1834bfcc09ddSBjoern A. Zeeb __le32 flags; 1835bfcc09ddSBjoern A. Zeeb __le32 duration; 1836bfcc09ddSBjoern A. Zeeb __le32 allocated_duration; 1837bfcc09ddSBjoern A. Zeeb u8 bw; 1838bfcc09ddSBjoern A. Zeeb u8 rate; 1839bfcc09ddSBjoern A. Zeeb __le16 reserved; 1840bfcc09ddSBjoern A. Zeeb } __packed; /* TOF_RESPONDER_STATISTICS_NTFY_S_VER_2 */ 1841bfcc09ddSBjoern A. Zeeb 1842bfcc09ddSBjoern A. Zeeb #define IWL_CSI_MAX_EXPECTED_CHUNKS 16 1843bfcc09ddSBjoern A. Zeeb 1844bfcc09ddSBjoern A. Zeeb #define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_1 0x0003 1845bfcc09ddSBjoern A. Zeeb #define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_1 0x000c 1846bfcc09ddSBjoern A. Zeeb 1847bfcc09ddSBjoern A. Zeeb #define IWL_CSI_CHUNK_CTL_NUM_MASK_VER_2 0x00ff 1848bfcc09ddSBjoern A. Zeeb #define IWL_CSI_CHUNK_CTL_IDX_MASK_VER_2 0xff00 1849bfcc09ddSBjoern A. Zeeb 1850bfcc09ddSBjoern A. Zeeb struct iwl_csi_chunk_notification { 1851bfcc09ddSBjoern A. Zeeb __le32 token; 1852bfcc09ddSBjoern A. Zeeb __le16 seq; 1853bfcc09ddSBjoern A. Zeeb __le16 ctl; 1854bfcc09ddSBjoern A. Zeeb __le32 size; 1855bfcc09ddSBjoern A. Zeeb u8 data[]; 1856bfcc09ddSBjoern A. Zeeb } __packed; /* CSI_CHUNKS_HDR_NTFY_API_S_VER_1/VER_2 */ 1857bfcc09ddSBjoern A. Zeeb 1858bfcc09ddSBjoern A. Zeeb #endif /* __iwl_fw_api_location_h__ */ 1859