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 _EHT_SIG_USR_MU_MIMO_INFO_H_ 18 #define _EHT_SIG_USR_MU_MIMO_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_EHT_SIG_USR_MU_MIMO_INFO 2 23 24 25 struct eht_sig_usr_mu_mimo_info { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t sta_id : 11, // [10:0] 28 sta_mcs : 4, // [14:11] 29 sta_coding : 1, // [15:15] 30 sta_spatial_config : 6, // [21:16] 31 reserved_0a : 1, // [22:22] 32 rx_integrity_check_passed : 1, // [23:23] 33 subband80_cc_mask : 8; // [31:24] 34 uint32_t user_order_subband80_0 : 8, // [7:0] 35 user_order_subband80_1 : 8, // [15:8] 36 user_order_subband80_2 : 8, // [23:16] 37 user_order_subband80_3 : 8; // [31:24] 38 #else 39 uint32_t subband80_cc_mask : 8, // [31:24] 40 rx_integrity_check_passed : 1, // [23:23] 41 reserved_0a : 1, // [22:22] 42 sta_spatial_config : 6, // [21:16] 43 sta_coding : 1, // [15:15] 44 sta_mcs : 4, // [14:11] 45 sta_id : 11; // [10:0] 46 uint32_t user_order_subband80_3 : 8, // [31:24] 47 user_order_subband80_2 : 8, // [23:16] 48 user_order_subband80_1 : 8, // [15:8] 49 user_order_subband80_0 : 8; // [7:0] 50 #endif 51 }; 52 53 54 /* Description STA_ID 55 56 Identifies the STA that is addressed. Details of STA ID 57 are TBD 58 */ 59 60 #define EHT_SIG_USR_MU_MIMO_INFO_STA_ID_OFFSET 0x00000000 61 #define EHT_SIG_USR_MU_MIMO_INFO_STA_ID_LSB 0 62 #define EHT_SIG_USR_MU_MIMO_INFO_STA_ID_MSB 10 63 #define EHT_SIG_USR_MU_MIMO_INFO_STA_ID_MASK 0x000007ff 64 65 66 /* Description STA_MCS 67 68 Indicates the data MCS 69 0 - 13: MCS 0 - 13 70 14: validate 71 15: MCS 0 with DCM 72 <legal 0-13, 15> 73 */ 74 75 #define EHT_SIG_USR_MU_MIMO_INFO_STA_MCS_OFFSET 0x00000000 76 #define EHT_SIG_USR_MU_MIMO_INFO_STA_MCS_LSB 11 77 #define EHT_SIG_USR_MU_MIMO_INFO_STA_MCS_MSB 14 78 #define EHT_SIG_USR_MU_MIMO_INFO_STA_MCS_MASK 0x00007800 79 80 81 /* Description STA_CODING 82 83 Distinguishes between BCC/LDPC 84 85 0: BCC 86 1: LDPC 87 <legal all> 88 */ 89 90 #define EHT_SIG_USR_MU_MIMO_INFO_STA_CODING_OFFSET 0x00000000 91 #define EHT_SIG_USR_MU_MIMO_INFO_STA_CODING_LSB 15 92 #define EHT_SIG_USR_MU_MIMO_INFO_STA_CODING_MSB 15 93 #define EHT_SIG_USR_MU_MIMO_INFO_STA_CODING_MASK 0x00008000 94 95 96 /* Description STA_SPATIAL_CONFIG 97 98 Number of assigned spatial streams and their corresponding 99 index. 100 Total number of spatial streams assigned for the MU-MIMO 101 allocation is also signaled. 102 */ 103 104 #define EHT_SIG_USR_MU_MIMO_INFO_STA_SPATIAL_CONFIG_OFFSET 0x00000000 105 #define EHT_SIG_USR_MU_MIMO_INFO_STA_SPATIAL_CONFIG_LSB 16 106 #define EHT_SIG_USR_MU_MIMO_INFO_STA_SPATIAL_CONFIG_MSB 21 107 #define EHT_SIG_USR_MU_MIMO_INFO_STA_SPATIAL_CONFIG_MASK 0x003f0000 108 109 110 /* Description RESERVED_0A 111 112 <legal 0> 113 */ 114 115 #define EHT_SIG_USR_MU_MIMO_INFO_RESERVED_0A_OFFSET 0x00000000 116 #define EHT_SIG_USR_MU_MIMO_INFO_RESERVED_0A_LSB 22 117 #define EHT_SIG_USR_MU_MIMO_INFO_RESERVED_0A_MSB 22 118 #define EHT_SIG_USR_MU_MIMO_INFO_RESERVED_0A_MASK 0x00400000 119 120 121 /* Description RX_INTEGRITY_CHECK_PASSED 122 123 TX side: Set to 0 124 RX side: Set to 1 if PHY determines the CRC check of the 125 codeblock containing this EHT-SIG user info has passed, 126 else set to 0 127 128 <legal all> 129 */ 130 131 #define EHT_SIG_USR_MU_MIMO_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x00000000 132 #define EHT_SIG_USR_MU_MIMO_INFO_RX_INTEGRITY_CHECK_PASSED_LSB 23 133 #define EHT_SIG_USR_MU_MIMO_INFO_RX_INTEGRITY_CHECK_PASSED_MSB 23 134 #define EHT_SIG_USR_MU_MIMO_INFO_RX_INTEGRITY_CHECK_PASSED_MASK 0x00800000 135 136 137 /* Description SUBBAND80_CC_MASK 138 139 RX side: Set to 0 140 TX side: Indicates what content channels of what 80 MHz 141 subbands this User field can go to 142 Bit 0: lowest 80 MHz content channel 0 143 Bit 1: lowest 80 MHz content channel 1 144 Bit 2: 2nd lowest 80 MHz content channel 0 145 ... 146 Bit 7: highest 80 MHz content channel 1 147 <legal all> 148 */ 149 150 #define EHT_SIG_USR_MU_MIMO_INFO_SUBBAND80_CC_MASK_OFFSET 0x00000000 151 #define EHT_SIG_USR_MU_MIMO_INFO_SUBBAND80_CC_MASK_LSB 24 152 #define EHT_SIG_USR_MU_MIMO_INFO_SUBBAND80_CC_MASK_MSB 31 153 #define EHT_SIG_USR_MU_MIMO_INFO_SUBBAND80_CC_MASK_MASK 0xff000000 154 155 156 /* Description USER_ORDER_SUBBAND80_0 157 158 RX side: Set to 0 159 TX side: Ordering index of the User field within the lowest 160 80 MHz 161 Gaps between the ordering indices of User fields indicate 162 that the microcode shall generate "unallocated RU" User 163 fields (STAID=2046) to fill the gaps. 164 <legal all> 165 */ 166 167 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_0_OFFSET 0x00000004 168 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_0_LSB 0 169 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_0_MSB 7 170 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_0_MASK 0x000000ff 171 172 173 /* Description USER_ORDER_SUBBAND80_1 174 175 RX side: Set to 0 176 TX side: Ordering index of the User field within the 2nd 177 lowest 80 MHz 178 See 'user_order_subband80_0.' 179 <legal all> 180 */ 181 182 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_1_OFFSET 0x00000004 183 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_1_LSB 8 184 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_1_MSB 15 185 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_1_MASK 0x0000ff00 186 187 188 /* Description USER_ORDER_SUBBAND80_2 189 190 RX side: Set to 0 191 TX side: Ordering index of the User field within the 2nd 192 highest 80 MHz 193 See 'user_order_subband80_0.' 194 <legal all> 195 */ 196 197 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_2_OFFSET 0x00000004 198 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_2_LSB 16 199 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_2_MSB 23 200 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_2_MASK 0x00ff0000 201 202 203 /* Description USER_ORDER_SUBBAND80_3 204 205 RX side: Set to 0 206 TX side: Ordering index of the User field within the highest 207 80 MHz 208 See 'user_order_subband80_0.' 209 <legal all> 210 */ 211 212 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_3_OFFSET 0x00000004 213 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_3_LSB 24 214 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_3_MSB 31 215 #define EHT_SIG_USR_MU_MIMO_INFO_USER_ORDER_SUBBAND80_3_MASK 0xff000000 216 217 218 219 #endif // EHT_SIG_USR_MU_MIMO_INFO 220