1 /* 2 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #ifndef _RX_LOCATION_INFO_H_ 18 #define _RX_LOCATION_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_RX_LOCATION_INFO 28 23 24 25 struct rx_location_info { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t rx_location_info_valid : 1, // [0:0] 28 rtt_hw_ifft_mode : 1, // [1:1] 29 rtt_11az_mode : 2, // [3:2] 30 reserved_0 : 4, // [7:4] 31 rtt_num_fac : 8, // [15:8] 32 rtt_rx_chain_mask : 8, // [23:16] 33 rtt_num_streams : 8; // [31:24] 34 uint32_t rtt_first_selected_chain : 8, // [7:0] 35 rtt_second_selected_chain : 8, // [15:8] 36 rtt_cfr_status : 8, // [23:16] 37 rtt_cir_status : 8; // [31:24] 38 uint32_t rtt_che_buffer_pointer_low32 : 32; // [31:0] 39 uint32_t rtt_che_buffer_pointer_high8 : 8, // [7:0] 40 reserved_3 : 8, // [15:8] 41 rtt_pkt_bw_vht : 4, // [19:16] 42 rtt_pkt_bw_leg : 4, // [23:20] 43 rtt_mcs_rate : 8; // [31:24] 44 uint32_t rtt_cfo_measurement : 16, // [15:0] 45 rtt_preamble_type : 8, // [23:16] 46 rtt_gi_type : 8; // [31:24] 47 uint32_t rx_start_ts : 32; // [31:0] 48 uint32_t rx_start_ts_upper : 32; // [31:0] 49 uint32_t rx_end_ts : 32; // [31:0] 50 uint32_t gain_chain0 : 16, // [15:0] 51 gain_chain1 : 16; // [31:16] 52 uint32_t gain_chain2 : 16, // [15:0] 53 gain_chain3 : 16; // [31:16] 54 uint32_t gain_report_status : 8, // [7:0] 55 rtt_timing_backoff_sel : 8, // [15:8] 56 rtt_fac_combined : 16; // [31:16] 57 uint32_t rtt_fac_0 : 16, // [15:0] 58 rtt_fac_1 : 16; // [31:16] 59 uint32_t rtt_fac_2 : 16, // [15:0] 60 rtt_fac_3 : 16; // [31:16] 61 uint32_t rtt_fac_4 : 16, // [15:0] 62 rtt_fac_5 : 16; // [31:16] 63 uint32_t rtt_fac_6 : 16, // [15:0] 64 rtt_fac_7 : 16; // [31:16] 65 uint32_t rtt_fac_8 : 16, // [15:0] 66 rtt_fac_9 : 16; // [31:16] 67 uint32_t rtt_fac_10 : 16, // [15:0] 68 rtt_fac_11 : 16; // [31:16] 69 uint32_t rtt_fac_12 : 16, // [15:0] 70 rtt_fac_13 : 16; // [31:16] 71 uint32_t rtt_fac_14 : 16, // [15:0] 72 rtt_fac_15 : 16; // [31:16] 73 uint32_t rtt_fac_16 : 16, // [15:0] 74 rtt_fac_17 : 16; // [31:16] 75 uint32_t rtt_fac_18 : 16, // [15:0] 76 rtt_fac_19 : 16; // [31:16] 77 uint32_t rtt_fac_20 : 16, // [15:0] 78 rtt_fac_21 : 16; // [31:16] 79 uint32_t rtt_fac_22 : 16, // [15:0] 80 rtt_fac_23 : 16; // [31:16] 81 uint32_t rtt_fac_24 : 16, // [15:0] 82 rtt_fac_25 : 16; // [31:16] 83 uint32_t rtt_fac_26 : 16, // [15:0] 84 rtt_fac_27 : 16; // [31:16] 85 uint32_t rtt_fac_28 : 16, // [15:0] 86 rtt_fac_29 : 16; // [31:16] 87 uint32_t rtt_fac_30 : 16, // [15:0] 88 rtt_fac_31 : 16; // [31:16] 89 uint32_t reserved_27a : 32; // [31:0] 90 #else 91 uint32_t rtt_num_streams : 8, // [31:24] 92 rtt_rx_chain_mask : 8, // [23:16] 93 rtt_num_fac : 8, // [15:8] 94 reserved_0 : 4, // [7:4] 95 rtt_11az_mode : 2, // [3:2] 96 rtt_hw_ifft_mode : 1, // [1:1] 97 rx_location_info_valid : 1; // [0:0] 98 uint32_t rtt_cir_status : 8, // [31:24] 99 rtt_cfr_status : 8, // [23:16] 100 rtt_second_selected_chain : 8, // [15:8] 101 rtt_first_selected_chain : 8; // [7:0] 102 uint32_t rtt_che_buffer_pointer_low32 : 32; // [31:0] 103 uint32_t rtt_mcs_rate : 8, // [31:24] 104 rtt_pkt_bw_leg : 4, // [23:20] 105 rtt_pkt_bw_vht : 4, // [19:16] 106 reserved_3 : 8, // [15:8] 107 rtt_che_buffer_pointer_high8 : 8; // [7:0] 108 uint32_t rtt_gi_type : 8, // [31:24] 109 rtt_preamble_type : 8, // [23:16] 110 rtt_cfo_measurement : 16; // [15:0] 111 uint32_t rx_start_ts : 32; // [31:0] 112 uint32_t rx_start_ts_upper : 32; // [31:0] 113 uint32_t rx_end_ts : 32; // [31:0] 114 uint32_t gain_chain1 : 16, // [31:16] 115 gain_chain0 : 16; // [15:0] 116 uint32_t gain_chain3 : 16, // [31:16] 117 gain_chain2 : 16; // [15:0] 118 uint32_t rtt_fac_combined : 16, // [31:16] 119 rtt_timing_backoff_sel : 8, // [15:8] 120 gain_report_status : 8; // [7:0] 121 uint32_t rtt_fac_1 : 16, // [31:16] 122 rtt_fac_0 : 16; // [15:0] 123 uint32_t rtt_fac_3 : 16, // [31:16] 124 rtt_fac_2 : 16; // [15:0] 125 uint32_t rtt_fac_5 : 16, // [31:16] 126 rtt_fac_4 : 16; // [15:0] 127 uint32_t rtt_fac_7 : 16, // [31:16] 128 rtt_fac_6 : 16; // [15:0] 129 uint32_t rtt_fac_9 : 16, // [31:16] 130 rtt_fac_8 : 16; // [15:0] 131 uint32_t rtt_fac_11 : 16, // [31:16] 132 rtt_fac_10 : 16; // [15:0] 133 uint32_t rtt_fac_13 : 16, // [31:16] 134 rtt_fac_12 : 16; // [15:0] 135 uint32_t rtt_fac_15 : 16, // [31:16] 136 rtt_fac_14 : 16; // [15:0] 137 uint32_t rtt_fac_17 : 16, // [31:16] 138 rtt_fac_16 : 16; // [15:0] 139 uint32_t rtt_fac_19 : 16, // [31:16] 140 rtt_fac_18 : 16; // [15:0] 141 uint32_t rtt_fac_21 : 16, // [31:16] 142 rtt_fac_20 : 16; // [15:0] 143 uint32_t rtt_fac_23 : 16, // [31:16] 144 rtt_fac_22 : 16; // [15:0] 145 uint32_t rtt_fac_25 : 16, // [31:16] 146 rtt_fac_24 : 16; // [15:0] 147 uint32_t rtt_fac_27 : 16, // [31:16] 148 rtt_fac_26 : 16; // [15:0] 149 uint32_t rtt_fac_29 : 16, // [31:16] 150 rtt_fac_28 : 16; // [15:0] 151 uint32_t rtt_fac_31 : 16, // [31:16] 152 rtt_fac_30 : 16; // [15:0] 153 uint32_t reserved_27a : 32; // [31:0] 154 #endif 155 }; 156 157 158 /* Description RX_LOCATION_INFO_VALID 159 160 <enum 0 rx_location_info_is_not_valid> 161 <enum 1 rx_location_info_is_valid> 162 <legal all> 163 */ 164 165 #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_OFFSET 0x00000000 166 #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_LSB 0 167 #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_MSB 0 168 #define RX_LOCATION_INFO_RX_LOCATION_INFO_VALID_MASK 0x00000001 169 170 171 /* Description RTT_HW_IFFT_MODE 172 173 Indicator showing if HW IFFT mode or SW IFFT mode 174 175 <enum 0 location_sw_ifft_mode> 176 <enum 1 location_hw_ifft_mode> 177 <legal all> 178 */ 179 180 #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_OFFSET 0x00000000 181 #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_LSB 1 182 #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_MSB 1 183 #define RX_LOCATION_INFO_RTT_HW_IFFT_MODE_MASK 0x00000002 184 185 186 /* Description RTT_11AZ_MODE 187 188 Indicator showing RTT5/.11mc or .11az mode for debug 189 190 <enum 0 location_rtt5_mode> legacy RTT5/.11mc mode 191 <enum 1 location_11az_ISTA> .11az ISTA location info. sent 192 on Rx path after receiving R2I LMR 193 <enum 2 location_RSVD> 194 <enum 3 location_11az_RSTA> .11az RSTA location info. sent 195 on Tx path after transmitting R2I LMR 196 <legal all> 197 */ 198 199 #define RX_LOCATION_INFO_RTT_11AZ_MODE_OFFSET 0x00000000 200 #define RX_LOCATION_INFO_RTT_11AZ_MODE_LSB 2 201 #define RX_LOCATION_INFO_RTT_11AZ_MODE_MSB 3 202 #define RX_LOCATION_INFO_RTT_11AZ_MODE_MASK 0x0000000c 203 204 205 /* Description RESERVED_0 206 207 <legal 0> 208 */ 209 210 #define RX_LOCATION_INFO_RESERVED_0_OFFSET 0x00000000 211 #define RX_LOCATION_INFO_RESERVED_0_LSB 4 212 #define RX_LOCATION_INFO_RESERVED_0_MSB 7 213 #define RX_LOCATION_INFO_RESERVED_0_MASK 0x000000f0 214 215 216 /* Description RTT_NUM_FAC 217 218 Number of valid first arrival correction (FAC) values (in 219 fields rtt_fac_0 - rtt_fac_31) 220 <legal 0-32> 221 */ 222 223 #define RX_LOCATION_INFO_RTT_NUM_FAC_OFFSET 0x00000000 224 #define RX_LOCATION_INFO_RTT_NUM_FAC_LSB 8 225 #define RX_LOCATION_INFO_RTT_NUM_FAC_MSB 15 226 #define RX_LOCATION_INFO_RTT_NUM_FAC_MASK 0x0000ff00 227 228 229 /* Description RTT_RX_CHAIN_MASK 230 231 Rx chain mask, each bit is a Rx chain 232 0: the Rx chain is not used 233 1: the Rx chain is used 234 235 Up to 4 Rx chains are supported. 236 237 <legal all> 238 */ 239 240 #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_OFFSET 0x00000000 241 #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_LSB 16 242 #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_MSB 23 243 #define RX_LOCATION_INFO_RTT_RX_CHAIN_MASK_MASK 0x00ff0000 244 245 246 /* Description RTT_NUM_STREAMS 247 248 Number of streams used 249 250 Up to 8 streams are supported. 251 252 <legal 0-8> 253 */ 254 255 #define RX_LOCATION_INFO_RTT_NUM_STREAMS_OFFSET 0x00000000 256 #define RX_LOCATION_INFO_RTT_NUM_STREAMS_LSB 24 257 #define RX_LOCATION_INFO_RTT_NUM_STREAMS_MSB 31 258 #define RX_LOCATION_INFO_RTT_NUM_STREAMS_MASK 0xff000000 259 260 261 /* Description RTT_FIRST_SELECTED_CHAIN 262 263 For legacy RTT5/.11mc mode, this field shows the first selected 264 Rx chain that is used for FAC calculations, when forced 265 by a virtual register. 266 267 <enum 0 location_selected_chain_is_0> 268 <enum 1 location_selected_chain_is_1> 269 <enum 2 location_selected_chain_is_2> 270 <enum 3 location_selected_chain_is_3> 271 <legal 0-3> 272 */ 273 274 #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_OFFSET 0x00000004 275 #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_LSB 0 276 #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_MSB 7 277 #define RX_LOCATION_INFO_RTT_FIRST_SELECTED_CHAIN_MASK 0x000000ff 278 279 280 /* Description RTT_SECOND_SELECTED_CHAIN 281 282 For legacy RTT5/.11mc mode, this field shows the second 283 selected Rx chain that is used for FAC calculations, when 284 forced by a virtual register. 285 286 <enum 0 location_selected_chain_is_0> 287 <enum 1 location_selected_chain_is_1> 288 <enum 2 location_selected_chain_is_2> 289 <enum 3 location_selected_chain_is_3> 290 <legal 0-3> 291 */ 292 293 #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_OFFSET 0x00000004 294 #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_LSB 8 295 #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_MSB 15 296 #define RX_LOCATION_INFO_RTT_SECOND_SELECTED_CHAIN_MASK 0x0000ff00 297 298 299 /* Description RTT_CFR_STATUS 300 301 Status of channel frequency response dump 302 303 <enum 0 location_CFR_dump_not_valid> 304 <enum 1 location_CFR_dump_valid> 305 <legal 0-1> 306 */ 307 308 #define RX_LOCATION_INFO_RTT_CFR_STATUS_OFFSET 0x00000004 309 #define RX_LOCATION_INFO_RTT_CFR_STATUS_LSB 16 310 #define RX_LOCATION_INFO_RTT_CFR_STATUS_MSB 23 311 #define RX_LOCATION_INFO_RTT_CFR_STATUS_MASK 0x00ff0000 312 313 314 /* Description RTT_CIR_STATUS 315 316 Status of channel impulse response dump 317 318 <enum 0 location_CIR_dump_not_valid> 319 <enum 1 location_CIR_dump_valid> 320 <legal 0-1> 321 */ 322 323 #define RX_LOCATION_INFO_RTT_CIR_STATUS_OFFSET 0x00000004 324 #define RX_LOCATION_INFO_RTT_CIR_STATUS_LSB 24 325 #define RX_LOCATION_INFO_RTT_CIR_STATUS_MSB 31 326 #define RX_LOCATION_INFO_RTT_CIR_STATUS_MASK 0xff000000 327 328 329 /* Description RTT_CHE_BUFFER_POINTER_LOW32 330 331 The low 32 bits of the 40 bits pointer pointed to the external 332 RTT channel information buffer 333 <legal all> 334 */ 335 336 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_OFFSET 0x00000008 337 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_LSB 0 338 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_MSB 31 339 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_LOW32_MASK 0xffffffff 340 341 342 /* Description RTT_CHE_BUFFER_POINTER_HIGH8 343 344 The high 8 bits of the 40 bits pointer pointed to the external 345 RTT channel information buffer 346 <legal all> 347 */ 348 349 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_OFFSET 0x0000000c 350 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_LSB 0 351 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_MSB 7 352 #define RX_LOCATION_INFO_RTT_CHE_BUFFER_POINTER_HIGH8_MASK 0x000000ff 353 354 355 /* Description RESERVED_3 356 357 <legal 0> 358 */ 359 360 #define RX_LOCATION_INFO_RESERVED_3_OFFSET 0x0000000c 361 #define RX_LOCATION_INFO_RESERVED_3_LSB 8 362 #define RX_LOCATION_INFO_RESERVED_3_MSB 15 363 #define RX_LOCATION_INFO_RESERVED_3_MASK 0x0000ff00 364 365 366 /* Description RTT_PKT_BW_VHT 367 368 Indicate the bandwidth of (V)HT/HE-LTF 369 370 <enum 0 location_pkt_bw_20MHz> 371 <enum 1 location_pkt_bw_40MHz> 372 <enum 2 location_pkt_bw_80MHz> 373 <enum 3 location_pkt_bw_160MHz> 374 <enum 4 location_pkt_bw_240MHz> Only valid for CFR, FAC 375 calculations are not PoR for 240 MHz. 376 <enum 5 location_pkt_bw_320MHz> Only valid for CFR, FAC 377 calculations are not PoR for 320 MHz. 378 <legal 0-5> 379 */ 380 381 #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_OFFSET 0x0000000c 382 #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_LSB 16 383 #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_MSB 19 384 #define RX_LOCATION_INFO_RTT_PKT_BW_VHT_MASK 0x000f0000 385 386 387 /* Description RTT_PKT_BW_LEG 388 389 Indicate the bandwidth of L-LTF 390 391 <enum 0 location_pkt_bw_20MHz> 392 <enum 1 location_pkt_bw_40MHz> 393 <enum 2 location_pkt_bw_80MHz> 394 <enum 3 location_pkt_bw_160MHz> 395 <enum 4 location_pkt_bw_240MHz> Only valid for CFR, FAC 396 calculations are not PoR for 240 MHz. 397 <enum 5 location_pkt_bw_320MHz> Only valid for CFR, FAC 398 calculations are not PoR for 320 MHz. 399 <legal 0-5> 400 */ 401 402 #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_OFFSET 0x0000000c 403 #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_LSB 20 404 #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_MSB 23 405 #define RX_LOCATION_INFO_RTT_PKT_BW_LEG_MASK 0x00f00000 406 407 408 /* Description RTT_MCS_RATE 409 410 Bits 0~4 indicate MCS rate, if Legacy, 411 0: 48 Mbps, 412 1: 24 Mbps, 413 2: 12 Mbps, 414 3: 6 Mbps, 415 4: 54 Mbps, 416 5: 36 Mbps, 417 6: 18 Mbps, 418 7: 9 Mbps, 419 8-15: reserved 420 421 if HT, 0-7: MCS0-MCS7, 8-15: reserved, 422 if VHT, 0-9: MCS0-MCS9, 10-15: reserved, 423 if HE or EHT, 0-11: MCS0-MCS11, 12-13: 4096QAM, 14-15: reserved 424 425 <legal all> 426 */ 427 428 #define RX_LOCATION_INFO_RTT_MCS_RATE_OFFSET 0x0000000c 429 #define RX_LOCATION_INFO_RTT_MCS_RATE_LSB 24 430 #define RX_LOCATION_INFO_RTT_MCS_RATE_MSB 31 431 #define RX_LOCATION_INFO_RTT_MCS_RATE_MASK 0xff000000 432 433 434 /* Description RTT_CFO_MEASUREMENT 435 436 CFO measurement. Needed for passive locationing 437 438 14 bits, signed 1.13. 13 bits fraction to provide a resolution 439 of 153 Hz 440 441 In units of cycles/800 ns 442 <legal 0-16383> 443 */ 444 445 #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_OFFSET 0x00000010 446 #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_LSB 0 447 #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_MSB 15 448 #define RX_LOCATION_INFO_RTT_CFO_MEASUREMENT_MASK 0x0000ffff 449 450 451 /* Description RTT_PREAMBLE_TYPE 452 453 Indicate preamble type 454 455 <enum 0 location_preamble_type_legacy> 456 <enum 1 location_preamble_type_ht> 457 <enum 2 location_preamble_type_vht> 458 <enum 3 location_preamble_type_he_su_4xltf> 459 <enum 4 location_preamble_type_he_su_2xltf> 460 <enum 5 location_preamble_type_he_su_1xltf> 461 <enum 6 location_preamble_type_he_trigger_based_ul_4xltf> 462 463 <enum 7 location_preamble_type_he_trigger_based_ul_2xltf> 464 465 <enum 8 location_preamble_type_he_trigger_based_ul_1xltf> 466 467 <enum 9 location_preamble_type_he_mu_4xltf> 468 <enum 10 location_preamble_type_he_mu_2xltf> 469 <enum 11 location_preamble_type_he_mu_1xltf> 470 <enum 12 location_preamble_type_he_extended_range_su_4xltf> 471 472 <enum 13 location_preamble_type_he_extended_range_su_2xltf> 473 474 <enum 14 location_preamble_type_he_extended_range_su_1xltf> 475 476 <legal 0-14> 477 */ 478 479 #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_OFFSET 0x00000010 480 #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_LSB 16 481 #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_MSB 23 482 #define RX_LOCATION_INFO_RTT_PREAMBLE_TYPE_MASK 0x00ff0000 483 484 485 /* Description RTT_GI_TYPE 486 487 Indicate GI (guard interval) type 488 489 <enum 0 location_gi_0_8_us > HE related GI. Can also be 490 used for HE 491 <enum 1 location_gi_0_4_us > HE related GI. Can also be 492 used for HE 493 <enum 2 location_gi_1_6_us > HE related GI 494 <enum 3 location_gi_3_2_us > HE related GI 495 <legal 0 - 3> 496 */ 497 498 #define RX_LOCATION_INFO_RTT_GI_TYPE_OFFSET 0x00000010 499 #define RX_LOCATION_INFO_RTT_GI_TYPE_LSB 24 500 #define RX_LOCATION_INFO_RTT_GI_TYPE_MSB 31 501 #define RX_LOCATION_INFO_RTT_GI_TYPE_MASK 0xff000000 502 503 504 /* Description RX_START_TS 505 506 RX packet start timestamp lower 32 bits 507 508 It reports the time the first L-STF ADC sample arrived at 509 RX antenna. 510 511 The clock unit is 960MHz. 512 <legal all> 513 */ 514 515 #define RX_LOCATION_INFO_RX_START_TS_OFFSET 0x00000014 516 #define RX_LOCATION_INFO_RX_START_TS_LSB 0 517 #define RX_LOCATION_INFO_RX_START_TS_MSB 31 518 #define RX_LOCATION_INFO_RX_START_TS_MASK 0xffffffff 519 520 521 /* Description RX_START_TS_UPPER 522 523 RX packet start timestamp upper 32 bits 524 525 It reports the time the first L-STF ADC sample arrived at 526 RX antenna. 527 528 The clock unit is 960MHz. 529 <legal all> 530 */ 531 532 #define RX_LOCATION_INFO_RX_START_TS_UPPER_OFFSET 0x00000018 533 #define RX_LOCATION_INFO_RX_START_TS_UPPER_LSB 0 534 #define RX_LOCATION_INFO_RX_START_TS_UPPER_MSB 31 535 #define RX_LOCATION_INFO_RX_START_TS_UPPER_MASK 0xffffffff 536 537 538 /* Description RX_END_TS 539 540 RX packet end timestamp lower 32 bits 541 542 It reports the time the last symbol's last ADC sample arrived 543 at RX antenna. 544 545 The clock unit is 960MHz. Only 32 bits are reported. 546 <legal all> 547 */ 548 549 #define RX_LOCATION_INFO_RX_END_TS_OFFSET 0x0000001c 550 #define RX_LOCATION_INFO_RX_END_TS_LSB 0 551 #define RX_LOCATION_INFO_RX_END_TS_MSB 31 552 #define RX_LOCATION_INFO_RX_END_TS_MASK 0xffffffff 553 554 555 /* Description GAIN_CHAIN0 556 557 Reports the total gain in dB and the gain table index to 558 support angle of arrival for chain0 559 */ 560 561 #define RX_LOCATION_INFO_GAIN_CHAIN0_OFFSET 0x00000020 562 #define RX_LOCATION_INFO_GAIN_CHAIN0_LSB 0 563 #define RX_LOCATION_INFO_GAIN_CHAIN0_MSB 15 564 #define RX_LOCATION_INFO_GAIN_CHAIN0_MASK 0x0000ffff 565 566 567 /* Description GAIN_CHAIN1 568 569 Reports the total gain in dB and the gain table index to 570 support angle of arrival for chain1 571 */ 572 573 #define RX_LOCATION_INFO_GAIN_CHAIN1_OFFSET 0x00000020 574 #define RX_LOCATION_INFO_GAIN_CHAIN1_LSB 16 575 #define RX_LOCATION_INFO_GAIN_CHAIN1_MSB 31 576 #define RX_LOCATION_INFO_GAIN_CHAIN1_MASK 0xffff0000 577 578 579 /* Description GAIN_CHAIN2 580 581 Reports the total gain in dB and the gain table index to 582 support angle of arrival for chain2 583 */ 584 585 #define RX_LOCATION_INFO_GAIN_CHAIN2_OFFSET 0x00000024 586 #define RX_LOCATION_INFO_GAIN_CHAIN2_LSB 0 587 #define RX_LOCATION_INFO_GAIN_CHAIN2_MSB 15 588 #define RX_LOCATION_INFO_GAIN_CHAIN2_MASK 0x0000ffff 589 590 591 /* Description GAIN_CHAIN3 592 593 Reports the total gain in dB and the gain table index to 594 support angle of arrival for chain3 595 */ 596 597 #define RX_LOCATION_INFO_GAIN_CHAIN3_OFFSET 0x00000024 598 #define RX_LOCATION_INFO_GAIN_CHAIN3_LSB 16 599 #define RX_LOCATION_INFO_GAIN_CHAIN3_MSB 31 600 #define RX_LOCATION_INFO_GAIN_CHAIN3_MASK 0xffff0000 601 602 603 /* Description GAIN_REPORT_STATUS 604 605 Number of valid gain reports (in fields gain_chain0 - gain_chain_3) 606 607 <legal 0-4> 608 */ 609 610 #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_OFFSET 0x00000028 611 #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_LSB 0 612 #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_MSB 7 613 #define RX_LOCATION_INFO_GAIN_REPORT_STATUS_MASK 0x000000ff 614 615 616 /* Description RTT_TIMING_BACKOFF_SEL 617 618 Indicate which timing backoff value is used 619 620 <enum 0 timing_backoff_low_rssi> 621 <enum 1 timing_backoff_mid_rssi> 622 <enum 2 timing_backoff_high_rssi> 623 <enum 3 reserved> 624 <legal 0-3> 625 */ 626 627 #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_OFFSET 0x00000028 628 #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_LSB 8 629 #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_MSB 15 630 #define RX_LOCATION_INFO_RTT_TIMING_BACKOFF_SEL_MASK 0x0000ff00 631 632 633 /* Description RTT_FAC_COMBINED 634 635 Final adjusted and combined first arrival correction value 636 637 <legal all> 638 */ 639 640 #define RX_LOCATION_INFO_RTT_FAC_COMBINED_OFFSET 0x00000028 641 #define RX_LOCATION_INFO_RTT_FAC_COMBINED_LSB 16 642 #define RX_LOCATION_INFO_RTT_FAC_COMBINED_MSB 31 643 #define RX_LOCATION_INFO_RTT_FAC_COMBINED_MASK 0xffff0000 644 645 646 /* Description RTT_FAC_0 647 648 The fields 'rtt_fac_0' - 'rtt_fac_31' show the RTT first 649 arrival correction (FAC) value computed from the LTFs on 650 the selected Rx chains. 651 652 16 bits, signed 11.5. 11 integer bits to cover -3.2us to 653 3.2us, and 5 fraction bits to cover 160 MHz with 32x FAC 654 interpolation. 655 656 The clock unit is 320MHz. 657 658 For .11az/MIMO, the FACs will be stored in spatial stream 659 order with multiple chains reported together for each stream. [ss0-ch0, 660 ss0-ch1, ..., ss1-ch0, ss1-ch1, ...] 661 662 For legacy RTT5/.11mc, the FACs will be stored in preamble 663 order with multiple chains reported together for each LTF. [legacy-ch0, 664 legacy-ch1, ..., (v)ht/he-ch0, (v)ht/he-ch1, ...] 665 */ 666 667 #define RX_LOCATION_INFO_RTT_FAC_0_OFFSET 0x0000002c 668 #define RX_LOCATION_INFO_RTT_FAC_0_LSB 0 669 #define RX_LOCATION_INFO_RTT_FAC_0_MSB 15 670 #define RX_LOCATION_INFO_RTT_FAC_0_MASK 0x0000ffff 671 672 673 /* Description RTT_FAC_1 674 675 See 'rtt_fac_0' description 676 */ 677 678 #define RX_LOCATION_INFO_RTT_FAC_1_OFFSET 0x0000002c 679 #define RX_LOCATION_INFO_RTT_FAC_1_LSB 16 680 #define RX_LOCATION_INFO_RTT_FAC_1_MSB 31 681 #define RX_LOCATION_INFO_RTT_FAC_1_MASK 0xffff0000 682 683 684 /* Description RTT_FAC_2 685 686 See 'rtt_fac_0' description 687 */ 688 689 #define RX_LOCATION_INFO_RTT_FAC_2_OFFSET 0x00000030 690 #define RX_LOCATION_INFO_RTT_FAC_2_LSB 0 691 #define RX_LOCATION_INFO_RTT_FAC_2_MSB 15 692 #define RX_LOCATION_INFO_RTT_FAC_2_MASK 0x0000ffff 693 694 695 /* Description RTT_FAC_3 696 697 See 'rtt_fac_0' description 698 */ 699 700 #define RX_LOCATION_INFO_RTT_FAC_3_OFFSET 0x00000030 701 #define RX_LOCATION_INFO_RTT_FAC_3_LSB 16 702 #define RX_LOCATION_INFO_RTT_FAC_3_MSB 31 703 #define RX_LOCATION_INFO_RTT_FAC_3_MASK 0xffff0000 704 705 706 /* Description RTT_FAC_4 707 708 See 'rtt_fac_0' description 709 */ 710 711 #define RX_LOCATION_INFO_RTT_FAC_4_OFFSET 0x00000034 712 #define RX_LOCATION_INFO_RTT_FAC_4_LSB 0 713 #define RX_LOCATION_INFO_RTT_FAC_4_MSB 15 714 #define RX_LOCATION_INFO_RTT_FAC_4_MASK 0x0000ffff 715 716 717 /* Description RTT_FAC_5 718 719 See 'rtt_fac_0' description 720 */ 721 722 #define RX_LOCATION_INFO_RTT_FAC_5_OFFSET 0x00000034 723 #define RX_LOCATION_INFO_RTT_FAC_5_LSB 16 724 #define RX_LOCATION_INFO_RTT_FAC_5_MSB 31 725 #define RX_LOCATION_INFO_RTT_FAC_5_MASK 0xffff0000 726 727 728 /* Description RTT_FAC_6 729 730 See 'rtt_fac_0' description 731 */ 732 733 #define RX_LOCATION_INFO_RTT_FAC_6_OFFSET 0x00000038 734 #define RX_LOCATION_INFO_RTT_FAC_6_LSB 0 735 #define RX_LOCATION_INFO_RTT_FAC_6_MSB 15 736 #define RX_LOCATION_INFO_RTT_FAC_6_MASK 0x0000ffff 737 738 739 /* Description RTT_FAC_7 740 741 See 'rtt_fac_0' description 742 */ 743 744 #define RX_LOCATION_INFO_RTT_FAC_7_OFFSET 0x00000038 745 #define RX_LOCATION_INFO_RTT_FAC_7_LSB 16 746 #define RX_LOCATION_INFO_RTT_FAC_7_MSB 31 747 #define RX_LOCATION_INFO_RTT_FAC_7_MASK 0xffff0000 748 749 750 /* Description RTT_FAC_8 751 752 See 'rtt_fac_0' description 753 */ 754 755 #define RX_LOCATION_INFO_RTT_FAC_8_OFFSET 0x0000003c 756 #define RX_LOCATION_INFO_RTT_FAC_8_LSB 0 757 #define RX_LOCATION_INFO_RTT_FAC_8_MSB 15 758 #define RX_LOCATION_INFO_RTT_FAC_8_MASK 0x0000ffff 759 760 761 /* Description RTT_FAC_9 762 763 See 'rtt_fac_0' description 764 */ 765 766 #define RX_LOCATION_INFO_RTT_FAC_9_OFFSET 0x0000003c 767 #define RX_LOCATION_INFO_RTT_FAC_9_LSB 16 768 #define RX_LOCATION_INFO_RTT_FAC_9_MSB 31 769 #define RX_LOCATION_INFO_RTT_FAC_9_MASK 0xffff0000 770 771 772 /* Description RTT_FAC_10 773 774 See 'rtt_fac_0' description 775 */ 776 777 #define RX_LOCATION_INFO_RTT_FAC_10_OFFSET 0x00000040 778 #define RX_LOCATION_INFO_RTT_FAC_10_LSB 0 779 #define RX_LOCATION_INFO_RTT_FAC_10_MSB 15 780 #define RX_LOCATION_INFO_RTT_FAC_10_MASK 0x0000ffff 781 782 783 /* Description RTT_FAC_11 784 785 See 'rtt_fac_0' description 786 */ 787 788 #define RX_LOCATION_INFO_RTT_FAC_11_OFFSET 0x00000040 789 #define RX_LOCATION_INFO_RTT_FAC_11_LSB 16 790 #define RX_LOCATION_INFO_RTT_FAC_11_MSB 31 791 #define RX_LOCATION_INFO_RTT_FAC_11_MASK 0xffff0000 792 793 794 /* Description RTT_FAC_12 795 796 See 'rtt_fac_0' description 797 */ 798 799 #define RX_LOCATION_INFO_RTT_FAC_12_OFFSET 0x00000044 800 #define RX_LOCATION_INFO_RTT_FAC_12_LSB 0 801 #define RX_LOCATION_INFO_RTT_FAC_12_MSB 15 802 #define RX_LOCATION_INFO_RTT_FAC_12_MASK 0x0000ffff 803 804 805 /* Description RTT_FAC_13 806 807 See 'rtt_fac_0' description 808 */ 809 810 #define RX_LOCATION_INFO_RTT_FAC_13_OFFSET 0x00000044 811 #define RX_LOCATION_INFO_RTT_FAC_13_LSB 16 812 #define RX_LOCATION_INFO_RTT_FAC_13_MSB 31 813 #define RX_LOCATION_INFO_RTT_FAC_13_MASK 0xffff0000 814 815 816 /* Description RTT_FAC_14 817 818 See 'rtt_fac_0' description 819 */ 820 821 #define RX_LOCATION_INFO_RTT_FAC_14_OFFSET 0x00000048 822 #define RX_LOCATION_INFO_RTT_FAC_14_LSB 0 823 #define RX_LOCATION_INFO_RTT_FAC_14_MSB 15 824 #define RX_LOCATION_INFO_RTT_FAC_14_MASK 0x0000ffff 825 826 827 /* Description RTT_FAC_15 828 829 See 'rtt_fac_0' description 830 */ 831 832 #define RX_LOCATION_INFO_RTT_FAC_15_OFFSET 0x00000048 833 #define RX_LOCATION_INFO_RTT_FAC_15_LSB 16 834 #define RX_LOCATION_INFO_RTT_FAC_15_MSB 31 835 #define RX_LOCATION_INFO_RTT_FAC_15_MASK 0xffff0000 836 837 838 /* Description RTT_FAC_16 839 840 See 'rtt_fac_0' description 841 */ 842 843 #define RX_LOCATION_INFO_RTT_FAC_16_OFFSET 0x0000004c 844 #define RX_LOCATION_INFO_RTT_FAC_16_LSB 0 845 #define RX_LOCATION_INFO_RTT_FAC_16_MSB 15 846 #define RX_LOCATION_INFO_RTT_FAC_16_MASK 0x0000ffff 847 848 849 /* Description RTT_FAC_17 850 851 See 'rtt_fac_0' description 852 */ 853 854 #define RX_LOCATION_INFO_RTT_FAC_17_OFFSET 0x0000004c 855 #define RX_LOCATION_INFO_RTT_FAC_17_LSB 16 856 #define RX_LOCATION_INFO_RTT_FAC_17_MSB 31 857 #define RX_LOCATION_INFO_RTT_FAC_17_MASK 0xffff0000 858 859 860 /* Description RTT_FAC_18 861 862 See 'rtt_fac_0' description 863 */ 864 865 #define RX_LOCATION_INFO_RTT_FAC_18_OFFSET 0x00000050 866 #define RX_LOCATION_INFO_RTT_FAC_18_LSB 0 867 #define RX_LOCATION_INFO_RTT_FAC_18_MSB 15 868 #define RX_LOCATION_INFO_RTT_FAC_18_MASK 0x0000ffff 869 870 871 /* Description RTT_FAC_19 872 873 See 'rtt_fac_0' description 874 */ 875 876 #define RX_LOCATION_INFO_RTT_FAC_19_OFFSET 0x00000050 877 #define RX_LOCATION_INFO_RTT_FAC_19_LSB 16 878 #define RX_LOCATION_INFO_RTT_FAC_19_MSB 31 879 #define RX_LOCATION_INFO_RTT_FAC_19_MASK 0xffff0000 880 881 882 /* Description RTT_FAC_20 883 884 See 'rtt_fac_0' description 885 */ 886 887 #define RX_LOCATION_INFO_RTT_FAC_20_OFFSET 0x00000054 888 #define RX_LOCATION_INFO_RTT_FAC_20_LSB 0 889 #define RX_LOCATION_INFO_RTT_FAC_20_MSB 15 890 #define RX_LOCATION_INFO_RTT_FAC_20_MASK 0x0000ffff 891 892 893 /* Description RTT_FAC_21 894 895 See 'rtt_fac_0' description 896 */ 897 898 #define RX_LOCATION_INFO_RTT_FAC_21_OFFSET 0x00000054 899 #define RX_LOCATION_INFO_RTT_FAC_21_LSB 16 900 #define RX_LOCATION_INFO_RTT_FAC_21_MSB 31 901 #define RX_LOCATION_INFO_RTT_FAC_21_MASK 0xffff0000 902 903 904 /* Description RTT_FAC_22 905 906 See 'rtt_fac_0' description 907 */ 908 909 #define RX_LOCATION_INFO_RTT_FAC_22_OFFSET 0x00000058 910 #define RX_LOCATION_INFO_RTT_FAC_22_LSB 0 911 #define RX_LOCATION_INFO_RTT_FAC_22_MSB 15 912 #define RX_LOCATION_INFO_RTT_FAC_22_MASK 0x0000ffff 913 914 915 /* Description RTT_FAC_23 916 917 See 'rtt_fac_0' description 918 */ 919 920 #define RX_LOCATION_INFO_RTT_FAC_23_OFFSET 0x00000058 921 #define RX_LOCATION_INFO_RTT_FAC_23_LSB 16 922 #define RX_LOCATION_INFO_RTT_FAC_23_MSB 31 923 #define RX_LOCATION_INFO_RTT_FAC_23_MASK 0xffff0000 924 925 926 /* Description RTT_FAC_24 927 928 See 'rtt_fac_0' description 929 */ 930 931 #define RX_LOCATION_INFO_RTT_FAC_24_OFFSET 0x0000005c 932 #define RX_LOCATION_INFO_RTT_FAC_24_LSB 0 933 #define RX_LOCATION_INFO_RTT_FAC_24_MSB 15 934 #define RX_LOCATION_INFO_RTT_FAC_24_MASK 0x0000ffff 935 936 937 /* Description RTT_FAC_25 938 939 See 'rtt_fac_0' description 940 */ 941 942 #define RX_LOCATION_INFO_RTT_FAC_25_OFFSET 0x0000005c 943 #define RX_LOCATION_INFO_RTT_FAC_25_LSB 16 944 #define RX_LOCATION_INFO_RTT_FAC_25_MSB 31 945 #define RX_LOCATION_INFO_RTT_FAC_25_MASK 0xffff0000 946 947 948 /* Description RTT_FAC_26 949 950 See 'rtt_fac_0' description 951 */ 952 953 #define RX_LOCATION_INFO_RTT_FAC_26_OFFSET 0x00000060 954 #define RX_LOCATION_INFO_RTT_FAC_26_LSB 0 955 #define RX_LOCATION_INFO_RTT_FAC_26_MSB 15 956 #define RX_LOCATION_INFO_RTT_FAC_26_MASK 0x0000ffff 957 958 959 /* Description RTT_FAC_27 960 961 See 'rtt_fac_0' description 962 */ 963 964 #define RX_LOCATION_INFO_RTT_FAC_27_OFFSET 0x00000060 965 #define RX_LOCATION_INFO_RTT_FAC_27_LSB 16 966 #define RX_LOCATION_INFO_RTT_FAC_27_MSB 31 967 #define RX_LOCATION_INFO_RTT_FAC_27_MASK 0xffff0000 968 969 970 /* Description RTT_FAC_28 971 972 See 'rtt_fac_0' description 973 */ 974 975 #define RX_LOCATION_INFO_RTT_FAC_28_OFFSET 0x00000064 976 #define RX_LOCATION_INFO_RTT_FAC_28_LSB 0 977 #define RX_LOCATION_INFO_RTT_FAC_28_MSB 15 978 #define RX_LOCATION_INFO_RTT_FAC_28_MASK 0x0000ffff 979 980 981 /* Description RTT_FAC_29 982 983 See 'rtt_fac_0' description 984 */ 985 986 #define RX_LOCATION_INFO_RTT_FAC_29_OFFSET 0x00000064 987 #define RX_LOCATION_INFO_RTT_FAC_29_LSB 16 988 #define RX_LOCATION_INFO_RTT_FAC_29_MSB 31 989 #define RX_LOCATION_INFO_RTT_FAC_29_MASK 0xffff0000 990 991 992 /* Description RTT_FAC_30 993 994 See 'rtt_fac_0' description 995 */ 996 997 #define RX_LOCATION_INFO_RTT_FAC_30_OFFSET 0x00000068 998 #define RX_LOCATION_INFO_RTT_FAC_30_LSB 0 999 #define RX_LOCATION_INFO_RTT_FAC_30_MSB 15 1000 #define RX_LOCATION_INFO_RTT_FAC_30_MASK 0x0000ffff 1001 1002 1003 /* Description RTT_FAC_31 1004 1005 See 'rtt_fac_0' description 1006 */ 1007 1008 #define RX_LOCATION_INFO_RTT_FAC_31_OFFSET 0x00000068 1009 #define RX_LOCATION_INFO_RTT_FAC_31_LSB 16 1010 #define RX_LOCATION_INFO_RTT_FAC_31_MSB 31 1011 #define RX_LOCATION_INFO_RTT_FAC_31_MASK 0xffff0000 1012 1013 1014 /* Description RESERVED_27A 1015 1016 <legal 0> 1017 */ 1018 1019 #define RX_LOCATION_INFO_RESERVED_27A_OFFSET 0x0000006c 1020 #define RX_LOCATION_INFO_RESERVED_27A_LSB 0 1021 #define RX_LOCATION_INFO_RESERVED_27A_MSB 31 1022 #define RX_LOCATION_INFO_RESERVED_27A_MASK 0xffffffff 1023 1024 1025 1026 #endif // RX_LOCATION_INFO 1027