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 _PDG_TX_REQ_H_ 18 #define _PDG_TX_REQ_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_PDG_TX_REQ 2 23 24 #define NUM_OF_QWORDS_PDG_TX_REQ 1 25 26 27 struct pdg_tx_req { 28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 29 uint32_t tx_reason : 2, // [1:0] 30 use_puncture_pattern : 2, // [3:2] 31 req_bw : 3, // [6:4] 32 puncture_pattern_number : 6, // [12:7] 33 reserved_0b : 1, // [13:13] 34 req_paprd : 1, // [14:14] 35 duration_field_boundary_valid : 1, // [15:15] 36 duration_field_boundary : 16; // [31:16] 37 uint32_t puncture_subband_mask : 16, // [15:0] 38 reserved_0c : 16; // [31:16] 39 #else 40 uint32_t duration_field_boundary : 16, // [31:16] 41 duration_field_boundary_valid : 1, // [15:15] 42 req_paprd : 1, // [14:14] 43 reserved_0b : 1, // [13:13] 44 puncture_pattern_number : 6, // [12:7] 45 req_bw : 3, // [6:4] 46 use_puncture_pattern : 2, // [3:2] 47 tx_reason : 2; // [1:0] 48 uint32_t reserved_0c : 16, // [31:16] 49 puncture_subband_mask : 16; // [15:0] 50 #endif 51 }; 52 53 54 /* Description TX_REASON 55 56 <enum 0 tx_fes_protection_frame> RTS, CTS2Self or 11h 57 protection type transmission preceding the regular PPDU 58 portion of the coming FES. 59 <enum 1 tx_fes_after_protection > Regular PPDU transmission 60 that follows the transmission of medium protection frames:. 61 62 <enum 2 tx_fes_only> Regular PPDU transmission without 63 preceding medium protection frame exchanges. 64 65 Note: Response frame transmissions are initiated with the 66 PDG_RESPONSE TLV 67 68 <legal 0-2> 69 */ 70 71 #define PDG_TX_REQ_TX_REASON_OFFSET 0x0000000000000000 72 #define PDG_TX_REQ_TX_REASON_LSB 0 73 #define PDG_TX_REQ_TX_REASON_MSB 1 74 #define PDG_TX_REQ_TX_REASON_MASK 0x0000000000000003 75 76 77 78 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_OFFSET 0x0000000000000000 79 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_LSB 2 80 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_MSB 3 81 #define PDG_TX_REQ_USE_PUNCTURE_PATTERN_MASK 0x000000000000000c 82 83 84 /* Description REQ_BW 85 86 Field not valid when use_puncture_pattern is set to PUNCTURE_FROM_TX_SETUP 87 88 89 The BW of the upcoming transmission. 90 Note: Coex might have changed this from the original request. 91 92 93 <enum 0 20_mhz>20 Mhz BW 94 <enum 1 40_mhz>40 Mhz BW 95 <enum 2 80_mhz>80 Mhz BW 96 <enum 3 160_mhz>160 Mhz BW 97 <enum 4 320_mhz>320 Mhz BW 98 <enum 5 240_mhz>240 Mhz BW 99 */ 100 101 #define PDG_TX_REQ_REQ_BW_OFFSET 0x0000000000000000 102 #define PDG_TX_REQ_REQ_BW_LSB 4 103 #define PDG_TX_REQ_REQ_BW_MSB 6 104 #define PDG_TX_REQ_REQ_BW_MASK 0x0000000000000070 105 106 107 /* Description PUNCTURE_PATTERN_NUMBER 108 109 Field only valid when "use_puncture_pattern" is set. 110 111 The pattern number in case punctured transmission is enabled 112 113 <legal all> 114 */ 115 116 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_OFFSET 0x0000000000000000 117 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_LSB 7 118 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_MSB 12 119 #define PDG_TX_REQ_PUNCTURE_PATTERN_NUMBER_MASK 0x0000000000001f80 120 121 122 /* Description RESERVED_0B 123 124 <legal 0> 125 */ 126 127 #define PDG_TX_REQ_RESERVED_0B_OFFSET 0x0000000000000000 128 #define PDG_TX_REQ_RESERVED_0B_LSB 13 129 #define PDG_TX_REQ_RESERVED_0B_MSB 13 130 #define PDG_TX_REQ_RESERVED_0B_MASK 0x0000000000002000 131 132 133 #define PDG_TX_REQ_REQ_PAPRD_OFFSET 0x0000000000000000 134 #define PDG_TX_REQ_REQ_PAPRD_LSB 14 135 #define PDG_TX_REQ_REQ_PAPRD_MSB 14 136 #define PDG_TX_REQ_REQ_PAPRD_MASK 0x0000000000004000 137 138 139 /* Description DURATION_FIELD_BOUNDARY_VALID 140 141 When set, PDG should take the 'duration_field_boundary' 142 value into account when it is calculating the TX and RX 143 boundaries for the upcoming transmission. Both RX and TX 144 should not go beyond this time duration provided. 145 146 <legal all> 147 */ 148 149 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_OFFSET 0x0000000000000000 150 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_LSB 15 151 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_MSB 15 152 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_VALID_MASK 0x0000000000008000 153 154 155 /* Description DURATION_FIELD_BOUNDARY 156 157 Field only valid when 'Duration_field_boundary_valid' is 158 set 159 160 Amount of time to both TX and RX boundaries that PDG should 161 take into account for the upcoming transmission. 162 <legal all> 163 */ 164 165 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_OFFSET 0x0000000000000000 166 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_LSB 16 167 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_MSB 31 168 #define PDG_TX_REQ_DURATION_FIELD_BOUNDARY_MASK 0x00000000ffff0000 169 170 171 /* Description PUNCTURE_SUBBAND_MASK 172 173 Field only valid when use_puncture_pattern is set to PUNCTURE_FROM_ALL_ALLOWED_MODES 174 175 176 This mask indicates which 20 Mhz channels are actively used 177 in this transmission. 178 179 Bit 0: primary 20 Mhz 180 Bit 1: secondary 20 MHz 181 Etc. 182 <legal all> 183 */ 184 185 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_OFFSET 0x0000000000000000 186 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_LSB 32 187 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_MSB 47 188 #define PDG_TX_REQ_PUNCTURE_SUBBAND_MASK_MASK 0x0000ffff00000000 189 190 191 /* Description RESERVED_0C 192 193 Reserved for future power bits: Generator should set to 194 0, consumer shall ignore <legal 0> 195 */ 196 197 #define PDG_TX_REQ_RESERVED_0C_OFFSET 0x0000000000000000 198 #define PDG_TX_REQ_RESERVED_0C_LSB 48 199 #define PDG_TX_REQ_RESERVED_0C_MSB 63 200 #define PDG_TX_REQ_RESERVED_0C_MASK 0xffff000000000000 201 202 203 204 #endif // PDG_TX_REQ 205