xref: /wlan-driver/fw-api/hw/qca6290/v2/tcl_data_cmd.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 //
20 // DO NOT EDIT!  This file is automatically generated
21 //               These definitions are tied to a particular hardware layout
22 
23 
24 #ifndef _TCL_DATA_CMD_H_
25 #define _TCL_DATA_CMD_H_
26 #if !defined(__ASSEMBLER__)
27 #endif
28 
29 #include "buffer_addr_info.h"
30 
31 // ################ START SUMMARY #################
32 //
33 //	Dword	Fields
34 //	0-1	struct buffer_addr_info buf_addr_info;
35 //	2	buf_or_ext_desc_type[0], epd[1], encap_type[3:2], encrypt_type[7:4], src_buffer_swap[8], link_meta_swap[9], reserved[13:10], addrx_en[14], addry_en[15], tcl_cmd_number[31:16]
36 //	3	data_length[15:0], ipv4_checksum_en[16], udp_over_ipv4_checksum_en[17], udp_over_ipv6_checksum_en[18], tcp_over_ipv4_checksum_en[19], tcp_over_ipv6_checksum_en[20], to_fw[21], dscp_to_tid_priority_table_id[22], packet_offset[31:23]
37 //	4	buffer_timestamp[18:0], buffer_timestamp_valid[19], mesh_enable[20], hlos_tid_overwrite[21], hlos_tid[25:22], reserved_4[31:26]
38 //	5	reserved_5[31:0]
39 //	6	reserved_6a[19:0], ring_id[27:20], looping_count[31:28]
40 //
41 // ################ END SUMMARY #################
42 
43 #define NUM_OF_DWORDS_TCL_DATA_CMD 7
44 
45 struct tcl_data_cmd {
46     struct            buffer_addr_info                       buf_addr_info;
47              uint32_t buf_or_ext_desc_type            :  1, //[0]
48                       epd                             :  1, //[1]
49                       encap_type                      :  2, //[3:2]
50                       encrypt_type                    :  4, //[7:4]
51                       src_buffer_swap                 :  1, //[8]
52                       link_meta_swap                  :  1, //[9]
53                       reserved                        :  4, //[13:10]
54                       addrx_en                        :  1, //[14]
55                       addry_en                        :  1, //[15]
56                       tcl_cmd_number                  : 16; //[31:16]
57              uint32_t data_length                     : 16, //[15:0]
58                       ipv4_checksum_en                :  1, //[16]
59                       udp_over_ipv4_checksum_en       :  1, //[17]
60                       udp_over_ipv6_checksum_en       :  1, //[18]
61                       tcp_over_ipv4_checksum_en       :  1, //[19]
62                       tcp_over_ipv6_checksum_en       :  1, //[20]
63                       to_fw                           :  1, //[21]
64                       dscp_to_tid_priority_table_id   :  1, //[22]
65                       packet_offset                   :  9; //[31:23]
66              uint32_t buffer_timestamp                : 19, //[18:0]
67                       buffer_timestamp_valid          :  1, //[19]
68                       mesh_enable                     :  1, //[20]
69                       hlos_tid_overwrite              :  1, //[21]
70                       hlos_tid                        :  4, //[25:22]
71                       reserved_4                      :  6; //[31:26]
72              uint32_t reserved_5                      : 32; //[31:0]
73              uint32_t reserved_6a                     : 20, //[19:0]
74                       ring_id                         :  8, //[27:20]
75                       looping_count                   :  4; //[31:28]
76 };
77 
78 /*
79 
80 struct buffer_addr_info buf_addr_info
81 
82 			Details of the physical address for a single buffer
83 
84 			It also contains return ownership info as well as some
85 			meta data for SW related to this buffer.
86 
87 
88 
89 			In case of Buf_or_ext_desc_type indicating
90 			'MSDU_buffer', this address indicates the start of the meta
91 			data that is preceding the actual packet data.
92 
93 			The start of the actual packet data is provided by
94 			field: Packet_offset
95 
96 buf_or_ext_desc_type
97 
98 			<enum 0 MSDU_buffer> The address points to an MSDU
99 			buffer.
100 
101 			<enum 1 extension_descriptor> The address points to an
102 			MSDU link extension descriptor
103 
104 			< legal all>
105 
106 epd
107 
108 			When this bit is set then input packet is an EPD type
109 
110 			<legal all>
111 
112 encap_type
113 
114 			Indicates the encapsulation that HW will perform:
115 
116 			<enum 0 RAW> No encapsulation
117 
118 			<enum 1 Native_WiFi>
119 
120 			<enum 2 Ethernet> Ethernet 2 (DIX)  or 802.3 (uses
121 			SNAP/LLC)
122 
123 			<enum 3 802_3> DO NOT USE. Indicate Ethernet
124 
125 
126 
127 			Used by the OLE during encapsulation.
128 
129 			<legal all>
130 
131 encrypt_type
132 
133 			Field only valid for encap_type: RAW
134 
135 
136 
137 			Indicates type of decrypt cipher used (as defined in the
138 			peer entry)
139 
140 			<enum 0 wep_40> WEP 40-bit
141 
142 			<enum 1 wep_104> WEP 104-bit
143 
144 			<enum 2 tkip_no_mic> TKIP without MIC
145 
146 			<enum 3 wep_128> WEP 128-bit
147 
148 			<enum 4 tkip_with_mic> TKIP with MIC
149 
150 			<enum 5 wapi> WAPI
151 
152 			<enum 6 aes_ccmp_128> AES CCMP 128
153 
154 			<enum 7 no_cipher> No crypto
155 
156 			<enum 8 aes_ccmp_256> AES CCMP 256
157 
158 			<enum 9 aes_gcmp_128> AES CCMP 128
159 
160 			<enum 10 aes_gcmp_256> AES CCMP 256
161 
162 			<enum 11 wapi_gcm_sm4> WAPI GCM SM4
163 
164 			<legal 0-11>
165 
166 src_buffer_swap
167 
168 			Treats source memory (packet buffer) organization as
169 			big-endian. The packets are read and byte swapped.
170 
171 			1'b0: Source memory is little endian
172 
173 			1'b1: Source memory is big endian
174 
175 			<legal all>
176 
177 link_meta_swap
178 
179 			Treats link descriptor and Metadata as big-endian. The
180 			link descriptor/Metadata is read and byte swapped.
181 
182 			1'b0: Memory is little endian
183 
184 			1'b1: Memory is big endian
185 
186 			<legal all>
187 
188 reserved
189 
190 			<legal 0>
191 
192 addrx_en
193 
194 			Address X search enable in ASE
195 
196 			1'b0: Search disable
197 
198 			1'b1: Search Enable
199 
200 			<legal all>
201 
202 addry_en
203 
204 			Address Y search enable in ASE
205 
206 			1'b0: Search disable
207 
208 			1'b1: Search Enable
209 
210 			<legal all>
211 
212 tcl_cmd_number
213 
214 			This number can be used by SW to track, identify and
215 			link the created commands with the command statuses
216 
217 
218 
219 			Is set to the value 'TCL_CMD_Number' of the related
220 			TCL_DATA command
221 
222 			<legal all>
223 
224 data_length
225 
226 			Valid Data length in bytes.
227 
228 
229 
230 			MSDU length in case of direct descriptor.
231 
232 			Length of link extension descriptor in case of Link
233 			extension descriptor. This is used to know the size of
234 			Metadata.
235 
236 			<legal all>
237 
238 ipv4_checksum_en
239 
240 			OLE related control
241 
242 			Enable IPv4 checksum replacement
243 
244 udp_over_ipv4_checksum_en
245 
246 			OLE related control
247 
248 			Enable UDP over IPv4 checksum replacement.  UDP checksum
249 			over IPv4 is optional for TCP/IP stacks.
250 
251 udp_over_ipv6_checksum_en
252 
253 			OLE related control
254 
255 			Enable UDP over IPv6 checksum replacement.  UDP checksum
256 			over IPv6 is mandatory for TCP/IP stacks.
257 
258 tcp_over_ipv4_checksum_en
259 
260 			OLE related control
261 
262 			Enable TCP checksum over IPv4 replacement
263 
264 tcp_over_ipv6_checksum_en
265 
266 			OLE related control
267 
268 			Enable TCP checksum over IPv6 replacement
269 
270 to_fw
271 
272 			Forward packet to FW along with classification result.
273 			The packet will not be forward to TQM when this bit is set
274 
275 			1'b0: Use classification result to forward the packet.
276 
277 			1'b1: Override classification result and forward packet
278 			only to FW.
279 
280 dscp_to_tid_priority_table_id
281 
282 			The DSCP to tid conversion table to be used for this
283 			frame
284 
285 			<legal all>
286 
287 packet_offset
288 
289 			Packet offset from Metadata in case of direct buffer
290 			descriptor. This field is valid when Buf_or_ext_desc_type is
291 			reset(= 0).
292 
293 			<legal all>
294 
295 buffer_timestamp
296 
297 			Field only valid when 'Buffer_timestamp_valid ' is set.
298 
299 
300 
301 			Frame system entrance timestamp. The timestamp is
302 			related to the global system timer
303 
304 
305 
306 			Generally the first module (SW, TCL or TQM). that sees
307 			this frame and this timestamp field is not valid, shall fill
308 			in this field.
309 
310 
311 
312 			Timestamp in units of 1024 us
313 
314 buffer_timestamp_valid
315 
316 			When set, the Buffer_timestamp field contains valid
317 			info.
318 
319 mesh_enable
320 
321 			If set to 1:
322 
323 			* For raw WiFi frames, this indicates transmission to a
324 			mesh STA, enabling the interpretation of the 'Mesh Control
325 			Present' bit (bit 8) of QoS Control (otherwise this bit is
326 			ignored),
327 
328 			* For native WiFi frames, this indicates that a 'Mesh
329 			Control' field is present between the header and the LLC.
330 
331 hlos_tid_overwrite
332 
333 			When set, TCL shall ignore the IP DSCP and VLAN PCP
334 			fields and use HLOS_TID as the final TID. Otherwise TCL
335 			shall consider the DSCP and PCP fields as well as HLOS_TID
336 			and choose a final TID based on the configured priority
337 
338 			<legal all>
339 
340 hlos_tid
341 
342 			HLOS MSDU priority
343 
344 
345 
346 			Field is used when HLOS_TID_overwrite is set.
347 
348 
349 
350 			Field is also used when HLOS_TID_overwrite is not set
351 			and DSCP/PCP is not available in the packet
352 
353 			<legal all>
354 
355 reserved_4
356 
357 			<legal 0>
358 
359 reserved_5
360 
361 			<legal 0>
362 
363 reserved_6a
364 
365 			<legal 0>
366 
367 ring_id
368 
369 			The buffer pointer ring ID.
370 
371 			0 refers to the IDLE ring
372 
373 			1 - N refers to other rings
374 
375 
376 
377 			Helps with debugging when dumping ring contents.
378 
379 			<legal all>
380 
381 looping_count
382 
383 			A count value that indicates the number of times the
384 			producer of entries into the Ring has looped around the
385 			ring.
386 
387 			At initialization time, this value is set to 0. On the
388 			first loop, this value is set to 1. After the max value is
389 			reached allowed by the number of bits for this field, the
390 			count value continues with 0 again.
391 
392 
393 
394 			In case SW is the consumer of the ring entries, it can
395 			use this field to figure out up to where the producer of
396 			entries has created new entries. This eliminates the need to
397 			check where the head pointer' of the ring is located once
398 			the SW starts processing an interrupt indicating that new
399 			entries have been put into this ring...
400 
401 
402 
403 			Also note that SW if it wants only needs to look at the
404 			LSB bit of this count value.
405 
406 			<legal all>
407 */
408 
409 #define TCL_DATA_CMD_0_BUFFER_ADDR_INFO_BUF_ADDR_INFO_OFFSET         0x00000000
410 #define TCL_DATA_CMD_0_BUFFER_ADDR_INFO_BUF_ADDR_INFO_LSB            28
411 #define TCL_DATA_CMD_0_BUFFER_ADDR_INFO_BUF_ADDR_INFO_MASK           0xffffffff
412 #define TCL_DATA_CMD_1_BUFFER_ADDR_INFO_BUF_ADDR_INFO_OFFSET         0x00000004
413 #define TCL_DATA_CMD_1_BUFFER_ADDR_INFO_BUF_ADDR_INFO_LSB            28
414 #define TCL_DATA_CMD_1_BUFFER_ADDR_INFO_BUF_ADDR_INFO_MASK           0xffffffff
415 
416 /* Description		TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE
417 
418 			<enum 0 MSDU_buffer> The address points to an MSDU
419 			buffer.
420 
421 			<enum 1 extension_descriptor> The address points to an
422 			MSDU link extension descriptor
423 
424 			< legal all>
425 */
426 #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_OFFSET                   0x00000008
427 #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_LSB                      0
428 #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_MASK                     0x00000001
429 
430 /* Description		TCL_DATA_CMD_2_EPD
431 
432 			When this bit is set then input packet is an EPD type
433 
434 			<legal all>
435 */
436 #define TCL_DATA_CMD_2_EPD_OFFSET                                    0x00000008
437 #define TCL_DATA_CMD_2_EPD_LSB                                       1
438 #define TCL_DATA_CMD_2_EPD_MASK                                      0x00000002
439 
440 /* Description		TCL_DATA_CMD_2_ENCAP_TYPE
441 
442 			Indicates the encapsulation that HW will perform:
443 
444 			<enum 0 RAW> No encapsulation
445 
446 			<enum 1 Native_WiFi>
447 
448 			<enum 2 Ethernet> Ethernet 2 (DIX)  or 802.3 (uses
449 			SNAP/LLC)
450 
451 			<enum 3 802_3> DO NOT USE. Indicate Ethernet
452 
453 
454 
455 			Used by the OLE during encapsulation.
456 
457 			<legal all>
458 */
459 #define TCL_DATA_CMD_2_ENCAP_TYPE_OFFSET                             0x00000008
460 #define TCL_DATA_CMD_2_ENCAP_TYPE_LSB                                2
461 #define TCL_DATA_CMD_2_ENCAP_TYPE_MASK                               0x0000000c
462 
463 /* Description		TCL_DATA_CMD_2_ENCRYPT_TYPE
464 
465 			Field only valid for encap_type: RAW
466 
467 
468 
469 			Indicates type of decrypt cipher used (as defined in the
470 			peer entry)
471 
472 			<enum 0 wep_40> WEP 40-bit
473 
474 			<enum 1 wep_104> WEP 104-bit
475 
476 			<enum 2 tkip_no_mic> TKIP without MIC
477 
478 			<enum 3 wep_128> WEP 128-bit
479 
480 			<enum 4 tkip_with_mic> TKIP with MIC
481 
482 			<enum 5 wapi> WAPI
483 
484 			<enum 6 aes_ccmp_128> AES CCMP 128
485 
486 			<enum 7 no_cipher> No crypto
487 
488 			<enum 8 aes_ccmp_256> AES CCMP 256
489 
490 			<enum 9 aes_gcmp_128> AES CCMP 128
491 
492 			<enum 10 aes_gcmp_256> AES CCMP 256
493 
494 			<enum 11 wapi_gcm_sm4> WAPI GCM SM4
495 
496 			<legal 0-11>
497 */
498 #define TCL_DATA_CMD_2_ENCRYPT_TYPE_OFFSET                           0x00000008
499 #define TCL_DATA_CMD_2_ENCRYPT_TYPE_LSB                              4
500 #define TCL_DATA_CMD_2_ENCRYPT_TYPE_MASK                             0x000000f0
501 
502 /* Description		TCL_DATA_CMD_2_SRC_BUFFER_SWAP
503 
504 			Treats source memory (packet buffer) organization as
505 			big-endian. The packets are read and byte swapped.
506 
507 			1'b0: Source memory is little endian
508 
509 			1'b1: Source memory is big endian
510 
511 			<legal all>
512 */
513 #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_OFFSET                        0x00000008
514 #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_LSB                           8
515 #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_MASK                          0x00000100
516 
517 /* Description		TCL_DATA_CMD_2_LINK_META_SWAP
518 
519 			Treats link descriptor and Metadata as big-endian. The
520 			link descriptor/Metadata is read and byte swapped.
521 
522 			1'b0: Memory is little endian
523 
524 			1'b1: Memory is big endian
525 
526 			<legal all>
527 */
528 #define TCL_DATA_CMD_2_LINK_META_SWAP_OFFSET                         0x00000008
529 #define TCL_DATA_CMD_2_LINK_META_SWAP_LSB                            9
530 #define TCL_DATA_CMD_2_LINK_META_SWAP_MASK                           0x00000200
531 
532 /* Description		TCL_DATA_CMD_2_RESERVED
533 
534 			<legal 0>
535 */
536 #define TCL_DATA_CMD_2_RESERVED_OFFSET                               0x00000008
537 #define TCL_DATA_CMD_2_RESERVED_LSB                                  10
538 #define TCL_DATA_CMD_2_RESERVED_MASK                                 0x00003c00
539 
540 /* Description		TCL_DATA_CMD_2_ADDRX_EN
541 
542 			Address X search enable in ASE
543 
544 			1'b0: Search disable
545 
546 			1'b1: Search Enable
547 
548 			<legal all>
549 */
550 #define TCL_DATA_CMD_2_ADDRX_EN_OFFSET                               0x00000008
551 #define TCL_DATA_CMD_2_ADDRX_EN_LSB                                  14
552 #define TCL_DATA_CMD_2_ADDRX_EN_MASK                                 0x00004000
553 
554 /* Description		TCL_DATA_CMD_2_ADDRY_EN
555 
556 			Address Y search enable in ASE
557 
558 			1'b0: Search disable
559 
560 			1'b1: Search Enable
561 
562 			<legal all>
563 */
564 #define TCL_DATA_CMD_2_ADDRY_EN_OFFSET                               0x00000008
565 #define TCL_DATA_CMD_2_ADDRY_EN_LSB                                  15
566 #define TCL_DATA_CMD_2_ADDRY_EN_MASK                                 0x00008000
567 
568 /* Description		TCL_DATA_CMD_2_TCL_CMD_NUMBER
569 
570 			This number can be used by SW to track, identify and
571 			link the created commands with the command statuses
572 
573 
574 
575 			Is set to the value 'TCL_CMD_Number' of the related
576 			TCL_DATA command
577 
578 			<legal all>
579 */
580 #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_OFFSET                         0x00000008
581 #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_LSB                            16
582 #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_MASK                           0xffff0000
583 
584 /* Description		TCL_DATA_CMD_3_DATA_LENGTH
585 
586 			Valid Data length in bytes.
587 
588 
589 
590 			MSDU length in case of direct descriptor.
591 
592 			Length of link extension descriptor in case of Link
593 			extension descriptor. This is used to know the size of
594 			Metadata.
595 
596 			<legal all>
597 */
598 #define TCL_DATA_CMD_3_DATA_LENGTH_OFFSET                            0x0000000c
599 #define TCL_DATA_CMD_3_DATA_LENGTH_LSB                               0
600 #define TCL_DATA_CMD_3_DATA_LENGTH_MASK                              0x0000ffff
601 
602 /* Description		TCL_DATA_CMD_3_IPV4_CHECKSUM_EN
603 
604 			OLE related control
605 
606 			Enable IPv4 checksum replacement
607 */
608 #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_OFFSET                       0x0000000c
609 #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_LSB                          16
610 #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_MASK                         0x00010000
611 
612 /* Description		TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN
613 
614 			OLE related control
615 
616 			Enable UDP over IPv4 checksum replacement.  UDP checksum
617 			over IPv4 is optional for TCP/IP stacks.
618 */
619 #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_OFFSET              0x0000000c
620 #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB                 17
621 #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK                0x00020000
622 
623 /* Description		TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN
624 
625 			OLE related control
626 
627 			Enable UDP over IPv6 checksum replacement.  UDP checksum
628 			over IPv6 is mandatory for TCP/IP stacks.
629 */
630 #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_OFFSET              0x0000000c
631 #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB                 18
632 #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK                0x00040000
633 
634 /* Description		TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN
635 
636 			OLE related control
637 
638 			Enable TCP checksum over IPv4 replacement
639 */
640 #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_OFFSET              0x0000000c
641 #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB                 19
642 #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK                0x00080000
643 
644 /* Description		TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN
645 
646 			OLE related control
647 
648 			Enable TCP checksum over IPv6 replacement
649 */
650 #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_OFFSET              0x0000000c
651 #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB                 20
652 #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK                0x00100000
653 
654 /* Description		TCL_DATA_CMD_3_TO_FW
655 
656 			Forward packet to FW along with classification result.
657 			The packet will not be forward to TQM when this bit is set
658 
659 			1'b0: Use classification result to forward the packet.
660 
661 			1'b1: Override classification result and forward packet
662 			only to FW.
663 */
664 #define TCL_DATA_CMD_3_TO_FW_OFFSET                                  0x0000000c
665 #define TCL_DATA_CMD_3_TO_FW_LSB                                     21
666 #define TCL_DATA_CMD_3_TO_FW_MASK                                    0x00200000
667 
668 /* Description		TCL_DATA_CMD_3_DSCP_TO_TID_PRIORITY_TABLE_ID
669 
670 			The DSCP to tid conversion table to be used for this
671 			frame
672 
673 			<legal all>
674 */
675 #define TCL_DATA_CMD_3_DSCP_TO_TID_PRIORITY_TABLE_ID_OFFSET          0x0000000c
676 #define TCL_DATA_CMD_3_DSCP_TO_TID_PRIORITY_TABLE_ID_LSB             22
677 #define TCL_DATA_CMD_3_DSCP_TO_TID_PRIORITY_TABLE_ID_MASK            0x00400000
678 
679 /* Description		TCL_DATA_CMD_3_PACKET_OFFSET
680 
681 			Packet offset from Metadata in case of direct buffer
682 			descriptor. This field is valid when Buf_or_ext_desc_type is
683 			reset(= 0).
684 
685 			<legal all>
686 */
687 #define TCL_DATA_CMD_3_PACKET_OFFSET_OFFSET                          0x0000000c
688 #define TCL_DATA_CMD_3_PACKET_OFFSET_LSB                             23
689 #define TCL_DATA_CMD_3_PACKET_OFFSET_MASK                            0xff800000
690 
691 /* Description		TCL_DATA_CMD_4_BUFFER_TIMESTAMP
692 
693 			Field only valid when 'Buffer_timestamp_valid ' is set.
694 
695 
696 
697 			Frame system entrance timestamp. The timestamp is
698 			related to the global system timer
699 
700 
701 
702 			Generally the first module (SW, TCL or TQM). that sees
703 			this frame and this timestamp field is not valid, shall fill
704 			in this field.
705 
706 
707 
708 			Timestamp in units of 1024 us
709 */
710 #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_OFFSET                       0x00000010
711 #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_LSB                          0
712 #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_MASK                         0x0007ffff
713 
714 /* Description		TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID
715 
716 			When set, the Buffer_timestamp field contains valid
717 			info.
718 */
719 #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_OFFSET                 0x00000010
720 #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_LSB                    19
721 #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_MASK                   0x00080000
722 
723 /* Description		TCL_DATA_CMD_4_MESH_ENABLE
724 
725 			If set to 1:
726 
727 			* For raw WiFi frames, this indicates transmission to a
728 			mesh STA, enabling the interpretation of the 'Mesh Control
729 			Present' bit (bit 8) of QoS Control (otherwise this bit is
730 			ignored),
731 
732 			* For native WiFi frames, this indicates that a 'Mesh
733 			Control' field is present between the header and the LLC.
734 */
735 #define TCL_DATA_CMD_4_MESH_ENABLE_OFFSET                            0x00000010
736 #define TCL_DATA_CMD_4_MESH_ENABLE_LSB                               20
737 #define TCL_DATA_CMD_4_MESH_ENABLE_MASK                              0x00100000
738 
739 /* Description		TCL_DATA_CMD_4_HLOS_TID_OVERWRITE
740 
741 			When set, TCL shall ignore the IP DSCP and VLAN PCP
742 			fields and use HLOS_TID as the final TID. Otherwise TCL
743 			shall consider the DSCP and PCP fields as well as HLOS_TID
744 			and choose a final TID based on the configured priority
745 
746 			<legal all>
747 */
748 #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_OFFSET                     0x00000010
749 #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_LSB                        21
750 #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_MASK                       0x00200000
751 
752 /* Description		TCL_DATA_CMD_4_HLOS_TID
753 
754 			HLOS MSDU priority
755 
756 
757 
758 			Field is used when HLOS_TID_overwrite is set.
759 
760 
761 
762 			Field is also used when HLOS_TID_overwrite is not set
763 			and DSCP/PCP is not available in the packet
764 
765 			<legal all>
766 */
767 #define TCL_DATA_CMD_4_HLOS_TID_OFFSET                               0x00000010
768 #define TCL_DATA_CMD_4_HLOS_TID_LSB                                  22
769 #define TCL_DATA_CMD_4_HLOS_TID_MASK                                 0x03c00000
770 
771 /* Description		TCL_DATA_CMD_4_RESERVED_4
772 
773 			<legal 0>
774 */
775 #define TCL_DATA_CMD_4_RESERVED_4_OFFSET                             0x00000010
776 #define TCL_DATA_CMD_4_RESERVED_4_LSB                                26
777 #define TCL_DATA_CMD_4_RESERVED_4_MASK                               0xfc000000
778 
779 /* Description		TCL_DATA_CMD_5_RESERVED_5
780 
781 			<legal 0>
782 */
783 #define TCL_DATA_CMD_5_RESERVED_5_OFFSET                             0x00000014
784 #define TCL_DATA_CMD_5_RESERVED_5_LSB                                0
785 #define TCL_DATA_CMD_5_RESERVED_5_MASK                               0xffffffff
786 
787 /* Description		TCL_DATA_CMD_6_RESERVED_6A
788 
789 			<legal 0>
790 */
791 #define TCL_DATA_CMD_6_RESERVED_6A_OFFSET                            0x00000018
792 #define TCL_DATA_CMD_6_RESERVED_6A_LSB                               0
793 #define TCL_DATA_CMD_6_RESERVED_6A_MASK                              0x000fffff
794 
795 /* Description		TCL_DATA_CMD_6_RING_ID
796 
797 			The buffer pointer ring ID.
798 
799 			0 refers to the IDLE ring
800 
801 			1 - N refers to other rings
802 
803 
804 
805 			Helps with debugging when dumping ring contents.
806 
807 			<legal all>
808 */
809 #define TCL_DATA_CMD_6_RING_ID_OFFSET                                0x00000018
810 #define TCL_DATA_CMD_6_RING_ID_LSB                                   20
811 #define TCL_DATA_CMD_6_RING_ID_MASK                                  0x0ff00000
812 
813 /* Description		TCL_DATA_CMD_6_LOOPING_COUNT
814 
815 			A count value that indicates the number of times the
816 			producer of entries into the Ring has looped around the
817 			ring.
818 
819 			At initialization time, this value is set to 0. On the
820 			first loop, this value is set to 1. After the max value is
821 			reached allowed by the number of bits for this field, the
822 			count value continues with 0 again.
823 
824 
825 
826 			In case SW is the consumer of the ring entries, it can
827 			use this field to figure out up to where the producer of
828 			entries has created new entries. This eliminates the need to
829 			check where the head pointer' of the ring is located once
830 			the SW starts processing an interrupt indicating that new
831 			entries have been put into this ring...
832 
833 
834 
835 			Also note that SW if it wants only needs to look at the
836 			LSB bit of this count value.
837 
838 			<legal all>
839 */
840 #define TCL_DATA_CMD_6_LOOPING_COUNT_OFFSET                          0x00000018
841 #define TCL_DATA_CMD_6_LOOPING_COUNT_LSB                             28
842 #define TCL_DATA_CMD_6_LOOPING_COUNT_MASK                            0xf0000000
843 
844 
845 #endif // _TCL_DATA_CMD_H_
846