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