tx_mpdu_start.h 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _TX_MPDU_START_H_
  16. #define _TX_MPDU_START_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_TX_MPDU_START 10
  20. #define NUM_OF_QWORDS_TX_MPDU_START 5
  21. struct tx_mpdu_start {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t mpdu_length : 14, // [13:0]
  24. frame_not_from_tqm : 1, // [14:14]
  25. vht_control_present : 1, // [15:15]
  26. mpdu_header_length : 8, // [23:16]
  27. retry_count : 7, // [30:24]
  28. wds : 1; // [31:31]
  29. uint32_t pn_31_0 : 32; // [31:0]
  30. uint32_t pn_47_32 : 16, // [15:0]
  31. mpdu_sequence_number : 12, // [27:16]
  32. raw_already_encrypted : 1, // [28:28]
  33. frame_type : 2, // [30:29]
  34. txdma_dropped_mpdu_warning : 1; // [31:31]
  35. uint32_t iv_byte_0 : 8, // [7:0]
  36. iv_byte_1 : 8, // [15:8]
  37. iv_byte_2 : 8, // [23:16]
  38. iv_byte_3 : 8; // [31:24]
  39. uint32_t iv_byte_4 : 8, // [7:0]
  40. iv_byte_5 : 8, // [15:8]
  41. iv_byte_6 : 8, // [23:16]
  42. iv_byte_7 : 8; // [31:24]
  43. uint32_t iv_byte_8 : 8, // [7:0]
  44. iv_byte_9 : 8, // [15:8]
  45. iv_byte_10 : 8, // [23:16]
  46. iv_byte_11 : 8; // [31:24]
  47. uint32_t iv_byte_12 : 8, // [7:0]
  48. iv_byte_13 : 8, // [15:8]
  49. iv_byte_14 : 8, // [23:16]
  50. iv_byte_15 : 8; // [31:24]
  51. uint32_t iv_byte_16 : 8, // [7:0]
  52. iv_byte_17 : 8, // [15:8]
  53. iv_len : 5, // [20:16]
  54. icv_len : 5, // [25:21]
  55. vht_control_offset : 6; // [31:26]
  56. uint32_t mpdu_type : 1, // [0:0]
  57. transmit_bw_restriction : 1, // [1:1]
  58. allowed_transmit_bw : 4, // [5:2]
  59. tx_notify_frame : 3, // [8:6]
  60. reserved_8a : 23; // [31:9]
  61. uint32_t tlv64_padding : 32; // [31:0]
  62. #else
  63. uint32_t wds : 1, // [31:31]
  64. retry_count : 7, // [30:24]
  65. mpdu_header_length : 8, // [23:16]
  66. vht_control_present : 1, // [15:15]
  67. frame_not_from_tqm : 1, // [14:14]
  68. mpdu_length : 14; // [13:0]
  69. uint32_t pn_31_0 : 32; // [31:0]
  70. uint32_t txdma_dropped_mpdu_warning : 1, // [31:31]
  71. frame_type : 2, // [30:29]
  72. raw_already_encrypted : 1, // [28:28]
  73. mpdu_sequence_number : 12, // [27:16]
  74. pn_47_32 : 16; // [15:0]
  75. uint32_t iv_byte_3 : 8, // [31:24]
  76. iv_byte_2 : 8, // [23:16]
  77. iv_byte_1 : 8, // [15:8]
  78. iv_byte_0 : 8; // [7:0]
  79. uint32_t iv_byte_7 : 8, // [31:24]
  80. iv_byte_6 : 8, // [23:16]
  81. iv_byte_5 : 8, // [15:8]
  82. iv_byte_4 : 8; // [7:0]
  83. uint32_t iv_byte_11 : 8, // [31:24]
  84. iv_byte_10 : 8, // [23:16]
  85. iv_byte_9 : 8, // [15:8]
  86. iv_byte_8 : 8; // [7:0]
  87. uint32_t iv_byte_15 : 8, // [31:24]
  88. iv_byte_14 : 8, // [23:16]
  89. iv_byte_13 : 8, // [15:8]
  90. iv_byte_12 : 8; // [7:0]
  91. uint32_t vht_control_offset : 6, // [31:26]
  92. icv_len : 5, // [25:21]
  93. iv_len : 5, // [20:16]
  94. iv_byte_17 : 8, // [15:8]
  95. iv_byte_16 : 8; // [7:0]
  96. uint32_t reserved_8a : 23, // [31:9]
  97. tx_notify_frame : 3, // [8:6]
  98. allowed_transmit_bw : 4, // [5:2]
  99. transmit_bw_restriction : 1, // [1:1]
  100. mpdu_type : 1; // [0:0]
  101. uint32_t tlv64_padding : 32; // [31:0]
  102. #endif
  103. };
  104. /* Description MPDU_LENGTH
  105. Consumer: TXOLE/CRYPTO/TXPCU
  106. Producer: TXDMA
  107. Expected Length of the entire MPDU, which includes all MSDUs
  108. within the MPDU and all OLE and Crypto processing. This
  109. length includes the FCS field.
  110. */
  111. #define TX_MPDU_START_MPDU_LENGTH_OFFSET 0x0000000000000000
  112. #define TX_MPDU_START_MPDU_LENGTH_LSB 0
  113. #define TX_MPDU_START_MPDU_LENGTH_MSB 13
  114. #define TX_MPDU_START_MPDU_LENGTH_MASK 0x0000000000003fff
  115. /* Description FRAME_NOT_FROM_TQM
  116. When set, TXPCU shall not take this frame into account for
  117. indicating to TQM how many frames from it's queue got transmitted.
  118. TXDMA gets this field from the TX_MSDU_DETAILS STRUCT (of
  119. the first MSDU in the MPDU) in the MSDU link descriptor.
  120. SW sets this bit (in TX_MSDU_DETAILS STRUCT) when it generates
  121. a frame outside of the TQM path and that frame can be intermingled
  122. with the other frames from the TQM. For example a trigger
  123. frame embedded or put in front of data frames from TQM
  124. within the same A-MPDU. For this SW generated frame, TXPCU
  125. shall not include this frame in the transmit frame count
  126. that is reported to TQM as that would result in incorrect
  127. reporting to TQM.
  128. <legal all>
  129. */
  130. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_OFFSET 0x0000000000000000
  131. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_LSB 14
  132. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_MSB 14
  133. #define TX_MPDU_START_FRAME_NOT_FROM_TQM_MASK 0x0000000000004000
  134. /* Description VHT_CONTROL_PRESENT
  135. TXOLE sets this bit when it added 4 placeholder bytes for
  136. VHT-CONTROL field in the MPDU header.
  137. For RAW frames, OLE will set this bit and compute vht_control_offset
  138. when the order bit and QoS bit in frame_control field are
  139. set to 1. For RAW management frame, this bit will be set
  140. if order bit is set to 1.
  141. Used by TXPCU, to find out if it needs to overwrite the
  142. HE-CONTROL field.
  143. <legal all>
  144. */
  145. #define TX_MPDU_START_VHT_CONTROL_PRESENT_OFFSET 0x0000000000000000
  146. #define TX_MPDU_START_VHT_CONTROL_PRESENT_LSB 15
  147. #define TX_MPDU_START_VHT_CONTROL_PRESENT_MSB 15
  148. #define TX_MPDU_START_VHT_CONTROL_PRESENT_MASK 0x0000000000008000
  149. /* Description MPDU_HEADER_LENGTH
  150. This field is filled in by the OLE
  151. Used by PCU, This prevents PCU from having to do this again
  152. (in the same way))
  153. */
  154. #define TX_MPDU_START_MPDU_HEADER_LENGTH_OFFSET 0x0000000000000000
  155. #define TX_MPDU_START_MPDU_HEADER_LENGTH_LSB 16
  156. #define TX_MPDU_START_MPDU_HEADER_LENGTH_MSB 23
  157. #define TX_MPDU_START_MPDU_HEADER_LENGTH_MASK 0x0000000000ff0000
  158. /* Description RETRY_COUNT
  159. Consumer: TXOLE/TXPCU
  160. Producer: TXDMA
  161. The number of times the frame is transmitted
  162. <legal all>
  163. */
  164. #define TX_MPDU_START_RETRY_COUNT_OFFSET 0x0000000000000000
  165. #define TX_MPDU_START_RETRY_COUNT_LSB 24
  166. #define TX_MPDU_START_RETRY_COUNT_MSB 30
  167. #define TX_MPDU_START_RETRY_COUNT_MASK 0x000000007f000000
  168. /* Description WDS
  169. If set the current packet is 4-address frame.
  170. Required because an aggregate can include some frames with
  171. 3 address format and other frames with 4 address format.
  172. Used by the OLE during encapsulation.
  173. TXDMA sets this when wds in the extension descriptor is
  174. set.
  175. If no extension descriptor is used for this MPDU, TXDMA
  176. gets the setting for this bit from a control register in
  177. TXDMA
  178. <legal all>
  179. */
  180. #define TX_MPDU_START_WDS_OFFSET 0x0000000000000000
  181. #define TX_MPDU_START_WDS_LSB 31
  182. #define TX_MPDU_START_WDS_MSB 31
  183. #define TX_MPDU_START_WDS_MASK 0x0000000080000000
  184. /* Description PN_31_0
  185. Consumer: TXOLE
  186. Producer: TXDMA
  187. Bits 31 - 0 for the Packet Number used by encryption
  188. <legal all>
  189. */
  190. #define TX_MPDU_START_PN_31_0_OFFSET 0x0000000000000000
  191. #define TX_MPDU_START_PN_31_0_LSB 32
  192. #define TX_MPDU_START_PN_31_0_MSB 63
  193. #define TX_MPDU_START_PN_31_0_MASK 0xffffffff00000000
  194. /* Description PN_47_32
  195. Consumer: TXOLE
  196. Producer: TXDMA
  197. Bits 47 - 32 for the Packet Number used by encryption
  198. <legal all>
  199. */
  200. #define TX_MPDU_START_PN_47_32_OFFSET 0x0000000000000008
  201. #define TX_MPDU_START_PN_47_32_LSB 0
  202. #define TX_MPDU_START_PN_47_32_MSB 15
  203. #define TX_MPDU_START_PN_47_32_MASK 0x000000000000ffff
  204. /* Description MPDU_SEQUENCE_NUMBER
  205. Consumer: TXOLE
  206. Producer: TXDMA
  207. Sequence number assigned to this MPDU
  208. <legal all>
  209. */
  210. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_OFFSET 0x0000000000000008
  211. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_LSB 16
  212. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_MSB 27
  213. #define TX_MPDU_START_MPDU_SEQUENCE_NUMBER_MASK 0x000000000fff0000
  214. /* Description RAW_ALREADY_ENCRYPTED
  215. Consumer: CRYPTO
  216. Producer: TXDMA
  217. If set it indicates that the RAW MPDU has already been encrypted
  218. and does not require HW encryption. If clear and if the
  219. frame control indicates that this is a "protected" MPDU
  220. and the peer key type indicates a cipher type then the
  221. HW is expected to encrypt this packet.
  222. <legal all>
  223. */
  224. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_OFFSET 0x0000000000000008
  225. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_LSB 28
  226. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_MSB 28
  227. #define TX_MPDU_START_RAW_ALREADY_ENCRYPTED_MASK 0x0000000010000000
  228. /* Description FRAME_TYPE
  229. Consumer: TXMON
  230. Producer: TXOLE
  231. 802.11 frame type field
  232. TXDMA fills this as zero and TXOLE overwrites it.
  233. <legal all>
  234. */
  235. #define TX_MPDU_START_FRAME_TYPE_OFFSET 0x0000000000000008
  236. #define TX_MPDU_START_FRAME_TYPE_LSB 29
  237. #define TX_MPDU_START_FRAME_TYPE_MSB 30
  238. #define TX_MPDU_START_FRAME_TYPE_MASK 0x0000000060000000
  239. /* Description TXDMA_DROPPED_MPDU_WARNING
  240. Consumer: FW
  241. Producer: TXDMA
  242. Indication to TXPCU to indicate to FW a warning that Tx
  243. DMA has dropped MPDUs due to SFM FIFO full condition
  244. <legal all>
  245. */
  246. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_OFFSET 0x0000000000000008
  247. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_LSB 31
  248. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_MSB 31
  249. #define TX_MPDU_START_TXDMA_DROPPED_MPDU_WARNING_MASK 0x0000000080000000
  250. /* Description IV_BYTE_0
  251. Byte 0 of the IV field of the MPDU
  252. Based on the Encryption type the iv_byte_0 takes the appropriate
  253. meaning. For IV formats, refer to the crypto MLDR document
  254. */
  255. #define TX_MPDU_START_IV_BYTE_0_OFFSET 0x0000000000000008
  256. #define TX_MPDU_START_IV_BYTE_0_LSB 32
  257. #define TX_MPDU_START_IV_BYTE_0_MSB 39
  258. #define TX_MPDU_START_IV_BYTE_0_MASK 0x000000ff00000000
  259. /* Description IV_BYTE_1
  260. Byte 1 of the IV field of the MPDU
  261. Based on the Encryption type the iv_byte_1 takes the appropriate
  262. meaning. For IV formats, refer to the crypto MLDR document
  263. */
  264. #define TX_MPDU_START_IV_BYTE_1_OFFSET 0x0000000000000008
  265. #define TX_MPDU_START_IV_BYTE_1_LSB 40
  266. #define TX_MPDU_START_IV_BYTE_1_MSB 47
  267. #define TX_MPDU_START_IV_BYTE_1_MASK 0x0000ff0000000000
  268. /* Description IV_BYTE_2
  269. Byte 2 of the IV field of the MDPU
  270. Based on the Encryption type the iv_byte_2 takes the appropriate
  271. meaning. For IV formats, refer to the crypto MLDR document
  272. */
  273. #define TX_MPDU_START_IV_BYTE_2_OFFSET 0x0000000000000008
  274. #define TX_MPDU_START_IV_BYTE_2_LSB 48
  275. #define TX_MPDU_START_IV_BYTE_2_MSB 55
  276. #define TX_MPDU_START_IV_BYTE_2_MASK 0x00ff000000000000
  277. /* Description IV_BYTE_3
  278. Byte 3 of the IV field of the MPDU
  279. Based on the Encryption type the iv_byte_3 takes the appropriate
  280. meaning. For IV formats, refer to the crypto MLDR document
  281. */
  282. #define TX_MPDU_START_IV_BYTE_3_OFFSET 0x0000000000000008
  283. #define TX_MPDU_START_IV_BYTE_3_LSB 56
  284. #define TX_MPDU_START_IV_BYTE_3_MSB 63
  285. #define TX_MPDU_START_IV_BYTE_3_MASK 0xff00000000000000
  286. /* Description IV_BYTE_4
  287. Byte 4 of the IV field of the MPDU
  288. Based on the Encryption type the iv_byte_4 takes the appropriate
  289. meaning. For IV formats, refer to the crypto MLDR document
  290. */
  291. #define TX_MPDU_START_IV_BYTE_4_OFFSET 0x0000000000000010
  292. #define TX_MPDU_START_IV_BYTE_4_LSB 0
  293. #define TX_MPDU_START_IV_BYTE_4_MSB 7
  294. #define TX_MPDU_START_IV_BYTE_4_MASK 0x00000000000000ff
  295. /* Description IV_BYTE_5
  296. Byte 5 of the IV field of the MPDU
  297. Based on the Encryption type the iv_byte_5 takes the appropriate
  298. meaning. For IV formats, refer to the crypto MLDR document
  299. */
  300. #define TX_MPDU_START_IV_BYTE_5_OFFSET 0x0000000000000010
  301. #define TX_MPDU_START_IV_BYTE_5_LSB 8
  302. #define TX_MPDU_START_IV_BYTE_5_MSB 15
  303. #define TX_MPDU_START_IV_BYTE_5_MASK 0x000000000000ff00
  304. /* Description IV_BYTE_6
  305. Byte 6 of the IV field of the MDPU
  306. Based on the Encryption type the iv_byte_6 takes the appropriate
  307. meaning. For IV formats, refer to the crypto MLDR document
  308. */
  309. #define TX_MPDU_START_IV_BYTE_6_OFFSET 0x0000000000000010
  310. #define TX_MPDU_START_IV_BYTE_6_LSB 16
  311. #define TX_MPDU_START_IV_BYTE_6_MSB 23
  312. #define TX_MPDU_START_IV_BYTE_6_MASK 0x0000000000ff0000
  313. /* Description IV_BYTE_7
  314. Byte 7 of the IV field of the MPDU
  315. Based on the Encryption type the iv_byte_7 takes the appropriate
  316. meaning. For IV formats, refer to the crypto MLDR document
  317. */
  318. #define TX_MPDU_START_IV_BYTE_7_OFFSET 0x0000000000000010
  319. #define TX_MPDU_START_IV_BYTE_7_LSB 24
  320. #define TX_MPDU_START_IV_BYTE_7_MSB 31
  321. #define TX_MPDU_START_IV_BYTE_7_MASK 0x00000000ff000000
  322. /* Description IV_BYTE_8
  323. Byte 8 of the IV field of the MPDU
  324. Based on the Encryption type the iv_byte_8 takes the appropriate
  325. meaning. For IV formats, refer to the crypto MLDR document
  326. */
  327. #define TX_MPDU_START_IV_BYTE_8_OFFSET 0x0000000000000010
  328. #define TX_MPDU_START_IV_BYTE_8_LSB 32
  329. #define TX_MPDU_START_IV_BYTE_8_MSB 39
  330. #define TX_MPDU_START_IV_BYTE_8_MASK 0x000000ff00000000
  331. /* Description IV_BYTE_9
  332. Byte 9 of the IV field of the MPDU
  333. Based on the Encryption type the iv_byte_9 takes the appropriate
  334. meaning. For IV formats, refer to the crypto MLDR document
  335. */
  336. #define TX_MPDU_START_IV_BYTE_9_OFFSET 0x0000000000000010
  337. #define TX_MPDU_START_IV_BYTE_9_LSB 40
  338. #define TX_MPDU_START_IV_BYTE_9_MSB 47
  339. #define TX_MPDU_START_IV_BYTE_9_MASK 0x0000ff0000000000
  340. /* Description IV_BYTE_10
  341. Byte 10 of the IV field of the MDPU
  342. Based on the Encryption type the iv_byte_10 takes the appropriate
  343. meaning. For IV formats, refer to the crypto MLDR document
  344. */
  345. #define TX_MPDU_START_IV_BYTE_10_OFFSET 0x0000000000000010
  346. #define TX_MPDU_START_IV_BYTE_10_LSB 48
  347. #define TX_MPDU_START_IV_BYTE_10_MSB 55
  348. #define TX_MPDU_START_IV_BYTE_10_MASK 0x00ff000000000000
  349. /* Description IV_BYTE_11
  350. Byte 11 of the IV field of the MPDU
  351. Based on the Encryption type the iv_byte_11 takes the appropriate
  352. meaning. For IV formats, refer to the crypto MLDR document
  353. */
  354. #define TX_MPDU_START_IV_BYTE_11_OFFSET 0x0000000000000010
  355. #define TX_MPDU_START_IV_BYTE_11_LSB 56
  356. #define TX_MPDU_START_IV_BYTE_11_MSB 63
  357. #define TX_MPDU_START_IV_BYTE_11_MASK 0xff00000000000000
  358. /* Description IV_BYTE_12
  359. Byte 8 of the IV field of the MPDU
  360. Based on the Encryption type the iv_byte_12 takes the appropriate
  361. meaning. For IV formats, refer to the crypto MLDR document
  362. */
  363. #define TX_MPDU_START_IV_BYTE_12_OFFSET 0x0000000000000018
  364. #define TX_MPDU_START_IV_BYTE_12_LSB 0
  365. #define TX_MPDU_START_IV_BYTE_12_MSB 7
  366. #define TX_MPDU_START_IV_BYTE_12_MASK 0x00000000000000ff
  367. /* Description IV_BYTE_13
  368. Byte 9 of the IV field of the MPDU
  369. Based on the Encryption type the iv_byte_13 takes the appropriate
  370. meaning. For IV formats, refer to the crypto MLDR document
  371. */
  372. #define TX_MPDU_START_IV_BYTE_13_OFFSET 0x0000000000000018
  373. #define TX_MPDU_START_IV_BYTE_13_LSB 8
  374. #define TX_MPDU_START_IV_BYTE_13_MSB 15
  375. #define TX_MPDU_START_IV_BYTE_13_MASK 0x000000000000ff00
  376. /* Description IV_BYTE_14
  377. Byte 10 of the IV field of the MDPU
  378. Based on the Encryption type the iv_byte_14 takes the appropriate
  379. meaning. For IV formats, refer to the crypto MLDR document
  380. */
  381. #define TX_MPDU_START_IV_BYTE_14_OFFSET 0x0000000000000018
  382. #define TX_MPDU_START_IV_BYTE_14_LSB 16
  383. #define TX_MPDU_START_IV_BYTE_14_MSB 23
  384. #define TX_MPDU_START_IV_BYTE_14_MASK 0x0000000000ff0000
  385. /* Description IV_BYTE_15
  386. Byte 11 of the IV field of the MPDU
  387. Based on the Encryption type the iv_byte_15 takes the appropriate
  388. meaning. For IV formats, refer to the crypto MLDR document
  389. */
  390. #define TX_MPDU_START_IV_BYTE_15_OFFSET 0x0000000000000018
  391. #define TX_MPDU_START_IV_BYTE_15_LSB 24
  392. #define TX_MPDU_START_IV_BYTE_15_MSB 31
  393. #define TX_MPDU_START_IV_BYTE_15_MASK 0x00000000ff000000
  394. /* Description IV_BYTE_16
  395. Byte 8 of the IV field of the MPDU
  396. Based on the Encryption type the iv_byte_16 takes the appropriate
  397. meaning. For IV formats, refer to the crypto MLDR document
  398. */
  399. #define TX_MPDU_START_IV_BYTE_16_OFFSET 0x0000000000000018
  400. #define TX_MPDU_START_IV_BYTE_16_LSB 32
  401. #define TX_MPDU_START_IV_BYTE_16_MSB 39
  402. #define TX_MPDU_START_IV_BYTE_16_MASK 0x000000ff00000000
  403. /* Description IV_BYTE_17
  404. Byte 9 of the IV field of the MPDU
  405. Based on the Encryption type the iv_byte_17 takes the appropriate
  406. meaning. For IV formats, refer to the crypto MLDR document
  407. */
  408. #define TX_MPDU_START_IV_BYTE_17_OFFSET 0x0000000000000018
  409. #define TX_MPDU_START_IV_BYTE_17_LSB 40
  410. #define TX_MPDU_START_IV_BYTE_17_MSB 47
  411. #define TX_MPDU_START_IV_BYTE_17_MASK 0x0000ff0000000000
  412. /* Description IV_LEN
  413. Length of the IV field generated by Tx OLE
  414. */
  415. #define TX_MPDU_START_IV_LEN_OFFSET 0x0000000000000018
  416. #define TX_MPDU_START_IV_LEN_LSB 48
  417. #define TX_MPDU_START_IV_LEN_MSB 52
  418. #define TX_MPDU_START_IV_LEN_MASK 0x001f000000000000
  419. /* Description ICV_LEN
  420. Length of the ICV field generated by Tx OLE. OLE will insert
  421. zeros in the ICV field when it pushes a frame
  422. */
  423. #define TX_MPDU_START_ICV_LEN_OFFSET 0x0000000000000018
  424. #define TX_MPDU_START_ICV_LEN_LSB 53
  425. #define TX_MPDU_START_ICV_LEN_MSB 57
  426. #define TX_MPDU_START_ICV_LEN_MASK 0x03e0000000000000
  427. /* Description VHT_CONTROL_OFFSET
  428. Field only valid when vht_control_present is set.
  429. Field filled in by TXOLE, used by TXPCU
  430. The starting byte number of the VHT control field in the
  431. header
  432. <legal all>
  433. */
  434. #define TX_MPDU_START_VHT_CONTROL_OFFSET_OFFSET 0x0000000000000018
  435. #define TX_MPDU_START_VHT_CONTROL_OFFSET_LSB 58
  436. #define TX_MPDU_START_VHT_CONTROL_OFFSET_MSB 63
  437. #define TX_MPDU_START_VHT_CONTROL_OFFSET_MASK 0xfc00000000000000
  438. /* Description MPDU_TYPE
  439. Indicates the type of MPDU that OLE will generate:
  440. <enum 0 mpdu_type_basic> This MPDU is not in the A-MSDU
  441. format (meaning there is no A-MSDU delimeter present) if
  442. there is only 1 MSDU in the MPDU. When there are multiple
  443. MSDUs in the MPDU, there is no choice, and the MSDUs within
  444. the MPDU shall all have A-MSDU delimiters in front of them.
  445. <enum 1 mpdu_type_amsdu> The MSDUs within the MPDU will
  446. all have to be in the A-MSDU format, even if there is just
  447. a single MSDU embedded in the MPDU. In other words, there
  448. is always an A-MSDU delimiter in front of the MSDU(s) in
  449. the MPDU.
  450. This is not supported in Hastings80 and HastingsPrime.
  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. Not supported in Hamilton/Waikiki v1
  540. <legal 0-1>
  541. */
  542. #define TX_MPDU_START_RESERVED_8A_OFFSET 0x0000000000000020
  543. #define TX_MPDU_START_RESERVED_8A_LSB 9
  544. #define TX_MPDU_START_RESERVED_8A_MSB 31
  545. #define TX_MPDU_START_RESERVED_8A_MASK 0x00000000fffffe00
  546. /* Description TLV64_PADDING
  547. Automatic DWORD padding inserted while converting TLV32
  548. to TLV64 for 64 bit ARCH
  549. <legal 0>
  550. */
  551. #define TX_MPDU_START_TLV64_PADDING_OFFSET 0x0000000000000020
  552. #define TX_MPDU_START_TLV64_PADDING_LSB 32
  553. #define TX_MPDU_START_TLV64_PADDING_MSB 63
  554. #define TX_MPDU_START_TLV64_PADDING_MASK 0xffffffff00000000
  555. #endif // TX_MPDU_START