tcl_data_cmd.h 33 KB

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