tx_msdu_extension.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #ifndef _TX_MSDU_EXTENSION_H_
  17. #define _TX_MSDU_EXTENSION_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_TX_MSDU_EXTENSION 18
  21. struct tx_msdu_extension {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t tso_enable : 1, // [0:0]
  24. reserved_0a : 6, // [6:1]
  25. tcp_flag : 9, // [15:7]
  26. tcp_flag_mask : 9, // [24:16]
  27. reserved_0b : 7; // [31:25]
  28. uint32_t l2_length : 16, // [15:0]
  29. ip_length : 16; // [31:16]
  30. uint32_t tcp_seq_number : 32; // [31:0]
  31. uint32_t ip_identification : 16, // [15:0]
  32. udp_length : 16; // [31:16]
  33. uint32_t checksum_offset : 14, // [13:0]
  34. partial_checksum_en : 1, // [14:14]
  35. reserved_4a : 1, // [15:15]
  36. payload_start_offset : 14, // [29:16]
  37. reserved_4b : 2; // [31:30]
  38. uint32_t payload_end_offset : 14, // [13:0]
  39. reserved_5a : 2, // [15:14]
  40. wds : 1, // [16:16]
  41. reserved_5b : 15; // [31:17]
  42. uint32_t buf0_ptr_31_0 : 32; // [31:0]
  43. uint32_t buf0_ptr_39_32 : 8, // [7:0]
  44. extn_override : 1, // [8:8]
  45. encap_type : 2, // [10:9]
  46. encrypt_type : 4, // [14:11]
  47. tqm_no_drop : 1, // [15:15]
  48. buf0_len : 16; // [31:16]
  49. uint32_t buf1_ptr_31_0 : 32; // [31:0]
  50. uint32_t buf1_ptr_39_32 : 8, // [7:0]
  51. epd : 1, // [8:8]
  52. mesh_enable : 2, // [10:9]
  53. reserved_9a : 5, // [15:11]
  54. buf1_len : 16; // [31:16]
  55. uint32_t buf2_ptr_31_0 : 32; // [31:0]
  56. uint32_t buf2_ptr_39_32 : 8, // [7:0]
  57. dscp_tid_table_num : 6, // [13:8]
  58. reserved_11a : 2, // [15:14]
  59. buf2_len : 16; // [31:16]
  60. uint32_t buf3_ptr_31_0 : 32; // [31:0]
  61. uint32_t buf3_ptr_39_32 : 8, // [7:0]
  62. reserved_13a : 8, // [15:8]
  63. buf3_len : 16; // [31:16]
  64. uint32_t buf4_ptr_31_0 : 32; // [31:0]
  65. uint32_t buf4_ptr_39_32 : 8, // [7:0]
  66. reserved_15a : 8, // [15:8]
  67. buf4_len : 16; // [31:16]
  68. uint32_t buf5_ptr_31_0 : 32; // [31:0]
  69. uint32_t buf5_ptr_39_32 : 8, // [7:0]
  70. reserved_17a : 8, // [15:8]
  71. buf5_len : 16; // [31:16]
  72. #else
  73. uint32_t reserved_0b : 7, // [31:25]
  74. tcp_flag_mask : 9, // [24:16]
  75. tcp_flag : 9, // [15:7]
  76. reserved_0a : 6, // [6:1]
  77. tso_enable : 1; // [0:0]
  78. uint32_t ip_length : 16, // [31:16]
  79. l2_length : 16; // [15:0]
  80. uint32_t tcp_seq_number : 32; // [31:0]
  81. uint32_t udp_length : 16, // [31:16]
  82. ip_identification : 16; // [15:0]
  83. uint32_t reserved_4b : 2, // [31:30]
  84. payload_start_offset : 14, // [29:16]
  85. reserved_4a : 1, // [15:15]
  86. partial_checksum_en : 1, // [14:14]
  87. checksum_offset : 14; // [13:0]
  88. uint32_t reserved_5b : 15, // [31:17]
  89. wds : 1, // [16:16]
  90. reserved_5a : 2, // [15:14]
  91. payload_end_offset : 14; // [13:0]
  92. uint32_t buf0_ptr_31_0 : 32; // [31:0]
  93. uint32_t buf0_len : 16, // [31:16]
  94. tqm_no_drop : 1, // [15:15]
  95. encrypt_type : 4, // [14:11]
  96. encap_type : 2, // [10:9]
  97. extn_override : 1, // [8:8]
  98. buf0_ptr_39_32 : 8; // [7:0]
  99. uint32_t buf1_ptr_31_0 : 32; // [31:0]
  100. uint32_t buf1_len : 16, // [31:16]
  101. reserved_9a : 5, // [15:11]
  102. mesh_enable : 2, // [10:9]
  103. epd : 1, // [8:8]
  104. buf1_ptr_39_32 : 8; // [7:0]
  105. uint32_t buf2_ptr_31_0 : 32; // [31:0]
  106. uint32_t buf2_len : 16, // [31:16]
  107. reserved_11a : 2, // [15:14]
  108. dscp_tid_table_num : 6, // [13:8]
  109. buf2_ptr_39_32 : 8; // [7:0]
  110. uint32_t buf3_ptr_31_0 : 32; // [31:0]
  111. uint32_t buf3_len : 16, // [31:16]
  112. reserved_13a : 8, // [15:8]
  113. buf3_ptr_39_32 : 8; // [7:0]
  114. uint32_t buf4_ptr_31_0 : 32; // [31:0]
  115. uint32_t buf4_len : 16, // [31:16]
  116. reserved_15a : 8, // [15:8]
  117. buf4_ptr_39_32 : 8; // [7:0]
  118. uint32_t buf5_ptr_31_0 : 32; // [31:0]
  119. uint32_t buf5_len : 16, // [31:16]
  120. reserved_17a : 8, // [15:8]
  121. buf5_ptr_39_32 : 8; // [7:0]
  122. #endif
  123. };
  124. /* Description TSO_ENABLE
  125. Enable transmit segmentation offload <legal all>
  126. */
  127. #define TX_MSDU_EXTENSION_TSO_ENABLE_OFFSET 0x00000000
  128. #define TX_MSDU_EXTENSION_TSO_ENABLE_LSB 0
  129. #define TX_MSDU_EXTENSION_TSO_ENABLE_MSB 0
  130. #define TX_MSDU_EXTENSION_TSO_ENABLE_MASK 0x00000001
  131. /* Description RESERVED_0A
  132. FW will set to 0, MAC will ignore. <legal 0>
  133. */
  134. #define TX_MSDU_EXTENSION_RESERVED_0A_OFFSET 0x00000000
  135. #define TX_MSDU_EXTENSION_RESERVED_0A_LSB 1
  136. #define TX_MSDU_EXTENSION_RESERVED_0A_MSB 6
  137. #define TX_MSDU_EXTENSION_RESERVED_0A_MASK 0x0000007e
  138. /* Description TCP_FLAG
  139. TCP flags
  140. {NS,CWR,ECE,URG,ACK,PSH, RST ,SYN,FIN}<legal all>
  141. */
  142. #define TX_MSDU_EXTENSION_TCP_FLAG_OFFSET 0x00000000
  143. #define TX_MSDU_EXTENSION_TCP_FLAG_LSB 7
  144. #define TX_MSDU_EXTENSION_TCP_FLAG_MSB 15
  145. #define TX_MSDU_EXTENSION_TCP_FLAG_MASK 0x0000ff80
  146. /* Description TCP_FLAG_MASK
  147. TCP flag mask. Tcp_flag is inserted into the header based
  148. on the mask, if TSO is enabled
  149. */
  150. #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_OFFSET 0x00000000
  151. #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_LSB 16
  152. #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_MSB 24
  153. #define TX_MSDU_EXTENSION_TCP_FLAG_MASK_MASK 0x01ff0000
  154. /* Description RESERVED_0B
  155. FW will set to 0, MAC will ignore. <legal 0>
  156. */
  157. #define TX_MSDU_EXTENSION_RESERVED_0B_OFFSET 0x00000000
  158. #define TX_MSDU_EXTENSION_RESERVED_0B_LSB 25
  159. #define TX_MSDU_EXTENSION_RESERVED_0B_MSB 31
  160. #define TX_MSDU_EXTENSION_RESERVED_0B_MASK 0xfe000000
  161. /* Description L2_LENGTH
  162. L2 length for the msdu, if TSO is enabled <legal all>
  163. */
  164. #define TX_MSDU_EXTENSION_L2_LENGTH_OFFSET 0x00000004
  165. #define TX_MSDU_EXTENSION_L2_LENGTH_LSB 0
  166. #define TX_MSDU_EXTENSION_L2_LENGTH_MSB 15
  167. #define TX_MSDU_EXTENSION_L2_LENGTH_MASK 0x0000ffff
  168. /* Description IP_LENGTH
  169. IP length for the msdu, if TSO is enabled <legal all>
  170. */
  171. #define TX_MSDU_EXTENSION_IP_LENGTH_OFFSET 0x00000004
  172. #define TX_MSDU_EXTENSION_IP_LENGTH_LSB 16
  173. #define TX_MSDU_EXTENSION_IP_LENGTH_MSB 31
  174. #define TX_MSDU_EXTENSION_IP_LENGTH_MASK 0xffff0000
  175. /* Description TCP_SEQ_NUMBER
  176. Tcp_seq_number for the msdu, if TSO is enabled <legal all>
  177. */
  178. #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_OFFSET 0x00000008
  179. #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_LSB 0
  180. #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_MSB 31
  181. #define TX_MSDU_EXTENSION_TCP_SEQ_NUMBER_MASK 0xffffffff
  182. /* Description IP_IDENTIFICATION
  183. IP_identification for the msdu, if TSO is enabled <legal
  184. all>
  185. */
  186. #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_OFFSET 0x0000000c
  187. #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_LSB 0
  188. #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_MSB 15
  189. #define TX_MSDU_EXTENSION_IP_IDENTIFICATION_MASK 0x0000ffff
  190. /* Description UDP_LENGTH
  191. TXDMA is copies this field into MSDU START TLV
  192. */
  193. #define TX_MSDU_EXTENSION_UDP_LENGTH_OFFSET 0x0000000c
  194. #define TX_MSDU_EXTENSION_UDP_LENGTH_LSB 16
  195. #define TX_MSDU_EXTENSION_UDP_LENGTH_MSB 31
  196. #define TX_MSDU_EXTENSION_UDP_LENGTH_MASK 0xffff0000
  197. /* Description CHECKSUM_OFFSET
  198. The calculated checksum from start offset to end offset
  199. will be added to the checksum at the offset given by this
  200. field<legal all>
  201. */
  202. #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_OFFSET 0x00000010
  203. #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_LSB 0
  204. #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_MSB 13
  205. #define TX_MSDU_EXTENSION_CHECKSUM_OFFSET_MASK 0x00003fff
  206. /* Description PARTIAL_CHECKSUM_EN
  207. Partial Checksum Enable Bit.
  208. <legal 0-1>
  209. */
  210. #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_OFFSET 0x00000010
  211. #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_LSB 14
  212. #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_MSB 14
  213. #define TX_MSDU_EXTENSION_PARTIAL_CHECKSUM_EN_MASK 0x00004000
  214. /* Description RESERVED_4A
  215. <Legal 0>
  216. */
  217. #define TX_MSDU_EXTENSION_RESERVED_4A_OFFSET 0x00000010
  218. #define TX_MSDU_EXTENSION_RESERVED_4A_LSB 15
  219. #define TX_MSDU_EXTENSION_RESERVED_4A_MSB 15
  220. #define TX_MSDU_EXTENSION_RESERVED_4A_MASK 0x00008000
  221. /* Description PAYLOAD_START_OFFSET
  222. L4 checksum calculations will start fromt this offset
  223. <Legal all>
  224. */
  225. #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_OFFSET 0x00000010
  226. #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_LSB 16
  227. #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_MSB 29
  228. #define TX_MSDU_EXTENSION_PAYLOAD_START_OFFSET_MASK 0x3fff0000
  229. /* Description RESERVED_4B
  230. <Legal 0>
  231. */
  232. #define TX_MSDU_EXTENSION_RESERVED_4B_OFFSET 0x00000010
  233. #define TX_MSDU_EXTENSION_RESERVED_4B_LSB 30
  234. #define TX_MSDU_EXTENSION_RESERVED_4B_MSB 31
  235. #define TX_MSDU_EXTENSION_RESERVED_4B_MASK 0xc0000000
  236. /* Description PAYLOAD_END_OFFSET
  237. L4 checksum calculations will end at this offset.
  238. <Legal all>
  239. */
  240. #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_OFFSET 0x00000014
  241. #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_LSB 0
  242. #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_MSB 13
  243. #define TX_MSDU_EXTENSION_PAYLOAD_END_OFFSET_MASK 0x00003fff
  244. /* Description RESERVED_5A
  245. <Legal 0>
  246. */
  247. #define TX_MSDU_EXTENSION_RESERVED_5A_OFFSET 0x00000014
  248. #define TX_MSDU_EXTENSION_RESERVED_5A_LSB 14
  249. #define TX_MSDU_EXTENSION_RESERVED_5A_MSB 15
  250. #define TX_MSDU_EXTENSION_RESERVED_5A_MASK 0x0000c000
  251. /* Description WDS
  252. If set the current packet is 4-address frame. Required
  253. because an aggregate can include some frames with 3 address
  254. format and other frames with 4 address format. Used by
  255. the OLE during encapsulation.
  256. Note: there is also global wds tx control in the TX_PEER_ENTRY
  257. <legal all>
  258. */
  259. #define TX_MSDU_EXTENSION_WDS_OFFSET 0x00000014
  260. #define TX_MSDU_EXTENSION_WDS_LSB 16
  261. #define TX_MSDU_EXTENSION_WDS_MSB 16
  262. #define TX_MSDU_EXTENSION_WDS_MASK 0x00010000
  263. /* Description RESERVED_5B
  264. <Legal 0>
  265. */
  266. #define TX_MSDU_EXTENSION_RESERVED_5B_OFFSET 0x00000014
  267. #define TX_MSDU_EXTENSION_RESERVED_5B_LSB 17
  268. #define TX_MSDU_EXTENSION_RESERVED_5B_MSB 31
  269. #define TX_MSDU_EXTENSION_RESERVED_5B_MASK 0xfffe0000
  270. /* Description BUF0_PTR_31_0
  271. Lower 32 bits of the first buffer pointer
  272. NOTE: SW/FW manages the 'cookie' info related to this buffer
  273. together with the 'cookie' info for this MSDU_EXTENSION
  274. descriptor
  275. <legal all>
  276. */
  277. #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_OFFSET 0x00000018
  278. #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_LSB 0
  279. #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_MSB 31
  280. #define TX_MSDU_EXTENSION_BUF0_PTR_31_0_MASK 0xffffffff
  281. /* Description BUF0_PTR_39_32
  282. Upper 8 bits of the first buffer pointer <legal all>
  283. */
  284. #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_OFFSET 0x0000001c
  285. #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_LSB 0
  286. #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_MSB 7
  287. #define TX_MSDU_EXTENSION_BUF0_PTR_39_32_MASK 0x000000ff
  288. /* Description EXTN_OVERRIDE
  289. Field only used by TCL
  290. When set, the fields encap_type, Encrypt_type, TQM_NO_DROP,
  291. EPD and mesh_enable are valid and override any TCL per-bank
  292. registers specifying these values (except TQM_NO_DROP).
  293. When clear, the values for encap_type, Encrypt_type, EPD,
  294. mesh_enable and DSCP_TID_TABLE_NUM are taken from per-bank
  295. registers in TCL and TQM_NO_DROP is not being requested
  296. by SW.
  297. <legal all>
  298. */
  299. #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_OFFSET 0x0000001c
  300. #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_LSB 8
  301. #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_MSB 8
  302. #define TX_MSDU_EXTENSION_EXTN_OVERRIDE_MASK 0x00000100
  303. /* Description ENCAP_TYPE
  304. Field only used by TCL, only valid if Extn_override is set.
  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 SNAP/LLC)
  309. <enum 3 802_3> DO NOT USE. Indicate Ethernet
  310. Used by the OLE during encapsulation.
  311. <legal all>
  312. */
  313. #define TX_MSDU_EXTENSION_ENCAP_TYPE_OFFSET 0x0000001c
  314. #define TX_MSDU_EXTENSION_ENCAP_TYPE_LSB 9
  315. #define TX_MSDU_EXTENSION_ENCAP_TYPE_MSB 10
  316. #define TX_MSDU_EXTENSION_ENCAP_TYPE_MASK 0x00000600
  317. /* Description ENCRYPT_TYPE
  318. Field only used by TCL, only valid if Extn_override is set
  319. and encap_type = RAW
  320. Indicates type of decrypt cipher used (as defined in the
  321. peer entry)
  322. <enum 0 wep_40> WEP 40-bit
  323. <enum 1 wep_104> WEP 104-bit
  324. <enum 2 tkip_no_mic> TKIP without MIC
  325. <enum 3 wep_128> WEP 128-bit
  326. <enum 4 tkip_with_mic> TKIP with MIC
  327. <enum 5 wapi> WAPI
  328. <enum 6 aes_ccmp_128> AES CCMP 128
  329. <enum 7 no_cipher> No crypto
  330. <enum 8 aes_ccmp_256> AES CCMP 256
  331. <enum 9 aes_gcmp_128> AES CCMP 128
  332. <enum 10 aes_gcmp_256> AES CCMP 256
  333. <enum 11 wapi_gcm_sm4> WAPI GCM SM4
  334. <enum 12 wep_varied_width> DO not use... Only for higher
  335. layer modules..
  336. <legal 0-12>
  337. */
  338. #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_OFFSET 0x0000001c
  339. #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_LSB 11
  340. #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_MSB 14
  341. #define TX_MSDU_EXTENSION_ENCRYPT_TYPE_MASK 0x00007800
  342. /* Description TQM_NO_DROP
  343. Field only used by TCL, only valid if Extn_override is set.
  344. This bit is used to stop TQM from dropping MSDUs while adding
  345. them to MSDU flows1'b1: Do not drop MSDU when any of the
  346. threshold value is met while adding MSDU in a flow1'b1:
  347. Drop MSDU when any of the threshold value is met while adding
  348. MSDU in a flow
  349. Note: TCL can also have CCE/LCE rules to set 'TQM_NO_DROP'
  350. which will be OR'd to this value.
  351. <legal all>
  352. */
  353. #define TX_MSDU_EXTENSION_TQM_NO_DROP_OFFSET 0x0000001c
  354. #define TX_MSDU_EXTENSION_TQM_NO_DROP_LSB 15
  355. #define TX_MSDU_EXTENSION_TQM_NO_DROP_MSB 15
  356. #define TX_MSDU_EXTENSION_TQM_NO_DROP_MASK 0x00008000
  357. /* Description BUF0_LEN
  358. Length of the first buffer <legal all>
  359. */
  360. #define TX_MSDU_EXTENSION_BUF0_LEN_OFFSET 0x0000001c
  361. #define TX_MSDU_EXTENSION_BUF0_LEN_LSB 16
  362. #define TX_MSDU_EXTENSION_BUF0_LEN_MSB 31
  363. #define TX_MSDU_EXTENSION_BUF0_LEN_MASK 0xffff0000
  364. /* Description BUF1_PTR_31_0
  365. Lower 32 bits of the second buffer pointer
  366. NOTE: SW/FW manages the 'cookie' info related to this buffer
  367. together with the 'cookie' info for this MSDU_EXTENSION
  368. descriptor
  369. <legal all>
  370. */
  371. #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_OFFSET 0x00000020
  372. #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_LSB 0
  373. #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_MSB 31
  374. #define TX_MSDU_EXTENSION_BUF1_PTR_31_0_MASK 0xffffffff
  375. /* Description BUF1_PTR_39_32
  376. Upper 8 bits of the second buffer pointer <legal all>
  377. */
  378. #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_OFFSET 0x00000024
  379. #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_LSB 0
  380. #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_MSB 7
  381. #define TX_MSDU_EXTENSION_BUF1_PTR_39_32_MASK 0x000000ff
  382. /* Description EPD
  383. Field only used by TCL, only valid if Extn_override is set.
  384. When this bit is set then input packet is an EPD type
  385. <legal all>
  386. */
  387. #define TX_MSDU_EXTENSION_EPD_OFFSET 0x00000024
  388. #define TX_MSDU_EXTENSION_EPD_LSB 8
  389. #define TX_MSDU_EXTENSION_EPD_MSB 8
  390. #define TX_MSDU_EXTENSION_EPD_MASK 0x00000100
  391. /* Description MESH_ENABLE
  392. Field only used by TCL, only valid if Extn_override is set.
  393. If set to a non-zero value:
  394. * For raw WiFi frames, this indicates transmission to a
  395. mesh STA, enabling the interpretation of the 'Mesh Control
  396. Present' bit (bit 8) of QoS Control (otherwise this bit
  397. is ignored). The interpretation of the A-MSDU 'Length'
  398. field is decided by the e-numerations below.
  399. * For native WiFi frames, this indicates that a 'Mesh Control'
  400. field is present between the header and the LLC. The three
  401. non-zero values are interchangeable.
  402. <enum 0 MESH_DISABLE>
  403. <enum 1 MESH_Q2Q> A-MSDU 'Length' is big endian and includes
  404. the length of Mesh Control.
  405. <enum 2 MESH_11S_BE> A-MSDU 'Length' is big endian and excludes
  406. the length of Mesh Control.
  407. <enum 3 MESH_11S_LE> A-MSDU 'Length' is little endian and
  408. excludes the length of Mesh Control. This is 802.11s-compliant.
  409. <legal 0-3>
  410. */
  411. #define TX_MSDU_EXTENSION_MESH_ENABLE_OFFSET 0x00000024
  412. #define TX_MSDU_EXTENSION_MESH_ENABLE_LSB 9
  413. #define TX_MSDU_EXTENSION_MESH_ENABLE_MSB 10
  414. #define TX_MSDU_EXTENSION_MESH_ENABLE_MASK 0x00000600
  415. /* Description RESERVED_9A
  416. <Legal 0>
  417. */
  418. #define TX_MSDU_EXTENSION_RESERVED_9A_OFFSET 0x00000024
  419. #define TX_MSDU_EXTENSION_RESERVED_9A_LSB 11
  420. #define TX_MSDU_EXTENSION_RESERVED_9A_MSB 15
  421. #define TX_MSDU_EXTENSION_RESERVED_9A_MASK 0x0000f800
  422. /* Description BUF1_LEN
  423. Length of the second buffer <legal all>
  424. */
  425. #define TX_MSDU_EXTENSION_BUF1_LEN_OFFSET 0x00000024
  426. #define TX_MSDU_EXTENSION_BUF1_LEN_LSB 16
  427. #define TX_MSDU_EXTENSION_BUF1_LEN_MSB 31
  428. #define TX_MSDU_EXTENSION_BUF1_LEN_MASK 0xffff0000
  429. /* Description BUF2_PTR_31_0
  430. Lower 32 bits of the third buffer pointer
  431. NOTE: SW/FW manages the 'cookie' info related to this buffer
  432. together with the 'cookie' info for this MSDU_EXTENSION
  433. descriptor
  434. <legal all>
  435. */
  436. #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_OFFSET 0x00000028
  437. #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_LSB 0
  438. #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_MSB 31
  439. #define TX_MSDU_EXTENSION_BUF2_PTR_31_0_MASK 0xffffffff
  440. /* Description BUF2_PTR_39_32
  441. Upper 8 bits of the third buffer pointer <legal all>
  442. */
  443. #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_OFFSET 0x0000002c
  444. #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_LSB 0
  445. #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_MSB 7
  446. #define TX_MSDU_EXTENSION_BUF2_PTR_39_32_MASK 0x000000ff
  447. /* Description DSCP_TID_TABLE_NUM
  448. Field only used by TCL, only valid if Extn_override is set.
  449. This specifies the DSCP to TID mapping table to be used
  450. for the MSDU
  451. <legal all>
  452. */
  453. #define TX_MSDU_EXTENSION_DSCP_TID_TABLE_NUM_OFFSET 0x0000002c
  454. #define TX_MSDU_EXTENSION_DSCP_TID_TABLE_NUM_LSB 8
  455. #define TX_MSDU_EXTENSION_DSCP_TID_TABLE_NUM_MSB 13
  456. #define TX_MSDU_EXTENSION_DSCP_TID_TABLE_NUM_MASK 0x00003f00
  457. /* Description RESERVED_11A
  458. <Legal 0>
  459. */
  460. #define TX_MSDU_EXTENSION_RESERVED_11A_OFFSET 0x0000002c
  461. #define TX_MSDU_EXTENSION_RESERVED_11A_LSB 14
  462. #define TX_MSDU_EXTENSION_RESERVED_11A_MSB 15
  463. #define TX_MSDU_EXTENSION_RESERVED_11A_MASK 0x0000c000
  464. /* Description BUF2_LEN
  465. Length of the third buffer <legal all>
  466. */
  467. #define TX_MSDU_EXTENSION_BUF2_LEN_OFFSET 0x0000002c
  468. #define TX_MSDU_EXTENSION_BUF2_LEN_LSB 16
  469. #define TX_MSDU_EXTENSION_BUF2_LEN_MSB 31
  470. #define TX_MSDU_EXTENSION_BUF2_LEN_MASK 0xffff0000
  471. /* Description BUF3_PTR_31_0
  472. Lower 32 bits of the fourth buffer pointer
  473. NOTE: SW/FW manages the 'cookie' info related to this buffer
  474. together with the 'cookie' info for this MSDU_EXTENSION
  475. descriptor
  476. <legal all>
  477. */
  478. #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_OFFSET 0x00000030
  479. #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_LSB 0
  480. #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_MSB 31
  481. #define TX_MSDU_EXTENSION_BUF3_PTR_31_0_MASK 0xffffffff
  482. /* Description BUF3_PTR_39_32
  483. Upper 8 bits of the fourth buffer pointer <legal all>
  484. */
  485. #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_OFFSET 0x00000034
  486. #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_LSB 0
  487. #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_MSB 7
  488. #define TX_MSDU_EXTENSION_BUF3_PTR_39_32_MASK 0x000000ff
  489. /* Description RESERVED_13A
  490. <Legal 0>
  491. */
  492. #define TX_MSDU_EXTENSION_RESERVED_13A_OFFSET 0x00000034
  493. #define TX_MSDU_EXTENSION_RESERVED_13A_LSB 8
  494. #define TX_MSDU_EXTENSION_RESERVED_13A_MSB 15
  495. #define TX_MSDU_EXTENSION_RESERVED_13A_MASK 0x0000ff00
  496. /* Description BUF3_LEN
  497. Length of the fourth buffer <legal all>
  498. */
  499. #define TX_MSDU_EXTENSION_BUF3_LEN_OFFSET 0x00000034
  500. #define TX_MSDU_EXTENSION_BUF3_LEN_LSB 16
  501. #define TX_MSDU_EXTENSION_BUF3_LEN_MSB 31
  502. #define TX_MSDU_EXTENSION_BUF3_LEN_MASK 0xffff0000
  503. /* Description BUF4_PTR_31_0
  504. Lower 32 bits of the fifth buffer pointer
  505. NOTE: SW/FW manages the 'cookie' info related to this buffer
  506. together with the 'cookie' info for this MSDU_EXTENSION
  507. descriptor
  508. <legal all>
  509. */
  510. #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_OFFSET 0x00000038
  511. #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_LSB 0
  512. #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_MSB 31
  513. #define TX_MSDU_EXTENSION_BUF4_PTR_31_0_MASK 0xffffffff
  514. /* Description BUF4_PTR_39_32
  515. Upper 8 bits of the fifth buffer pointer <legal all>
  516. */
  517. #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_OFFSET 0x0000003c
  518. #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_LSB 0
  519. #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_MSB 7
  520. #define TX_MSDU_EXTENSION_BUF4_PTR_39_32_MASK 0x000000ff
  521. /* Description RESERVED_15A
  522. <Legal 0>
  523. */
  524. #define TX_MSDU_EXTENSION_RESERVED_15A_OFFSET 0x0000003c
  525. #define TX_MSDU_EXTENSION_RESERVED_15A_LSB 8
  526. #define TX_MSDU_EXTENSION_RESERVED_15A_MSB 15
  527. #define TX_MSDU_EXTENSION_RESERVED_15A_MASK 0x0000ff00
  528. /* Description BUF4_LEN
  529. Length of the fifth buffer <legal all>
  530. */
  531. #define TX_MSDU_EXTENSION_BUF4_LEN_OFFSET 0x0000003c
  532. #define TX_MSDU_EXTENSION_BUF4_LEN_LSB 16
  533. #define TX_MSDU_EXTENSION_BUF4_LEN_MSB 31
  534. #define TX_MSDU_EXTENSION_BUF4_LEN_MASK 0xffff0000
  535. /* Description BUF5_PTR_31_0
  536. Lower 32 bits of the sixth buffer pointer
  537. NOTE: SW/FW manages the 'cookie' info related to this buffer
  538. together with the 'cookie' info for this MSDU_EXTENSION
  539. descriptor
  540. <legal all>
  541. */
  542. #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_OFFSET 0x00000040
  543. #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_LSB 0
  544. #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_MSB 31
  545. #define TX_MSDU_EXTENSION_BUF5_PTR_31_0_MASK 0xffffffff
  546. /* Description BUF5_PTR_39_32
  547. Upper 8 bits of the sixth buffer pointer <legal all>
  548. */
  549. #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_OFFSET 0x00000044
  550. #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_LSB 0
  551. #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_MSB 7
  552. #define TX_MSDU_EXTENSION_BUF5_PTR_39_32_MASK 0x000000ff
  553. /* Description RESERVED_17A
  554. <Legal 0>
  555. */
  556. #define TX_MSDU_EXTENSION_RESERVED_17A_OFFSET 0x00000044
  557. #define TX_MSDU_EXTENSION_RESERVED_17A_LSB 8
  558. #define TX_MSDU_EXTENSION_RESERVED_17A_MSB 15
  559. #define TX_MSDU_EXTENSION_RESERVED_17A_MASK 0x0000ff00
  560. /* Description BUF5_LEN
  561. Length of the sixth buffer <legal all>
  562. */
  563. #define TX_MSDU_EXTENSION_BUF5_LEN_OFFSET 0x00000044
  564. #define TX_MSDU_EXTENSION_BUF5_LEN_LSB 16
  565. #define TX_MSDU_EXTENSION_BUF5_LEN_MSB 31
  566. #define TX_MSDU_EXTENSION_BUF5_LEN_MASK 0xffff0000
  567. #endif // TX_MSDU_EXTENSION