xref: /wlan-driver/fw-api/hw/qca5332/vht_sig_b_mu80_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 _VHT_SIG_B_MU80_INFO_H_
27 #define _VHT_SIG_B_MU80_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_VHT_SIG_B_MU80_INFO 4
32 
33 
34 struct vht_sig_b_mu80_info {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t length                                                  : 19, // [18:0]
37                       mcs                                                     :  4, // [22:19]
38                       tail                                                    :  6, // [28:23]
39                       reserved_0                                              :  3; // [31:29]
40              uint32_t length_copy_a                                           : 19, // [18:0]
41                       mcs_copy_a                                              :  4, // [22:19]
42                       tail_copy_a                                             :  6, // [28:23]
43                       reserved_1                                              :  3; // [31:29]
44              uint32_t length_copy_b                                           : 19, // [18:0]
45                       mcs_copy_b                                              :  4, // [22:19]
46                       tail_copy_b                                             :  6, // [28:23]
47                       mu_user_number                                          :  3; // [31:29]
48              uint32_t length_copy_c                                           : 19, // [18:0]
49                       mcs_copy_c                                              :  4, // [22:19]
50                       tail_copy_c                                             :  6, // [28:23]
51                       reserved_3                                              :  3; // [31:29]
52 #else
53              uint32_t reserved_0                                              :  3, // [31:29]
54                       tail                                                    :  6, // [28:23]
55                       mcs                                                     :  4, // [22:19]
56                       length                                                  : 19; // [18:0]
57              uint32_t reserved_1                                              :  3, // [31:29]
58                       tail_copy_a                                             :  6, // [28:23]
59                       mcs_copy_a                                              :  4, // [22:19]
60                       length_copy_a                                           : 19; // [18:0]
61              uint32_t mu_user_number                                          :  3, // [31:29]
62                       tail_copy_b                                             :  6, // [28:23]
63                       mcs_copy_b                                              :  4, // [22:19]
64                       length_copy_b                                           : 19; // [18:0]
65              uint32_t reserved_3                                              :  3, // [31:29]
66                       tail_copy_c                                             :  6, // [28:23]
67                       mcs_copy_c                                              :  4, // [22:19]
68                       length_copy_c                                           : 19; // [18:0]
69 #endif
70 };
71 
72 
73 /* Description		LENGTH
74 
75 			VHT-SIG-B Length (in units of 4 octets) = ceiling (LENGTH/4)
76 			 <legal all>
77 */
78 
79 #define VHT_SIG_B_MU80_INFO_LENGTH_OFFSET                                           0x00000000
80 #define VHT_SIG_B_MU80_INFO_LENGTH_LSB                                              0
81 #define VHT_SIG_B_MU80_INFO_LENGTH_MSB                                              18
82 #define VHT_SIG_B_MU80_INFO_LENGTH_MASK                                             0x0007ffff
83 
84 
85 /* Description		MCS
86 
87 			Modulation as described in vht_sig_a mcs field  <legal 0-11>
88 
89 */
90 
91 #define VHT_SIG_B_MU80_INFO_MCS_OFFSET                                              0x00000000
92 #define VHT_SIG_B_MU80_INFO_MCS_LSB                                                 19
93 #define VHT_SIG_B_MU80_INFO_MCS_MSB                                                 22
94 #define VHT_SIG_B_MU80_INFO_MCS_MASK                                                0x00780000
95 
96 
97 /* Description		TAIL
98 
99 			Used to terminate the trellis of the convolutional decoder.
100 
101 			Set to 0.  <legal 0>
102 */
103 
104 #define VHT_SIG_B_MU80_INFO_TAIL_OFFSET                                             0x00000000
105 #define VHT_SIG_B_MU80_INFO_TAIL_LSB                                                23
106 #define VHT_SIG_B_MU80_INFO_TAIL_MSB                                                28
107 #define VHT_SIG_B_MU80_INFO_TAIL_MASK                                               0x1f800000
108 
109 
110 /* Description		RESERVED_0
111 
112 			Not part of VHT-SIG-B.
113 			Reserved: Set to 0 and ignored on receive  <legal 0>
114 */
115 
116 #define VHT_SIG_B_MU80_INFO_RESERVED_0_OFFSET                                       0x00000000
117 #define VHT_SIG_B_MU80_INFO_RESERVED_0_LSB                                          29
118 #define VHT_SIG_B_MU80_INFO_RESERVED_0_MSB                                          31
119 #define VHT_SIG_B_MU80_INFO_RESERVED_0_MASK                                         0xe0000000
120 
121 
122 /* Description		LENGTH_COPY_A
123 
124 			Same as "length". This field is not valid for RX packets
125 			 <legal all>
126 */
127 
128 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_A_OFFSET                                    0x00000004
129 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_A_LSB                                       0
130 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_A_MSB                                       18
131 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_A_MASK                                      0x0007ffff
132 
133 
134 /* Description		MCS_COPY_A
135 
136 			Same as "mcs". This field is not valid for RX packets  <legal
137 			 0-11>
138 */
139 
140 #define VHT_SIG_B_MU80_INFO_MCS_COPY_A_OFFSET                                       0x00000004
141 #define VHT_SIG_B_MU80_INFO_MCS_COPY_A_LSB                                          19
142 #define VHT_SIG_B_MU80_INFO_MCS_COPY_A_MSB                                          22
143 #define VHT_SIG_B_MU80_INFO_MCS_COPY_A_MASK                                         0x00780000
144 
145 
146 /* Description		TAIL_COPY_A
147 
148 			Same as "tail". This field is not valid for RX packets  <legal
149 			 0>
150 */
151 
152 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_A_OFFSET                                      0x00000004
153 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_A_LSB                                         23
154 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_A_MSB                                         28
155 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_A_MASK                                        0x1f800000
156 
157 
158 /* Description		RESERVED_1
159 
160 			Not part of VHT-SIG-B.
161 			Reserved: Set to 0 and ignored on receive  <legal 0>
162 */
163 
164 #define VHT_SIG_B_MU80_INFO_RESERVED_1_OFFSET                                       0x00000004
165 #define VHT_SIG_B_MU80_INFO_RESERVED_1_LSB                                          29
166 #define VHT_SIG_B_MU80_INFO_RESERVED_1_MSB                                          31
167 #define VHT_SIG_B_MU80_INFO_RESERVED_1_MASK                                         0xe0000000
168 
169 
170 /* Description		LENGTH_COPY_B
171 
172 			Same as "length". This field is not valid for RX packets. <legal
173 			 all>
174 */
175 
176 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_B_OFFSET                                    0x00000008
177 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_B_LSB                                       0
178 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_B_MSB                                       18
179 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_B_MASK                                      0x0007ffff
180 
181 
182 /* Description		MCS_COPY_B
183 
184 			Same as "mcs". This field is not valid for RX packets.
185 
186 			<legal 0-11>
187 */
188 
189 #define VHT_SIG_B_MU80_INFO_MCS_COPY_B_OFFSET                                       0x00000008
190 #define VHT_SIG_B_MU80_INFO_MCS_COPY_B_LSB                                          19
191 #define VHT_SIG_B_MU80_INFO_MCS_COPY_B_MSB                                          22
192 #define VHT_SIG_B_MU80_INFO_MCS_COPY_B_MASK                                         0x00780000
193 
194 
195 /* Description		TAIL_COPY_B
196 
197 			Same as "tail". This field is not valid for RX packets.
198 			 <legal 0>
199 */
200 
201 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_B_OFFSET                                      0x00000008
202 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_B_LSB                                         23
203 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_B_MSB                                         28
204 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_B_MASK                                        0x1f800000
205 
206 
207 /* Description		MU_USER_NUMBER
208 
209 			Not part of VHT-SIG-B.
210 			Mapping from user number (BFer hardware specific) to mu_user_number.
211 			The reader is directed to the previous chapter (User Number)
212 			for a definition of the terms user and mu_user.  <legal
213 			0-3>
214 */
215 
216 #define VHT_SIG_B_MU80_INFO_MU_USER_NUMBER_OFFSET                                   0x00000008
217 #define VHT_SIG_B_MU80_INFO_MU_USER_NUMBER_LSB                                      29
218 #define VHT_SIG_B_MU80_INFO_MU_USER_NUMBER_MSB                                      31
219 #define VHT_SIG_B_MU80_INFO_MU_USER_NUMBER_MASK                                     0xe0000000
220 
221 
222 /* Description		LENGTH_COPY_C
223 
224 			Same as "length". This field is not valid for RX packets. <legal
225 			 all>
226 */
227 
228 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_C_OFFSET                                    0x0000000c
229 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_C_LSB                                       0
230 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_C_MSB                                       18
231 #define VHT_SIG_B_MU80_INFO_LENGTH_COPY_C_MASK                                      0x0007ffff
232 
233 
234 /* Description		MCS_COPY_C
235 
236 			Same as "mcs". This field is not valid for RX packets.
237 
238 			<legal 0-11>
239 */
240 
241 #define VHT_SIG_B_MU80_INFO_MCS_COPY_C_OFFSET                                       0x0000000c
242 #define VHT_SIG_B_MU80_INFO_MCS_COPY_C_LSB                                          19
243 #define VHT_SIG_B_MU80_INFO_MCS_COPY_C_MSB                                          22
244 #define VHT_SIG_B_MU80_INFO_MCS_COPY_C_MASK                                         0x00780000
245 
246 
247 /* Description		TAIL_COPY_C
248 
249 			Same as "tail". This field is not valid for RX packets.
250 			 <legal 0>
251 */
252 
253 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_C_OFFSET                                      0x0000000c
254 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_C_LSB                                         23
255 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_C_MSB                                         28
256 #define VHT_SIG_B_MU80_INFO_TAIL_COPY_C_MASK                                        0x1f800000
257 
258 
259 /* Description		RESERVED_3
260 
261 			<legal 0>
262 */
263 
264 #define VHT_SIG_B_MU80_INFO_RESERVED_3_OFFSET                                       0x0000000c
265 #define VHT_SIG_B_MU80_INFO_RESERVED_3_LSB                                          29
266 #define VHT_SIG_B_MU80_INFO_RESERVED_3_MSB                                          31
267 #define VHT_SIG_B_MU80_INFO_RESERVED_3_MASK                                         0xe0000000
268 
269 
270 
271 #endif   // VHT_SIG_B_MU80_INFO
272