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