tcl_data_cmd.h 29 KB

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