tx_queue_extension.h 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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_QUEUE_EXTENSION_H_
  17. #define _TX_QUEUE_EXTENSION_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_TX_QUEUE_EXTENSION 14
  21. #define NUM_OF_QWORDS_TX_QUEUE_EXTENSION 7
  22. struct tx_queue_extension {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t frame_ctl : 16, // [15:0]
  25. qos_ctl : 16; // [31:16]
  26. uint32_t ampdu_flag : 1, // [0:0]
  27. tx_notify_no_htc_override : 1, // [1:1]
  28. reserved_1a : 7, // [8:2]
  29. checksum_tso_disable_for_frag : 1, // [9:9]
  30. key_id : 8, // [17:10]
  31. qos_buf_state_overwrite : 1, // [18:18]
  32. buf_state_sta_id : 1, // [19:19]
  33. buf_state_source : 1, // [20:20]
  34. ht_control_overwrite_enable : 1, // [21:21]
  35. ht_control_overwrite_source : 4, // [25:22]
  36. reserved_1b : 6; // [31:26]
  37. uint32_t ul_headroom_insertion_enable : 1, // [0:0]
  38. ul_headroom_offset : 5, // [5:1]
  39. bqrp_insertion_enable : 1, // [6:6]
  40. bqrp_offset : 5, // [11:7]
  41. ul_headroom_rsvd_7_6 : 2, // [13:12]
  42. bqr_rsvd_9_8 : 2, // [15:14]
  43. base_pn_63_48 : 16; // [31:16]
  44. uint32_t base_pn_95_64 : 32; // [31:0]
  45. uint32_t base_pn_127_96 : 32; // [31:0]
  46. uint32_t ht_control_field_bw20 : 32; // [31:0]
  47. uint32_t ht_control_field_bw40 : 32; // [31:0]
  48. uint32_t ht_control_field_bw80 : 32; // [31:0]
  49. uint32_t ht_control_field_bw160 : 32; // [31:0]
  50. uint32_t ht_control_overwrite_mask : 32; // [31:0]
  51. uint32_t cas_control_info : 8, // [7:0]
  52. cas_offset : 5, // [12:8]
  53. cas_insertion_enable : 1, // [13:13]
  54. reserved_10a : 2, // [15:14]
  55. ht_control_overwrite_source_for_srp : 4, // [19:16]
  56. ht_control_overwrite_source_for_bsrp : 4, // [23:20]
  57. reserved_10b : 6, // [29:24]
  58. mpdu_hdr_len_override_en : 1, // [30:30]
  59. bar_ssn_overwrite_enable : 1; // [31:31]
  60. uint32_t bar_ssn_offset : 12, // [11:0]
  61. mpdu_hdr_len_override_val : 9, // [20:12]
  62. reserved_11a : 11; // [31:21]
  63. uint32_t ht_control_field_bw320 : 32; // [31:0]
  64. uint32_t fw2sw_info : 32; // [31:0]
  65. #else
  66. uint32_t qos_ctl : 16, // [31:16]
  67. frame_ctl : 16; // [15:0]
  68. uint32_t reserved_1b : 6, // [31:26]
  69. ht_control_overwrite_source : 4, // [25:22]
  70. ht_control_overwrite_enable : 1, // [21:21]
  71. buf_state_source : 1, // [20:20]
  72. buf_state_sta_id : 1, // [19:19]
  73. qos_buf_state_overwrite : 1, // [18:18]
  74. key_id : 8, // [17:10]
  75. checksum_tso_disable_for_frag : 1, // [9:9]
  76. reserved_1a : 7, // [8:2]
  77. tx_notify_no_htc_override : 1, // [1:1]
  78. ampdu_flag : 1; // [0:0]
  79. uint32_t base_pn_63_48 : 16, // [31:16]
  80. bqr_rsvd_9_8 : 2, // [15:14]
  81. ul_headroom_rsvd_7_6 : 2, // [13:12]
  82. bqrp_offset : 5, // [11:7]
  83. bqrp_insertion_enable : 1, // [6:6]
  84. ul_headroom_offset : 5, // [5:1]
  85. ul_headroom_insertion_enable : 1; // [0:0]
  86. uint32_t base_pn_95_64 : 32; // [31:0]
  87. uint32_t base_pn_127_96 : 32; // [31:0]
  88. uint32_t ht_control_field_bw20 : 32; // [31:0]
  89. uint32_t ht_control_field_bw40 : 32; // [31:0]
  90. uint32_t ht_control_field_bw80 : 32; // [31:0]
  91. uint32_t ht_control_field_bw160 : 32; // [31:0]
  92. uint32_t ht_control_overwrite_mask : 32; // [31:0]
  93. uint32_t bar_ssn_overwrite_enable : 1, // [31:31]
  94. mpdu_hdr_len_override_en : 1, // [30:30]
  95. reserved_10b : 6, // [29:24]
  96. ht_control_overwrite_source_for_bsrp : 4, // [23:20]
  97. ht_control_overwrite_source_for_srp : 4, // [19:16]
  98. reserved_10a : 2, // [15:14]
  99. cas_insertion_enable : 1, // [13:13]
  100. cas_offset : 5, // [12:8]
  101. cas_control_info : 8; // [7:0]
  102. uint32_t reserved_11a : 11, // [31:21]
  103. mpdu_hdr_len_override_val : 9, // [20:12]
  104. bar_ssn_offset : 12; // [11:0]
  105. uint32_t ht_control_field_bw320 : 32; // [31:0]
  106. uint32_t fw2sw_info : 32; // [31:0]
  107. #endif
  108. };
  109. /* Description FRAME_CTL
  110. Consumer: TXOLE
  111. Producer: SW
  112. 802.11 Frame control field:
  113. fc [1:0]: Protocol Version
  114. fc[7:2]: type/subtypeFor non-11ah fc[3:2] = Type fc[7:4] =
  115. Subtype For 11ah fc[4:2] = Typefc[7:5] = PTID/SubType
  116. fc [8]: To DS ( for Non-11ah) From DS ( for 11ah )
  117. fc [9]: From DS ( for Non-11ah )
  118. More Frag ( for 11ah )
  119. fc [10]: More Frag ( for Non-11ah )
  120. Power Management ( for 11ah)
  121. fc [11]: Retry ( for Non-11ah )
  122. More Data ( for 11ah )
  123. fc [12]: Pwr Mgt ( for Non-11ah )
  124. Protected Frame ( for 11ah )
  125. fc [13]: More Data( for Non-11ah )
  126. EOSP ( for 11ah )
  127. fc [14]: Protected Frame ( for Non-11ah)
  128. Relayed Frame ( for 11ah )
  129. fc [15]: Order ( for Non-11ah )
  130. Ack Policy ( for 11ah )
  131. Used by OLE during the encapsulation process for Native
  132. WiFi, Ethernet II, and 802.3.
  133. When the Order field is set, TXOLE shall insert 4 placeholder
  134. bytes for the HE-control field in the frame. TXPCU will
  135. overwrite them with the final actual value...
  136. */
  137. #define TX_QUEUE_EXTENSION_FRAME_CTL_OFFSET 0x0000000000000000
  138. #define TX_QUEUE_EXTENSION_FRAME_CTL_LSB 0
  139. #define TX_QUEUE_EXTENSION_FRAME_CTL_MSB 15
  140. #define TX_QUEUE_EXTENSION_FRAME_CTL_MASK 0x000000000000ffff
  141. /* Description QOS_CTL
  142. Consumer: TXOLE
  143. Producer: SW
  144. QoS control field is valid if the type field is data and
  145. the upper bit of the subtype field is set. The field decode
  146. is as below:
  147. qos_ctl[3:0]: TID
  148. qos_ctl[4]: EOSP (with some exceptions)
  149. qos_ctl[6:5]: Ack Policy
  150. 0x0: Normal Ack or Implicit BAR
  151. 0x1: No Ack
  152. 0x2: No explicit Ack or PSMP Ack (not supported)
  153. 0x3: Block Ack (Not supported)
  154. Qos_ctl[7]: A-MSDU Present (with some exceptions)
  155. Qos_ctl[15:8]: TXOP limit, AP PS buffer state, TXOP duration
  156. requested or queue size
  157. This field is inserted into the 802.11 header during the
  158. encapsulation process
  159. <legal all>
  160. */
  161. #define TX_QUEUE_EXTENSION_QOS_CTL_OFFSET 0x0000000000000000
  162. #define TX_QUEUE_EXTENSION_QOS_CTL_LSB 16
  163. #define TX_QUEUE_EXTENSION_QOS_CTL_MSB 31
  164. #define TX_QUEUE_EXTENSION_QOS_CTL_MASK 0x00000000ffff0000
  165. /* Description AMPDU_FLAG
  166. Consumer: PDG/TXPCU
  167. Producer: SW
  168. Note:
  169. For legacy rate transmissions (11 b and 11a, an 11g), this
  170. bit shall always be set to zero.
  171. 0:
  172. For legacy and .11n rates:
  173. MPDUs are only allowed to be sent out 1 at a time in NON
  174. A-MPDU format.
  175. For .11ac and .11ax rates:
  176. MPDUs are sent out in S-MPDU format (TXPCU sets the 'EOF'
  177. bit in the MPDU delimiter).
  178. 1: All MPDUs should be sent out using the A-MPDU format,
  179. even if there is only one MPDU.
  180. Note that this bit should be set to 0 in order to construct
  181. an S-MPDU frame. VHT and HE frames are all A-MPDU format
  182. but if this bit is clear, EOF bit is set to 1 for the MPDU
  183. delimiter in A-MPDU, which is the indicator of S-MPDU and
  184. solicits ACK rather than BA as response frame.
  185. This bit shall be set to 1 for any MD (Multi Destination)
  186. transmission.
  187. */
  188. #define TX_QUEUE_EXTENSION_AMPDU_FLAG_OFFSET 0x0000000000000000
  189. #define TX_QUEUE_EXTENSION_AMPDU_FLAG_LSB 32
  190. #define TX_QUEUE_EXTENSION_AMPDU_FLAG_MSB 32
  191. #define TX_QUEUE_EXTENSION_AMPDU_FLAG_MASK 0x0000000100000000
  192. /* Description TX_NOTIFY_NO_HTC_OVERRIDE
  193. When set, and a 'TX_MPDU_START' TLV has Tx_notify_frame
  194. set to TX_HARD_NOTIFY or TX_SOFT_NOTIFY or TX_SEMI_HARD_NOTIFY,
  195. then PDG would have updated the rate fields for a legacy
  196. PPDU which may not support HT Control.
  197. In this case TXOLE shall not:
  198. set the Order/+HTC bit in the 'Frame Control,'
  199. include 4 bytes for TXPCU to fill the HT Control, or
  200. set vht_control_present in 'TX_MPDU_START,'
  201. even if requested, and instead shall subtract '4' from the
  202. mpdu_length in 'TX_MPDU_START' and overwrite it.
  203. <legal all>
  204. */
  205. #define TX_QUEUE_EXTENSION_TX_NOTIFY_NO_HTC_OVERRIDE_OFFSET 0x0000000000000000
  206. #define TX_QUEUE_EXTENSION_TX_NOTIFY_NO_HTC_OVERRIDE_LSB 33
  207. #define TX_QUEUE_EXTENSION_TX_NOTIFY_NO_HTC_OVERRIDE_MSB 33
  208. #define TX_QUEUE_EXTENSION_TX_NOTIFY_NO_HTC_OVERRIDE_MASK 0x0000000200000000
  209. #define TX_QUEUE_EXTENSION_RESERVED_1A_OFFSET 0x0000000000000000
  210. #define TX_QUEUE_EXTENSION_RESERVED_1A_LSB 34
  211. #define TX_QUEUE_EXTENSION_RESERVED_1A_MSB 40
  212. #define TX_QUEUE_EXTENSION_RESERVED_1A_MASK 0x000001fc00000000
  213. /* Description CHECKSUM_TSO_DISABLE_FOR_FRAG
  214. Field only valid in case of level-1 fragmentation, identified
  215. by TXOLE getting the 'TX_FRAG_STATE' TLV
  216. If set, TXOLE disables all checksum and TSO overwrites for
  217. the fragment(s) being transmitted.
  218. This is useful if it is known that the checksum and TSO
  219. overwrites affect only the first fragment (or first few
  220. fragments) and for the rest these can be safely disabled.
  221. <legal all>
  222. */
  223. #define TX_QUEUE_EXTENSION_CHECKSUM_TSO_DISABLE_FOR_FRAG_OFFSET 0x0000000000000000
  224. #define TX_QUEUE_EXTENSION_CHECKSUM_TSO_DISABLE_FOR_FRAG_LSB 41
  225. #define TX_QUEUE_EXTENSION_CHECKSUM_TSO_DISABLE_FOR_FRAG_MSB 41
  226. #define TX_QUEUE_EXTENSION_CHECKSUM_TSO_DISABLE_FOR_FRAG_MASK 0x0000020000000000
  227. /* Description KEY_ID
  228. Field only valid in case of encryption, and TXOLE being
  229. instructured to insert the IV.
  230. TXOLE blindly copies this field into the key ID octet (which
  231. is part of the IV) of the encrypted frame.
  232. For AES/TKIP the encoding is:
  233. key_id_octet[7:6]: key ID
  234. key_id_octet[5]: extended IV:
  235. key_id_octet[4:0]: Reserved bits
  236. For WEP the encoding is:
  237. key_id_octet[7:6]: key ID
  238. key_id_octet[5]: extended IV:
  239. key_id_octet[4:0]: Reserved bits
  240. For WAPI the encoding is:
  241. key_id_octet[7:2]: Reserved bits
  242. key_id_octet[1:0]: key ID
  243. <legal all>
  244. */
  245. #define TX_QUEUE_EXTENSION_KEY_ID_OFFSET 0x0000000000000000
  246. #define TX_QUEUE_EXTENSION_KEY_ID_LSB 42
  247. #define TX_QUEUE_EXTENSION_KEY_ID_MSB 49
  248. #define TX_QUEUE_EXTENSION_KEY_ID_MASK 0x0003fc0000000000
  249. /* Description QOS_BUF_STATE_OVERWRITE
  250. When clear, TXPCU shall not overwrite buffer state field
  251. in the QoS frame control field.
  252. When set, TXPCU shall overwrite the buffer state field in
  253. the QoS frame control field, with info that SW has programmed
  254. in TXPCU registers. Note that TXPCU shall pick up the values
  255. related to this TID.
  256. <legal all>
  257. */
  258. #define TX_QUEUE_EXTENSION_QOS_BUF_STATE_OVERWRITE_OFFSET 0x0000000000000000
  259. #define TX_QUEUE_EXTENSION_QOS_BUF_STATE_OVERWRITE_LSB 50
  260. #define TX_QUEUE_EXTENSION_QOS_BUF_STATE_OVERWRITE_MSB 50
  261. #define TX_QUEUE_EXTENSION_QOS_BUF_STATE_OVERWRITE_MASK 0x0004000000000000
  262. /* Description BUF_STATE_STA_ID
  263. Field only valid when QoS_Buf_state_overwrite is set.
  264. This field indicates what the STA ID register source is
  265. of the buffer status.
  266. 1'b0: TXPCU registers: STA0_buf_status_...
  267. 1'b1: TXPCU registers: STA1_buf_status_...
  268. <legal all>
  269. */
  270. #define TX_QUEUE_EXTENSION_BUF_STATE_STA_ID_OFFSET 0x0000000000000000
  271. #define TX_QUEUE_EXTENSION_BUF_STATE_STA_ID_LSB 51
  272. #define TX_QUEUE_EXTENSION_BUF_STATE_STA_ID_MSB 51
  273. #define TX_QUEUE_EXTENSION_BUF_STATE_STA_ID_MASK 0x0008000000000000
  274. /* Description BUF_STATE_SOURCE
  275. Field only valid when QoS_Buf_state_overwrite is set.
  276. This field indicates what the source is of the actual value
  277. TXPCU will insert
  278. <enum 0 BUF_STATE_TID_BASED> TXPCU looks at the TID field
  279. in the QoS control frame and based on this TID, selects
  280. the buffer source value from the corresponding TID register.
  281. <enum 1 BUF_STATE_SUM_BASED> TXPCU inserts the value from
  282. the buffer_state_sum register
  283. <legal all>
  284. */
  285. #define TX_QUEUE_EXTENSION_BUF_STATE_SOURCE_OFFSET 0x0000000000000000
  286. #define TX_QUEUE_EXTENSION_BUF_STATE_SOURCE_LSB 52
  287. #define TX_QUEUE_EXTENSION_BUF_STATE_SOURCE_MSB 52
  288. #define TX_QUEUE_EXTENSION_BUF_STATE_SOURCE_MASK 0x0010000000000000
  289. /* Description HT_CONTROL_OVERWRITE_ENABLE
  290. When set, TXPCU shall overwrite some (or all) of the HT_CONTROL
  291. field with values that are programmed in TXPCU registers:
  292. HT_CONTROL_OVERWRITE_IX???
  293. See HT/HE control overwrite order NOTE after this table
  294. <legal all>
  295. */
  296. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_ENABLE_OFFSET 0x0000000000000000
  297. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_ENABLE_LSB 53
  298. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_ENABLE_MSB 53
  299. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_ENABLE_MASK 0x0020000000000000
  300. /* Description HT_CONTROL_OVERWRITE_SOURCE
  301. Field only valid when HT_control_overwrite_enable is set.
  302. This field indicates the index of the TXPCU register HT_CONTROL_OVERWRITE_IX???
  303. That is the source of the overwrite data.
  304. <legal all>
  305. */
  306. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_OFFSET 0x0000000000000000
  307. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_LSB 54
  308. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_MSB 57
  309. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_MASK 0x03c0000000000000
  310. #define TX_QUEUE_EXTENSION_RESERVED_1B_OFFSET 0x0000000000000000
  311. #define TX_QUEUE_EXTENSION_RESERVED_1B_LSB 58
  312. #define TX_QUEUE_EXTENSION_RESERVED_1B_MSB 63
  313. #define TX_QUEUE_EXTENSION_RESERVED_1B_MASK 0xfc00000000000000
  314. /* Description UL_HEADROOM_INSERTION_ENABLE
  315. When set, and this transmission services a trigger response
  316. transmission, TXPCU shall create and insert the UL headroom
  317. info in the HE control field, starting at offset indicated
  318. by field: UL_headroom_offset
  319. See HT/HE control overwrite order NOTE after this table
  320. <legal all>
  321. */
  322. #define TX_QUEUE_EXTENSION_UL_HEADROOM_INSERTION_ENABLE_OFFSET 0x0000000000000008
  323. #define TX_QUEUE_EXTENSION_UL_HEADROOM_INSERTION_ENABLE_LSB 0
  324. #define TX_QUEUE_EXTENSION_UL_HEADROOM_INSERTION_ENABLE_MSB 0
  325. #define TX_QUEUE_EXTENSION_UL_HEADROOM_INSERTION_ENABLE_MASK 0x0000000000000001
  326. /* Description UL_HEADROOM_OFFSET
  327. Field only valid when UL_headroom_insertion_enable is set.
  328. The bit location in HE_CONTROL Field where TXPCU will start
  329. writing the the 4 bit Control ID field that needs to be
  330. inserted, followed by the lower 6 bits of the 8 bit bit
  331. UL_headroom info (UPH Control).
  332. NOTE: currently on 6 bits are defined in the UPH control
  333. field. The upper two bits are provided by SW in UL_headroom_rsvd_7_6.
  334. <legal 2-20>
  335. */
  336. #define TX_QUEUE_EXTENSION_UL_HEADROOM_OFFSET_OFFSET 0x0000000000000008
  337. #define TX_QUEUE_EXTENSION_UL_HEADROOM_OFFSET_LSB 1
  338. #define TX_QUEUE_EXTENSION_UL_HEADROOM_OFFSET_MSB 5
  339. #define TX_QUEUE_EXTENSION_UL_HEADROOM_OFFSET_MASK 0x000000000000003e
  340. /* Description BQRP_INSERTION_ENABLE
  341. When set, and this transmission services a BQRP trigger
  342. response transmission, TXPCU shall create and insert the
  343. BQR control field into the HE control field, as well as
  344. the 4 bit preceding Control ID field.
  345. See HT/HE control overwrite order NOTE after this table
  346. <legal all>
  347. */
  348. #define TX_QUEUE_EXTENSION_BQRP_INSERTION_ENABLE_OFFSET 0x0000000000000008
  349. #define TX_QUEUE_EXTENSION_BQRP_INSERTION_ENABLE_LSB 6
  350. #define TX_QUEUE_EXTENSION_BQRP_INSERTION_ENABLE_MSB 6
  351. #define TX_QUEUE_EXTENSION_BQRP_INSERTION_ENABLE_MASK 0x0000000000000040
  352. /* Description BQRP_OFFSET
  353. Field only valid when BQRP_insertion_enable is set.
  354. The bit location in HE_CONTROL Field where TXPCU will start
  355. writing the 4 bit Control ID field that needs to be inserted,
  356. followed by the lower 8 bits of the 10 bit BQR control field.
  357. NOTE: currently only 8 bits are defined in the 10 bit BQR
  358. control field. The upper two bits are provided by SW in
  359. BQR_rsvd_9_8.
  360. <legal 2-20>
  361. */
  362. #define TX_QUEUE_EXTENSION_BQRP_OFFSET_OFFSET 0x0000000000000008
  363. #define TX_QUEUE_EXTENSION_BQRP_OFFSET_LSB 7
  364. #define TX_QUEUE_EXTENSION_BQRP_OFFSET_MSB 11
  365. #define TX_QUEUE_EXTENSION_BQRP_OFFSET_MASK 0x0000000000000f80
  366. /* Description UL_HEADROOM_RSVD_7_6
  367. These will be used by TXPCU to fill the upper two bits of
  368. the UPH control field.
  369. <legal all>
  370. */
  371. #define TX_QUEUE_EXTENSION_UL_HEADROOM_RSVD_7_6_OFFSET 0x0000000000000008
  372. #define TX_QUEUE_EXTENSION_UL_HEADROOM_RSVD_7_6_LSB 12
  373. #define TX_QUEUE_EXTENSION_UL_HEADROOM_RSVD_7_6_MSB 13
  374. #define TX_QUEUE_EXTENSION_UL_HEADROOM_RSVD_7_6_MASK 0x0000000000003000
  375. /* Description BQR_RSVD_9_8
  376. These will be used by TXPCU to fill the upper two bits of
  377. the BQR control field.
  378. NOTE: When overwriting CAS control (8-bit) at the same offset
  379. as BQR control (10-bit), TXPCU will ignore the BQR overwrite,
  380. including these upper two bits.
  381. <legal all>
  382. */
  383. #define TX_QUEUE_EXTENSION_BQR_RSVD_9_8_OFFSET 0x0000000000000008
  384. #define TX_QUEUE_EXTENSION_BQR_RSVD_9_8_LSB 14
  385. #define TX_QUEUE_EXTENSION_BQR_RSVD_9_8_MSB 15
  386. #define TX_QUEUE_EXTENSION_BQR_RSVD_9_8_MASK 0x000000000000c000
  387. /* Description BASE_PN_63_48
  388. Upper bits PN number, in case a larger then 48 bit PN number
  389. needs to be inserted in the transmit frame.
  390. 63-48 bits of the 128-bit packet number
  391. <legal all>
  392. */
  393. #define TX_QUEUE_EXTENSION_BASE_PN_63_48_OFFSET 0x0000000000000008
  394. #define TX_QUEUE_EXTENSION_BASE_PN_63_48_LSB 16
  395. #define TX_QUEUE_EXTENSION_BASE_PN_63_48_MSB 31
  396. #define TX_QUEUE_EXTENSION_BASE_PN_63_48_MASK 0x00000000ffff0000
  397. /* Description BASE_PN_95_64
  398. Upper bits PN number, in case a larger then 48 bit PN number
  399. needs to be inserted in the transmit frame.
  400. 95-64 bits of the 128-bit packet number
  401. <legal all>
  402. */
  403. #define TX_QUEUE_EXTENSION_BASE_PN_95_64_OFFSET 0x0000000000000008
  404. #define TX_QUEUE_EXTENSION_BASE_PN_95_64_LSB 32
  405. #define TX_QUEUE_EXTENSION_BASE_PN_95_64_MSB 63
  406. #define TX_QUEUE_EXTENSION_BASE_PN_95_64_MASK 0xffffffff00000000
  407. /* Description BASE_PN_127_96
  408. Upper bits PN number, in case a larger then 48 bit PN number
  409. needs to be inserted in the transmit frame.
  410. 127-96 bits of the 128-bit packet number
  411. <legal all>
  412. */
  413. #define TX_QUEUE_EXTENSION_BASE_PN_127_96_OFFSET 0x0000000000000010
  414. #define TX_QUEUE_EXTENSION_BASE_PN_127_96_LSB 0
  415. #define TX_QUEUE_EXTENSION_BASE_PN_127_96_MSB 31
  416. #define TX_QUEUE_EXTENSION_BASE_PN_127_96_MASK 0x00000000ffffffff
  417. /* Description HT_CONTROL_FIELD_BW20
  418. Field used by TXPCU when in TX_MPDU_START TLV field vht_control_present
  419. is set.
  420. Note that TXPCU might overwrite some fields. This is controlled
  421. with field HT_control_overwrite_enable
  422. See HT/HE control overwrite order NOTE after this table
  423. <legal all>
  424. */
  425. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW20_OFFSET 0x0000000000000010
  426. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW20_LSB 32
  427. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW20_MSB 63
  428. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW20_MASK 0xffffffff00000000
  429. /* Description HT_CONTROL_FIELD_BW40
  430. Field used by TXPCU when in TX_MPDU_START TLV field vht_control_present
  431. is set.
  432. Note that TXPCU might overwrite some fields. This is controlled
  433. with field HT_control_overwrite_enable
  434. See HT/HE control overwrite order NOTE after this table
  435. <legal all>
  436. */
  437. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW40_OFFSET 0x0000000000000018
  438. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW40_LSB 0
  439. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW40_MSB 31
  440. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW40_MASK 0x00000000ffffffff
  441. /* Description HT_CONTROL_FIELD_BW80
  442. Field used by TXPCU when in TX_MPDU_START TLV field vht_control_present
  443. is set.
  444. Note that TXPCU might overwrite some fields. This is controlled
  445. with field HT_control_overwrite_enable
  446. See HT/HE control overwrite order NOTE after this table
  447. <legal all>
  448. */
  449. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW80_OFFSET 0x0000000000000018
  450. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW80_LSB 32
  451. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW80_MSB 63
  452. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW80_MASK 0xffffffff00000000
  453. /* Description HT_CONTROL_FIELD_BW160
  454. Field used by TXPCU when in TX_MPDU_START TLV field vht_control_present
  455. is set.
  456. Note that TXPCU might overwrite some fields. This is controlled
  457. with field HT_control_overwrite_enable
  458. See HT/HE control overwrite order NOTE after this table
  459. <legal all>
  460. */
  461. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW160_OFFSET 0x0000000000000020
  462. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW160_LSB 0
  463. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW160_MSB 31
  464. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW160_MASK 0x00000000ffffffff
  465. /* Description HT_CONTROL_OVERWRITE_MASK
  466. Field only valid when HT_control_overwrite_enable is set.
  467. This field indicates which bits of the HT_CONTROL_FIELD
  468. shall be overwritten with bits from TXPCU register HT_CONTROL_OVERWRITE_IX???
  469. Every bit that needs to be overwritten is set to 1 in this
  470. register.
  471. <legal all>
  472. */
  473. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_MASK_OFFSET 0x0000000000000020
  474. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_MASK_LSB 32
  475. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_MASK_MSB 63
  476. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_MASK_MASK 0xffffffff00000000
  477. /* Description CAS_CONTROL_INFO
  478. This contains 8-bit CAS control field to be used for transmission
  479. during SRP window
  480. <legal all>
  481. */
  482. #define TX_QUEUE_EXTENSION_CAS_CONTROL_INFO_OFFSET 0x0000000000000028
  483. #define TX_QUEUE_EXTENSION_CAS_CONTROL_INFO_LSB 0
  484. #define TX_QUEUE_EXTENSION_CAS_CONTROL_INFO_MSB 7
  485. #define TX_QUEUE_EXTENSION_CAS_CONTROL_INFO_MASK 0x00000000000000ff
  486. /* Description CAS_OFFSET
  487. 5 bit offset for CAS insertion
  488. <legal 2-20>
  489. */
  490. #define TX_QUEUE_EXTENSION_CAS_OFFSET_OFFSET 0x0000000000000028
  491. #define TX_QUEUE_EXTENSION_CAS_OFFSET_LSB 8
  492. #define TX_QUEUE_EXTENSION_CAS_OFFSET_MSB 12
  493. #define TX_QUEUE_EXTENSION_CAS_OFFSET_MASK 0x0000000000001f00
  494. /* Description CAS_INSERTION_ENABLE
  495. single bit used as ENABLE for CAS control insertion for
  496. transmission during SRP window
  497. <legal all>
  498. */
  499. #define TX_QUEUE_EXTENSION_CAS_INSERTION_ENABLE_OFFSET 0x0000000000000028
  500. #define TX_QUEUE_EXTENSION_CAS_INSERTION_ENABLE_LSB 13
  501. #define TX_QUEUE_EXTENSION_CAS_INSERTION_ENABLE_MSB 13
  502. #define TX_QUEUE_EXTENSION_CAS_INSERTION_ENABLE_MASK 0x0000000000002000
  503. /* Description RESERVED_10A
  504. <legal 0>
  505. */
  506. #define TX_QUEUE_EXTENSION_RESERVED_10A_OFFSET 0x0000000000000028
  507. #define TX_QUEUE_EXTENSION_RESERVED_10A_LSB 14
  508. #define TX_QUEUE_EXTENSION_RESERVED_10A_MSB 15
  509. #define TX_QUEUE_EXTENSION_RESERVED_10A_MASK 0x000000000000c000
  510. /* Description HT_CONTROL_OVERWRITE_SOURCE_FOR_SRP
  511. 4-bit index similar to HT_control_overwrite_source field
  512. to be used for transmission during SRP window
  513. <legal all>
  514. */
  515. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_SRP_OFFSET 0x0000000000000028
  516. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_SRP_LSB 16
  517. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_SRP_MSB 19
  518. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_SRP_MASK 0x00000000000f0000
  519. /* Description HT_CONTROL_OVERWRITE_SOURCE_FOR_BSRP
  520. 4-bit index similar to HT_control_overwrite_source field
  521. to be used for response to BSRP triggers (even during SRP
  522. window)
  523. <legal all>
  524. */
  525. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_BSRP_OFFSET 0x0000000000000028
  526. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_BSRP_LSB 20
  527. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_BSRP_MSB 23
  528. #define TX_QUEUE_EXTENSION_HT_CONTROL_OVERWRITE_SOURCE_FOR_BSRP_MASK 0x0000000000f00000
  529. /* Description RESERVED_10B
  530. <legal 0>
  531. */
  532. #define TX_QUEUE_EXTENSION_RESERVED_10B_OFFSET 0x0000000000000028
  533. #define TX_QUEUE_EXTENSION_RESERVED_10B_LSB 24
  534. #define TX_QUEUE_EXTENSION_RESERVED_10B_MSB 29
  535. #define TX_QUEUE_EXTENSION_RESERVED_10B_MASK 0x000000003f000000
  536. /* Description MPDU_HDR_LEN_OVERRIDE_EN
  537. This is for the FW override of MPDU overhead length programmed
  538. in the TQM queue.
  539. If enabled, PDG will update the length of each MPDU by subtracting
  540. the value of field Mpdu_header_length in 'MPDU_QUEUE_OVERVIEW'
  541. and adding Mpdu_hdr_len_override_val (in this TLV).
  542. <legal all>
  543. */
  544. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_EN_OFFSET 0x0000000000000028
  545. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_EN_LSB 30
  546. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_EN_MSB 30
  547. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_EN_MASK 0x0000000040000000
  548. /* Description BAR_SSN_OVERWRITE_ENABLE
  549. If enabled, TXPCU will overwrite the starting sequence number
  550. in case of Tx BAR or MU-BAR Trigger from with the sequence
  551. number from 'MPDU_QUEUE_OVERVIEW'
  552. <legal all>
  553. */
  554. #define TX_QUEUE_EXTENSION_BAR_SSN_OVERWRITE_ENABLE_OFFSET 0x0000000000000028
  555. #define TX_QUEUE_EXTENSION_BAR_SSN_OVERWRITE_ENABLE_LSB 31
  556. #define TX_QUEUE_EXTENSION_BAR_SSN_OVERWRITE_ENABLE_MSB 31
  557. #define TX_QUEUE_EXTENSION_BAR_SSN_OVERWRITE_ENABLE_MASK 0x0000000080000000
  558. /* Description BAR_SSN_OFFSET
  559. Offset to the starting sequence number in case of Tx BAR
  560. or MU-BAR Trigger that TXPCU can overwrite with the sequence
  561. number from 'MPDU_QUEUE_OVERVIEW'
  562. <legal all>
  563. */
  564. #define TX_QUEUE_EXTENSION_BAR_SSN_OFFSET_OFFSET 0x0000000000000028
  565. #define TX_QUEUE_EXTENSION_BAR_SSN_OFFSET_LSB 32
  566. #define TX_QUEUE_EXTENSION_BAR_SSN_OFFSET_MSB 43
  567. #define TX_QUEUE_EXTENSION_BAR_SSN_OFFSET_MASK 0x00000fff00000000
  568. /* Description MPDU_HDR_LEN_OVERRIDE_VAL
  569. This is for the FW override of MPDU overhead length programmed
  570. in the TQM queue.
  571. <legal all>
  572. */
  573. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_VAL_OFFSET 0x0000000000000028
  574. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_VAL_LSB 44
  575. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_VAL_MSB 52
  576. #define TX_QUEUE_EXTENSION_MPDU_HDR_LEN_OVERRIDE_VAL_MASK 0x001ff00000000000
  577. #define TX_QUEUE_EXTENSION_RESERVED_11A_OFFSET 0x0000000000000028
  578. #define TX_QUEUE_EXTENSION_RESERVED_11A_LSB 53
  579. #define TX_QUEUE_EXTENSION_RESERVED_11A_MSB 63
  580. #define TX_QUEUE_EXTENSION_RESERVED_11A_MASK 0xffe0000000000000
  581. /* Description HT_CONTROL_FIELD_BW320
  582. Field used by TXPCU when in TX_MPDU_START TLV field vht_control_present
  583. is set.
  584. Note that TXPCU might overwrite some fields. This is controlled
  585. with field HT_control_overwrite_enable
  586. <legal all>
  587. */
  588. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW320_OFFSET 0x0000000000000030
  589. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW320_LSB 0
  590. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW320_MSB 31
  591. #define TX_QUEUE_EXTENSION_HT_CONTROL_FIELD_BW320_MASK 0x00000000ffffffff
  592. /* Description FW2SW_INFO
  593. This field is provided by FW, to be logged via TXMON to
  594. host SW. It is transparent to HW.
  595. <legal all>
  596. */
  597. #define TX_QUEUE_EXTENSION_FW2SW_INFO_OFFSET 0x0000000000000030
  598. #define TX_QUEUE_EXTENSION_FW2SW_INFO_LSB 32
  599. #define TX_QUEUE_EXTENSION_FW2SW_INFO_MSB 63
  600. #define TX_QUEUE_EXTENSION_FW2SW_INFO_MASK 0xffffffff00000000
  601. #endif // TX_QUEUE_EXTENSION