tx_mpdu_start.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  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_MPDU_START_H_
  17. #define _TX_MPDU_START_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_TX_MPDU_START 10
  21. #define NUM_OF_QWORDS_TX_MPDU_START 5
  22. struct tx_mpdu_start {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t mpdu_length : 14, // [13:0]
  25. frame_not_from_tqm : 1, // [14:14]
  26. vht_control_present : 1, // [15:15]
  27. mpdu_header_length : 8, // [23:16]
  28. retry_count : 7, // [30:24]
  29. wds : 1; // [31:31]
  30. uint32_t pn_31_0 : 32; // [31:0]
  31. uint32_t pn_47_32 : 16, // [15:0]
  32. mpdu_sequence_number : 12, // [27:16]
  33. raw_already_encrypted : 1, // [28:28]
  34. frame_type : 2, // [30:29]
  35. txdma_dropped_mpdu_warning : 1; // [31:31]
  36. uint32_t iv_byte_0 : 8, // [7:0]
  37. iv_byte_1 : 8, // [15:8]
  38. iv_byte_2 : 8, // [23:16]
  39. iv_byte_3 : 8; // [31:24]
  40. uint32_t iv_byte_4 : 8, // [7:0]
  41. iv_byte_5 : 8, // [15:8]
  42. iv_byte_6 : 8, // [23:16]
  43. iv_byte_7 : 8; // [31:24]
  44. uint32_t iv_byte_8 : 8, // [7:0]
  45. iv_byte_9 : 8, // [15:8]
  46. iv_byte_10 : 8, // [23:16]
  47. iv_byte_11 : 8; // [31:24]
  48. uint32_t iv_byte_12 : 8, // [7:0]
  49. iv_byte_13 : 8, // [15:8]
  50. iv_byte_14 : 8, // [23:16]
  51. iv_byte_15 : 8; // [31:24]
  52. uint32_t iv_byte_16 : 8, // [7:0]
  53. iv_byte_17 : 8, // [15:8]
  54. iv_len : 5, // [20:16]
  55. icv_len : 5, // [25:21]
  56. vht_control_offset : 6; // [31:26]
  57. uint32_t mpdu_type : 1, // [0:0]
  58. transmit_bw_restriction : 1, // [1:1]
  59. allowed_transmit_bw : 4, // [5:2]
  60. tx_notify_frame : 3, // [8:6]
  61. reserved_8a : 23; // [31:9]
  62. uint32_t tlv64_padding : 32; // [31:0]
  63. #else
  64. uint32_t wds : 1, // [31:31]
  65. retry_count : 7, // [30:24]
  66. mpdu_header_length : 8, // [23:16]
  67. vht_control_present : 1, // [15:15]
  68. frame_not_from_tqm : 1, // [14:14]
  69. mpdu_length : 14; // [13:0]
  70. uint32_t pn_31_0 : 32; // [31:0]
  71. uint32_t txdma_dropped_mpdu_warning : 1, // [31:31]
  72. frame_type : 2, // [30:29]
  73. raw_already_encrypted : 1, // [28:28]
  74. mpdu_sequence_number : 12, // [27:16]
  75. pn_47_32 : 16; // [15:0]
  76. uint32_t iv_byte_3 : 8, // [31:24]
  77. iv_byte_2 : 8, // [23:16]
  78. iv_byte_1 : 8, // [15:8]
  79. iv_byte_0 : 8; // [7:0]
  80. uint32_t iv_byte_7 : 8, // [31:24]
  81. iv_byte_6 : 8, // [23:16]
  82. iv_byte_5 : 8, // [15:8]
  83. iv_byte_4 : 8; // [7:0]
  84. uint32_t iv_byte_11 : 8, // [31:24]
  85. iv_byte_10 : 8, // [23:16]
  86. iv_byte_9 : 8, // [15:8]
  87. iv_byte_8 : 8; // [7:0]
  88. uint32_t iv_byte_15 : 8, // [31:24]
  89. iv_byte_14 : 8, // [23:16]
  90. iv_byte_13 : 8, // [15:8]
  91. iv_byte_12 : 8; // [7:0]
  92. uint32_t vht_control_offset : 6, // [31:26]
  93. icv_len : 5, // [25:21]
  94. iv_len : 5, // [20:16]
  95. iv_byte_17 : 8, // [15:8]
  96. iv_byte_16 : 8; // [7:0]
  97. uint32_t reserved_8a : 23, // [31:9]
  98. tx_notify_frame : 3, // [8:6]
  99. allowed_transmit_bw : 4, // [5:2]
  100. transmit_bw_restriction : 1, // [1:1]
  101. mpdu_type : 1; // [0:0]
  102. uint32_t tlv64_padding : 32; // [31:0]
  103. #endif
  104. };
  105. /* Description MPDU_LENGTH
  106. Consumer: TXOLE/CRYPTO/TXPCU
  107. Producer: TXDMA
  108. Expected Length of the entire MPDU, which includes all MSDUs
  109. within the MPDU and all OLE and Crypto processing. This
  110. length includes the FCS field.
  111. */
  112. #define TX_MPDU_START_MPDU_LENGTH_OFFSET 0x0000000000000000
  113. #define TX_MPDU_START_MPDU_LENGTH_LSB 0
  114. #define TX_MPDU_START_MPDU_LENGTH_MSB 13
  115. #define TX_MPDU_START_MPDU_LENGTH_MASK 0x0000000000003fff
  116. /* Description FRAME_NOT_FROM_TQM
  117. When set, TXPCU shall not take this frame into account for
  118. indicating to TQM how many frames from it's queue got transmitted.
  119. TXDMA gets this field from the TX_MSDU_DETAILS STRUCT (of
  120. the first MSDU in the MPDU) in the MSDU link descriptor.
  121. SW sets this bit (in TX_MSDU_DETAILS STRUCT) when it generates
  122. a frame outside of the TQM path and that frame can be intermingled
  123. with the other frames from the TQM. For example a trigger
  124. frame embedded or put in front of data frames from TQM
  125. within the same A-MPDU. For this SW generated frame, TXPCU
  126. shall not include this frame in the transmit frame count
  127. that is reported to TQM as that would result in incorrect
  128. reporting to TQM.
  129. <legal all>
  130. */
  131. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_OFFSET 0x0000000000000000
  132. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_LSB 14
  133. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_MSB 14
  134. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_MASK 0x0000000000004000
  135. /* Description VHT_CONTROL_PRESENT
  136. TXOLE sets this bit when it added 4 placeholder bytes for
  137. VHT-CONTROL field in the MPDU header.
  138. For RAW frames, OLE will set this bit and compute vht_control_offset
  139. when the order bit and QoS bit in frame_control field are
  140. set to 1. For RAW management frame, this bit will be set
  141. if order bit is set to 1.
  142. Used by TXPCU, to find out if it needs to overwrite the
  143. HE-CONTROL field.
  144. <legal all>
  145. */
  146. #define TX_MPDU_START_VHT_CONTROL_PRESENT_OFFSET 0x0000000000000000
  147. #define TX_MPDU_START_VHT_CONTROL_PRESENT_LSB 15
  148. #define TX_MPDU_START_VHT_CONTROL_PRESENT_MSB 15
  149. #define TX_MPDU_START_VHT_CONTROL_PRESENT_MASK 0x0000000000008000
  150. /* Description MPDU_HEADER_LENGTH
  151. This field is filled in by the OLE
  152. Used by PCU, This prevents PCU from having to do this again
  153. (in the same way))
  154. */
  155. #define TX_MPDU_START_MPDU_HEADER_LENGTH_OFFSET 0x0000000000000000
  156. #define TX_MPDU_START_MPDU_HEADER_LENGTH_LSB 16
  157. #define TX_MPDU_START_MPDU_HEADER_LENGTH_MSB 23
  158. #define TX_MPDU_START_MPDU_HEADER_LENGTH_MASK 0x0000000000ff0000
  159. /* Description RETRY_COUNT
  160. Consumer: TXOLE/TXPCU
  161. Producer: TXDMA
  162. The number of times the frame is transmitted
  163. <legal all>
  164. */
  165. #define TX_MPDU_START_RETRY_COUNT_OFFSET 0x0000000000000000
  166. #define TX_MPDU_START_RETRY_COUNT_LSB 24
  167. #define TX_MPDU_START_RETRY_COUNT_MSB 30
  168. #define TX_MPDU_START_RETRY_COUNT_MASK 0x000000007f000000
  169. /* Description WDS
  170. If set the current packet is 4-address frame.
  171. Required because an aggregate can include some frames with
  172. 3 address format and other frames with 4 address format.
  173. Used by the OLE during encapsulation.
  174. TXDMA sets this when wds in the extension descriptor is
  175. set.
  176. If no extension descriptor is used for this MPDU, TXDMA
  177. gets the setting for this bit from a control register in
  178. TXDMA
  179. <legal all>
  180. */
  181. #define TX_MPDU_START_WDS_OFFSET 0x0000000000000000
  182. #define TX_MPDU_START_WDS_LSB 31
  183. #define TX_MPDU_START_WDS_MSB 31
  184. #define TX_MPDU_START_WDS_MASK 0x0000000080000000
  185. /* Description PN_31_0
  186. Consumer: TXOLE
  187. Producer: TXDMA
  188. Bits 31 - 0 for the Packet Number used by encryption
  189. <legal all>
  190. */
  191. #define TX_MPDU_START_PN_31_0_OFFSET 0x0000000000000000
  192. #define TX_MPDU_START_PN_31_0_LSB 32
  193. #define TX_MPDU_START_PN_31_0_MSB 63
  194. #define TX_MPDU_START_PN_31_0_MASK 0xffffffff00000000
  195. /* Description PN_47_32
  196. Consumer: TXOLE
  197. Producer: TXDMA
  198. Bits 47 - 32 for the Packet Number used by encryption
  199. <legal all>
  200. */
  201. #define TX_MPDU_START_PN_47_32_OFFSET 0x0000000000000008
  202. #define TX_MPDU_START_PN_47_32_LSB 0
  203. #define TX_MPDU_START_PN_47_32_MSB 15
  204. #define TX_MPDU_START_PN_47_32_MASK 0x000000000000ffff
  205. /* Description MPDU_SEQUENCE_NUMBER
  206. Consumer: TXOLE
  207. Producer: TXDMA
  208. Sequence number assigned to this MPDU
  209. <legal all>
  210. */
  211. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_OFFSET 0x0000000000000008
  212. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_LSB 16
  213. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_MSB 27
  214. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_MASK 0x000000000fff0000
  215. /* Description RAW_ALREADY_ENCRYPTED
  216. Consumer: CRYPTO
  217. Producer: TXDMA
  218. If set it indicates that the RAW MPDU has already been encrypted
  219. and does not require HW encryption. If clear and if the
  220. frame control indicates that this is a "protected" MPDU
  221. and the peer key type indicates a cipher type then the
  222. HW is expected to encrypt this packet.
  223. <legal all>
  224. */
  225. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_OFFSET 0x0000000000000008
  226. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_LSB 28
  227. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_MSB 28
  228. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_MASK 0x0000000010000000
  229. /* Description FRAME_TYPE
  230. Consumer: TXMON
  231. Producer: TXOLE
  232. 802.11 frame type field
  233. TXDMA fills this as zero and TXOLE overwrites it.
  234. <legal all>
  235. */
  236. #define TX_MPDU_START_FRAME_TYPE_OFFSET 0x0000000000000008
  237. #define TX_MPDU_START_FRAME_TYPE_LSB 29
  238. #define TX_MPDU_START_FRAME_TYPE_MSB 30
  239. #define TX_MPDU_START_FRAME_TYPE_MASK 0x0000000060000000
  240. /* Description TXDMA_DROPPED_MPDU_WARNING
  241. Consumer: FW
  242. Producer: TXDMA
  243. Indication to TXPCU to indicate to FW a warning that Tx
  244. DMA has dropped MPDUs due to SFM FIFO full condition
  245. <legal all>
  246. */
  247. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_OFFSET 0x0000000000000008
  248. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_LSB 31
  249. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_MSB 31
  250. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_MASK 0x0000000080000000
  251. /* Description IV_BYTE_0
  252. Byte 0 of the IV field of the MPDU
  253. Based on the Encryption type the iv_byte_0 takes the appropriate
  254. meaning. For IV formats, refer to the crypto MLDR document
  255. */
  256. #define TX_MPDU_START_IV_BYTE_0_OFFSET 0x0000000000000008
  257. #define TX_MPDU_START_IV_BYTE_0_LSB 32
  258. #define TX_MPDU_START_IV_BYTE_0_MSB 39
  259. #define TX_MPDU_START_IV_BYTE_0_MASK 0x000000ff00000000
  260. /* Description IV_BYTE_1
  261. Byte 1 of the IV field of the MPDU
  262. Based on the Encryption type the iv_byte_1 takes the appropriate
  263. meaning. For IV formats, refer to the crypto MLDR document
  264. */
  265. #define TX_MPDU_START_IV_BYTE_1_OFFSET 0x0000000000000008
  266. #define TX_MPDU_START_IV_BYTE_1_LSB 40
  267. #define TX_MPDU_START_IV_BYTE_1_MSB 47
  268. #define TX_MPDU_START_IV_BYTE_1_MASK 0x0000ff0000000000
  269. /* Description IV_BYTE_2
  270. Byte 2 of the IV field of the MDPU
  271. Based on the Encryption type the iv_byte_2 takes the appropriate
  272. meaning. For IV formats, refer to the crypto MLDR document
  273. */
  274. #define TX_MPDU_START_IV_BYTE_2_OFFSET 0x0000000000000008
  275. #define TX_MPDU_START_IV_BYTE_2_LSB 48
  276. #define TX_MPDU_START_IV_BYTE_2_MSB 55
  277. #define TX_MPDU_START_IV_BYTE_2_MASK 0x00ff000000000000
  278. /* Description IV_BYTE_3
  279. Byte 3 of the IV field of the MPDU
  280. Based on the Encryption type the iv_byte_3 takes the appropriate
  281. meaning. For IV formats, refer to the crypto MLDR document
  282. */
  283. #define TX_MPDU_START_IV_BYTE_3_OFFSET 0x0000000000000008
  284. #define TX_MPDU_START_IV_BYTE_3_LSB 56
  285. #define TX_MPDU_START_IV_BYTE_3_MSB 63
  286. #define TX_MPDU_START_IV_BYTE_3_MASK 0xff00000000000000
  287. /* Description IV_BYTE_4
  288. Byte 4 of the IV field of the MPDU
  289. Based on the Encryption type the iv_byte_4 takes the appropriate
  290. meaning. For IV formats, refer to the crypto MLDR document
  291. */
  292. #define TX_MPDU_START_IV_BYTE_4_OFFSET 0x0000000000000010
  293. #define TX_MPDU_START_IV_BYTE_4_LSB 0
  294. #define TX_MPDU_START_IV_BYTE_4_MSB 7
  295. #define TX_MPDU_START_IV_BYTE_4_MASK 0x00000000000000ff
  296. /* Description IV_BYTE_5
  297. Byte 5 of the IV field of the MPDU
  298. Based on the Encryption type the iv_byte_5 takes the appropriate
  299. meaning. For IV formats, refer to the crypto MLDR document
  300. */
  301. #define TX_MPDU_START_IV_BYTE_5_OFFSET 0x0000000000000010
  302. #define TX_MPDU_START_IV_BYTE_5_LSB 8
  303. #define TX_MPDU_START_IV_BYTE_5_MSB 15
  304. #define TX_MPDU_START_IV_BYTE_5_MASK 0x000000000000ff00
  305. /* Description IV_BYTE_6
  306. Byte 6 of the IV field of the MDPU
  307. Based on the Encryption type the iv_byte_6 takes the appropriate
  308. meaning. For IV formats, refer to the crypto MLDR document
  309. */
  310. #define TX_MPDU_START_IV_BYTE_6_OFFSET 0x0000000000000010
  311. #define TX_MPDU_START_IV_BYTE_6_LSB 16
  312. #define TX_MPDU_START_IV_BYTE_6_MSB 23
  313. #define TX_MPDU_START_IV_BYTE_6_MASK 0x0000000000ff0000
  314. /* Description IV_BYTE_7
  315. Byte 7 of the IV field of the MPDU
  316. Based on the Encryption type the iv_byte_7 takes the appropriate
  317. meaning. For IV formats, refer to the crypto MLDR document
  318. */
  319. #define TX_MPDU_START_IV_BYTE_7_OFFSET 0x0000000000000010
  320. #define TX_MPDU_START_IV_BYTE_7_LSB 24
  321. #define TX_MPDU_START_IV_BYTE_7_MSB 31
  322. #define TX_MPDU_START_IV_BYTE_7_MASK 0x00000000ff000000
  323. /* Description IV_BYTE_8
  324. Byte 8 of the IV field of the MPDU
  325. Based on the Encryption type the iv_byte_8 takes the appropriate
  326. meaning. For IV formats, refer to the crypto MLDR document
  327. */
  328. #define TX_MPDU_START_IV_BYTE_8_OFFSET 0x0000000000000010
  329. #define TX_MPDU_START_IV_BYTE_8_LSB 32
  330. #define TX_MPDU_START_IV_BYTE_8_MSB 39
  331. #define TX_MPDU_START_IV_BYTE_8_MASK 0x000000ff00000000
  332. /* Description IV_BYTE_9
  333. Byte 9 of the IV field of the MPDU
  334. Based on the Encryption type the iv_byte_9 takes the appropriate
  335. meaning. For IV formats, refer to the crypto MLDR document
  336. */
  337. #define TX_MPDU_START_IV_BYTE_9_OFFSET 0x0000000000000010
  338. #define TX_MPDU_START_IV_BYTE_9_LSB 40
  339. #define TX_MPDU_START_IV_BYTE_9_MSB 47
  340. #define TX_MPDU_START_IV_BYTE_9_MASK 0x0000ff0000000000
  341. /* Description IV_BYTE_10
  342. Byte 10 of the IV field of the MDPU
  343. Based on the Encryption type the iv_byte_10 takes the appropriate
  344. meaning. For IV formats, refer to the crypto MLDR document
  345. */
  346. #define TX_MPDU_START_IV_BYTE_10_OFFSET 0x0000000000000010
  347. #define TX_MPDU_START_IV_BYTE_10_LSB 48
  348. #define TX_MPDU_START_IV_BYTE_10_MSB 55
  349. #define TX_MPDU_START_IV_BYTE_10_MASK 0x00ff000000000000
  350. /* Description IV_BYTE_11
  351. Byte 11 of the IV field of the MPDU
  352. Based on the Encryption type the iv_byte_11 takes the appropriate
  353. meaning. For IV formats, refer to the crypto MLDR document
  354. */
  355. #define TX_MPDU_START_IV_BYTE_11_OFFSET 0x0000000000000010
  356. #define TX_MPDU_START_IV_BYTE_11_LSB 56
  357. #define TX_MPDU_START_IV_BYTE_11_MSB 63
  358. #define TX_MPDU_START_IV_BYTE_11_MASK 0xff00000000000000
  359. /* Description IV_BYTE_12
  360. Byte 8 of the IV field of the MPDU
  361. Based on the Encryption type the iv_byte_12 takes the appropriate
  362. meaning. For IV formats, refer to the crypto MLDR document
  363. */
  364. #define TX_MPDU_START_IV_BYTE_12_OFFSET 0x0000000000000018
  365. #define TX_MPDU_START_IV_BYTE_12_LSB 0
  366. #define TX_MPDU_START_IV_BYTE_12_MSB 7
  367. #define TX_MPDU_START_IV_BYTE_12_MASK 0x00000000000000ff
  368. /* Description IV_BYTE_13
  369. Byte 9 of the IV field of the MPDU
  370. Based on the Encryption type the iv_byte_13 takes the appropriate
  371. meaning. For IV formats, refer to the crypto MLDR document
  372. */
  373. #define TX_MPDU_START_IV_BYTE_13_OFFSET 0x0000000000000018
  374. #define TX_MPDU_START_IV_BYTE_13_LSB 8
  375. #define TX_MPDU_START_IV_BYTE_13_MSB 15
  376. #define TX_MPDU_START_IV_BYTE_13_MASK 0x000000000000ff00
  377. /* Description IV_BYTE_14
  378. Byte 10 of the IV field of the MDPU
  379. Based on the Encryption type the iv_byte_14 takes the appropriate
  380. meaning. For IV formats, refer to the crypto MLDR document
  381. */
  382. #define TX_MPDU_START_IV_BYTE_14_OFFSET 0x0000000000000018
  383. #define TX_MPDU_START_IV_BYTE_14_LSB 16
  384. #define TX_MPDU_START_IV_BYTE_14_MSB 23
  385. #define TX_MPDU_START_IV_BYTE_14_MASK 0x0000000000ff0000
  386. /* Description IV_BYTE_15
  387. Byte 11 of the IV field of the MPDU
  388. Based on the Encryption type the iv_byte_15 takes the appropriate
  389. meaning. For IV formats, refer to the crypto MLDR document
  390. */
  391. #define TX_MPDU_START_IV_BYTE_15_OFFSET 0x0000000000000018
  392. #define TX_MPDU_START_IV_BYTE_15_LSB 24
  393. #define TX_MPDU_START_IV_BYTE_15_MSB 31
  394. #define TX_MPDU_START_IV_BYTE_15_MASK 0x00000000ff000000
  395. /* Description IV_BYTE_16
  396. Byte 8 of the IV field of the MPDU
  397. Based on the Encryption type the iv_byte_16 takes the appropriate
  398. meaning. For IV formats, refer to the crypto MLDR document
  399. */
  400. #define TX_MPDU_START_IV_BYTE_16_OFFSET 0x0000000000000018
  401. #define TX_MPDU_START_IV_BYTE_16_LSB 32
  402. #define TX_MPDU_START_IV_BYTE_16_MSB 39
  403. #define TX_MPDU_START_IV_BYTE_16_MASK 0x000000ff00000000
  404. /* Description IV_BYTE_17
  405. Byte 9 of the IV field of the MPDU
  406. Based on the Encryption type the iv_byte_17 takes the appropriate
  407. meaning. For IV formats, refer to the crypto MLDR document
  408. */
  409. #define TX_MPDU_START_IV_BYTE_17_OFFSET 0x0000000000000018
  410. #define TX_MPDU_START_IV_BYTE_17_LSB 40
  411. #define TX_MPDU_START_IV_BYTE_17_MSB 47
  412. #define TX_MPDU_START_IV_BYTE_17_MASK 0x0000ff0000000000
  413. /* Description IV_LEN
  414. Length of the IV field generated by Tx OLE
  415. */
  416. #define TX_MPDU_START_IV_LEN_OFFSET 0x0000000000000018
  417. #define TX_MPDU_START_IV_LEN_LSB 48
  418. #define TX_MPDU_START_IV_LEN_MSB 52
  419. #define TX_MPDU_START_IV_LEN_MASK 0x001f000000000000
  420. /* Description ICV_LEN
  421. Length of the ICV field generated by Tx OLE. OLE will insert
  422. zeros in the ICV field when it pushes a frame
  423. */
  424. #define TX_MPDU_START_ICV_LEN_OFFSET 0x0000000000000018
  425. #define TX_MPDU_START_ICV_LEN_LSB 53
  426. #define TX_MPDU_START_ICV_LEN_MSB 57
  427. #define TX_MPDU_START_ICV_LEN_MASK 0x03e0000000000000
  428. /* Description VHT_CONTROL_OFFSET
  429. Field only valid when vht_control_present is set.
  430. Field filled in by TXOLE, used by TXPCU
  431. The starting byte number of the VHT control field in the
  432. header
  433. <legal all>
  434. */
  435. #define TX_MPDU_START_VHT_CONTROL_OFFSET_OFFSET 0x0000000000000018
  436. #define TX_MPDU_START_VHT_CONTROL_OFFSET_LSB 58
  437. #define TX_MPDU_START_VHT_CONTROL_OFFSET_MSB 63
  438. #define TX_MPDU_START_VHT_CONTROL_OFFSET_MASK 0xfc00000000000000
  439. /* Description MPDU_TYPE
  440. Indicates the type of MPDU that OLE will generate:
  441. <enum 0 mpdu_type_basic> This MPDU is not in the A-MSDU
  442. format (meaning there is no A-MSDU delimeter present) if
  443. there is only 1 MSDU in the MPDU. When there are multiple
  444. MSDUs in the MPDU, there is no choice, and the MSDUs within
  445. the MPDU shall all have A-MSDU delimiters in front of them.
  446. <enum 1 mpdu_type_amsdu> The MSDUs within the MPDU will
  447. all have to be in the A-MSDU format, even if there is just
  448. a single MSDU embedded in the MPDU. In other words, there
  449. is always an A-MSDU delimiter in front of the MSDU(s) in
  450. the MPDU.
  451. <legal all>
  452. */
  453. #define TX_MPDU_START_MPDU_TYPE_OFFSET 0x0000000000000020
  454. #define TX_MPDU_START_MPDU_TYPE_LSB 0
  455. #define TX_MPDU_START_MPDU_TYPE_MSB 0
  456. #define TX_MPDU_START_MPDU_TYPE_MASK 0x0000000000000001
  457. /* Description TRANSMIT_BW_RESTRICTION
  458. Consumer: TXPCU
  459. Producer: TXDMA
  460. 1'b0: This is a normal frame and there are no restrictions
  461. on the BW that this frame can be transmitted on.
  462. 1'b1: This MPDU is only allowed to be transmitted at certain
  463. BWs. The one and only allowed BW is indicated in field
  464. allowed_transmit_bw
  465. When TXPCU has made a BW selection and then encounters this
  466. frame, the frame will be dropped and TXPCU will continue
  467. transmitting the next frame (assuming there is no BW restriction
  468. on that one)
  469. <legal all>
  470. */
  471. #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_OFFSET 0x0000000000000020
  472. #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_LSB 1
  473. #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_MSB 1
  474. #define TX_MPDU_START_TRANSMIT_BW_RESTRICTION_MASK 0x0000000000000002
  475. /* Description ALLOWED_TRANSMIT_BW
  476. Consumer: TXPCU
  477. Producer: TXDMA
  478. Field only valid when transmit_bw_restriction is set
  479. TXDMA gets this from the three or four upper bits of the
  480. "Sw_buffer_cookie" field from the TX_MPDU_DETAILS STRUCT
  481. In case of NON punctured transmission:
  482. allowed_transmit_bw[2:0] = 3'b000: 20 MHz TX only
  483. allowed_transmit_bw[2:0] = 3'b001: 40 MHz TX only
  484. allowed_transmit_bw[2:0] = 3'b010: 80 MHz TX only
  485. allowed_transmit_bw[2:0] = 3'b011: 160 MHz TX only
  486. allowed_transmit_bw[2:0] = 3'b100: 240 MHz TX only
  487. allowed_transmit_bw[2:0] = 3'b101: 320 MHz TX only
  488. allowed_transmit_bw[2:1] = 2'b11: reserved
  489. In case of punctured transmission:
  490. allowed_transmit_bw[3:0] = 4'b0000: pattern 0 only
  491. allowed_transmit_bw[3:0] = 4'b0001: pattern 1 only
  492. allowed_transmit_bw[3:0] = 4'b0010: pattern 2 only
  493. allowed_transmit_bw[3:0] = 4'b0011: pattern 3 only
  494. allowed_transmit_bw[3:0] = 4'b0100: pattern 4 only
  495. allowed_transmit_bw[3:0] = 4'b0101: pattern 5 only
  496. allowed_transmit_bw[3:0] = 4'b0110: pattern 6 only
  497. allowed_transmit_bw[3:0] = 4'b0111: pattern 7 only
  498. allowed_transmit_bw[3:0] = 4'b1000: pattern 8 only
  499. allowed_transmit_bw[3:0] = 4'b1001: pattern 9 only
  500. allowed_transmit_bw[3:0] = 4'b1010: pattern 10 only
  501. allowed_transmit_bw[3:0] = 4'b1011: pattern 11 only
  502. allowed_transmit_bw[3:2] = 2'b11: reserved
  503. Note: a punctured transmission is indicated by the presence
  504. of TLV TX_PUNCTURE_SETUP embedded in the scheduler TLV
  505. <legal 0-11>
  506. */
  507. #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_OFFSET 0x0000000000000020
  508. #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_LSB 2
  509. #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_MSB 5
  510. #define TX_MPDU_START_ALLOWED_TRANSMIT_BW_MASK 0x000000000000003c
  511. /* Description TX_NOTIFY_FRAME
  512. Consumer: TQM/PDG/TXOLE
  513. Producer: FW/SW
  514. When clear, this frame does not require any special handling.
  515. When set, this MPDU contains an MSDU with the 'FW_tx_notify_frame'
  516. field set.
  517. This means this MPDU is a special frame that requires special
  518. handling in TQM.
  519. Note that FW/SW shall always set the amsdu_not_allowed bit
  520. in 'TX_MSDU_DETAILS' for any notify frame.
  521. <enum 0 NO_TX_NOTIFY> Not a notify frame
  522. <enum 1 TX_HARD_NOTIFY>
  523. <enum 2 TX_SOFT_NOTIFY>
  524. <enum 3 TX_SEMI_HARD_NOTIFY>
  525. <enum 4 TX_SEMI_HARD_NOTIFY_CURR_RATE> Rate cannot be overridden
  526. by PDG
  527. <legal 0-4>
  528. */
  529. #define TX_MPDU_START_TX_NOTIFY_FRAME_OFFSET 0x0000000000000020
  530. #define TX_MPDU_START_TX_NOTIFY_FRAME_LSB 6
  531. #define TX_MPDU_START_TX_NOTIFY_FRAME_MSB 8
  532. #define TX_MPDU_START_TX_NOTIFY_FRAME_MASK 0x00000000000001c0
  533. /* Description RESERVED_8A
  534. Bit 9: self_gen:
  535. Field only used in the MAC-flexibility feature in TXPCU
  536. and PHY microcode
  537. 0: Indicates a normal data MPDU
  538. 1: Indicates a self-gen MPDU
  539. <legal 0-1>
  540. */
  541. #define TX_MPDU_START_RESERVED_8A_OFFSET 0x0000000000000020
  542. #define TX_MPDU_START_RESERVED_8A_LSB 9
  543. #define TX_MPDU_START_RESERVED_8A_MSB 31
  544. #define TX_MPDU_START_RESERVED_8A_MASK 0x00000000fffffe00
  545. /* Description TLV64_PADDING
  546. Automatic DWORD padding inserted while converting TLV32
  547. to TLV64 for 64 bit ARCH
  548. <legal 0>
  549. */
  550. #define TX_MPDU_START_TLV64_PADDING_OFFSET 0x0000000000000020
  551. #define TX_MPDU_START_TLV64_PADDING_LSB 32
  552. #define TX_MPDU_START_TLV64_PADDING_MSB 63
  553. #define TX_MPDU_START_TLV64_PADDING_MASK 0xffffffff00000000
  554. #endif // TX_MPDU_START