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