he_sig_b2_mu_info.h 9.0 KB

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