tcl_data_cmd.h 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142
  1. /*
  2. * Copyright (c) 2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. // $ATH_LICENSE_HW_HDR_C$
  17. //
  18. // DO NOT EDIT! This file is automatically generated
  19. // These definitions are tied to a particular hardware layout
  20. #ifndef _TCL_DATA_CMD_H_
  21. #define _TCL_DATA_CMD_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. #include "buffer_addr_info.h"
  25. // ################ START SUMMARY #################
  26. //
  27. // Dword Fields
  28. // 0-1 struct buffer_addr_info buf_addr_info;
  29. // 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_2a[11:10], search_type[13:12], addrx_en[14], addry_en[15], tcl_cmd_number[31:16]
  30. // 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], reserved_3a[22], packet_offset[31:23]
  31. // 4 buffer_timestamp[18:0], buffer_timestamp_valid[19], mesh_enable[20], hlos_tid_overwrite[21], hlos_tid[25:22], lmac_id[27:26], reserved_4[31:28]
  32. // 5 dscp_tid_table_num[5:0], search_index[25:6], cache_set_num[29:26], reserved_5[31:30]
  33. // 6 reserved_6a[19:0], ring_id[27:20], looping_count[31:28]
  34. //
  35. // ################ END SUMMARY #################
  36. #define NUM_OF_DWORDS_TCL_DATA_CMD 7
  37. struct tcl_data_cmd {
  38. struct buffer_addr_info buf_addr_info;
  39. uint32_t buf_or_ext_desc_type : 1, //[0]
  40. epd : 1, //[1]
  41. encap_type : 2, //[3:2]
  42. encrypt_type : 4, //[7:4]
  43. src_buffer_swap : 1, //[8]
  44. link_meta_swap : 1, //[9]
  45. reserved_2a : 2, //[11:10]
  46. search_type : 2, //[13:12]
  47. addrx_en : 1, //[14]
  48. addry_en : 1, //[15]
  49. tcl_cmd_number : 16; //[31:16]
  50. uint32_t data_length : 16, //[15:0]
  51. ipv4_checksum_en : 1, //[16]
  52. udp_over_ipv4_checksum_en : 1, //[17]
  53. udp_over_ipv6_checksum_en : 1, //[18]
  54. tcp_over_ipv4_checksum_en : 1, //[19]
  55. tcp_over_ipv6_checksum_en : 1, //[20]
  56. to_fw : 1, //[21]
  57. reserved_3a : 1, //[22]
  58. packet_offset : 9; //[31:23]
  59. uint32_t buffer_timestamp : 19, //[18:0]
  60. buffer_timestamp_valid : 1, //[19]
  61. mesh_enable : 1, //[20]
  62. hlos_tid_overwrite : 1, //[21]
  63. hlos_tid : 4, //[25:22]
  64. lmac_id : 2, //[27:26]
  65. reserved_4 : 4; //[31:28]
  66. uint32_t dscp_tid_table_num : 6, //[5:0]
  67. search_index : 20, //[25:6]
  68. cache_set_num : 4, //[29:26]
  69. reserved_5 : 2; //[31:30]
  70. uint32_t reserved_6a : 20, //[19:0]
  71. ring_id : 8, //[27:20]
  72. looping_count : 4; //[31:28]
  73. };
  74. /*
  75. struct buffer_addr_info buf_addr_info
  76. Details of the physical address for a single buffer
  77. It also contains return ownership info as well as some
  78. meta data for SW related to this buffer.
  79. In case of Buf_or_ext_desc_type indicating
  80. 'MSDU_buffer', this address indicates the start of the meta
  81. data that is preceding the actual packet data.
  82. The start of the actual packet data is provided by
  83. field: Packet_offset
  84. buf_or_ext_desc_type
  85. <enum 0 MSDU_buffer> The address points to an MSDU
  86. buffer.
  87. <enum 1 extension_descriptor> The address points to an
  88. MSDU link extension descriptor
  89. < legal all>
  90. epd
  91. When this bit is set then input packet is an EPD type
  92. <legal all>
  93. encap_type
  94. Indicates the encapsulation that HW will perform:
  95. <enum 0 RAW> No encapsulation
  96. <enum 1 Native_WiFi>
  97. <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses
  98. SNAP/LLC)
  99. <enum 3 802_3> DO NOT USE. Indicate Ethernet
  100. Used by the OLE during encapsulation.
  101. <legal all>
  102. encrypt_type
  103. Field only valid for encap_type: RAW
  104. Indicates type of decrypt cipher used (as defined in the
  105. peer entry)
  106. <enum 0 wep_40> WEP 40-bit
  107. <enum 1 wep_104> WEP 104-bit
  108. <enum 2 tkip_no_mic> TKIP without MIC
  109. <enum 3 wep_128> WEP 128-bit
  110. <enum 4 tkip_with_mic> TKIP with MIC
  111. <enum 5 wapi> WAPI
  112. <enum 6 aes_ccmp_128> AES CCMP 128
  113. <enum 7 no_cipher> No crypto
  114. <enum 8 aes_ccmp_256> AES CCMP 256
  115. <enum 9 aes_gcmp_128> AES CCMP 128
  116. <enum 10 aes_gcmp_256> AES CCMP 256
  117. <enum 11 wapi_gcm_sm4> WAPI GCM SM4
  118. <enum 12 wep_varied_width> DO not use... Only for higher
  119. layer modules..
  120. <legal 0-12>
  121. src_buffer_swap
  122. Treats source memory (packet buffer) organization as
  123. big-endian. The packets are read and byte swapped.
  124. 1'b0: Source memory is little endian
  125. 1'b1: Source memory is big endian
  126. <legal all>
  127. link_meta_swap
  128. Treats link descriptor and Metadata as big-endian. The
  129. link descriptor/Metadata is read and byte swapped.
  130. 1'b0: Memory is little endian
  131. 1'b1: Memory is big endian
  132. <legal all>
  133. reserved_2a
  134. <legal 0>
  135. search_type
  136. Search type select
  137. <enum 0 Normal_search> Address and flow search will use
  138. packet contents
  139. <enum 1 Index_based_address_search> Address search will
  140. <enum 2 Index_based_flow_search> Flow search will use
  141. 'search_index', and address search will use packet contents
  142. <legal 0-2>
  143. addrx_en
  144. Address X search enable in ASE
  145. 1'b0: Search disable
  146. 1'b1: Search Enable
  147. <legal all>
  148. addry_en
  149. Address Y search enable in ASE
  150. 1'b0: Search disable
  151. 1'b1: Search Enable
  152. <legal all>
  153. tcl_cmd_number
  154. This number can be used by SW to track, identify and
  155. link the created commands with the command statuses
  156. Is set to the value 'TCL_CMD_Number' of the related
  157. TCL_DATA command
  158. <legal all>
  159. data_length
  160. Valid Data length in bytes.
  161. MSDU length in case of direct descriptor.
  162. Length of link extension descriptor in case of Link
  163. extension descriptor. This is used to know the size of
  164. Metadata.
  165. <legal all>
  166. ipv4_checksum_en
  167. OLE related control
  168. Enable IPv4 checksum replacement
  169. udp_over_ipv4_checksum_en
  170. OLE related control
  171. Enable UDP over IPv4 checksum replacement. UDP checksum
  172. over IPv4 is optional for TCP/IP stacks.
  173. udp_over_ipv6_checksum_en
  174. OLE related control
  175. Enable UDP over IPv6 checksum replacement. UDP checksum
  176. over IPv6 is mandatory for TCP/IP stacks.
  177. tcp_over_ipv4_checksum_en
  178. OLE related control
  179. Enable TCP checksum over IPv4 replacement
  180. tcp_over_ipv6_checksum_en
  181. OLE related control
  182. Enable TCP checksum over IPv6 replacement
  183. to_fw
  184. Forward packet to FW along with classification result.
  185. The packet will not be forward to TQM when this bit is set
  186. 1'b0: Use classification result to forward the packet.
  187. 1'b1: Override classification result and forward packet
  188. only to FW.
  189. <legal all>
  190. reserved_3a
  191. <legal 0>
  192. packet_offset
  193. Packet offset from Metadata in case of direct buffer
  194. descriptor. This field is valid when Buf_or_ext_desc_type is
  195. reset(= 0).
  196. <legal all>
  197. buffer_timestamp
  198. Field only valid when 'Buffer_timestamp_valid ' is set.
  199. Frame system entrance timestamp. The timestamp is
  200. related to the global system timer
  201. Generally the first module (SW, TCL or TQM). that sees
  202. this frame and this timestamp field is not valid, shall fill
  203. in this field.
  204. Timestamp in units of 1024 us
  205. buffer_timestamp_valid
  206. When set, the Buffer_timestamp field contains valid
  207. info.
  208. mesh_enable
  209. If set to 1:
  210. * For raw WiFi frames, this indicates transmission to a
  211. mesh STA, enabling the interpretation of the 'Mesh Control
  212. Present' bit (bit 8) of QoS Control (otherwise this bit is
  213. ignored),
  214. * For native WiFi frames, this indicates that a 'Mesh
  215. Control' field is present between the header and the LLC.
  216. hlos_tid_overwrite
  217. When set, TCL shall ignore the IP DSCP and VLAN PCP
  218. fields and use HLOS_TID as the final TID. Otherwise TCL
  219. shall consider the DSCP and PCP fields as well as HLOS_TID
  220. and choose a final TID based on the configured priority
  221. <legal all>
  222. hlos_tid
  223. HLOS MSDU priority
  224. Field is used when HLOS_TID_overwrite is set.
  225. Field is also used when HLOS_TID_overwrite is not set
  226. and DSCP/PCP is not available in the packet
  227. <legal all>
  228. lmac_id
  229. TCL uses this LMAC_ID in address search, i.e, while
  230. finding matching entry for the packet in AST corresponding
  231. to given LMAC_ID
  232. If LMAC ID is all 1s (=> value 3), it indicates wildcard
  233. match for any MAC
  234. <legal 0-3>
  235. reserved_4
  236. <legal 0>
  237. dscp_tid_table_num
  238. DSCP to TID mapping table number that need to be used
  239. for the MSDU, should be specified using this field
  240. <legal all>
  241. search_index
  242. The index that will be used for index based address or
  243. flow search. The field is valid when 'search_type' is 1 or
  244. 2.
  245. <legal all>
  246. cache_set_num
  247. Cache set number that should be used to cache the index
  248. based search results, for address and flow search. This
  249. value should be equal to LSB four bits of the hash value of
  250. match data, in case of search index points to an entry which
  251. may be used in content based search also. The value can be
  252. anything when the entry pointed by search index will not be
  253. used for content based search.
  254. <legal all>
  255. reserved_5
  256. <legal 0>
  257. reserved_6a
  258. <legal 0>
  259. ring_id
  260. The buffer pointer ring ID.
  261. 0 refers to the IDLE ring
  262. 1 - N refers to other rings
  263. Helps with debugging when dumping ring contents.
  264. <legal all>
  265. looping_count
  266. A count value that indicates the number of times the
  267. producer of entries into the Ring has looped around the
  268. ring.
  269. At initialization time, this value is set to 0. On the
  270. first loop, this value is set to 1. After the max value is
  271. reached allowed by the number of bits for this field, the
  272. count value continues with 0 again.
  273. In case SW is the consumer of the ring entries, it can
  274. use this field to figure out up to where the producer of
  275. entries has created new entries. This eliminates the need to
  276. check where the head pointer' of the ring is located once
  277. the SW starts processing an interrupt indicating that new
  278. entries have been put into this ring...
  279. Also note that SW if it wants only needs to look at the
  280. LSB bit of this count value.
  281. <legal all>
  282. */
  283. /* EXTERNAL REFERENCE : struct buffer_addr_info buf_addr_info */
  284. /* Description TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0
  285. Address (lower 32 bits) of the MSDU buffer OR
  286. MSDU_EXTENSION descriptor OR Link Descriptor
  287. In case of 'NULL' pointer, this field is set to 0
  288. <legal all>
  289. */
  290. #define TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
  291. #define TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
  292. #define TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
  293. /* Description TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32
  294. Address (upper 8 bits) of the MSDU buffer OR
  295. MSDU_EXTENSION descriptor OR Link Descriptor
  296. In case of 'NULL' pointer, this field is set to 0
  297. <legal all>
  298. */
  299. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
  300. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
  301. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
  302. /* Description TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER
  303. Consumer: WBM
  304. Producer: SW/FW
  305. In case of 'NULL' pointer, this field is set to 0
  306. Indicates to which buffer manager the buffer OR
  307. MSDU_EXTENSION descriptor OR link descriptor that is being
  308. pointed to shall be returned after the frame has been
  309. processed. It is used by WBM for routing purposes.
  310. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  311. to the WMB buffer idle list
  312. <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
  313. returned to the WMB idle link descriptor idle list
  314. <enum 2 FW_BM> This buffer shall be returned to the FW
  315. <enum 3 SW0_BM> This buffer shall be returned to the SW,
  316. ring 0
  317. <enum 4 SW1_BM> This buffer shall be returned to the SW,
  318. ring 1
  319. <enum 5 SW2_BM> This buffer shall be returned to the SW,
  320. ring 2
  321. <enum 6 SW3_BM> This buffer shall be returned to the SW,
  322. ring 3
  323. <enum 7 SW4_BM> This buffer shall be returned to the SW,
  324. ring 3
  325. <legal all>
  326. */
  327. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
  328. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
  329. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700
  330. /* Description TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE
  331. Cookie field exclusively used by SW.
  332. In case of 'NULL' pointer, this field is set to 0
  333. HW ignores the contents, accept that it passes the
  334. programmed value on to other descriptors together with the
  335. physical address
  336. Field can be used by SW to for example associate the
  337. buffers physical address with the virtual address
  338. The bit definitions as used by SW are within SW HLD
  339. specification
  340. NOTE:
  341. The three most significant bits can have a special
  342. meaning in case this struct is embedded in a TX_MPDU_DETAILS
  343. STRUCT, and field transmit_bw_restriction is set
  344. In case of NON punctured transmission:
  345. Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
  346. Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
  347. Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
  348. Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
  349. In case of punctured transmission:
  350. Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only
  351. Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only
  352. Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only
  353. Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only
  354. Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only
  355. Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only
  356. Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only
  357. Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only
  358. Note: a punctured transmission is indicated by the
  359. presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler
  360. TLV
  361. <legal all>
  362. */
  363. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
  364. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11
  365. #define TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800
  366. /* Description TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE
  367. <enum 0 MSDU_buffer> The address points to an MSDU
  368. buffer.
  369. <enum 1 extension_descriptor> The address points to an
  370. MSDU link extension descriptor
  371. < legal all>
  372. */
  373. #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_OFFSET 0x00000008
  374. #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_LSB 0
  375. #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_MASK 0x00000001
  376. /* Description TCL_DATA_CMD_2_EPD
  377. When this bit is set then input packet is an EPD type
  378. <legal all>
  379. */
  380. #define TCL_DATA_CMD_2_EPD_OFFSET 0x00000008
  381. #define TCL_DATA_CMD_2_EPD_LSB 1
  382. #define TCL_DATA_CMD_2_EPD_MASK 0x00000002
  383. /* Description TCL_DATA_CMD_2_ENCAP_TYPE
  384. Indicates the encapsulation that HW will perform:
  385. <enum 0 RAW> No encapsulation
  386. <enum 1 Native_WiFi>
  387. <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses
  388. SNAP/LLC)
  389. <enum 3 802_3> DO NOT USE. Indicate Ethernet
  390. Used by the OLE during encapsulation.
  391. <legal all>
  392. */
  393. #define TCL_DATA_CMD_2_ENCAP_TYPE_OFFSET 0x00000008
  394. #define TCL_DATA_CMD_2_ENCAP_TYPE_LSB 2
  395. #define TCL_DATA_CMD_2_ENCAP_TYPE_MASK 0x0000000c
  396. /* Description TCL_DATA_CMD_2_ENCRYPT_TYPE
  397. Field only valid for encap_type: RAW
  398. Indicates type of decrypt cipher used (as defined in the
  399. peer entry)
  400. <enum 0 wep_40> WEP 40-bit
  401. <enum 1 wep_104> WEP 104-bit
  402. <enum 2 tkip_no_mic> TKIP without MIC
  403. <enum 3 wep_128> WEP 128-bit
  404. <enum 4 tkip_with_mic> TKIP with MIC
  405. <enum 5 wapi> WAPI
  406. <enum 6 aes_ccmp_128> AES CCMP 128
  407. <enum 7 no_cipher> No crypto
  408. <enum 8 aes_ccmp_256> AES CCMP 256
  409. <enum 9 aes_gcmp_128> AES CCMP 128
  410. <enum 10 aes_gcmp_256> AES CCMP 256
  411. <enum 11 wapi_gcm_sm4> WAPI GCM SM4
  412. <enum 12 wep_varied_width> DO not use... Only for higher
  413. layer modules..
  414. <legal 0-12>
  415. */
  416. #define TCL_DATA_CMD_2_ENCRYPT_TYPE_OFFSET 0x00000008
  417. #define TCL_DATA_CMD_2_ENCRYPT_TYPE_LSB 4
  418. #define TCL_DATA_CMD_2_ENCRYPT_TYPE_MASK 0x000000f0
  419. /* Description TCL_DATA_CMD_2_SRC_BUFFER_SWAP
  420. Treats source memory (packet buffer) organization as
  421. big-endian. The packets are read and byte swapped.
  422. 1'b0: Source memory is little endian
  423. 1'b1: Source memory is big endian
  424. <legal all>
  425. */
  426. #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_OFFSET 0x00000008
  427. #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_LSB 8
  428. #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_MASK 0x00000100
  429. /* Description TCL_DATA_CMD_2_LINK_META_SWAP
  430. Treats link descriptor and Metadata as big-endian. The
  431. link descriptor/Metadata is read and byte swapped.
  432. 1'b0: Memory is little endian
  433. 1'b1: Memory is big endian
  434. <legal all>
  435. */
  436. #define TCL_DATA_CMD_2_LINK_META_SWAP_OFFSET 0x00000008
  437. #define TCL_DATA_CMD_2_LINK_META_SWAP_LSB 9
  438. #define TCL_DATA_CMD_2_LINK_META_SWAP_MASK 0x00000200
  439. /* Description TCL_DATA_CMD_2_RESERVED_2A
  440. <legal 0>
  441. */
  442. #define TCL_DATA_CMD_2_RESERVED_2A_OFFSET 0x00000008
  443. #define TCL_DATA_CMD_2_RESERVED_2A_LSB 10
  444. #define TCL_DATA_CMD_2_RESERVED_2A_MASK 0x00000c00
  445. /* Description TCL_DATA_CMD_2_SEARCH_TYPE
  446. Search type select
  447. <enum 0 Normal_search> Address and flow search will use
  448. packet contents
  449. <enum 1 Index_based_address_search> Address search will
  450. <enum 2 Index_based_flow_search> Flow search will use
  451. 'search_index', and address search will use packet contents
  452. <legal 0-2>
  453. */
  454. #define TCL_DATA_CMD_2_SEARCH_TYPE_OFFSET 0x00000008
  455. #define TCL_DATA_CMD_2_SEARCH_TYPE_LSB 12
  456. #define TCL_DATA_CMD_2_SEARCH_TYPE_MASK 0x00003000
  457. /* Description TCL_DATA_CMD_2_ADDRX_EN
  458. Address X search enable in ASE
  459. 1'b0: Search disable
  460. 1'b1: Search Enable
  461. <legal all>
  462. */
  463. #define TCL_DATA_CMD_2_ADDRX_EN_OFFSET 0x00000008
  464. #define TCL_DATA_CMD_2_ADDRX_EN_LSB 14
  465. #define TCL_DATA_CMD_2_ADDRX_EN_MASK 0x00004000
  466. /* Description TCL_DATA_CMD_2_ADDRY_EN
  467. Address Y search enable in ASE
  468. 1'b0: Search disable
  469. 1'b1: Search Enable
  470. <legal all>
  471. */
  472. #define TCL_DATA_CMD_2_ADDRY_EN_OFFSET 0x00000008
  473. #define TCL_DATA_CMD_2_ADDRY_EN_LSB 15
  474. #define TCL_DATA_CMD_2_ADDRY_EN_MASK 0x00008000
  475. /* Description TCL_DATA_CMD_2_TCL_CMD_NUMBER
  476. This number can be used by SW to track, identify and
  477. link the created commands with the command statuses
  478. Is set to the value 'TCL_CMD_Number' of the related
  479. TCL_DATA command
  480. <legal all>
  481. */
  482. #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_OFFSET 0x00000008
  483. #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_LSB 16
  484. #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_MASK 0xffff0000
  485. /* Description TCL_DATA_CMD_3_DATA_LENGTH
  486. Valid Data length in bytes.
  487. MSDU length in case of direct descriptor.
  488. Length of link extension descriptor in case of Link
  489. extension descriptor. This is used to know the size of
  490. Metadata.
  491. <legal all>
  492. */
  493. #define TCL_DATA_CMD_3_DATA_LENGTH_OFFSET 0x0000000c
  494. #define TCL_DATA_CMD_3_DATA_LENGTH_LSB 0
  495. #define TCL_DATA_CMD_3_DATA_LENGTH_MASK 0x0000ffff
  496. /* Description TCL_DATA_CMD_3_IPV4_CHECKSUM_EN
  497. OLE related control
  498. Enable IPv4 checksum replacement
  499. */
  500. #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_OFFSET 0x0000000c
  501. #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_LSB 16
  502. #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_MASK 0x00010000
  503. /* Description TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN
  504. OLE related control
  505. Enable UDP over IPv4 checksum replacement. UDP checksum
  506. over IPv4 is optional for TCP/IP stacks.
  507. */
  508. #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_OFFSET 0x0000000c
  509. #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB 17
  510. #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK 0x00020000
  511. /* Description TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN
  512. OLE related control
  513. Enable UDP over IPv6 checksum replacement. UDP checksum
  514. over IPv6 is mandatory for TCP/IP stacks.
  515. */
  516. #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_OFFSET 0x0000000c
  517. #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB 18
  518. #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK 0x00040000
  519. /* Description TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN
  520. OLE related control
  521. Enable TCP checksum over IPv4 replacement
  522. */
  523. #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_OFFSET 0x0000000c
  524. #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB 19
  525. #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK 0x00080000
  526. /* Description TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN
  527. OLE related control
  528. Enable TCP checksum over IPv6 replacement
  529. */
  530. #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_OFFSET 0x0000000c
  531. #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB 20
  532. #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK 0x00100000
  533. /* Description TCL_DATA_CMD_3_TO_FW
  534. Forward packet to FW along with classification result.
  535. The packet will not be forward to TQM when this bit is set
  536. 1'b0: Use classification result to forward the packet.
  537. 1'b1: Override classification result and forward packet
  538. only to FW.
  539. <legal all>
  540. */
  541. #define TCL_DATA_CMD_3_TO_FW_OFFSET 0x0000000c
  542. #define TCL_DATA_CMD_3_TO_FW_LSB 21
  543. #define TCL_DATA_CMD_3_TO_FW_MASK 0x00200000
  544. /* Description TCL_DATA_CMD_3_RESERVED_3A
  545. <legal 0>
  546. */
  547. #define TCL_DATA_CMD_3_RESERVED_3A_OFFSET 0x0000000c
  548. #define TCL_DATA_CMD_3_RESERVED_3A_LSB 22
  549. #define TCL_DATA_CMD_3_RESERVED_3A_MASK 0x00400000
  550. /* Description TCL_DATA_CMD_3_PACKET_OFFSET
  551. Packet offset from Metadata in case of direct buffer
  552. descriptor. This field is valid when Buf_or_ext_desc_type is
  553. reset(= 0).
  554. <legal all>
  555. */
  556. #define TCL_DATA_CMD_3_PACKET_OFFSET_OFFSET 0x0000000c
  557. #define TCL_DATA_CMD_3_PACKET_OFFSET_LSB 23
  558. #define TCL_DATA_CMD_3_PACKET_OFFSET_MASK 0xff800000
  559. /* Description TCL_DATA_CMD_4_BUFFER_TIMESTAMP
  560. Field only valid when 'Buffer_timestamp_valid ' is set.
  561. Frame system entrance timestamp. The timestamp is
  562. related to the global system timer
  563. Generally the first module (SW, TCL or TQM). that sees
  564. this frame and this timestamp field is not valid, shall fill
  565. in this field.
  566. Timestamp in units of 1024 us
  567. */
  568. #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_OFFSET 0x00000010
  569. #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_LSB 0
  570. #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_MASK 0x0007ffff
  571. /* Description TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID
  572. When set, the Buffer_timestamp field contains valid
  573. info.
  574. */
  575. #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_OFFSET 0x00000010
  576. #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_LSB 19
  577. #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_MASK 0x00080000
  578. /* Description TCL_DATA_CMD_4_MESH_ENABLE
  579. If set to 1:
  580. * For raw WiFi frames, this indicates transmission to a
  581. mesh STA, enabling the interpretation of the 'Mesh Control
  582. Present' bit (bit 8) of QoS Control (otherwise this bit is
  583. ignored),
  584. * For native WiFi frames, this indicates that a 'Mesh
  585. Control' field is present between the header and the LLC.
  586. */
  587. #define TCL_DATA_CMD_4_MESH_ENABLE_OFFSET 0x00000010
  588. #define TCL_DATA_CMD_4_MESH_ENABLE_LSB 20
  589. #define TCL_DATA_CMD_4_MESH_ENABLE_MASK 0x00100000
  590. /* Description TCL_DATA_CMD_4_HLOS_TID_OVERWRITE
  591. When set, TCL shall ignore the IP DSCP and VLAN PCP
  592. fields and use HLOS_TID as the final TID. Otherwise TCL
  593. shall consider the DSCP and PCP fields as well as HLOS_TID
  594. and choose a final TID based on the configured priority
  595. <legal all>
  596. */
  597. #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_OFFSET 0x00000010
  598. #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_LSB 21
  599. #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_MASK 0x00200000
  600. /* Description TCL_DATA_CMD_4_HLOS_TID
  601. HLOS MSDU priority
  602. Field is used when HLOS_TID_overwrite is set.
  603. Field is also used when HLOS_TID_overwrite is not set
  604. and DSCP/PCP is not available in the packet
  605. <legal all>
  606. */
  607. #define TCL_DATA_CMD_4_HLOS_TID_OFFSET 0x00000010
  608. #define TCL_DATA_CMD_4_HLOS_TID_LSB 22
  609. #define TCL_DATA_CMD_4_HLOS_TID_MASK 0x03c00000
  610. /* Description TCL_DATA_CMD_4_LMAC_ID
  611. TCL uses this LMAC_ID in address search, i.e, while
  612. finding matching entry for the packet in AST corresponding
  613. to given LMAC_ID
  614. If LMAC ID is all 1s (=> value 3), it indicates wildcard
  615. match for any MAC
  616. <legal 0-3>
  617. */
  618. #define TCL_DATA_CMD_4_LMAC_ID_OFFSET 0x00000010
  619. #define TCL_DATA_CMD_4_LMAC_ID_LSB 26
  620. #define TCL_DATA_CMD_4_LMAC_ID_MASK 0x0c000000
  621. /* Description TCL_DATA_CMD_4_RESERVED_4
  622. <legal 0>
  623. */
  624. #define TCL_DATA_CMD_4_RESERVED_4_OFFSET 0x00000010
  625. #define TCL_DATA_CMD_4_RESERVED_4_LSB 28
  626. #define TCL_DATA_CMD_4_RESERVED_4_MASK 0xf0000000
  627. /* Description TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM
  628. DSCP to TID mapping table number that need to be used
  629. for the MSDU, should be specified using this field
  630. <legal all>
  631. */
  632. #define TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM_OFFSET 0x00000014
  633. #define TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM_LSB 0
  634. #define TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM_MASK 0x0000003f
  635. /* Description TCL_DATA_CMD_5_SEARCH_INDEX
  636. The index that will be used for index based address or
  637. flow search. The field is valid when 'search_type' is 1 or
  638. 2.
  639. <legal all>
  640. */
  641. #define TCL_DATA_CMD_5_SEARCH_INDEX_OFFSET 0x00000014
  642. #define TCL_DATA_CMD_5_SEARCH_INDEX_LSB 6
  643. #define TCL_DATA_CMD_5_SEARCH_INDEX_MASK 0x03ffffc0
  644. /* Description TCL_DATA_CMD_5_CACHE_SET_NUM
  645. Cache set number that should be used to cache the index
  646. based search results, for address and flow search. This
  647. value should be equal to LSB four bits of the hash value of
  648. match data, in case of search index points to an entry which
  649. may be used in content based search also. The value can be
  650. anything when the entry pointed by search index will not be
  651. used for content based search.
  652. <legal all>
  653. */
  654. #define TCL_DATA_CMD_5_CACHE_SET_NUM_OFFSET 0x00000014
  655. #define TCL_DATA_CMD_5_CACHE_SET_NUM_LSB 26
  656. #define TCL_DATA_CMD_5_CACHE_SET_NUM_MASK 0x3c000000
  657. /* Description TCL_DATA_CMD_5_RESERVED_5
  658. <legal 0>
  659. */
  660. #define TCL_DATA_CMD_5_RESERVED_5_OFFSET 0x00000014
  661. #define TCL_DATA_CMD_5_RESERVED_5_LSB 30
  662. #define TCL_DATA_CMD_5_RESERVED_5_MASK 0xc0000000
  663. /* Description TCL_DATA_CMD_6_RESERVED_6A
  664. <legal 0>
  665. */
  666. #define TCL_DATA_CMD_6_RESERVED_6A_OFFSET 0x00000018
  667. #define TCL_DATA_CMD_6_RESERVED_6A_LSB 0
  668. #define TCL_DATA_CMD_6_RESERVED_6A_MASK 0x000fffff
  669. /* Description TCL_DATA_CMD_6_RING_ID
  670. The buffer pointer ring ID.
  671. 0 refers to the IDLE ring
  672. 1 - N refers to other rings
  673. Helps with debugging when dumping ring contents.
  674. <legal all>
  675. */
  676. #define TCL_DATA_CMD_6_RING_ID_OFFSET 0x00000018
  677. #define TCL_DATA_CMD_6_RING_ID_LSB 20
  678. #define TCL_DATA_CMD_6_RING_ID_MASK 0x0ff00000
  679. /* Description TCL_DATA_CMD_6_LOOPING_COUNT
  680. A count value that indicates the number of times the
  681. producer of entries into the Ring has looped around the
  682. ring.
  683. At initialization time, this value is set to 0. On the
  684. first loop, this value is set to 1. After the max value is
  685. reached allowed by the number of bits for this field, the
  686. count value continues with 0 again.
  687. In case SW is the consumer of the ring entries, it can
  688. use this field to figure out up to where the producer of
  689. entries has created new entries. This eliminates the need to
  690. check where the head pointer' of the ring is located once
  691. the SW starts processing an interrupt indicating that new
  692. entries have been put into this ring...
  693. Also note that SW if it wants only needs to look at the
  694. LSB bit of this count value.
  695. <legal all>
  696. */
  697. #define TCL_DATA_CMD_6_LOOPING_COUNT_OFFSET 0x00000018
  698. #define TCL_DATA_CMD_6_LOOPING_COUNT_LSB 28
  699. #define TCL_DATA_CMD_6_LOOPING_COUNT_MASK 0xf0000000
  700. #endif // _TCL_DATA_CMD_H_