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