1 /* 2 * Copyright (c) 2020 The Linux Foundation. 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 // $ATH_LICENSE_HW_HDR_C$ 18 // 19 // DO NOT EDIT! This file is automatically generated 20 // These definitions are tied to a particular hardware layout 21 22 23 #ifndef _RECEIVE_USER_INFO_H_ 24 #define _RECEIVE_USER_INFO_H_ 25 #if !defined(__ASSEMBLER__) 26 #endif 27 28 29 // ################ START SUMMARY ################# 30 // 31 // Dword Fields 32 // 0 phy_ppdu_id[15:0], user_rssi[23:16], pkt_type[27:24], stbc[28], reception_type[31:29] 33 // 1 rate_mcs[3:0], sgi[5:4], receive_bandwidth[7:6], mimo_ss_bitmap[15:8], ofdma_ru_allocation[23:16], ofdma_user_index[30:24], ofdma_content_channel[31] 34 // 2 ldpc[0], reserved_2a[31:1] 35 // 36 // ################ END SUMMARY ################# 37 38 #define NUM_OF_DWORDS_RECEIVE_USER_INFO 3 39 40 struct receive_user_info { 41 uint32_t phy_ppdu_id : 16, //[15:0] 42 user_rssi : 8, //[23:16] 43 pkt_type : 4, //[27:24] 44 stbc : 1, //[28] 45 reception_type : 3; //[31:29] 46 uint32_t rate_mcs : 4, //[3:0] 47 sgi : 2, //[5:4] 48 receive_bandwidth : 2, //[7:6] 49 mimo_ss_bitmap : 8, //[15:8] 50 ofdma_ru_allocation : 8, //[23:16] 51 ofdma_user_index : 7, //[30:24] 52 ofdma_content_channel : 1; //[31] 53 uint32_t ldpc : 1, //[0] 54 reserved_2a : 31; //[31:1] 55 }; 56 57 /* 58 59 phy_ppdu_id 60 61 A ppdu counter value that PHY increments for every PPDU 62 received. The counter value wraps around 63 64 <legal all> 65 66 user_rssi 67 68 RSSI for this user 69 70 Frequency domain RSSI measurement for this user. Based 71 on the channel estimate. 72 73 74 75 <legal all> 76 77 pkt_type 78 79 Packet type: 80 81 82 83 <enum 0 dot11a>802.11a PPDU type 84 85 <enum 1 dot11b>802.11b PPDU type 86 87 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 88 89 <enum 3 dot11ac>802.11ac PPDU type 90 91 <enum 4 dot11ax>802.11ax PPDU type 92 93 stbc 94 95 When set, use STBC transmission rates 96 97 reception_type 98 99 Indicates what type of reception this is. 100 101 <enum 0 reception_type_SU > Basic SU reception (not 102 part of OFDMA or MIMO) 103 104 <enum 1 reception_type_MU_MIMO > This is related to 105 DL type of reception 106 107 <enum 2 reception_type_MU_OFDMA > This is related 108 to DL type of reception 109 110 <enum 3 reception_type_MU_OFDMA_MIMO > This is 111 related to DL type of reception 112 113 <enum 4 reception_type_UL_MU_MIMO > This is related 114 to UL type of reception 115 116 <enum 5 reception_type_UL_MU_OFDMA > This is 117 related to UL type of reception 118 119 <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is 120 related to UL type of reception 121 122 123 124 <legal 0-6> 125 126 rate_mcs 127 128 For details, refer to MCS_TYPE description 129 130 <legal all> 131 132 sgi 133 134 Field only valid when pkt type is HT, VHT or HE. 135 136 137 138 <enum 0 gi_0_8_us > Legacy normal GI. Can also be 139 used for HE 140 141 <enum 1 gi_0_4_us > Legacy short GI. Can also be 142 used for HE 143 144 <enum 2 gi_1_6_us > HE related GI 145 146 <enum 3 gi_3_2_us > HE related GI 147 148 <legal 0 - 3> 149 150 receive_bandwidth 151 152 Full receive Bandwidth 153 154 155 156 <enum 0 full_rx_bw_20_mhz> 157 158 <enum 1 full_rx_bw_40_mhz> 159 160 <enum 2 full_rx_bw_80_mhz> 161 162 <enum 3 full_rx_bw_160_mhz> 163 164 165 166 <legal 0-3> 167 168 mimo_ss_bitmap 169 170 Field only valid in case of MIMO type reception 171 172 173 174 Bitmap, with each bit indicating if the related spatial 175 stream is used for this STA 176 177 LSB related to SS 0 178 179 180 181 0: spatial stream not used for this reception 182 183 1: spatial stream used for this reception 184 185 186 187 <legal all> 188 189 ofdma_ru_allocation 190 191 Field only valid in case of OFDMA type receptions (DL 192 and UL) 193 194 195 196 Indicates the RU number associated with this user. 197 198 199 200 In case of reception where the transmission was DL MU 201 OFDMA, this field provides the RU pattern. Note that fields 202 ofdma_user_index and Content_channel are needed to determine 203 which RU was actually assigned to this user. 204 205 206 207 In case of reception where the transmission was UL MU 208 OFDMA, this field contains everything needed to determine 209 the actual RU 210 211 <legal all> 212 213 ofdma_user_index 214 215 Field only valid in the of DL MU OFDMA reception 216 217 218 219 The user number within the RU_allocation. 220 221 222 223 This is needed for SW to determine the exact RU position 224 within the reception. 225 226 <legal all> 227 228 ofdma_content_channel 229 230 Field only valid in the of DL MU OFDMA/MIMO reception 231 232 233 234 In case of DL MU reception, this field indicates the 235 content channel number where PHY found the RU information 236 for this user 237 238 239 240 This is needed for SW to determine the exact RU position 241 within the reception. 242 243 244 245 <enum 0 content_channel_1> 246 247 <enum 1 content_channel_2> 248 249 250 251 <legal all> 252 253 ldpc 254 255 When set, use LDPC transmission rates were used. 256 257 <legal all> 258 259 reserved_2a 260 261 <legal 0> 262 */ 263 264 265 /* Description RECEIVE_USER_INFO_0_PHY_PPDU_ID 266 267 A ppdu counter value that PHY increments for every PPDU 268 received. The counter value wraps around 269 270 <legal all> 271 */ 272 #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_OFFSET 0x00000000 273 #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_LSB 0 274 #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_MASK 0x0000ffff 275 276 /* Description RECEIVE_USER_INFO_0_USER_RSSI 277 278 RSSI for this user 279 280 Frequency domain RSSI measurement for this user. Based 281 on the channel estimate. 282 283 284 285 <legal all> 286 */ 287 #define RECEIVE_USER_INFO_0_USER_RSSI_OFFSET 0x00000000 288 #define RECEIVE_USER_INFO_0_USER_RSSI_LSB 16 289 #define RECEIVE_USER_INFO_0_USER_RSSI_MASK 0x00ff0000 290 291 /* Description RECEIVE_USER_INFO_0_PKT_TYPE 292 293 Packet type: 294 295 296 297 <enum 0 dot11a>802.11a PPDU type 298 299 <enum 1 dot11b>802.11b PPDU type 300 301 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 302 303 <enum 3 dot11ac>802.11ac PPDU type 304 305 <enum 4 dot11ax>802.11ax PPDU type 306 */ 307 #define RECEIVE_USER_INFO_0_PKT_TYPE_OFFSET 0x00000000 308 #define RECEIVE_USER_INFO_0_PKT_TYPE_LSB 24 309 #define RECEIVE_USER_INFO_0_PKT_TYPE_MASK 0x0f000000 310 311 /* Description RECEIVE_USER_INFO_0_STBC 312 313 When set, use STBC transmission rates 314 */ 315 #define RECEIVE_USER_INFO_0_STBC_OFFSET 0x00000000 316 #define RECEIVE_USER_INFO_0_STBC_LSB 28 317 #define RECEIVE_USER_INFO_0_STBC_MASK 0x10000000 318 319 /* Description RECEIVE_USER_INFO_0_RECEPTION_TYPE 320 321 Indicates what type of reception this is. 322 323 <enum 0 reception_type_SU > Basic SU reception (not 324 part of OFDMA or MIMO) 325 326 <enum 1 reception_type_MU_MIMO > This is related to 327 DL type of reception 328 329 <enum 2 reception_type_MU_OFDMA > This is related 330 to DL type of reception 331 332 <enum 3 reception_type_MU_OFDMA_MIMO > This is 333 related to DL type of reception 334 335 <enum 4 reception_type_UL_MU_MIMO > This is related 336 to UL type of reception 337 338 <enum 5 reception_type_UL_MU_OFDMA > This is 339 related to UL type of reception 340 341 <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is 342 related to UL type of reception 343 344 345 346 <legal 0-6> 347 */ 348 #define RECEIVE_USER_INFO_0_RECEPTION_TYPE_OFFSET 0x00000000 349 #define RECEIVE_USER_INFO_0_RECEPTION_TYPE_LSB 29 350 #define RECEIVE_USER_INFO_0_RECEPTION_TYPE_MASK 0xe0000000 351 352 /* Description RECEIVE_USER_INFO_1_RATE_MCS 353 354 For details, refer to MCS_TYPE description 355 356 <legal all> 357 */ 358 #define RECEIVE_USER_INFO_1_RATE_MCS_OFFSET 0x00000004 359 #define RECEIVE_USER_INFO_1_RATE_MCS_LSB 0 360 #define RECEIVE_USER_INFO_1_RATE_MCS_MASK 0x0000000f 361 362 /* Description RECEIVE_USER_INFO_1_SGI 363 364 Field only valid when pkt type is HT, VHT or HE. 365 366 367 368 <enum 0 gi_0_8_us > Legacy normal GI. Can also be 369 used for HE 370 371 <enum 1 gi_0_4_us > Legacy short GI. Can also be 372 used for HE 373 374 <enum 2 gi_1_6_us > HE related GI 375 376 <enum 3 gi_3_2_us > HE related GI 377 378 <legal 0 - 3> 379 */ 380 #define RECEIVE_USER_INFO_1_SGI_OFFSET 0x00000004 381 #define RECEIVE_USER_INFO_1_SGI_LSB 4 382 #define RECEIVE_USER_INFO_1_SGI_MASK 0x00000030 383 384 /* Description RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH 385 386 Full receive Bandwidth 387 388 389 390 <enum 0 full_rx_bw_20_mhz> 391 392 <enum 1 full_rx_bw_40_mhz> 393 394 <enum 2 full_rx_bw_80_mhz> 395 396 <enum 3 full_rx_bw_160_mhz> 397 398 399 400 <legal 0-3> 401 */ 402 #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_OFFSET 0x00000004 403 #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_LSB 6 404 #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_MASK 0x000000c0 405 406 /* Description RECEIVE_USER_INFO_1_MIMO_SS_BITMAP 407 408 Field only valid in case of MIMO type reception 409 410 411 412 Bitmap, with each bit indicating if the related spatial 413 stream is used for this STA 414 415 LSB related to SS 0 416 417 418 419 0: spatial stream not used for this reception 420 421 1: spatial stream used for this reception 422 423 424 425 <legal all> 426 */ 427 #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_OFFSET 0x00000004 428 #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_LSB 8 429 #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_MASK 0x0000ff00 430 431 /* Description RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION 432 433 Field only valid in case of OFDMA type receptions (DL 434 and UL) 435 436 437 438 Indicates the RU number associated with this user. 439 440 441 442 In case of reception where the transmission was DL MU 443 OFDMA, this field provides the RU pattern. Note that fields 444 ofdma_user_index and Content_channel are needed to determine 445 which RU was actually assigned to this user. 446 447 448 449 In case of reception where the transmission was UL MU 450 OFDMA, this field contains everything needed to determine 451 the actual RU 452 453 <legal all> 454 */ 455 #define RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION_OFFSET 0x00000004 456 #define RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION_LSB 16 457 #define RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION_MASK 0x00ff0000 458 459 /* Description RECEIVE_USER_INFO_1_OFDMA_USER_INDEX 460 461 Field only valid in the of DL MU OFDMA reception 462 463 464 465 The user number within the RU_allocation. 466 467 468 469 This is needed for SW to determine the exact RU position 470 within the reception. 471 472 <legal all> 473 */ 474 #define RECEIVE_USER_INFO_1_OFDMA_USER_INDEX_OFFSET 0x00000004 475 #define RECEIVE_USER_INFO_1_OFDMA_USER_INDEX_LSB 24 476 #define RECEIVE_USER_INFO_1_OFDMA_USER_INDEX_MASK 0x7f000000 477 478 /* Description RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL 479 480 Field only valid in the of DL MU OFDMA/MIMO reception 481 482 483 484 In case of DL MU reception, this field indicates the 485 content channel number where PHY found the RU information 486 for this user 487 488 489 490 This is needed for SW to determine the exact RU position 491 within the reception. 492 493 494 495 <enum 0 content_channel_1> 496 497 <enum 1 content_channel_2> 498 499 500 501 <legal all> 502 */ 503 #define RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL_OFFSET 0x00000004 504 #define RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL_LSB 31 505 #define RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL_MASK 0x80000000 506 507 /* Description RECEIVE_USER_INFO_2_LDPC 508 509 When set, use LDPC transmission rates were used. 510 511 <legal all> 512 */ 513 #define RECEIVE_USER_INFO_2_LDPC_OFFSET 0x00000008 514 #define RECEIVE_USER_INFO_2_LDPC_LSB 0 515 #define RECEIVE_USER_INFO_2_LDPC_MASK 0x00000001 516 517 /* Description RECEIVE_USER_INFO_2_RESERVED_2A 518 519 <legal 0> 520 */ 521 #define RECEIVE_USER_INFO_2_RESERVED_2A_OFFSET 0x00000008 522 #define RECEIVE_USER_INFO_2_RESERVED_2A_LSB 1 523 #define RECEIVE_USER_INFO_2_RESERVED_2A_MASK 0xfffffffe 524 525 526 #endif // _RECEIVE_USER_INFO_H_ 527