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 _MACTX_PHY_DESC_H_ 18 #define _MACTX_PHY_DESC_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_MACTX_PHY_DESC 4 23 24 #define NUM_OF_QWORDS_MACTX_PHY_DESC 2 25 26 27 struct mactx_phy_desc { 28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 29 uint32_t reserved_0a : 16, // [15:0] 30 bf_type : 2, // [17:16] 31 wait_sifs : 2, // [19:18] 32 dot11b_preamble_type : 1, // [20:20] 33 pkt_type : 4, // [24:21] 34 su_or_mu : 2, // [26:25] 35 mu_type : 1, // [27:27] 36 bandwidth : 3, // [30:28] 37 channel_capture : 1; // [31:31] 38 uint32_t mcs : 4, // [3:0] 39 global_ofdma_mimo_enable : 1, // [4:4] 40 reserved_1a : 1, // [5:5] 41 stbc : 1, // [6:6] 42 dot11ax_su_extended : 1, // [7:7] 43 dot11ax_trigger_frame_embedded : 1, // [8:8] 44 tx_pwr_shared : 8, // [16:9] 45 tx_pwr_unshared : 8, // [24:17] 46 measure_power : 1, // [25:25] 47 tpc_glut_self_cal : 1, // [26:26] 48 back_to_back_transmission_expected : 1, // [27:27] 49 heavy_clip_nss : 3, // [30:28] 50 txbf_per_packet_no_csd_no_walsh : 1; // [31:31] 51 uint32_t ndp : 2, // [1:0] 52 ul_flag : 1, // [2:2] 53 triggered : 1, // [3:3] 54 ap_pkt_bw : 3, // [6:4] 55 ru_position_start : 8, // [14:7] 56 pcu_ppdu_setup_start_reason : 3, // [17:15] 57 tlv_source : 1, // [18:18] 58 reserved_2a : 2, // [20:19] 59 nss : 3, // [23:21] 60 stream_offset : 3, // [26:24] 61 reserved_2b : 2, // [28:27] 62 clpc_enable : 1, // [29:29] 63 mu_ndp : 1, // [30:30] 64 response_expected : 1; // [31:31] 65 uint32_t rx_chain_mask : 8, // [7:0] 66 rx_chain_mask_valid : 1, // [8:8] 67 ant_sel_valid : 1, // [9:9] 68 ant_sel : 1, // [10:10] 69 cp_setting : 2, // [12:11] 70 he_ppdu_subtype : 2, // [14:13] 71 active_channel : 3, // [17:15] 72 generate_phyrx_tx_start_timing : 1, // [18:18] 73 ltf_size : 2, // [20:19] 74 ru_size_updated_v2 : 4, // [24:21] 75 reserved_3c : 1, // [25:25] 76 u_sig_puncture_pattern_encoding : 6; // [31:26] 77 #else 78 uint32_t channel_capture : 1, // [31:31] 79 bandwidth : 3, // [30:28] 80 mu_type : 1, // [27:27] 81 su_or_mu : 2, // [26:25] 82 pkt_type : 4, // [24:21] 83 dot11b_preamble_type : 1, // [20:20] 84 wait_sifs : 2, // [19:18] 85 bf_type : 2, // [17:16] 86 reserved_0a : 16; // [15:0] 87 uint32_t txbf_per_packet_no_csd_no_walsh : 1, // [31:31] 88 heavy_clip_nss : 3, // [30:28] 89 back_to_back_transmission_expected : 1, // [27:27] 90 tpc_glut_self_cal : 1, // [26:26] 91 measure_power : 1, // [25:25] 92 tx_pwr_unshared : 8, // [24:17] 93 tx_pwr_shared : 8, // [16:9] 94 dot11ax_trigger_frame_embedded : 1, // [8:8] 95 dot11ax_su_extended : 1, // [7:7] 96 stbc : 1, // [6:6] 97 reserved_1a : 1, // [5:5] 98 global_ofdma_mimo_enable : 1, // [4:4] 99 mcs : 4; // [3:0] 100 uint32_t response_expected : 1, // [31:31] 101 mu_ndp : 1, // [30:30] 102 clpc_enable : 1, // [29:29] 103 reserved_2b : 2, // [28:27] 104 stream_offset : 3, // [26:24] 105 nss : 3, // [23:21] 106 reserved_2a : 2, // [20:19] 107 tlv_source : 1, // [18:18] 108 pcu_ppdu_setup_start_reason : 3, // [17:15] 109 ru_position_start : 8, // [14:7] 110 ap_pkt_bw : 3, // [6:4] 111 triggered : 1, // [3:3] 112 ul_flag : 1, // [2:2] 113 ndp : 2; // [1:0] 114 uint32_t u_sig_puncture_pattern_encoding : 6, // [31:26] 115 reserved_3c : 1, // [25:25] 116 ru_size_updated_v2 : 4, // [24:21] 117 ltf_size : 2, // [20:19] 118 generate_phyrx_tx_start_timing : 1, // [18:18] 119 active_channel : 3, // [17:15] 120 he_ppdu_subtype : 2, // [14:13] 121 cp_setting : 2, // [12:11] 122 ant_sel : 1, // [10:10] 123 ant_sel_valid : 1, // [9:9] 124 rx_chain_mask_valid : 1, // [8:8] 125 rx_chain_mask : 8; // [7:0] 126 #endif 127 }; 128 129 130 /* Description RESERVED_0A 131 132 <legal 0> 133 */ 134 135 #define MACTX_PHY_DESC_RESERVED_0A_OFFSET 0x0000000000000000 136 #define MACTX_PHY_DESC_RESERVED_0A_LSB 0 137 #define MACTX_PHY_DESC_RESERVED_0A_MSB 15 138 #define MACTX_PHY_DESC_RESERVED_0A_MASK 0x000000000000ffff 139 140 141 /* Description BF_TYPE 142 143 <enum 0 NO_BF> Transmit a non-beamformed packet. NOTE 144 that MAC might have send MACTX_BF_PARAMS... related TLVs 145 to the PHY for this upcoming transmission, but if this 146 field indicates NO_BF, MAC_TX has for some reason decided 147 at the last moment that actual beamform transmission shall 148 not happen anymore... 149 <enum 1 LEGACY_BF> Transmit a legacy beamformed packet. 150 This means beamforming starts at the L-STF. The possible 151 preamble formats are 11a, 11n mixed mode and 11ac. This 152 is used to support legacy implicit beamforming. 153 <enum 2 SU_BF> Transmit a single-user beamformed packet 154 starting at the HT-STF or VHT-STF. 155 <enum 3 MU_BF> Transmit a multi-user beamformed packet 156 starting at the VHT-STF. In case of an MU transmission, 157 where maybe not all users are being transmitted in a 'beamformed' 158 way, but at least one is, this e_num setting will be used 159 as well 160 <legal all> 161 */ 162 163 #define MACTX_PHY_DESC_BF_TYPE_OFFSET 0x0000000000000000 164 #define MACTX_PHY_DESC_BF_TYPE_LSB 16 165 #define MACTX_PHY_DESC_BF_TYPE_MSB 17 166 #define MACTX_PHY_DESC_BF_TYPE_MASK 0x0000000000030000 167 168 169 /* Description WAIT_SIFS 170 171 This bit is evaluated by the PHY TX to determine if this 172 transmission start on the air needs to be exactly SIFS 173 aligned compared to the end of the previous reception or 174 previous transmission. 175 176 This feature is typically required for Triggered UL response 177 transmissions, where SIFS accuracy is really required. 178 For RTT this is also usefull, but not absolutely needed. 179 180 181 182 This field is filled in by TXPCU. 183 184 <enum 0 NO_SIFS_TIMING> Transmission shall start with the 185 normal delay in PHY after receiving this notification 186 <enum 1 SIFS_TIMING_DESIRED> Transmission shall be made 187 at the SIFS boundary. If shall never start before SIFS boundary, 188 but if it a little later, it is not ideal and should be 189 flagged, but transmission shall not be aborted. 190 <enum 2 SIFS_TIMING_MANDATED> Transmission shall be made 191 at exactly SIFS boundary. If this notification is received 192 by the PHY after SIFS boundary already passed, the PHY 193 shall abort the transmission 194 <legal 0-2> 195 */ 196 197 #define MACTX_PHY_DESC_WAIT_SIFS_OFFSET 0x0000000000000000 198 #define MACTX_PHY_DESC_WAIT_SIFS_LSB 18 199 #define MACTX_PHY_DESC_WAIT_SIFS_MSB 19 200 #define MACTX_PHY_DESC_WAIT_SIFS_MASK 0x00000000000c0000 201 202 203 /* Description DOT11B_PREAMBLE_TYPE 204 205 Valid for 802.11b packets only. 206 <enum 0 short_preamble> 207 <enum 1 long_preamble> 208 <legal all> 209 */ 210 211 #define MACTX_PHY_DESC_DOT11B_PREAMBLE_TYPE_OFFSET 0x0000000000000000 212 #define MACTX_PHY_DESC_DOT11B_PREAMBLE_TYPE_LSB 20 213 #define MACTX_PHY_DESC_DOT11B_PREAMBLE_TYPE_MSB 20 214 #define MACTX_PHY_DESC_DOT11B_PREAMBLE_TYPE_MASK 0x0000000000100000 215 216 217 /* Description PKT_TYPE 218 219 Packet type: 220 221 Note: in case of 11ax, see field he_ppdu_subtype for additional 222 info... 223 224 <enum 0 dot11a>802.11a PPDU type 225 <enum 1 dot11b>802.11b PPDU type 226 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 227 <enum 3 dot11ac>802.11ac PPDU type 228 <enum 4 dot11ax>802.11ax PPDU type 229 <enum 5 dot11ba>802.11ba (WUR) PPDU type 230 <enum 6 dot11be>802.11be PPDU type 231 <enum 7 dot11az>802.11az (ranging) PPDU type 232 <enum 8 dot11n_gf>802.11n Green Field PPDU type (unsupported 233 & aborted) 234 */ 235 236 #define MACTX_PHY_DESC_PKT_TYPE_OFFSET 0x0000000000000000 237 #define MACTX_PHY_DESC_PKT_TYPE_LSB 21 238 #define MACTX_PHY_DESC_PKT_TYPE_MSB 24 239 #define MACTX_PHY_DESC_PKT_TYPE_MASK 0x0000000001e00000 240 241 242 /* Description SU_OR_MU 243 244 Type of transmission: 245 246 For 11ax: 247 <enum 0 SU_transmission> 248 11ax: 249 This setting is used for the following preamble type of 250 transmissions: 251 11ax HE_SU PPDU 252 11ax HE_EXT_SU PPDU 253 11ax HE_TRIG PPDU 254 Note that the above implies all single user transmissions 255 256 257 11ac and other pkt_types: 258 Single user transmission 259 260 <enum 1 MU_transmission> 261 11ax: 262 This setting is used for the following preamble type of 263 transmissions: 264 11ax HE_MU 265 Note that this type of transmission implies multiple users 266 267 268 For 11ac: 269 Multi-user transmission 270 271 <enum 2 MU_SU_transmission> 272 11ax: 273 This setting is used for the following preamble type of 274 transmissions: 275 11ax HE_MU 276 Note that this type of transmission implies a SINGLE user, 277 but using HE_MU preamble type... 278 279 11ac and other pkt_types: 280 Reserved 281 282 <legal 0-2> 283 */ 284 285 #define MACTX_PHY_DESC_SU_OR_MU_OFFSET 0x0000000000000000 286 #define MACTX_PHY_DESC_SU_OR_MU_LSB 25 287 #define MACTX_PHY_DESC_SU_OR_MU_MSB 26 288 #define MACTX_PHY_DESC_SU_OR_MU_MASK 0x0000000006000000 289 290 291 /* Description MU_TYPE 292 293 Field only valid when 294 SU_or_MU == MU_transmission or 295 SU_or_MU == MU_SU_transmission 296 <enum 0 MU_MIMO_Transmission> 297 <enum 1 MU_OFDMA_Transmission> Note that within the RUs, 298 there might still be MU-MIMO... 299 <legal all> 300 */ 301 302 #define MACTX_PHY_DESC_MU_TYPE_OFFSET 0x0000000000000000 303 #define MACTX_PHY_DESC_MU_TYPE_LSB 27 304 #define MACTX_PHY_DESC_MU_TYPE_MSB 27 305 #define MACTX_PHY_DESC_MU_TYPE_MASK 0x0000000008000000 306 307 308 /* Description BANDWIDTH 309 310 Packet bandwidth: 311 312 The physical bandwidth that this device will be transmitting 313 in. 314 315 Note that for 11ax Trigger response transmissions (when 316 Field triggered == is_triggered), this bandwith is min(AP_pkt_bw, 317 STA_ch_bw) 318 319 <enum 0 20_mhz>20 Mhz BW 320 <enum 1 40_mhz>40 Mhz BW 321 <enum 2 80_mhz>80 Mhz BW 322 <enum 3 160_mhz>160 Mhz BW 323 <enum 4 320_mhz>320 Mhz BW 324 <enum 5 240_mhz>240 Mhz BW 325 */ 326 327 #define MACTX_PHY_DESC_BANDWIDTH_OFFSET 0x0000000000000000 328 #define MACTX_PHY_DESC_BANDWIDTH_LSB 28 329 #define MACTX_PHY_DESC_BANDWIDTH_MSB 30 330 #define MACTX_PHY_DESC_BANDWIDTH_MASK 0x0000000070000000 331 332 333 /* Description CHANNEL_CAPTURE 334 335 Indicates that the PHY should be armed to capture the channel 336 on the next received packet. This channel estimate is passed 337 to the MAC if the packet is successfully received. 338 <legal 0-1> 339 This field is not applicable for 11ah since implicit beamforming 340 is not supported 341 */ 342 343 #define MACTX_PHY_DESC_CHANNEL_CAPTURE_OFFSET 0x0000000000000000 344 #define MACTX_PHY_DESC_CHANNEL_CAPTURE_LSB 31 345 #define MACTX_PHY_DESC_CHANNEL_CAPTURE_MSB 31 346 #define MACTX_PHY_DESC_CHANNEL_CAPTURE_MASK 0x0000000080000000 347 348 349 /* Description MCS 350 351 In case of SU_or_MU == SU_transmission 352 353 Note that this includes trigger response transmission 354 355 The MCS to be used for the upcoming transmission. It must 356 match the 4-bit MCS value that is sent in the appropriate 357 signal field for the given packet type, except that EHT 358 BPSK with DCM and/or duplicate is encoded as '0.' 359 360 In case of .11ba (WUR), this field is filled according to 361 what is on the MAC side defined as "MCS_TYPE" 362 363 In case of SU_or_MU == MU_transmission 364 .11ac: highest MCS of all users 365 .11ax or .11be: highest 4-bit MCS field in all the HE_SIG_B 366 or EHT_SIG TLVs that MAC S/W informs to MAC H/W. Actual 367 highest 4-bit MCS to be sent to PHY might be lower after 368 MAC H/W computation. 369 370 For details, refer to the SIG field, related to this pkt_type. 371 372 (Note that this is slightly different then what is on the 373 MAC side defined as "MCS_TYPE". For this reason, the 'legal 374 values' here are NOT defined as MCS_TYPE) 375 <legal all> 376 */ 377 378 #define MACTX_PHY_DESC_MCS_OFFSET 0x0000000000000000 379 #define MACTX_PHY_DESC_MCS_LSB 32 380 #define MACTX_PHY_DESC_MCS_MSB 35 381 #define MACTX_PHY_DESC_MCS_MASK 0x0000000f00000000 382 383 384 /* Description GLOBAL_OFDMA_MIMO_ENABLE 385 386 When set, this transmission contains at least 1 user for 387 which MU-MIMO is enabled in its RU. 388 After per-BW/puncture pattern user disabling, in case of 389 pure OFDMA, PDG will clear this bit, but full BW MU-MIMO 390 is still possible with this bit set. 391 <legal all> 392 */ 393 394 #define MACTX_PHY_DESC_GLOBAL_OFDMA_MIMO_ENABLE_OFFSET 0x0000000000000000 395 #define MACTX_PHY_DESC_GLOBAL_OFDMA_MIMO_ENABLE_LSB 36 396 #define MACTX_PHY_DESC_GLOBAL_OFDMA_MIMO_ENABLE_MSB 36 397 #define MACTX_PHY_DESC_GLOBAL_OFDMA_MIMO_ENABLE_MASK 0x0000001000000000 398 399 400 /* Description RESERVED_1A 401 402 */ 403 404 #define MACTX_PHY_DESC_RESERVED_1A_OFFSET 0x0000000000000000 405 #define MACTX_PHY_DESC_RESERVED_1A_LSB 37 406 #define MACTX_PHY_DESC_RESERVED_1A_MSB 37 407 #define MACTX_PHY_DESC_RESERVED_1A_MASK 0x0000002000000000 408 409 410 /* Description STBC 411 412 When set, this transmission is based on stbc rates. 413 */ 414 415 #define MACTX_PHY_DESC_STBC_OFFSET 0x0000000000000000 416 #define MACTX_PHY_DESC_STBC_LSB 38 417 #define MACTX_PHY_DESC_STBC_MSB 38 418 #define MACTX_PHY_DESC_STBC_MASK 0x0000004000000000 419 420 421 /* Description DOT11AX_SU_EXTENDED 422 423 This field is only valid for pkt_type == 11ax OR pkt_type 424 == 11be 425 426 When set, the 11ax or 11be transmission is extended range 427 SU 428 */ 429 430 #define MACTX_PHY_DESC_DOT11AX_SU_EXTENDED_OFFSET 0x0000000000000000 431 #define MACTX_PHY_DESC_DOT11AX_SU_EXTENDED_LSB 39 432 #define MACTX_PHY_DESC_DOT11AX_SU_EXTENDED_MSB 39 433 #define MACTX_PHY_DESC_DOT11AX_SU_EXTENDED_MASK 0x0000008000000000 434 435 436 /* Description DOT11AX_TRIGGER_FRAME_EMBEDDED 437 438 When set, there is an 11ax trigger frame OR 11be trigger 439 frame embedded in this transmission. PHY shall latch the 440 transmit BW of this transmission and use it to select the 441 'MACTX_UPLINK_COMMON/USER...' TLVs parameters belonging 442 to this BW. Note that these 'MACTX_UPLINK_COMMON/USER...' 443 might already have been received by the PHY, or will come 444 in later. 445 <legal all> 446 */ 447 448 #define MACTX_PHY_DESC_DOT11AX_TRIGGER_FRAME_EMBEDDED_OFFSET 0x0000000000000000 449 #define MACTX_PHY_DESC_DOT11AX_TRIGGER_FRAME_EMBEDDED_LSB 40 450 #define MACTX_PHY_DESC_DOT11AX_TRIGGER_FRAME_EMBEDDED_MSB 40 451 #define MACTX_PHY_DESC_DOT11AX_TRIGGER_FRAME_EMBEDDED_MASK 0x0000010000000000 452 453 454 /* Description TX_PWR_SHARED 455 456 Transmit Power (signed value) in units of 0.25 dBm 457 <legal all> 458 */ 459 460 #define MACTX_PHY_DESC_TX_PWR_SHARED_OFFSET 0x0000000000000000 461 #define MACTX_PHY_DESC_TX_PWR_SHARED_LSB 41 462 #define MACTX_PHY_DESC_TX_PWR_SHARED_MSB 48 463 #define MACTX_PHY_DESC_TX_PWR_SHARED_MASK 0x0001fe0000000000 464 465 466 /* Description TX_PWR_UNSHARED 467 468 Transmit Power (signed value) in units of 0.25 dBm <legal 469 all> 470 */ 471 472 #define MACTX_PHY_DESC_TX_PWR_UNSHARED_OFFSET 0x0000000000000000 473 #define MACTX_PHY_DESC_TX_PWR_UNSHARED_LSB 49 474 #define MACTX_PHY_DESC_TX_PWR_UNSHARED_MSB 56 475 #define MACTX_PHY_DESC_TX_PWR_UNSHARED_MASK 0x01fe000000000000 476 477 478 /* Description MEASURE_POWER 479 480 This field enables the TPC to use power measurement for 481 current packet in CLPC updates. 482 <enum 0 measure_dis> TPC will not latch power measurement 483 result for current packet 484 <enum 1 measure_en> TPC will latch power measurement 485 result for current packet 486 <legal all> 487 */ 488 489 #define MACTX_PHY_DESC_MEASURE_POWER_OFFSET 0x0000000000000000 490 #define MACTX_PHY_DESC_MEASURE_POWER_LSB 57 491 #define MACTX_PHY_DESC_MEASURE_POWER_MSB 57 492 #define MACTX_PHY_DESC_MEASURE_POWER_MASK 0x0200000000000000 493 494 495 /* Description TPC_GLUT_SELF_CAL 496 497 Setting related to transmit power control calibration. 498 <legal all> 499 */ 500 501 #define MACTX_PHY_DESC_TPC_GLUT_SELF_CAL_OFFSET 0x0000000000000000 502 #define MACTX_PHY_DESC_TPC_GLUT_SELF_CAL_LSB 58 503 #define MACTX_PHY_DESC_TPC_GLUT_SELF_CAL_MSB 58 504 #define MACTX_PHY_DESC_TPC_GLUT_SELF_CAL_MASK 0x0400000000000000 505 506 507 /* Description BACK_TO_BACK_TRANSMISSION_EXPECTED 508 509 When set, the next transmission is expected to follow this 510 one in SIFS time (without any response reception in between). 511 512 513 For example used when transmitting beacons followed by the 514 broadcast or multicast frames 515 <legal all> 516 */ 517 518 #define MACTX_PHY_DESC_BACK_TO_BACK_TRANSMISSION_EXPECTED_OFFSET 0x0000000000000000 519 #define MACTX_PHY_DESC_BACK_TO_BACK_TRANSMISSION_EXPECTED_LSB 59 520 #define MACTX_PHY_DESC_BACK_TO_BACK_TRANSMISSION_EXPECTED_MSB 59 521 #define MACTX_PHY_DESC_BACK_TO_BACK_TRANSMISSION_EXPECTED_MASK 0x0800000000000000 522 523 524 /* Description HEAVY_CLIP_NSS 525 526 Number of active spatial streams in current packet. This 527 parameter is used by the heavy clip function in the transmitter. 528 In case of MU PPDU, this is total Nss of all users. 529 530 <enum 0 1_spatial_stream>Single spatial stream 531 <enum 1 2_spatial_streams>2 spatial streams 532 <enum 2 3_spatial_streams>3 spatial streams 533 <enum 3 4_spatial_streams>4 spatial streams 534 <enum 4 5_spatial_streams>5 spatial streams 535 <enum 5 6_spatial_streams>6 spatial streams 536 <enum 6 7_spatial_streams>7 spatial streams 537 <enum 7 8_spatial_streams>8 spatial streams 538 */ 539 540 #define MACTX_PHY_DESC_HEAVY_CLIP_NSS_OFFSET 0x0000000000000000 541 #define MACTX_PHY_DESC_HEAVY_CLIP_NSS_LSB 60 542 #define MACTX_PHY_DESC_HEAVY_CLIP_NSS_MSB 62 543 #define MACTX_PHY_DESC_HEAVY_CLIP_NSS_MASK 0x7000000000000000 544 545 546 /* Description TXBF_PER_PACKET_NO_CSD_NO_WALSH 547 548 This is a global switch that is applied to beamformed packets 549 550 551 If set, no_csd and no_walsh is applied to steering packet. 552 553 */ 554 555 #define MACTX_PHY_DESC_TXBF_PER_PACKET_NO_CSD_NO_WALSH_OFFSET 0x0000000000000000 556 #define MACTX_PHY_DESC_TXBF_PER_PACKET_NO_CSD_NO_WALSH_LSB 63 557 #define MACTX_PHY_DESC_TXBF_PER_PACKET_NO_CSD_NO_WALSH_MSB 63 558 #define MACTX_PHY_DESC_TXBF_PER_PACKET_NO_CSD_NO_WALSH_MASK 0x8000000000000000 559 560 561 /* Description NDP 562 563 When not "0", upcoming transmission is one of the indicated 564 NDP types. 565 566 <enum 0 no_ndp>No NDP transmission 567 <enum 1 beamforming_ndp>Beamforming NDP 568 <enum 2 he_ranging_ndp>11az NDP (HE Ranging NDP) 569 <enum 3 he_feedback_ndp>Short TB (HE Feedback NDP) 570 */ 571 572 #define MACTX_PHY_DESC_NDP_OFFSET 0x0000000000000008 573 #define MACTX_PHY_DESC_NDP_LSB 0 574 #define MACTX_PHY_DESC_NDP_MSB 1 575 #define MACTX_PHY_DESC_NDP_MASK 0x0000000000000003 576 577 578 /* Description UL_FLAG 579 580 This field is only valid for pkt_type == 11ax OR pkt_type 581 == 11be 582 583 584 Used for HE_SIGB 585 <enum 1 uplink> 586 <enum 0 downlink> 587 <legal all> 588 */ 589 590 #define MACTX_PHY_DESC_UL_FLAG_OFFSET 0x0000000000000008 591 #define MACTX_PHY_DESC_UL_FLAG_LSB 2 592 #define MACTX_PHY_DESC_UL_FLAG_MSB 2 593 #define MACTX_PHY_DESC_UL_FLAG_MASK 0x0000000000000004 594 595 596 /* Description TRIGGERED 597 598 This field is only valid for pkt_type == 11ax OR pkt_type 599 == 11be 600 601 602 Denotes whether it's a triggered uplink transmission 603 604 Must be set for HE-TB NDPs used in Secure Ranging NDPs (11az) 605 and Short-NDP (HE TB Feedback NDP). 606 607 <enum 0 non_trigerred> 608 <enum 1 is_triggered> 609 <legal all> 610 */ 611 612 #define MACTX_PHY_DESC_TRIGGERED_OFFSET 0x0000000000000008 613 #define MACTX_PHY_DESC_TRIGGERED_LSB 3 614 #define MACTX_PHY_DESC_TRIGGERED_MSB 3 615 #define MACTX_PHY_DESC_TRIGGERED_MASK 0x0000000000000008 616 617 618 /* Description AP_PKT_BW 619 620 Field only valid when triggered == is_triggered 621 622 This indicates the total bandwidth of the UL_TRIG packet 623 as indicated in the Trigger Frame. 624 625 <enum 0 20_mhz>20 Mhz BW 626 <enum 1 40_mhz>40 Mhz BW 627 <enum 2 80_mhz>80 Mhz BW 628 <enum 3 160_mhz>160 Mhz BW 629 <enum 4 320_mhz>320 Mhz BW 630 <enum 5 240_mhz>240 Mhz BW 631 */ 632 633 #define MACTX_PHY_DESC_AP_PKT_BW_OFFSET 0x0000000000000008 634 #define MACTX_PHY_DESC_AP_PKT_BW_LSB 4 635 #define MACTX_PHY_DESC_AP_PKT_BW_MSB 6 636 #define MACTX_PHY_DESC_AP_PKT_BW_MASK 0x0000000000000070 637 638 639 /* Description RU_POSITION_START 640 641 Field only valid when triggered == is_triggered 642 643 644 This field indicates the start basic (26 tone) RU number 645 assigned to this user 646 647 RU Numbering is based only on the order in which the RUs 648 are allocated over the available BW, starting from 0 and 649 in increasing frequency order and not primary-secondary 650 order. 651 652 The RU number within 80 MHz is available from the RU allocation 653 information in the trigger. For 160 MHz transmissions, 654 the trigger RU allocation only mentions primary/secondary 655 80 MHz. PDG needs to convert this to lower/higher 80 MHz. 656 657 658 If in 'PCU_PPDU_SETUP_START'/'MACTX_PRE_PHY_DESC,' CCA_Subband_channel_bonding_mask 659 bit 0 is mapped to any of bits 4 - 7 of Freq_Subband_channel_bonding_mask, 660 then the primary 80 MHz is the higher 80 MHz and the secondary 661 80 MHz is the lower one. 662 Otherwise (if CCA_Subband_channel_bonding_mask bit 0 is 663 mapped to any of bits 0 - 3 of Freq_Subband_channel_bonding_mask, 664 then the primary 80 MHz is the lower 80 MHz and the secondary 665 80 MHz is the higher one. 666 667 Note: this type of encoding decouples the formatting of 668 the trigger from from how info between MAC-PHY is exchanged 669 670 <legal 0- 147> 671 */ 672 673 #define MACTX_PHY_DESC_RU_POSITION_START_OFFSET 0x0000000000000008 674 #define MACTX_PHY_DESC_RU_POSITION_START_LSB 7 675 #define MACTX_PHY_DESC_RU_POSITION_START_MSB 14 676 #define MACTX_PHY_DESC_RU_POSITION_START_MASK 0x0000000000007f80 677 678 679 /* Description PCU_PPDU_SETUP_START_REASON 680 681 PDG shall fill this with the value it fills in the setup_start_reason 682 in 'PCU_PPDU_SETUP_START.' It indicates what triggered 683 the PDG to start Tx setup. 684 Used for debugging purposes. 685 686 <enum 0 fes_protection_frame> RTS or CTS-to-self transmission 687 preceding the regular PPDU portion of the coming FES. The 688 transmit is initiated by PDG_TX_REQ TLV from TXPCU 689 <enum 1 fes_after_protection > Regular PPDU transmission 690 that follows the transmission of medium protection: Either 691 RTS - CTS exchanges or CTS to self. The transmit is initiated 692 by PDG_TX_REQ TLV from TXPCU 693 <enum 2 fes_only> Regular PPDU transmission without 694 preceding medium protection frame exchanges. The transmit 695 is initiated by PDG_TX_REQ TLV from TXPCU 696 <enum 3 response_frame> response frame transmission. 697 The transmit is initiated by PDG_RESPONSE TLV from TXPCU 698 699 <enum 4 trig_response_frame> 11ax triggered response 700 frame transmission. The transmit is initiated by PDG_TRIG_RESPONSE 701 TLV from TXPCU 702 <enum 5 dynamic_protection_fes_only> Regular PPDU transmission 703 without preceding medium protection frame exchanges, because 704 the dynamic medium protection constraints were not satisfied. 705 The transmit is initiated by PDG_TX_REQ TLV from TXPCU. 706 707 <legal 0-5> 708 */ 709 710 #define MACTX_PHY_DESC_PCU_PPDU_SETUP_START_REASON_OFFSET 0x0000000000000008 711 #define MACTX_PHY_DESC_PCU_PPDU_SETUP_START_REASON_LSB 15 712 #define MACTX_PHY_DESC_PCU_PPDU_SETUP_START_REASON_MSB 17 713 #define MACTX_PHY_DESC_PCU_PPDU_SETUP_START_REASON_MASK 0x0000000000038000 714 715 716 /* Description TLV_SOURCE 717 718 <enum 1 phy_desc_from_pdg> This MACTX_PHY_DESC TLV is generated 719 by PDG. 720 <enum 0 phy_desc_from_fw> PDG is in bypass mode and this 721 MACTX_PHY_DESC TLV is queued by firmware. 722 <legal all> 723 */ 724 725 #define MACTX_PHY_DESC_TLV_SOURCE_OFFSET 0x0000000000000008 726 #define MACTX_PHY_DESC_TLV_SOURCE_LSB 18 727 #define MACTX_PHY_DESC_TLV_SOURCE_MSB 18 728 #define MACTX_PHY_DESC_TLV_SOURCE_MASK 0x0000000000040000 729 730 731 /* Description RESERVED_2A 732 733 <legal 0> 734 */ 735 736 #define MACTX_PHY_DESC_RESERVED_2A_OFFSET 0x0000000000000008 737 #define MACTX_PHY_DESC_RESERVED_2A_LSB 19 738 #define MACTX_PHY_DESC_RESERVED_2A_MSB 20 739 #define MACTX_PHY_DESC_RESERVED_2A_MASK 0x0000000000180000 740 741 742 /* Description NSS 743 744 Field only valid when triggered == is_triggered 745 746 Number of Spatial Streams occupied by the User 747 748 <enum 0 1_spatial_stream>Single spatial stream 749 <enum 1 2_spatial_streams>2 spatial streams 750 <enum 2 3_spatial_streams>3 spatial streams 751 <enum 3 4_spatial_streams>4 spatial streams 752 <enum 4 5_spatial_streams>5 spatial streams 753 <enum 5 6_spatial_streams>6 spatial streams 754 <enum 6 7_spatial_streams>7 spatial streams 755 <enum 7 8_spatial_streams>8 spatial streams 756 */ 757 758 #define MACTX_PHY_DESC_NSS_OFFSET 0x0000000000000008 759 #define MACTX_PHY_DESC_NSS_LSB 21 760 #define MACTX_PHY_DESC_NSS_MSB 23 761 #define MACTX_PHY_DESC_NSS_MASK 0x0000000000e00000 762 763 764 /* Description STREAM_OFFSET 765 766 Field only valid when triggered == is_triggered 767 768 Specify Stream-offset of the user for HE_TB Ranging NDP 769 or Short-NDP 770 771 Stream Offset from which the User occupies the Streams 772 */ 773 774 #define MACTX_PHY_DESC_STREAM_OFFSET_OFFSET 0x0000000000000008 775 #define MACTX_PHY_DESC_STREAM_OFFSET_LSB 24 776 #define MACTX_PHY_DESC_STREAM_OFFSET_MSB 26 777 #define MACTX_PHY_DESC_STREAM_OFFSET_MASK 0x0000000007000000 778 779 780 /* Description RESERVED_2B 781 782 <legal 0> 783 */ 784 785 #define MACTX_PHY_DESC_RESERVED_2B_OFFSET 0x0000000000000008 786 #define MACTX_PHY_DESC_RESERVED_2B_LSB 27 787 #define MACTX_PHY_DESC_RESERVED_2B_MSB 28 788 #define MACTX_PHY_DESC_RESERVED_2B_MASK 0x0000000018000000 789 790 791 /* Description CLPC_ENABLE 792 793 This field enables closed-loop TPC operation by enabling 794 CLPC adjustment of DAC gain for the next packet. 795 <enum 0 clpc_off> TPC error update disabled 796 <enum 1 clpc_on> TPC error will be applied to DAC gain 797 setting for the next packet 798 <legal 0-1> 799 */ 800 801 #define MACTX_PHY_DESC_CLPC_ENABLE_OFFSET 0x0000000000000008 802 #define MACTX_PHY_DESC_CLPC_ENABLE_LSB 29 803 #define MACTX_PHY_DESC_CLPC_ENABLE_MSB 29 804 #define MACTX_PHY_DESC_CLPC_ENABLE_MASK 0x0000000020000000 805 806 807 /* Description MU_NDP 808 809 If set indicates that this packet is an NDP used for MU 810 channel estimation. This bit will be used by the TPC to 811 signal that the analog gain settings can be updated. The 812 analog gain settings will not change for subsequent MU 813 data packets. 814 */ 815 816 #define MACTX_PHY_DESC_MU_NDP_OFFSET 0x0000000000000008 817 #define MACTX_PHY_DESC_MU_NDP_LSB 30 818 #define MACTX_PHY_DESC_MU_NDP_MSB 30 819 #define MACTX_PHY_DESC_MU_NDP_MASK 0x0000000040000000 820 821 822 /* Description RESPONSE_EXPECTED 823 824 When set, a response frame in SIFS time is expected after 825 this transmission. 826 <legal all> 827 */ 828 829 #define MACTX_PHY_DESC_RESPONSE_EXPECTED_OFFSET 0x0000000000000008 830 #define MACTX_PHY_DESC_RESPONSE_EXPECTED_LSB 31 831 #define MACTX_PHY_DESC_RESPONSE_EXPECTED_MSB 31 832 #define MACTX_PHY_DESC_RESPONSE_EXPECTED_MASK 0x0000000080000000 833 834 835 /* Description RX_CHAIN_MASK 836 837 Chain mask to support up to 8 antennas. 838 <legal 1-255> 839 */ 840 841 #define MACTX_PHY_DESC_RX_CHAIN_MASK_OFFSET 0x0000000000000008 842 #define MACTX_PHY_DESC_RX_CHAIN_MASK_LSB 32 843 #define MACTX_PHY_DESC_RX_CHAIN_MASK_MSB 39 844 #define MACTX_PHY_DESC_RX_CHAIN_MASK_MASK 0x000000ff00000000 845 846 847 /* Description RX_CHAIN_MASK_VALID 848 849 Indicates rx_chain_mask field is valid. 850 <enum 0 RX_CHAIN_MASK_IS_NOT_VALID> 851 <enum 1 RX_CHAIN_MASK_IS_VALID> 852 <legal all> 853 */ 854 855 #define MACTX_PHY_DESC_RX_CHAIN_MASK_VALID_OFFSET 0x0000000000000008 856 #define MACTX_PHY_DESC_RX_CHAIN_MASK_VALID_LSB 40 857 #define MACTX_PHY_DESC_RX_CHAIN_MASK_VALID_MSB 40 858 #define MACTX_PHY_DESC_RX_CHAIN_MASK_VALID_MASK 0x0000010000000000 859 860 861 /* Description ANT_SEL_VALID 862 863 Field only valid when ant_sel_valid is set. 864 865 TX Antenna select valid 866 <enum 0 ANT_SEL_IS_NOT_VALID> 867 <enum 1 ANT_SEL_IS_VALID> 868 <legal all> 869 */ 870 871 #define MACTX_PHY_DESC_ANT_SEL_VALID_OFFSET 0x0000000000000008 872 #define MACTX_PHY_DESC_ANT_SEL_VALID_LSB 41 873 #define MACTX_PHY_DESC_ANT_SEL_VALID_MSB 41 874 #define MACTX_PHY_DESC_ANT_SEL_VALID_MASK 0x0000020000000000 875 876 877 /* Description ANT_SEL 878 879 Field only valid when ant_sel_valid is set. 880 881 Antenna select for TX antenna diversity. 882 <enum 0 ANTENNA_0> 883 <enum 1 ANTENNA_1> 884 <legal all> 885 */ 886 887 #define MACTX_PHY_DESC_ANT_SEL_OFFSET 0x0000000000000008 888 #define MACTX_PHY_DESC_ANT_SEL_LSB 42 889 #define MACTX_PHY_DESC_ANT_SEL_MSB 42 890 #define MACTX_PHY_DESC_ANT_SEL_MASK 0x0000040000000000 891 892 893 /* Description CP_SETTING 894 895 Field only valid when pkt type is HT, VHT or HE. 896 897 Specify the right CP for HE-Ranging NDPs (11az)/Short NDP 898 899 900 <enum 0 gi_0_8_us > Legacy normal GI 901 <enum 1 gi_0_4_us > Legacy short GI 902 <enum 2 gi_1_6_us > HE related GI 903 <enum 3 gi_3_2_us > HE related GI 904 <legal 0 - 3> 905 */ 906 907 #define MACTX_PHY_DESC_CP_SETTING_OFFSET 0x0000000000000008 908 #define MACTX_PHY_DESC_CP_SETTING_LSB 43 909 #define MACTX_PHY_DESC_CP_SETTING_MSB 44 910 #define MACTX_PHY_DESC_CP_SETTING_MASK 0x0000180000000000 911 912 913 /* Description HE_PPDU_SUBTYPE 914 915 The subtype of HE transmission: 916 917 Specify as HE-SU for HE-SU Ranging NDP in 11az ; 918 Specify as HE-TB for HE-TB Ranging NDP in 11az ; 919 Specify as HE-TB for Short -NDP 920 Re-use the same for EHT PPDU types also 921 <enum 0 he_subtype_SU> 922 <enum 1 he_subtype_TRIG> 923 <enum 2 he_subtype_MU> 924 <enum 3 he_subtype_EXT_SU> 925 926 <legal all> 927 */ 928 929 #define MACTX_PHY_DESC_HE_PPDU_SUBTYPE_OFFSET 0x0000000000000008 930 #define MACTX_PHY_DESC_HE_PPDU_SUBTYPE_LSB 45 931 #define MACTX_PHY_DESC_HE_PPDU_SUBTYPE_MSB 46 932 #define MACTX_PHY_DESC_HE_PPDU_SUBTYPE_MASK 0x0000600000000000 933 934 935 /* Description ACTIVE_CHANNEL 936 937 Field only valid when triggered == non_trigerred 938 In case of a triggered response transmission, this field 939 will always be set to 0 940 941 This field indicates the active frequency band when the 942 packet bandwidth is less than the channel bandwidth. For 943 non 11ax packets this is same as the primary channel 944 <legal all> 945 */ 946 947 #define MACTX_PHY_DESC_ACTIVE_CHANNEL_OFFSET 0x0000000000000008 948 #define MACTX_PHY_DESC_ACTIVE_CHANNEL_LSB 47 949 #define MACTX_PHY_DESC_ACTIVE_CHANNEL_MSB 49 950 #define MACTX_PHY_DESC_ACTIVE_CHANNEL_MASK 0x0003800000000000 951 952 953 /* Description GENERATE_PHYRX_TX_START_TIMING 954 955 When set, PHY shall generate the PHYRX_TX_START_TIMING TLV 956 at the earliest opportunity during the preamble transmission 957 958 <legal all> 959 */ 960 961 #define MACTX_PHY_DESC_GENERATE_PHYRX_TX_START_TIMING_OFFSET 0x0000000000000008 962 #define MACTX_PHY_DESC_GENERATE_PHYRX_TX_START_TIMING_LSB 50 963 #define MACTX_PHY_DESC_GENERATE_PHYRX_TX_START_TIMING_MSB 50 964 #define MACTX_PHY_DESC_GENERATE_PHYRX_TX_START_TIMING_MASK 0x0004000000000000 965 966 967 /* Description LTF_SIZE 968 969 Field only valid when pkt type is HE. 970 971 Ltf size 972 973 Specify right LTF-size for HE-Ranging NDPs (11az)/Short-NDP 974 975 976 <enum 0 ltf_1x > 977 <enum 1 ltf_2x > 978 <enum 2 ltf_4x > 979 <legal 0 - 2> 980 */ 981 982 #define MACTX_PHY_DESC_LTF_SIZE_OFFSET 0x0000000000000008 983 #define MACTX_PHY_DESC_LTF_SIZE_LSB 51 984 #define MACTX_PHY_DESC_LTF_SIZE_MSB 52 985 #define MACTX_PHY_DESC_LTF_SIZE_MASK 0x0018000000000000 986 987 988 /* Description RU_SIZE_UPDATED_V2 989 990 Field only valid for pkt_type == 11ax or 11be and 991 SU_or_MU == SU_transmission or 992 SU_or_MU == MU_SU_transmission 993 994 The RU size of the upcoming transmission. 995 996 PHY uses this info to apply different min/max BO if payload 997 bandwidth is less than 10MHz 998 999 In case of HE extended range transmission, e-num 2 (10MHz) 1000 or e-num 7 (20MHz) are used. 1001 1002 In case of trig transmission or OFDMA single user or MU-MIMO 1003 single user transmission, if the ru_size allocated to the 1004 user is the fullBW (with respect to AP_bw) ru size then 1005 the e-num 7 is used. 1006 For all other cases, e-nums corresponding to the ru size 1007 allocated to the user is used. 1008 1009 In case of EHT duplicate transmissions, this field indicates 1010 the width of the actual content before duplication, e.g. 1011 a 40 MHz PPDU duplicated to 160 MHz will have the bandwidth 1012 fields indicating 160 MHz and this field set to e-num 4 1013 (RU_484). 1014 1015 <enum 0 RU_26> 1016 <enum 1 RU_52> 1017 <enum 2 RU_106> 1018 <enum 3 RU_242><enum 4 RU_484><enum 5 RU_996><enum 6 RU_1992> 1019 1020 <enum 7 RU_FULLBW> Set when the RU occupies the full packet 1021 bandwidth 1022 Note that for an MU-RTS trigger, the response will also 1023 go out in legacy CTS rate... and thus e-num 7 will be used. 1024 1025 <enum 8 RU_FULLBW_240> Set when the RU occupies the full 1026 packet bandwidth 1027 <enum 9 RU_FULLBW_320> Set when the RU occupies the full 1028 packet bandwidth 1029 1030 <enum 10 RU_MULTI_LARGE> HW will use per-user sub-band-mask 1031 to infer the actual RU-size for Multi-large-RU/SU-Puncturing 1032 1033 1034 <enum 11 RU_78> multi small RU 1035 <enum 12 RU_132> multi small RU 1036 1037 1038 1039 NOTE: See the table following this TLV definition that explains 1040 the relationship between this field and the RU size allocated 1041 to users. 1042 1043 <legal all> 1044 */ 1045 1046 #define MACTX_PHY_DESC_RU_SIZE_UPDATED_V2_OFFSET 0x0000000000000008 1047 #define MACTX_PHY_DESC_RU_SIZE_UPDATED_V2_LSB 53 1048 #define MACTX_PHY_DESC_RU_SIZE_UPDATED_V2_MSB 56 1049 #define MACTX_PHY_DESC_RU_SIZE_UPDATED_V2_MASK 0x01e0000000000000 1050 1051 1052 /* Description RESERVED_3C 1053 1054 <legal 0> 1055 */ 1056 1057 #define MACTX_PHY_DESC_RESERVED_3C_OFFSET 0x0000000000000008 1058 #define MACTX_PHY_DESC_RESERVED_3C_LSB 57 1059 #define MACTX_PHY_DESC_RESERVED_3C_MSB 57 1060 #define MACTX_PHY_DESC_RESERVED_3C_MASK 0x0200000000000000 1061 1062 1063 /* Description U_SIG_PUNCTURE_PATTERN_ENCODING 1064 1065 Field only valid for pkt_type == 11be 1066 1067 The 6-bit value to be used in U-SIG and/or EHT-SIG Common 1068 field for the puncture pattern 1069 <legal 0-29> 1070 */ 1071 1072 #define MACTX_PHY_DESC_U_SIG_PUNCTURE_PATTERN_ENCODING_OFFSET 0x0000000000000008 1073 #define MACTX_PHY_DESC_U_SIG_PUNCTURE_PATTERN_ENCODING_LSB 58 1074 #define MACTX_PHY_DESC_U_SIG_PUNCTURE_PATTERN_ENCODING_MSB 63 1075 #define MACTX_PHY_DESC_U_SIG_PUNCTURE_PATTERN_ENCODING_MASK 0xfc00000000000000 1076 1077 1078 1079 #endif // MACTX_PHY_DESC 1080