1 /* 2 * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #ifndef _TARGET_IF_CFR_ENH_H_ 21 #define _TARGET_IF_CFR_ENH_H_ 22 23 #ifdef WLAN_ENH_CFR_ENABLE 24 /* 25 * Memory requirements : 26 * 27 * 1. DMA header : 28 * 29 * Legacy DMA header(QCA8074V2) : 2 words (length = 8 bytes) 30 * Enhanced DMA header(QCA6018) : Upto 16 words depending on no. of MU users 31 * in UL-MU-PPDU (Max length = 64 bytes) 32 * 33 * Fixed 4 words for whal_cfir_enhanced_hdr + freeze TLV 34 * + uplink_user_info TLV (MAX 4) 35 * 36 * mu_rx_num_users -> No. of words in CFR DMA header 37 * 0 -> 12 = 4 + 7(freeze TLV) + 1(for 64-bit alignment) 38 * 1 -> 12 = 4 + 7(freeze TLV) + 1(user1) 39 * 2 -> 14 = 4 + 7(freeze TLV) + 2(users 1,2) + 1(for 64-bit alignment) 40 * 3 -> 14 = 4 + 7(freeze TLV) + 3(users 1,2,3) 41 * 4 -> 16 = 4 + 7(freeze TLV) + 4(users 1,2,3,4) + 1(for 64-bit alignment) 42 * 43 * 44 * 2. CFR data size for max BW/Nss/Nrx 45 * 46 * Cypress : Max BW = 80 MHz 47 * NSS = 2 48 * Nrx = 2 49 * Size of one tone = 4 bytes 50 * 51 * a. RTT-H - 2048 bytes 52 * 53 * b. Debug-H (MIMO CFR) - 16016 bytes 54 * 55 * c. RTT-H + CIR - 10240 bytes = 2048(RTT-H) + 8192(CIR) 56 */ 57 58 /* Max 4 users in MU case */ 59 #define CYP_CFR_MU_USERS 4 60 61 #define CYP_MAX_HEADER_LENGTH_WORDS 16 62 63 /* payload_len = Max(2048, 16016, 10240) = 16064 (64-bit alignment) */ 64 #define CYP_MAX_DATA_LENGTH_BYTES 16064 65 66 /* in ms */ 67 #define LUT_AGE_TIMER 3000 68 #define LUT_AGE_THRESHOLD 3000 69 70 /* Max size : 71 * sizeof(csi_cfr_header) + 64 bytes(cfr header) + 16064 bytes(cfr payload) 72 */ 73 #define STREAMFS_MAX_SUBBUF_CYP \ 74 (sizeof(struct csi_cfr_header) + \ 75 (CYP_MAX_HEADER_LENGTH_WORDS * 4) + \ 76 CYP_MAX_DATA_LENGTH_BYTES) 77 78 #define STREAMFS_NUM_SUBBUF_CYP 255 79 80 /* Max 37 users in MU case for Pine */ 81 #define PINE_CFR_MU_USERS 37 82 83 #define PINE_MAX_HEADER_LENGTH_WORDS 50 84 85 #define PINE_MAX_DATA_LENGTH_BYTES 16384 86 87 /* Max size : 88 * sizeof(csi_cfr_header) + 200 bytes(cfr header) + 16384 bytes(cfr payload) 89 */ 90 #define STREAMFS_MAX_SUBBUF_PINE \ 91 (sizeof(struct csi_cfr_header) + \ 92 (PINE_MAX_HEADER_LENGTH_WORDS * 4) + \ 93 PINE_MAX_DATA_LENGTH_BYTES) 94 95 #define STREAMFS_NUM_SUBBUF_PINE 255 96 97 /* Max 37 users in MU case for Waikiki */ 98 #define WAIKIKI_CFR_MU_USERS 37 99 100 #define WAIKIKI_MAX_HEADER_LENGTH_WORDS 88 101 102 #define WAIKIKI_MAX_DATA_LENGTH_BYTES 65536 103 104 /* Max size : 105 * sizeof(csi_cfr_header) + 352 bytes(cfr header) + 65536 bytes(cfr payload) 106 * where cfr_header size = rtt upload header len + freeze_tlv len + 107 * uplink user setup info + alignment/reserved bytes 108 * = 16bytes + 32bytes + (8bytes * 37users) + 8bytes 109 */ 110 #define STREAMFS_MAX_SUBBUF_WAIKIKI \ 111 (sizeof(struct csi_cfr_header) + \ 112 (WAIKIKI_MAX_HEADER_LENGTH_WORDS * 4) + \ 113 WAIKIKI_MAX_DATA_LENGTH_BYTES) 114 115 #define STREAMFS_NUM_SUBBUF_WAIKIKI 127 116 117 /* Max 4 users in MU case for Spruce */ 118 #define SPRUCE_CFR_MU_USERS 4 119 120 #define SPRUCE_MAX_HEADER_LENGTH_WORDS 16 121 122 #define SPRUCE_MAX_DATA_LENGTH_BYTES 16384 123 124 /* Max size : 125 * sizeof(csi_cfr_header) + 200 bytes(cfr header) + 16384 bytes(cfr payload) 126 */ 127 #define STREAMFS_MAX_SUBBUF_SPRUCE \ 128 (sizeof(struct csi_cfr_header) + \ 129 (SPRUCE_MAX_HEADER_LENGTH_WORDS * 4) + \ 130 SPRUCE_MAX_DATA_LENGTH_BYTES) 131 132 #define STREAMFS_NUM_SUBBUF_SPRUCE 255 133 134 /* enum macrx_freeze_tlv_version: Reported by uCode in enh_dma_header 135 * MACRX_FREEZE_TLV_VERSION_1: Single MU UL user info reported by MAC. 136 * This is used in Cypress/HastingsPrime chips. Corresponding structures are 137 * macrx_freeze_capture_channel and 1 uplink_user_setup_info. 138 * 139 * MACRX_FREEZE_TLV_VERSION_2: Upto 4 MU UL user info reported by MAC. 140 * This is used in Maple/Spruce/Moselle chips. Corresponding structures are 141 * macrx_freeze_capture_channel and 2 uplink_user_setup_info. 142 * 143 * MACRX_FREEZE_TLV_VERSION_3: Upto 37 MU UL user info reported by MAC. 144 * This is used in Pine chip. The corresponding structures are 145 * macrx_freeze_capture_channel_v3 and 37 uplink_user_setup_info. 146 * 147 * MACRX_FREEZE_TLV_VERSION_4: Upto 37 MU UL user info reported by MAC. 148 * This is used in Hamilton 1/2. 149 * 150 * MACRX_FREEZE_TLV_VERSION_5: Upto 37 MU UL user info reported by MAC. 151 * This is used in Waikiki chipsets. 152 */ 153 enum macrx_freeze_tlv_version { 154 MACRX_FREEZE_TLV_VERSION_1 = 1, 155 MACRX_FREEZE_TLV_VERSION_2 = 2, 156 MACRX_FREEZE_TLV_VERSION_3 = 3, 157 MACRX_FREEZE_TLV_VERSION_4 = 4, 158 MACRX_FREEZE_TLV_VERSION_5 = 5, 159 MACRX_FREEZE_TLV_VERSION_MAX 160 }; 161 162 /* Max 4 users in MU case for Maple */ 163 #define MAPLE_CFR_MU_USERS 4 164 165 #define MAPLE_MAX_HEADER_LENGTH_WORDS 16 166 167 #define MAPLE_MAX_DATA_LENGTH_BYTES 4096 168 169 /* Max size : 170 * sizeof(csi_cfr_header) + 64 bytes(cfr uCode header) + 171 * 4096 bytes(cfr payload) 172 */ 173 #define STREAMFS_MAX_SUBBUF_MAPLE \ 174 (sizeof(struct csi_cfr_header) + \ 175 (MAPLE_MAX_HEADER_LENGTH_WORDS * 4) + \ 176 MAPLE_MAX_DATA_LENGTH_BYTES) 177 178 /* 179 * RelayFS memory required: 180 * Max sub buffer size * Number of sub buffers 181 * 182 * Cascade: (2200B * 1100) ~= 2MB 183 * Dakota: (1100B * 2200) ~= 2MB 184 * Hawkeye: (8200B * 255 ) ~= 2MB 185 * Cypress: (16438B * 255 ) ~= 4MB 186 * Pine : (16894B * 255 ) ~= 4MB 187 * Maple : (4470B * 255 ) ~= 1MB 188 * 189 */ 190 #define STREAMFS_NUM_SUBBUF_MAPLE 255 191 192 enum UCODE_UPLOAD_HEADER_VERSION { 193 UPLOAD_HEADER_VERSION_1 = 1, 194 UPLOAD_HEADER_VERSION_2 = 2, 195 UPLOAD_HEADER_VERSION_3 = 3, 196 UPLOAD_HEADER_VERSION_4 = 4, 197 UPLOAD_HEADER_VERSION_8 = 8, 198 UPLOAD_HEADER_VERSION_9 = 9, 199 UPLOAD_HEADER_VERSION_MAX 200 }; 201 202 /* 203 * @tag: ucode fills this with 0xBA 204 * 205 * @length: length of CFR header in words (32-bit) 206 * 207 * @upload_done: ucode sets this to 1 to indicate DMA completion 208 * 209 * @capture_type: 210 * 211 * 0 - None 212 * 1 - RTT-H (Nss = 1, Nrx) 213 * 2 - Debug-H (Nss, Nrx) 214 * 3 - Reserved 215 * 5 - RTT-H + CIR(Nss, Nrx) 216 * 217 * @preamble_type: 218 * 219 * 0 - Legacy 220 * 1 - HT 221 * 2 - VHT 222 * 3 - HE 223 * 224 * @nss: 225 * 226 * 0 - 1-stream 227 * 1 - 2-stream 228 * .. .. 229 * 7 - 8-stream 230 * 231 *@num_chains: 232 * 233 * 0 - 1-chain 234 * 1 - 2-chain 235 * .. .. 236 * 7 - 8-chain 237 * 238 *@upload_bw_pkt: 239 * 240 * 0 - 20 MHz 241 * 1 - 40 MHz 242 * 2 - 80 MHz 243 * 3 - 160 MHz 244 * 245 * @sw_peer_id_valid: Indicates whether sw_peer_id field is valid or not, 246 * sent from MAC to PHY via the MACRX_FREEZE_CAPTURE_CHANNEL TLV 247 * 248 * @sw_peer_id: Indicates peer id based on AST search, sent from MAC to PHY 249 * via the MACRX_FREEZE_CAPTURE_CHANNEL TLV 250 * 251 * @phy_ppdu_id: sent from PHY to MAC, copied to MACRX_FREEZE_CAPTURE_CHANNEL 252 * TLV 253 * 254 * @total_bytes: Total size of CFR payload (FFT bins) 255 * 256 * @header_version: 257 * 258 * 1 - HKV2/Hastings 259 * 2 - Cypress 260 * 3 - Hasting Prime 261 * 4 - Pine 262 * 8 - Hamilton 263 * 9 - Waikiki 264 * 265 * @target_id: 266 * 267 * 1 - Hastings 268 * 2 - Cypress 269 * 3 - Hastings Prime 270 * 4 - Pine 271 * 272 * @cfr_fmt: 273 * 274 * 0 - raw (32-bit format) 275 * 1 - compressed (24-bit format) 276 * 277 * @mu_rx_data_incl: Indicates whether CFR header contains UL-MU-MIMO info 278 * 279 * @freeze_data_incl: Indicates whether CFR header contains 280 * MACRX_FREEZE_CAPTURE_CHANNEL TLV 281 * 282 * @freeze_tlv_version: Indicates the version of freeze_tlv 283 * 1 - HSP, Cypress 284 * 2 - Maple/Spruce/Moselle 285 * 3 - Pine 286 * 287 * @decimation_factor: FFT bins decimation 288 * @mu_rx_num_users: Number of users in UL-MU-PPDU 289 */ 290 struct whal_cfir_enhanced_hdr { 291 uint16_t tag : 8, 292 length : 6, 293 rsvd1 : 2; 294 295 uint16_t upload_done : 1, 296 capture_type : 3, 297 preamble_type : 2, 298 nss : 3, 299 num_chains : 3, 300 upload_pkt_bw : 3, 301 sw_peer_id_valid : 1; 302 303 uint16_t sw_peer_id : 16; 304 305 uint16_t phy_ppdu_id : 16; 306 307 uint16_t total_bytes; 308 309 uint16_t header_version :4, 310 target_id :4, 311 cfr_fmt :1, 312 rsvd2 :1, 313 mu_rx_data_incl :1, 314 freeze_data_incl :1, 315 freeze_tlv_version :4; 316 317 uint16_t mu_rx_num_users :8, 318 decimation_factor :4, 319 rsvd3 :4; 320 321 uint16_t rsvd4; 322 }; 323 324 /* 325 * freeze_tlv v1/v2 used by Hastings/Cypress/Maple/Spruce/Moselle supports upto 326 * 4 UL MU users 327 * 328 * @freeze: 329 * 0: Allow channel capture 330 * 1: Freeze channel capture 331 * 332 * @capture_reason: Field only valid when the freeze field is 1. Indicates why 333 * the MAC asked to capture the channel 334 * 0: freeze_reason_TM 335 * 1: freeze_reason_FTM 336 * 2: freeze_reason_ACK_resp_to_TM_FTM 337 * 3: freeze_reason_TA_RA_TYPE_FILTER 338 * 4: freeze readon NDP_NDP 339 * 5: freeze_reason_ALL_PACKET 340 * 341 * @packet_type: Packet type of captured packets. 342 * 0: Management 343 * 1: Control 344 * 2: Data 345 * 3: Extension 346 * 347 * @packet_sub_type: packet subtype of the captured packets. 348 * @sw_peer_id_valid: It is valid only when the freeze field is set to 1. 349 * 0: no TA address search on the received frame has been 350 * performed. This is due to the frame not having a TA address 351 * (like ACK frame), or the received frame being from an other 352 * AP to which this device is not associated. 353 * 1: field sw_peer_id will contain valid information. 354 * This implies that a (successful) address search has been 355 * performed on the TA address of the received frame. 356 * 357 * @sw_peer_id: Valid only when sw_peer_id_valid field is set. It is an 358 * identifier that allows SW to double check that the CSI info stored belongs 359 * to the device with this SW identifier. 360 * 361 * @phy_ppdu_id: ppdu_id of ppdu which has channel capture performed. Field 362 * only valid when the freeze field is set to 1. 363 * 364 * @packet_ta_lower_16: Packet’s lower 16bits transmit address in MAC header. 365 * 366 * @packet_ta_mid_16: Packet’s middle 16bits transmit address in MAC header. 367 * 368 * @packet_ta_upper_16: Packet’s upper 16bits transmit address in MAC header. 369 * 370 * @packet_ra_lower_16: Packet’s lower 16bits receive address in MAC header. 371 * 372 * @packet_ra_mid_16: Packet’s middle 16bits receive address in MAC header. 373 * 374 * @packet_ra_upper_16: Packet’s upper 16bits receive address in MAC header. 375 * 376 * @tsf_timestamp_15_0: MAC side 64bit TSF timestamp when this TLV is sent to 377 * PHY. Bits [15:0]. 378 * 379 * @tsf_timestamp_31_16: MAC side 64bit TSF timestamp when this TLV is sent to 380 * PHY. Bits [31:16]. 381 * 382 * @tsf_timestamp_47_32: MAC side 64bit TSF timestamp when this TLV is sent to 383 * PHY. Bits [47:32]. 384 * 385 * @tsf_timestamp_63_48: MAC side 64bit TSF timestamp when this TLV is sent to 386 * PHY. Bits [63:48]. 387 * 388 * @user_index_or_user_mask_5_0: When freeze_tlv_version is 1, this field from 389 * MAC, indicate to PHY which user's channel information need to be uploaded. 390 * When freeze_tlv_version is 2 & MU_SUPPORT_IN_TLV is 1, this field indicates 391 * bitmap of users upto 4 to which channel capture need to be uploaded. And if 392 * freeze_tlv_version is 2 & MU_SUPPORT_IN_TLV is 0, this field indicate to PHY 393 * which user's channel information need to be uploaded 394 * 395 * @directed: Indicate the frame is directed to us or not when NDPA/NDP capture 396 * or FTM/TM/ACK capture. 1=directed. For other modes, it is 0. 397 */ 398 struct macrx_freeze_capture_channel { 399 uint16_t freeze : 1, //[0] 400 capture_reason : 3, //[3:1] 401 packet_type : 2, //[5:4] 402 packet_sub_type : 4, //[9:6] 403 reserved : 5, //[14:10] 404 sw_peer_id_valid : 1; //[15] 405 uint16_t sw_peer_id : 16; //[15:0] 406 uint16_t phy_ppdu_id : 16; //[15:0] 407 uint16_t packet_ta_lower_16 : 16; //[15:0] 408 uint16_t packet_ta_mid_16 : 16; //[15:0] 409 uint16_t packet_ta_upper_16 : 16; //[15:0] 410 uint16_t packet_ra_lower_16 : 16; //[15:0] 411 uint16_t packet_ra_mid_16 : 16; //[15:0] 412 uint16_t packet_ra_upper_16 : 16; //[15:0] 413 uint16_t tsf_timestamp_15_0 : 16; //[15:0] 414 uint16_t tsf_timestamp_31_16 : 16; //[15:0] 415 uint16_t tsf_timestamp_47_32 : 16; //[15:0] 416 uint16_t tsf_timestamp_63_48 : 16; //[15:0] 417 uint16_t user_index_or_user_mask_5_0 : 6, //[5:0] 418 directed : 1, //[6] 419 reserved_13 : 9; //[15:7] 420 }; 421 422 /* 423 * freeze_tlv v3 used by Pine 424 * 425 * @freeze: 426 * 0: Allow channel capture 427 * 1: Freeze channel capture 428 * 429 * @capture_reason: Field only valid when the freeze field is 1. Indicates why 430 * the MAC asked to capture the channel 431 * 0: freeze_reason_TM 432 * 1: freeze_reason_FTM 433 * 2: freeze_reason_ACK_resp_to_TM_FTM 434 * 3: freeze_reason_TA_RA_TYPE_FILTER 435 * 4: freeze readon NDP_NDP 436 * 5: freeze_reason_ALL_PACKET 437 * 438 * @packet_type: Packet type of captured packets. 439 * 0: Management 440 * 1: Control 441 * 2: Data 442 * 3: Extension 443 * 444 * @packet_sub_type: packet subtype of the captured packets. 445 * 446 * @directed: Indicate the frame is directed to us or not when NDPA/NDP capture 447 * or FTM/TM/ACK capture. 1=directed. For other modes, it is 0. 448 * 449 * @sw_peer_id_valid: It is valid only when the freeze field is set to 1. 450 * 0: no TA address search on the received frame has been 451 * performed. This is due to the frame not having a TA address 452 * (like ACK frame), or the received frame being from an other 453 * AP to which this device is not associated. 454 * 1: field sw_peer_id will contain valid information. 455 * This implies that a (successful) address search has been 456 * performed on the TA address of the received frame. 457 * 458 * @sw_peer_id: Valid only when sw_peer_id_valid field is set. It is an 459 * identifier that allows SW to double check that the CSI info stored belongs 460 * to the device with this SW identifier. 461 * 462 * @phy_ppdu_id: ppdu_id of ppdu which has channel capture performed. Field 463 * only valid when the freeze field is set to 1. 464 * 465 * @packet_ta_lower_16: Packet’s lower 16bits transmit address in MAC header. 466 * 467 * @packet_ta_mid_16: Packet’s middle 16bits transmit address in MAC header. 468 * 469 * @packet_ta_upper_16: Packet’s upper 16bits transmit address in MAC header. 470 * 471 * @packet_ra_lower_16: Packet’s lower 16bits receive address in MAC header. 472 * 473 * @packet_ra_mid_16: Packet’s middle 16bits receive address in MAC header. 474 * 475 * @packet_ra_upper_16: Packet’s upper 16bits receive address in MAC header. 476 * 477 * @tsf_timestamp_15_0: MAC side 64bit TSF timestamp when this TLV is sent to 478 * PHY. Bits [15:0]. 479 * 480 * @tsf_timestamp_31_16: MAC side 64bit TSF timestamp when this TLV is sent to 481 * PHY. Bits [31:16]. 482 * 483 * @tsf_timestamp_47_32: MAC side 64bit TSF timestamp when this TLV is sent to 484 * PHY. Bits [47:32]. 485 * 486 * @tsf_63_48_or_user_mask_36_32: Indicates to PHY which user's channel info 487 * need to be uploaded. Only valid in UL MU case with MU_SUPPORT_IN_TLV = 1. 488 * Otherwise this indicates to PHY MSBs 63:48 of the MAC side 64bit TSF 489 * timestamp when this TLV is sent to PHY. 490 * 491 * @user_index_or_user_mask_15_0: Indicate to PHY which user's channel info 492 * need to be uploaded in UL MU case with MU_SUPPORT_IN_TLV = 1. Otherwise it 493 * indicate PHY which user’s channel information need to be uploaded. 494 * 495 * @user_mask_31_16: Indicate to PHY which user’s channel information need to 496 * be uploaded. Only valid in UL MU case with MU_SUPPORT_IN_TLV = 1. 497 */ 498 struct macrx_freeze_capture_channel_v3 { 499 uint16_t freeze : 1, //[0] 500 capture_reason : 3, //[3:1] 501 packet_type : 2, //[5:4] 502 packet_sub_type : 4, //[9:6] 503 directed : 1, //[10] 504 reserved : 4, //[14:11] 505 sw_peer_id_valid : 1; //[15] 506 uint16_t sw_peer_id : 16; //[15:0] 507 uint16_t phy_ppdu_id : 16; //[15:0] 508 uint16_t packet_ta_lower_16 : 16; //[15:0] 509 uint16_t packet_ta_mid_16 : 16; //[15:0] 510 uint16_t packet_ta_upper_16 : 16; //[15:0] 511 uint16_t packet_ra_lower_16 : 16; //[15:0] 512 uint16_t packet_ra_mid_16 : 16; //[15:0] 513 uint16_t packet_ra_upper_16 : 16; //[15:0] 514 uint16_t tsf_timestamp_15_0 : 16; //[15:0] 515 uint16_t tsf_timestamp_31_16 : 16; //[15:0] 516 uint16_t tsf_timestamp_47_32 : 16; //[15:0] 517 uint16_t tsf_63_48_or_user_mask_36_32 : 16; //[15:0] 518 uint16_t user_index_or_user_mask_15_0 : 16; //[15:0] 519 uint16_t user_mask_31_16 : 16; //[15:0] 520 }; 521 522 struct uplink_user_setup_info { 523 uint32_t bw_info_valid : 1, //[0] 524 uplink_receive_type : 2, //[2:1] 525 reserved_0a : 1, //[3] 526 uplink_11ax_mcs : 4, //[7:4] 527 ru_width : 7, //[14:8] 528 reserved_0b : 1, //[15] 529 nss : 3, //[18:16] 530 stream_offset : 3, //[21:19] 531 sta_dcm : 1, //[22] 532 sta_coding : 1, //[23] 533 ru_start_index : 7, //[30:24] 534 reserved_0c : 1; //[31] 535 }; 536 537 struct macrx_freeze_capture_channel_v5 { 538 uint16_t freeze : 1, //[0] 539 capture_reason : 3, //[3:1] 540 packet_type : 2, //[5:4] 541 packet_sub_type : 4, //[9:6] 542 reserved : 5, //[14:10] 543 sw_peer_id_valid : 1; //[15] 544 uint16_t sw_peer_id : 16; //[15:0] 545 uint16_t phy_ppdu_id : 16; //[15:0] 546 uint16_t packet_ta_lower_16 : 16; //[15:0] 547 uint16_t packet_ta_mid_16 : 16; //[15:0] 548 uint16_t packet_ta_upper_16 : 16; //[15:0] 549 uint16_t packet_ra_lower_16 : 16; //[15:0] 550 uint16_t packet_ra_mid_16 : 16; //[15:0] 551 uint16_t packet_ra_upper_16 : 16; //[15:0] 552 uint16_t tsf_timestamp_15_0 : 16; //[15:0] 553 uint16_t tsf_timestamp_31_16 : 16; //[15:0] 554 uint16_t tsf_timestamp_47_32 : 16; //[15:0] 555 uint16_t tsf_timestamp_63_48 : 16; //[15:0] 556 uint16_t user_index_or_user_mask_5_0 : 6, //[5:0] 557 directed : 1, //[6] 558 reserved_13 : 9; //[15:7] 559 uint16_t user_mask_21_6 : 16; //[15:0] 560 uint16_t user_mask_36_22 : 15, //[14:0] 561 reserved_15a : 1; //[15] 562 }; 563 564 struct uplink_user_setup_info_v2 { 565 uint32_t bw_info_valid : 1, //[0] 566 uplink_receive_type : 2, //[2:1] 567 reserved_0a : 1, //[3] 568 uplink_11ax_mcs : 4, //[7:4] 569 nss : 3, //[10:8] 570 stream_offset : 3, //[13:11] 571 sta_dcm : 1, //[14] 572 sta_coding : 1, //[15] 573 ru_type_80_0 : 4, //[19:16] 574 ru_type_80_1 : 4, //[23:20] 575 ru_type_80_2 : 4, //[27:24] 576 ru_type_80_3 : 4; //[31:28] 577 uint32_t ru_start_index_80_0 : 6, //[5:0] 578 reserved_1a : 2, //[7:6] 579 ru_start_index_80_1 : 6, //[13:8] 580 reserved_1b : 2, //[15:14] 581 ru_start_index_80_2 : 6, //[21:16] 582 reserved_1c : 2, //[23:22] 583 ru_start_index_80_3 : 6, //[29:24] 584 reserved_1d : 2; //[31-30] 585 }; 586 587 /** 588 * cfr_enh_init_pdev() - Inits cfr pdev and registers necessary handlers. 589 * @psoc: pointer to psoc object 590 * @pdev: pointer to pdev object 591 * 592 * Return: Registration status for necessary handlers 593 */ 594 QDF_STATUS cfr_enh_init_pdev( 595 struct wlan_objmgr_psoc *psoc, 596 struct wlan_objmgr_pdev *pdev); 597 598 /** 599 * cfr_enh_deinit_pdev() - De-inits corresponding pdev and handlers. 600 * @psoc: pointer to psoc object 601 * @pdev: pointer to pdev object 602 * 603 * Return: De-registration status for necessary handlers 604 */ 605 QDF_STATUS cfr_enh_deinit_pdev( 606 struct wlan_objmgr_psoc *psoc, 607 struct wlan_objmgr_pdev *pdev); 608 609 /** 610 * target_if_cfr_start_lut_age_timer() - Start timer to flush aged-out LUT 611 * entries 612 * @pdev: pointer to pdev object 613 * 614 * Return: None 615 */ 616 void target_if_cfr_start_lut_age_timer(struct wlan_objmgr_pdev *pdev); 617 618 /** 619 * target_if_cfr_stop_lut_age_timer() - Stop timer to flush aged-out LUT 620 * entries 621 * @pdev: pointer to pdev object 622 * 623 * Return: None 624 */ 625 void target_if_cfr_stop_lut_age_timer(struct wlan_objmgr_pdev *pdev); 626 627 /** 628 * target_if_cfr_dump_lut_enh() - Dump all valid LUT entries 629 * @pdev: objmgr PDEV 630 * 631 * Return: none 632 */ 633 void target_if_cfr_dump_lut_enh(struct wlan_objmgr_pdev *pdev); 634 635 /** 636 * target_if_cfr_config_rcc() - Start repetitive channel capture 637 * @pdev: pointer to pdev object 638 * @rcc_param: rcc configurations 639 * 640 * Return: Success/Failure status 641 */ 642 QDF_STATUS target_if_cfr_config_rcc(struct wlan_objmgr_pdev *pdev, 643 struct cfr_rcc_param *rcc_param); 644 645 /** 646 * target_if_cfr_default_ta_ra_config() - Configure default values to all 647 * params(BW/NSS/TA/RA) in TA_RA mode 648 * @rcc_param: rcc configurations 649 * @allvalid: Indicates whether all TA_RA params are valid or not. 650 * It could be either 0 or 1. 651 * 1: should be sent to FW during CFR initialization 652 * 0: should be set, after a successful commit session. 653 * @reset_cfg: This bitmap is being used to determine which groups' 654 * parameters are needed to be reset to its default state. 655 */ 656 void target_if_cfr_default_ta_ra_config(struct cfr_rcc_param *rcc_param, 657 bool allvalid, uint16_t reset_cfg); 658 659 /** 660 * target_if_cfr_rx_tlv_process() - Process PPDU status TLVs and store info in 661 * lookup table 662 * @pdev: PDEV object 663 * @nbuf: ppdu info 664 * 665 * Return: none 666 */ 667 void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf); 668 669 /** 670 * target_if_cfr_update_global_cfg() - Update global config after a successful 671 * commit 672 * @pdev: pointer to pdev object 673 * 674 * Return: None 675 */ 676 void target_if_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev); 677 #else 678 static inline QDF_STATUS cfr_enh_init_pdev( 679 struct wlan_objmgr_psoc *psoc, 680 struct wlan_objmgr_pdev *pdev) 681 { 682 return QDF_STATUS_SUCCESS; 683 } 684 685 static inline QDF_STATUS cfr_enh_deinit_pdev( 686 struct wlan_objmgr_psoc *psoc, 687 struct wlan_objmgr_pdev *pdev) 688 { 689 return QDF_STATUS_SUCCESS; 690 } 691 #endif 692 #endif 693