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 _EHT_SIG_USR_OFDMA_INFO_H_ 18 #define _EHT_SIG_USR_OFDMA_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_EHT_SIG_USR_OFDMA_INFO 2 23 24 25 struct eht_sig_usr_ofdma_info { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t sta_id : 11, // [10:0] 28 sta_mcs : 4, // [14:11] 29 validate_0a : 1, // [15:15] 30 nss : 4, // [19:16] 31 txbf : 1, // [20:20] 32 sta_coding : 1, // [21:21] 33 reserved_0b : 1, // [22:22] 34 rx_integrity_check_passed : 1, // [23:23] 35 subband80_cc_mask : 8; // [31:24] 36 uint32_t user_order_subband80_0 : 8, // [7:0] 37 user_order_subband80_1 : 8, // [15:8] 38 user_order_subband80_2 : 8, // [23:16] 39 user_order_subband80_3 : 8; // [31:24] 40 #else 41 uint32_t subband80_cc_mask : 8, // [31:24] 42 rx_integrity_check_passed : 1, // [23:23] 43 reserved_0b : 1, // [22:22] 44 sta_coding : 1, // [21:21] 45 txbf : 1, // [20:20] 46 nss : 4, // [19:16] 47 validate_0a : 1, // [15:15] 48 sta_mcs : 4, // [14:11] 49 sta_id : 11; // [10:0] 50 uint32_t user_order_subband80_3 : 8, // [31:24] 51 user_order_subband80_2 : 8, // [23:16] 52 user_order_subband80_1 : 8, // [15:8] 53 user_order_subband80_0 : 8; // [7:0] 54 #endif 55 }; 56 57 58 /* Description STA_ID 59 60 Identifies the STA that is addressed. Details of STA ID 61 are TBD 62 */ 63 64 #define EHT_SIG_USR_OFDMA_INFO_STA_ID_OFFSET 0x00000000 65 #define EHT_SIG_USR_OFDMA_INFO_STA_ID_LSB 0 66 #define EHT_SIG_USR_OFDMA_INFO_STA_ID_MSB 10 67 #define EHT_SIG_USR_OFDMA_INFO_STA_ID_MASK 0x000007ff 68 69 70 /* Description STA_MCS 71 72 Indicates the data MCS 73 0 - 13: MCS 0 - 13 74 14: validate 75 15: MCS 0 with DCM 76 <legal 0-13, 15> 77 */ 78 79 #define EHT_SIG_USR_OFDMA_INFO_STA_MCS_OFFSET 0x00000000 80 #define EHT_SIG_USR_OFDMA_INFO_STA_MCS_LSB 11 81 #define EHT_SIG_USR_OFDMA_INFO_STA_MCS_MSB 14 82 #define EHT_SIG_USR_OFDMA_INFO_STA_MCS_MASK 0x00007800 83 84 85 /* Description VALIDATE_0A 86 87 Note: spec indicates this shall be set to 1 88 <legal 1> 89 */ 90 91 #define EHT_SIG_USR_OFDMA_INFO_VALIDATE_0A_OFFSET 0x00000000 92 #define EHT_SIG_USR_OFDMA_INFO_VALIDATE_0A_LSB 15 93 #define EHT_SIG_USR_OFDMA_INFO_VALIDATE_0A_MSB 15 94 #define EHT_SIG_USR_OFDMA_INFO_VALIDATE_0A_MASK 0x00008000 95 96 97 /* Description NSS 98 99 Number of spatial streams for this user 100 101 The actual number of streams is 1 larger than indicated 102 in this field. 103 <legal all> 104 */ 105 106 #define EHT_SIG_USR_OFDMA_INFO_NSS_OFFSET 0x00000000 107 #define EHT_SIG_USR_OFDMA_INFO_NSS_LSB 16 108 #define EHT_SIG_USR_OFDMA_INFO_NSS_MSB 19 109 #define EHT_SIG_USR_OFDMA_INFO_NSS_MASK 0x000f0000 110 111 112 /* Description TXBF 113 114 Indicates whether beamforming is applied 115 0: No beamforming 116 1: beamforming 117 <legal all> 118 */ 119 120 #define EHT_SIG_USR_OFDMA_INFO_TXBF_OFFSET 0x00000000 121 #define EHT_SIG_USR_OFDMA_INFO_TXBF_LSB 20 122 #define EHT_SIG_USR_OFDMA_INFO_TXBF_MSB 20 123 #define EHT_SIG_USR_OFDMA_INFO_TXBF_MASK 0x00100000 124 125 126 /* Description STA_CODING 127 128 Distinguishes between BCC/LDPC 129 130 0: BCC 131 1: LDPC 132 <legal all> 133 */ 134 135 #define EHT_SIG_USR_OFDMA_INFO_STA_CODING_OFFSET 0x00000000 136 #define EHT_SIG_USR_OFDMA_INFO_STA_CODING_LSB 21 137 #define EHT_SIG_USR_OFDMA_INFO_STA_CODING_MSB 21 138 #define EHT_SIG_USR_OFDMA_INFO_STA_CODING_MASK 0x00200000 139 140 141 /* Description RESERVED_0B 142 143 <legal 0> 144 */ 145 146 #define EHT_SIG_USR_OFDMA_INFO_RESERVED_0B_OFFSET 0x00000000 147 #define EHT_SIG_USR_OFDMA_INFO_RESERVED_0B_LSB 22 148 #define EHT_SIG_USR_OFDMA_INFO_RESERVED_0B_MSB 22 149 #define EHT_SIG_USR_OFDMA_INFO_RESERVED_0B_MASK 0x00400000 150 151 152 /* Description RX_INTEGRITY_CHECK_PASSED 153 154 TX side: Set to 0 155 RX side: Set to 1 if PHY determines the CRC check of the 156 codeblock containing this EHT-SIG user info has passed, 157 else set to 0 158 159 <legal all> 160 */ 161 162 #define EHT_SIG_USR_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x00000000 163 #define EHT_SIG_USR_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_LSB 23 164 #define EHT_SIG_USR_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_MSB 23 165 #define EHT_SIG_USR_OFDMA_INFO_RX_INTEGRITY_CHECK_PASSED_MASK 0x00800000 166 167 168 /* Description SUBBAND80_CC_MASK 169 170 RX side: Set to 0 171 TX side: Indicates what content channels of what 80 MHz 172 subbands this User field can go to 173 Bit 0: lowest 80 MHz content channel 0 174 Bit 1: lowest 80 MHz content channel 1 175 Bit 2: 2nd lowest 80 MHz content channel 0 176 ... 177 Bit 7: highest 80 MHz content channel 1 178 <legal all> 179 */ 180 181 #define EHT_SIG_USR_OFDMA_INFO_SUBBAND80_CC_MASK_OFFSET 0x00000000 182 #define EHT_SIG_USR_OFDMA_INFO_SUBBAND80_CC_MASK_LSB 24 183 #define EHT_SIG_USR_OFDMA_INFO_SUBBAND80_CC_MASK_MSB 31 184 #define EHT_SIG_USR_OFDMA_INFO_SUBBAND80_CC_MASK_MASK 0xff000000 185 186 187 /* Description USER_ORDER_SUBBAND80_0 188 189 RX side: Set to 0 190 TX side: Ordering index of the User field within the lowest 191 80 MHz 192 Gaps between the ordering indices of User fields indicate 193 that the microcode shall generate "unallocated RU" User 194 fields (STAID=2046) to fill the gaps. 195 <legal all> 196 */ 197 198 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_0_OFFSET 0x00000004 199 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_0_LSB 0 200 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_0_MSB 7 201 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_0_MASK 0x000000ff 202 203 204 /* Description USER_ORDER_SUBBAND80_1 205 206 RX side: Set to 0 207 TX side: Ordering index of the User field within the 2nd 208 lowest 80 MHz 209 See 'user_order_subband80_0.' 210 <legal all> 211 */ 212 213 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_1_OFFSET 0x00000004 214 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_1_LSB 8 215 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_1_MSB 15 216 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_1_MASK 0x0000ff00 217 218 219 /* Description USER_ORDER_SUBBAND80_2 220 221 RX side: Set to 0 222 TX side: Ordering index of the User field within the 2nd 223 highest 80 MHz 224 See 'user_order_subband80_0.' 225 <legal all> 226 */ 227 228 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_2_OFFSET 0x00000004 229 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_2_LSB 16 230 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_2_MSB 23 231 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_2_MASK 0x00ff0000 232 233 234 /* Description USER_ORDER_SUBBAND80_3 235 236 RX side: Set to 0 237 TX side: Ordering index of the User field within the highest 238 80 MHz 239 See 'user_order_subband80_0.' 240 <legal all> 241 */ 242 243 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_3_OFFSET 0x00000004 244 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_3_LSB 24 245 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_3_MSB 31 246 #define EHT_SIG_USR_OFDMA_INFO_USER_ORDER_SUBBAND80_3_MASK 0xff000000 247 248 249 250 #endif // EHT_SIG_USR_OFDMA_INFO 251