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 _RU_ALLOCATION_160_INFO_H_ 18 #define _RU_ALLOCATION_160_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_RU_ALLOCATION_160_INFO 4 23 24 25 struct ru_allocation_160_info { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t ru_allocation_band0_0 : 9, // [8:0] 28 ru_allocation_band0_1 : 9, // [17:9] 29 reserved_0a : 6, // [23:18] 30 ru_allocations_01_subband80_mask : 4, // [27:24] 31 ru_allocations_23_subband80_mask : 4; // [31:28] 32 uint32_t ru_allocation_band0_2 : 9, // [8:0] 33 ru_allocation_band0_3 : 9, // [17:9] 34 reserved_1a : 14; // [31:18] 35 uint32_t ru_allocation_band1_0 : 9, // [8:0] 36 ru_allocation_band1_1 : 9, // [17:9] 37 reserved_2a : 14; // [31:18] 38 uint32_t ru_allocation_band1_2 : 9, // [8:0] 39 ru_allocation_band1_3 : 9, // [17:9] 40 reserved_3a : 14; // [31:18] 41 #else 42 uint32_t ru_allocations_23_subband80_mask : 4, // [31:28] 43 ru_allocations_01_subband80_mask : 4, // [27:24] 44 reserved_0a : 6, // [23:18] 45 ru_allocation_band0_1 : 9, // [17:9] 46 ru_allocation_band0_0 : 9; // [8:0] 47 uint32_t reserved_1a : 14, // [31:18] 48 ru_allocation_band0_3 : 9, // [17:9] 49 ru_allocation_band0_2 : 9; // [8:0] 50 uint32_t reserved_2a : 14, // [31:18] 51 ru_allocation_band1_1 : 9, // [17:9] 52 ru_allocation_band1_0 : 9; // [8:0] 53 uint32_t reserved_3a : 14, // [31:18] 54 ru_allocation_band1_3 : 9, // [17:9] 55 ru_allocation_band1_2 : 9; // [8:0] 56 #endif 57 }; 58 59 60 /* Description RU_ALLOCATION_BAND0_0 61 62 Field not used for MIMO 63 64 Indicates RU arrangement in frequency domain. RU allocated 65 for MU-MIMO, and number of users in the MU-MIMO. 66 0 - valid for HE_20/HE_40/HE_80/HE_160/ EHT_20/EHT_40/EHT_80/EHT_160/ 67 EHT_240/EHT_320 68 1 - valid for HE_80/HE_160 (80+80)/ EHT_80/EHT_160/EHT_240/EHT_320 69 70 2 - valid for HE_160 (80+80)/ EHT_160/EHT_240/EHT_320 71 3 - valid for HE_160 (80+80)/ EHT_160/EHT_240/EHT_320 72 73 The four bands are for HE_SIGB0 & B1 respectively or for 74 EHT_SIG0, EHT_SIG1, EHT_SIG2 & EHT_SIG3 respectively. 75 76 valid for HE_20/HE_40/HE_80/HE_160/ EHT_20/EHT_40/EHT_80/EHT_160/ 77 EHT_240/EHT_320 packets and denotes RU-map of the first 78 20MHz band of HE_SIGB0 or EHT_SIG0 79 <legal all> 80 */ 81 82 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_0_OFFSET 0x00000000 83 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_0_LSB 0 84 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_0_MSB 8 85 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_0_MASK 0x000001ff 86 87 88 /* Description RU_ALLOCATION_BAND0_1 89 90 Field not used for MIMO 91 92 See description of ru_allocation_band0_0 93 94 valid for HE_80/HE_160/ EHT_80/EHT_160/EHT_240/EHT_320 packets 95 and denotes RU-map of the second 20MHz band of HE_SIGB0 96 or EHT_SIG0 97 */ 98 99 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_1_OFFSET 0x00000000 100 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_1_LSB 9 101 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_1_MSB 17 102 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_1_MASK 0x0003fe00 103 104 105 /* Description RESERVED_0A 106 107 <legal 0> 108 */ 109 110 #define RU_ALLOCATION_160_INFO_RESERVED_0A_OFFSET 0x00000000 111 #define RU_ALLOCATION_160_INFO_RESERVED_0A_LSB 18 112 #define RU_ALLOCATION_160_INFO_RESERVED_0A_MSB 23 113 #define RU_ALLOCATION_160_INFO_RESERVED_0A_MASK 0x00fc0000 114 115 116 /* Description RU_ALLOCATIONS_01_SUBBAND80_MASK 117 118 Field not used for HE 119 120 Indicates what 80 MHz subbands 'ru_allocation_band{0, 1}_{0, 121 1}' are valid for 122 Bit 0: lowest 80 MHz 123 Bit 1: 2nd lowest 80 MHz 124 Bit 2: 2nd highest 80 MHz 125 Bit 3: highest 80 MHz 126 127 In other 80 MHz subbands PHY microcode should override these 128 with 'zero-user RU996.' 129 <legal all> 130 */ 131 132 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_01_SUBBAND80_MASK_OFFSET 0x00000000 133 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_01_SUBBAND80_MASK_LSB 24 134 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_01_SUBBAND80_MASK_MSB 27 135 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_01_SUBBAND80_MASK_MASK 0x0f000000 136 137 138 /* Description RU_ALLOCATIONS_23_SUBBAND80_MASK 139 140 Field not used for HE 141 142 Indicates what 80 MHz subbands 'ru_allocation_band{0, 1}_{2, 143 3}' are valid for 144 Bit 0: lowest 80 MHz 145 Bit 1: 2nd lowest 80 MHz 146 Bit 2: 2nd highest 80 MHz 147 Bit 3: highest 80 MHz 148 149 In other 80 MHz subbands PHY microcode should override these 150 with 'zero-user RU996.' 151 <legal all> 152 */ 153 154 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_23_SUBBAND80_MASK_OFFSET 0x00000000 155 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_23_SUBBAND80_MASK_LSB 28 156 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_23_SUBBAND80_MASK_MSB 31 157 #define RU_ALLOCATION_160_INFO_RU_ALLOCATIONS_23_SUBBAND80_MASK_MASK 0xf0000000 158 159 160 /* Description RU_ALLOCATION_BAND0_2 161 162 Field not used for MIMO 163 164 See description of ru_allocation_band0_0 165 166 valid for HE_160/ EHT_160/EHT_240/EHT_320 packets and denotes 167 RU-map of the third 20MHz band of HE_SIGB0 or EHT_SIG0 168 */ 169 170 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_2_OFFSET 0x00000004 171 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_2_LSB 0 172 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_2_MSB 8 173 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_2_MASK 0x000001ff 174 175 176 /* Description RU_ALLOCATION_BAND0_3 177 178 Field not used for MIMO 179 180 See description of ru_allocation_band0_0 181 182 valid for HE_160/ EHT_160/EHT_240/EHT_320 packets and denotes 183 RU-map of the fourth 20MHz band of HE_SIGB0 or EHT_SIG0 184 185 */ 186 187 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_3_OFFSET 0x00000004 188 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_3_LSB 9 189 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_3_MSB 17 190 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND0_3_MASK 0x0003fe00 191 192 193 /* Description RESERVED_1A 194 195 <legal 0> 196 */ 197 198 #define RU_ALLOCATION_160_INFO_RESERVED_1A_OFFSET 0x00000004 199 #define RU_ALLOCATION_160_INFO_RESERVED_1A_LSB 18 200 #define RU_ALLOCATION_160_INFO_RESERVED_1A_MSB 31 201 #define RU_ALLOCATION_160_INFO_RESERVED_1A_MASK 0xfffc0000 202 203 204 /* Description RU_ALLOCATION_BAND1_0 205 206 Field not used for MIMO 207 208 See description of ru_allocation_band0_0 209 210 valid for HE_40/HE_80/HE_160/ EHT_40/EHT_80/EHT_160/ EHT_240/EHT_320 211 packets and denotes RU-map of the first 20MHz band of HE_SIGB1 212 or EHT_SIG1 213 */ 214 215 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_0_OFFSET 0x00000008 216 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_0_LSB 0 217 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_0_MSB 8 218 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_0_MASK 0x000001ff 219 220 221 /* Description RU_ALLOCATION_BAND1_1 222 223 Field not used for MIMO 224 225 See description of ru_allocation_band0_0 226 227 valid for HE_80/HE_160/ EHT_80/EHT_160/EHT_240/EHT_320 packets 228 and denotes RU-map of the second 20MHz band of HE_SIGB1 229 or EHT_SIG1 230 */ 231 232 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_1_OFFSET 0x00000008 233 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_1_LSB 9 234 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_1_MSB 17 235 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_1_MASK 0x0003fe00 236 237 238 /* Description RESERVED_2A 239 240 <legal 0> 241 */ 242 243 #define RU_ALLOCATION_160_INFO_RESERVED_2A_OFFSET 0x00000008 244 #define RU_ALLOCATION_160_INFO_RESERVED_2A_LSB 18 245 #define RU_ALLOCATION_160_INFO_RESERVED_2A_MSB 31 246 #define RU_ALLOCATION_160_INFO_RESERVED_2A_MASK 0xfffc0000 247 248 249 /* Description RU_ALLOCATION_BAND1_2 250 251 Field not used for MIMO 252 253 See description of ru_allocation_band0_0 254 255 valid for HE_160/ EHT_160/EHT_240/EHT_320 packets and denotes 256 RU-map of the third 20MHz band of HE_SIGB1 or EHT_SIG1 257 */ 258 259 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_2_OFFSET 0x0000000c 260 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_2_LSB 0 261 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_2_MSB 8 262 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_2_MASK 0x000001ff 263 264 265 /* Description RU_ALLOCATION_BAND1_3 266 267 Field not used for MIMO 268 269 See description of ru_allocation_band0_0 270 271 valid for HE_160/ EHT_160/EHT_240/EHT_320 packets and denotes 272 RU-map of the fourth 20MHz band of HE_SIGB1 or EHT_SIG1 273 274 */ 275 276 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_3_OFFSET 0x0000000c 277 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_3_LSB 9 278 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_3_MSB 17 279 #define RU_ALLOCATION_160_INFO_RU_ALLOCATION_BAND1_3_MASK 0x0003fe00 280 281 282 /* Description RESERVED_3A 283 284 <legal 0> 285 */ 286 287 #define RU_ALLOCATION_160_INFO_RESERVED_3A_OFFSET 0x0000000c 288 #define RU_ALLOCATION_160_INFO_RESERVED_3A_LSB 18 289 #define RU_ALLOCATION_160_INFO_RESERVED_3A_MSB 31 290 #define RU_ALLOCATION_160_INFO_RESERVED_3A_MASK 0xfffc0000 291 292 293 294 #endif // RU_ALLOCATION_160_INFO 295