he_sig_b2_mu_info.h 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. #ifndef _HE_SIG_B2_MU_INFO_H_
  17. #define _HE_SIG_B2_MU_INFO_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_HE_SIG_B2_MU_INFO 2
  21. struct he_sig_b2_mu_info {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t sta_id : 11, // [10:0]
  24. sta_spatial_config : 4, // [14:11]
  25. sta_mcs : 4, // [18:15]
  26. reserved_set_to_1 : 1, // [19:19]
  27. sta_coding : 1, // [20:20]
  28. reserved_0a : 7, // [27:21]
  29. nsts : 3, // [30:28]
  30. rx_integrity_check_passed : 1; // [31:31]
  31. uint32_t user_order : 8, // [7:0]
  32. cc_mask : 8, // [15:8]
  33. reserved_1a : 16; // [31:16]
  34. #else
  35. uint32_t rx_integrity_check_passed : 1, // [31:31]
  36. nsts : 3, // [30:28]
  37. reserved_0a : 7, // [27:21]
  38. sta_coding : 1, // [20:20]
  39. reserved_set_to_1 : 1, // [19:19]
  40. sta_mcs : 4, // [18:15]
  41. sta_spatial_config : 4, // [14:11]
  42. sta_id : 11; // [10:0]
  43. uint32_t reserved_1a : 16, // [31:16]
  44. cc_mask : 8, // [15:8]
  45. user_order : 8; // [7:0]
  46. #endif
  47. };
  48. /* Description STA_ID
  49. Identifies the STA that is addressed. Details of STA ID
  50. are TBD
  51. */
  52. #define HE_SIG_B2_MU_INFO_STA_ID_OFFSET 0x00000000
  53. #define HE_SIG_B2_MU_INFO_STA_ID_LSB 0
  54. #define HE_SIG_B2_MU_INFO_STA_ID_MSB 10
  55. #define HE_SIG_B2_MU_INFO_STA_ID_MASK 0x000007ff
  56. /* Description STA_SPATIAL_CONFIG
  57. Number of assigned spatial streams and their corresponding
  58. index.
  59. Total number of spatial streams assigned for the MU-MIMO
  60. allocation is also signaled.
  61. */
  62. #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_OFFSET 0x00000000
  63. #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_LSB 11
  64. #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_MSB 14
  65. #define HE_SIG_B2_MU_INFO_STA_SPATIAL_CONFIG_MASK 0x00007800
  66. /* Description STA_MCS
  67. Indicates the data MCS
  68. */
  69. #define HE_SIG_B2_MU_INFO_STA_MCS_OFFSET 0x00000000
  70. #define HE_SIG_B2_MU_INFO_STA_MCS_LSB 15
  71. #define HE_SIG_B2_MU_INFO_STA_MCS_MSB 18
  72. #define HE_SIG_B2_MU_INFO_STA_MCS_MASK 0x00078000
  73. #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_OFFSET 0x00000000
  74. #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_LSB 19
  75. #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_MSB 19
  76. #define HE_SIG_B2_MU_INFO_RESERVED_SET_TO_1_MASK 0x00080000
  77. /* Description STA_CODING
  78. Distinguishes between BCC/LDPC
  79. 0: BCC
  80. 1: LDPC
  81. <legal all>
  82. */
  83. #define HE_SIG_B2_MU_INFO_STA_CODING_OFFSET 0x00000000
  84. #define HE_SIG_B2_MU_INFO_STA_CODING_LSB 20
  85. #define HE_SIG_B2_MU_INFO_STA_CODING_MSB 20
  86. #define HE_SIG_B2_MU_INFO_STA_CODING_MASK 0x00100000
  87. /* Description RESERVED_0A
  88. <legal 0>
  89. */
  90. #define HE_SIG_B2_MU_INFO_RESERVED_0A_OFFSET 0x00000000
  91. #define HE_SIG_B2_MU_INFO_RESERVED_0A_LSB 21
  92. #define HE_SIG_B2_MU_INFO_RESERVED_0A_MSB 27
  93. #define HE_SIG_B2_MU_INFO_RESERVED_0A_MASK 0x0fe00000
  94. /* Description NSTS
  95. MAC RX side usage only:
  96. Needed by RXPCU. Provided by PHY so that RXPCU does not
  97. need to have the RU number decoding logic.
  98. Number of spatial streams for this user
  99. <enum 0 1_spatial_stream>Single spatial stream
  100. <enum 1 2_spatial_streams>2 spatial streams
  101. <enum 2 3_spatial_streams>3 spatial streams
  102. <enum 3 4_spatial_streams>4 spatial streams
  103. <enum 4 5_spatial_streams>5 spatial streams
  104. <enum 5 6_spatial_streams>6 spatial streams
  105. <enum 6 7_spatial_streams>7 spatial streams
  106. <enum 7 8_spatial_streams>8 spatial streams
  107. */
  108. #define HE_SIG_B2_MU_INFO_NSTS_OFFSET 0x00000000
  109. #define HE_SIG_B2_MU_INFO_NSTS_LSB 28
  110. #define HE_SIG_B2_MU_INFO_NSTS_MSB 30
  111. #define HE_SIG_B2_MU_INFO_NSTS_MASK 0x70000000
  112. /* Description RX_INTEGRITY_CHECK_PASSED
  113. TX side: Set to 0
  114. RX side: Set to 1 if PHY determines the CRC check of the
  115. codeblock containing this HE-SIG-B user info has passed,
  116. else set to 0
  117. <legal all>
  118. */
  119. #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x00000000
  120. #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_LSB 31
  121. #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_MSB 31
  122. #define HE_SIG_B2_MU_INFO_RX_INTEGRITY_CHECK_PASSED_MASK 0x80000000
  123. /* Description USER_ORDER
  124. RX side: Set to 0
  125. TX side: Ordering index of the User field
  126. Gaps between the ordering indices of User fields indicate
  127. that the microcode shall generate "unallocated RU" User
  128. fields (STAID=2046) to fill the gaps.
  129. <legal all>
  130. */
  131. #define HE_SIG_B2_MU_INFO_USER_ORDER_OFFSET 0x00000004
  132. #define HE_SIG_B2_MU_INFO_USER_ORDER_LSB 0
  133. #define HE_SIG_B2_MU_INFO_USER_ORDER_MSB 7
  134. #define HE_SIG_B2_MU_INFO_USER_ORDER_MASK 0x000000ff
  135. /* Description CC_MASK
  136. RX side: Set to 0
  137. TX side: Indicates what content channel this User field
  138. can go to
  139. Bit 0: content channel 0
  140. Bit 1: content channel 1
  141. The other bits are unused, but could repeat the above pattern
  142. for compatibility with 'EHT_SIG_USR_MU_MIMO_INFO.'
  143. <legal all>
  144. */
  145. #define HE_SIG_B2_MU_INFO_CC_MASK_OFFSET 0x00000004
  146. #define HE_SIG_B2_MU_INFO_CC_MASK_LSB 8
  147. #define HE_SIG_B2_MU_INFO_CC_MASK_MSB 15
  148. #define HE_SIG_B2_MU_INFO_CC_MASK_MASK 0x0000ff00
  149. /* Description RESERVED_1A
  150. <legal 0>
  151. */
  152. #define HE_SIG_B2_MU_INFO_RESERVED_1A_OFFSET 0x00000004
  153. #define HE_SIG_B2_MU_INFO_RESERVED_1A_LSB 16
  154. #define HE_SIG_B2_MU_INFO_RESERVED_1A_MSB 31
  155. #define HE_SIG_B2_MU_INFO_RESERVED_1A_MASK 0xffff0000
  156. #endif // HE_SIG_B2_MU_INFO