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