xref: /wlan-driver/fw-api/hw/kiwi/v1/tx_msdu_extension.h (revision 5113495b16420b49004c444715d2daae2066e7dc) !
1 
2 /*
3  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 #ifndef _TX_MSDU_EXTENSION_H_
31 #define _TX_MSDU_EXTENSION_H_
32 #if !defined(__ASSEMBLER__)
33 #endif
34 
35 #define NUM_OF_DWORDS_TX_MSDU_EXTENSION 18
36 
37 
38 struct tx_msdu_extension {
39 	     uint32_t tso_enable                                              :  1,
40 		      reserved_0a                                             :  6,
41 		      tcp_flag                                                :  9,
42 		      tcp_flag_mask                                           :  9,
43 		      reserved_0b                                             :  7;
44 	     uint32_t l2_length                                               : 16,
45 		      ip_length                                               : 16;
46 	     uint32_t tcp_seq_number                                          : 32;
47 	     uint32_t ip_identification                                       : 16,
48 		      udp_length                                              : 16;
49 	     uint32_t checksum_offset                                         : 14,
50 		      partial_checksum_en                                     :  1,
51 		      reserved_4a                                             :  1,
52 		      payload_start_offset                                    : 14,
53 		      reserved_4b                                             :  2;
54 	     uint32_t payload_end_offset                                      : 14,
55 		      reserved_5a                                             :  2,
56 		      wds                                                     :  1,
57 		      reserved_5b                                             : 15;
58 	     uint32_t buf0_ptr_31_0                                           : 32;
59 	     uint32_t buf0_ptr_39_32                                          :  8,
60 		      extn_override                                           :  1,
61 		      encap_type                                              :  2,
62 		      encrypt_type                                            :  4,
63 		      tqm_no_drop                                             :  1,
64 		      buf0_len                                                : 16;
65 	     uint32_t buf1_ptr_31_0                                           : 32;
66 	     uint32_t buf1_ptr_39_32                                          :  8,
67 		      epd                                                     :  1,
68 		      mesh_enable                                             :  2,
69 		      reserved_9a                                             :  5,
70 		      buf1_len                                                : 16;
71 	     uint32_t buf2_ptr_31_0                                           : 32;
72 	     uint32_t buf2_ptr_39_32                                          :  8,
73 		      reserved_11a                                            :  8,
74 		      buf2_len                                                : 16;
75 	     uint32_t buf3_ptr_31_0                                           : 32;
76 	     uint32_t buf3_ptr_39_32                                          :  8,
77 		      reserved_13a                                            :  8,
78 		      buf3_len                                                : 16;
79 	     uint32_t buf4_ptr_31_0                                           : 32;
80 	     uint32_t buf4_ptr_39_32                                          :  8,
81 		      reserved_15a                                            :  8,
82 		      buf4_len                                                : 16;
83 	     uint32_t buf5_ptr_31_0                                           : 32;
84 	     uint32_t buf5_ptr_39_32                                          :  8,
85 		      reserved_17a                                            :  8,
86 		      buf5_len                                                : 16;
87 };
88 
89 
90 
91 
92 #define TX_MSDU_EXTENSION_TSO_ENABLE_OFFSET                                         0x00000000
93 #define TX_MSDU_EXTENSION_TSO_ENABLE_LSB                                            0
94 #define TX_MSDU_EXTENSION_TSO_ENABLE_MSB                                            0
95 #define TX_MSDU_EXTENSION_TSO_ENABLE_MASK                                           0x00000001
96 
97 
98 
99 
100 #define TX_MSDU_EXTENSION_RESERVED_0A_OFFSET                                        0x00000000
101 #define TX_MSDU_EXTENSION_RESERVED_0A_LSB                                           1
102 #define TX_MSDU_EXTENSION_RESERVED_0A_MSB                                           6
103 #define TX_MSDU_EXTENSION_RESERVED_0A_MASK                                          0x0000007e
104 
105 
106 
107 
108 #define TX_MSDU_EXTENSION_TCP_FLAG_OFFSET                                           0x00000000
109 #define TX_MSDU_EXTENSION_TCP_FLAG_LSB                                              7
110 #define TX_MSDU_EXTENSION_TCP_FLAG_MSB                                              15
111 #define TX_MSDU_EXTENSION_TCP_FLAG_MASK                                             0x0000ff80
112 
113 
114 
115 
116 #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_OFFSET                                      0x00000000
117 #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_LSB                                         16
118 #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_MSB                                         24
119 #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_MASK                                        0x01ff0000
120 
121 
122 
123 
124 #define TX_MSDU_EXTENSION_RESERVED_0B_OFFSET                                        0x00000000
125 #define TX_MSDU_EXTENSION_RESERVED_0B_LSB                                           25
126 #define TX_MSDU_EXTENSION_RESERVED_0B_MSB                                           31
127 #define TX_MSDU_EXTENSION_RESERVED_0B_MASK                                          0xfe000000
128 
129 
130 
131 
132 #define TX_MSDU_EXTENSION_L2_LENGTH_OFFSET                                          0x00000004
133 #define TX_MSDU_EXTENSION_L2_LENGTH_LSB                                             0
134 #define TX_MSDU_EXTENSION_L2_LENGTH_MSB                                             15
135 #define TX_MSDU_EXTENSION_L2_LENGTH_MASK                                            0x0000ffff
136 
137 
138 
139 
140 #define TX_MSDU_EXTENSION_IP_LENGTH_OFFSET                                          0x00000004
141 #define TX_MSDU_EXTENSION_IP_LENGTH_LSB                                             16
142 #define TX_MSDU_EXTENSION_IP_LENGTH_MSB                                             31
143 #define TX_MSDU_EXTENSION_IP_LENGTH_MASK                                            0xffff0000
144 
145 
146 
147 
148 #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_OFFSET                                     0x00000008
149 #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_LSB                                        0
150 #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_MSB                                        31
151 #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_MASK                                       0xffffffff
152 
153 
154 
155 
156 #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_OFFSET                                  0x0000000c
157 #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_LSB                                     0
158 #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_MSB                                     15
159 #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_MASK                                    0x0000ffff
160 
161 
162 
163 
164 #define TX_MSDU_EXTENSION_UDP_LENGTH_OFFSET                                         0x0000000c
165 #define TX_MSDU_EXTENSION_UDP_LENGTH_LSB                                            16
166 #define TX_MSDU_EXTENSION_UDP_LENGTH_MSB                                            31
167 #define TX_MSDU_EXTENSION_UDP_LENGTH_MASK                                           0xffff0000
168 
169 
170 
171 
172 #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_OFFSET                                    0x00000010
173 #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_LSB                                       0
174 #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_MSB                                       13
175 #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_MASK                                      0x00003fff
176 
177 
178 
179 
180 #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_OFFSET                                0x00000010
181 #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_LSB                                   14
182 #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_MSB                                   14
183 #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_MASK                                  0x00004000
184 
185 
186 
187 
188 #define TX_MSDU_EXTENSION_RESERVED_4A_OFFSET                                        0x00000010
189 #define TX_MSDU_EXTENSION_RESERVED_4A_LSB                                           15
190 #define TX_MSDU_EXTENSION_RESERVED_4A_MSB                                           15
191 #define TX_MSDU_EXTENSION_RESERVED_4A_MASK                                          0x00008000
192 
193 
194 
195 
196 #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_OFFSET                               0x00000010
197 #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_LSB                                  16
198 #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_MSB                                  29
199 #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_MASK                                 0x3fff0000
200 
201 
202 
203 
204 #define TX_MSDU_EXTENSION_RESERVED_4B_OFFSET                                        0x00000010
205 #define TX_MSDU_EXTENSION_RESERVED_4B_LSB                                           30
206 #define TX_MSDU_EXTENSION_RESERVED_4B_MSB                                           31
207 #define TX_MSDU_EXTENSION_RESERVED_4B_MASK                                          0xc0000000
208 
209 
210 
211 
212 #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_OFFSET                                 0x00000014
213 #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_LSB                                    0
214 #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_MSB                                    13
215 #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_MASK                                   0x00003fff
216 
217 
218 
219 
220 #define TX_MSDU_EXTENSION_RESERVED_5A_OFFSET                                        0x00000014
221 #define TX_MSDU_EXTENSION_RESERVED_5A_LSB                                           14
222 #define TX_MSDU_EXTENSION_RESERVED_5A_MSB                                           15
223 #define TX_MSDU_EXTENSION_RESERVED_5A_MASK                                          0x0000c000
224 
225 
226 
227 
228 #define TX_MSDU_EXTENSION_WDS_OFFSET                                                0x00000014
229 #define TX_MSDU_EXTENSION_WDS_LSB                                                   16
230 #define TX_MSDU_EXTENSION_WDS_MSB                                                   16
231 #define TX_MSDU_EXTENSION_WDS_MASK                                                  0x00010000
232 
233 
234 
235 
236 #define TX_MSDU_EXTENSION_RESERVED_5B_OFFSET                                        0x00000014
237 #define TX_MSDU_EXTENSION_RESERVED_5B_LSB                                           17
238 #define TX_MSDU_EXTENSION_RESERVED_5B_MSB                                           31
239 #define TX_MSDU_EXTENSION_RESERVED_5B_MASK                                          0xfffe0000
240 
241 
242 
243 
244 #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_OFFSET                                      0x00000018
245 #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_LSB                                         0
246 #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_MSB                                         31
247 #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_MASK                                        0xffffffff
248 
249 
250 
251 
252 #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_OFFSET                                     0x0000001c
253 #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_LSB                                        0
254 #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_MSB                                        7
255 #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_MASK                                       0x000000ff
256 
257 
258 
259 
260 #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_OFFSET                                      0x0000001c
261 #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_LSB                                         8
262 #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_MSB                                         8
263 #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_MASK                                        0x00000100
264 
265 
266 
267 
268 #define TX_MSDU_EXTENSION_ENCAP_TYPE_OFFSET                                         0x0000001c
269 #define TX_MSDU_EXTENSION_ENCAP_TYPE_LSB                                            9
270 #define TX_MSDU_EXTENSION_ENCAP_TYPE_MSB                                            10
271 #define TX_MSDU_EXTENSION_ENCAP_TYPE_MASK                                           0x00000600
272 
273 
274 
275 
276 #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_OFFSET                                       0x0000001c
277 #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_LSB                                          11
278 #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_MSB                                          14
279 #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_MASK                                         0x00007800
280 
281 
282 
283 
284 #define TX_MSDU_EXTENSION_TQM_NO_DROP_OFFSET                                        0x0000001c
285 #define TX_MSDU_EXTENSION_TQM_NO_DROP_LSB                                           15
286 #define TX_MSDU_EXTENSION_TQM_NO_DROP_MSB                                           15
287 #define TX_MSDU_EXTENSION_TQM_NO_DROP_MASK                                          0x00008000
288 
289 
290 
291 
292 #define TX_MSDU_EXTENSION_BUF0_LEN_OFFSET                                           0x0000001c
293 #define TX_MSDU_EXTENSION_BUF0_LEN_LSB                                              16
294 #define TX_MSDU_EXTENSION_BUF0_LEN_MSB                                              31
295 #define TX_MSDU_EXTENSION_BUF0_LEN_MASK                                             0xffff0000
296 
297 
298 
299 
300 #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_OFFSET                                      0x00000020
301 #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_LSB                                         0
302 #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_MSB                                         31
303 #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_MASK                                        0xffffffff
304 
305 
306 
307 
308 #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_OFFSET                                     0x00000024
309 #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_LSB                                        0
310 #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_MSB                                        7
311 #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_MASK                                       0x000000ff
312 
313 
314 
315 
316 #define TX_MSDU_EXTENSION_EPD_OFFSET                                                0x00000024
317 #define TX_MSDU_EXTENSION_EPD_LSB                                                   8
318 #define TX_MSDU_EXTENSION_EPD_MSB                                                   8
319 #define TX_MSDU_EXTENSION_EPD_MASK                                                  0x00000100
320 
321 
322 
323 
324 #define TX_MSDU_EXTENSION_MESH_ENABLE_OFFSET                                        0x00000024
325 #define TX_MSDU_EXTENSION_MESH_ENABLE_LSB                                           9
326 #define TX_MSDU_EXTENSION_MESH_ENABLE_MSB                                           10
327 #define TX_MSDU_EXTENSION_MESH_ENABLE_MASK                                          0x00000600
328 
329 
330 
331 
332 #define TX_MSDU_EXTENSION_RESERVED_9A_OFFSET                                        0x00000024
333 #define TX_MSDU_EXTENSION_RESERVED_9A_LSB                                           11
334 #define TX_MSDU_EXTENSION_RESERVED_9A_MSB                                           15
335 #define TX_MSDU_EXTENSION_RESERVED_9A_MASK                                          0x0000f800
336 
337 
338 
339 
340 #define TX_MSDU_EXTENSION_BUF1_LEN_OFFSET                                           0x00000024
341 #define TX_MSDU_EXTENSION_BUF1_LEN_LSB                                              16
342 #define TX_MSDU_EXTENSION_BUF1_LEN_MSB                                              31
343 #define TX_MSDU_EXTENSION_BUF1_LEN_MASK                                             0xffff0000
344 
345 
346 
347 
348 #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_OFFSET                                      0x00000028
349 #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_LSB                                         0
350 #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_MSB                                         31
351 #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_MASK                                        0xffffffff
352 
353 
354 
355 
356 #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_OFFSET                                     0x0000002c
357 #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_LSB                                        0
358 #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_MSB                                        7
359 #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_MASK                                       0x000000ff
360 
361 
362 
363 
364 #define TX_MSDU_EXTENSION_RESERVED_11A_OFFSET                                       0x0000002c
365 #define TX_MSDU_EXTENSION_RESERVED_11A_LSB                                          8
366 #define TX_MSDU_EXTENSION_RESERVED_11A_MSB                                          15
367 #define TX_MSDU_EXTENSION_RESERVED_11A_MASK                                         0x0000ff00
368 
369 
370 
371 
372 #define TX_MSDU_EXTENSION_BUF2_LEN_OFFSET                                           0x0000002c
373 #define TX_MSDU_EXTENSION_BUF2_LEN_LSB                                              16
374 #define TX_MSDU_EXTENSION_BUF2_LEN_MSB                                              31
375 #define TX_MSDU_EXTENSION_BUF2_LEN_MASK                                             0xffff0000
376 
377 
378 
379 
380 #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_OFFSET                                      0x00000030
381 #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_LSB                                         0
382 #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_MSB                                         31
383 #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_MASK                                        0xffffffff
384 
385 
386 
387 
388 #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_OFFSET                                     0x00000034
389 #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_LSB                                        0
390 #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_MSB                                        7
391 #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_MASK                                       0x000000ff
392 
393 
394 
395 
396 #define TX_MSDU_EXTENSION_RESERVED_13A_OFFSET                                       0x00000034
397 #define TX_MSDU_EXTENSION_RESERVED_13A_LSB                                          8
398 #define TX_MSDU_EXTENSION_RESERVED_13A_MSB                                          15
399 #define TX_MSDU_EXTENSION_RESERVED_13A_MASK                                         0x0000ff00
400 
401 
402 
403 
404 #define TX_MSDU_EXTENSION_BUF3_LEN_OFFSET                                           0x00000034
405 #define TX_MSDU_EXTENSION_BUF3_LEN_LSB                                              16
406 #define TX_MSDU_EXTENSION_BUF3_LEN_MSB                                              31
407 #define TX_MSDU_EXTENSION_BUF3_LEN_MASK                                             0xffff0000
408 
409 
410 
411 
412 #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_OFFSET                                      0x00000038
413 #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_LSB                                         0
414 #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_MSB                                         31
415 #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_MASK                                        0xffffffff
416 
417 
418 
419 
420 #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_OFFSET                                     0x0000003c
421 #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_LSB                                        0
422 #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_MSB                                        7
423 #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_MASK                                       0x000000ff
424 
425 
426 
427 
428 #define TX_MSDU_EXTENSION_RESERVED_15A_OFFSET                                       0x0000003c
429 #define TX_MSDU_EXTENSION_RESERVED_15A_LSB                                          8
430 #define TX_MSDU_EXTENSION_RESERVED_15A_MSB                                          15
431 #define TX_MSDU_EXTENSION_RESERVED_15A_MASK                                         0x0000ff00
432 
433 
434 
435 
436 #define TX_MSDU_EXTENSION_BUF4_LEN_OFFSET                                           0x0000003c
437 #define TX_MSDU_EXTENSION_BUF4_LEN_LSB                                              16
438 #define TX_MSDU_EXTENSION_BUF4_LEN_MSB                                              31
439 #define TX_MSDU_EXTENSION_BUF4_LEN_MASK                                             0xffff0000
440 
441 
442 
443 
444 #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_OFFSET                                      0x00000040
445 #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_LSB                                         0
446 #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_MSB                                         31
447 #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_MASK                                        0xffffffff
448 
449 
450 
451 
452 #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_OFFSET                                     0x00000044
453 #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_LSB                                        0
454 #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_MSB                                        7
455 #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_MASK                                       0x000000ff
456 
457 
458 
459 
460 #define TX_MSDU_EXTENSION_RESERVED_17A_OFFSET                                       0x00000044
461 #define TX_MSDU_EXTENSION_RESERVED_17A_LSB                                          8
462 #define TX_MSDU_EXTENSION_RESERVED_17A_MSB                                          15
463 #define TX_MSDU_EXTENSION_RESERVED_17A_MASK                                         0x0000ff00
464 
465 
466 
467 
468 #define TX_MSDU_EXTENSION_BUF5_LEN_OFFSET                                           0x00000044
469 #define TX_MSDU_EXTENSION_BUF5_LEN_LSB                                              16
470 #define TX_MSDU_EXTENSION_BUF5_LEN_MSB                                              31
471 #define TX_MSDU_EXTENSION_BUF5_LEN_MASK                                             0xffff0000
472 
473 
474 
475 #endif
476