wbm_release_ring_tx.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047
  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 _WBM_RELEASE_RING_TX_H_
  16. #define _WBM_RELEASE_RING_TX_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #include "tx_rate_stats_info.h"
  20. #include "buffer_addr_info.h"
  21. #define NUM_OF_DWORDS_WBM_RELEASE_RING_TX 8
  22. struct wbm_release_ring_tx {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. struct buffer_addr_info released_buff_or_desc_addr_info;
  25. uint32_t release_source_module : 3, // [2:0]
  26. bm_action : 3, // [5:3]
  27. buffer_or_desc_type : 3, // [8:6]
  28. first_msdu_index : 4, // [12:9]
  29. tqm_release_reason : 4, // [16:13]
  30. rbm_override_valid : 1, // [17:17]
  31. rbm_override : 4, // [21:18]
  32. reserved_2a : 7, // [28:22]
  33. cache_id : 1, // [29:29]
  34. cookie_conversion_status : 1, // [30:30]
  35. wbm_internal_error : 1; // [31:31]
  36. uint32_t tqm_status_number : 24, // [23:0]
  37. transmit_count : 7, // [30:24]
  38. sw_release_details_valid : 1; // [31:31]
  39. uint32_t ack_frame_rssi : 8, // [7:0]
  40. first_msdu : 1, // [8:8]
  41. last_msdu : 1, // [9:9]
  42. fw_tx_notify_frame : 3, // [12:10]
  43. buffer_timestamp : 19; // [31:13]
  44. struct tx_rate_stats_info tx_rate_stats;
  45. uint32_t sw_peer_id : 16, // [15:0]
  46. tid : 4, // [19:16]
  47. tqm_status_number_31_24 : 8, // [27:20]
  48. looping_count : 4; // [31:28]
  49. #else
  50. struct buffer_addr_info released_buff_or_desc_addr_info;
  51. uint32_t wbm_internal_error : 1, // [31:31]
  52. cookie_conversion_status : 1, // [30:30]
  53. cache_id : 1, // [29:29]
  54. reserved_2a : 7, // [28:22]
  55. rbm_override : 4, // [21:18]
  56. rbm_override_valid : 1, // [17:17]
  57. tqm_release_reason : 4, // [16:13]
  58. first_msdu_index : 4, // [12:9]
  59. buffer_or_desc_type : 3, // [8:6]
  60. bm_action : 3, // [5:3]
  61. release_source_module : 3; // [2:0]
  62. uint32_t sw_release_details_valid : 1, // [31:31]
  63. transmit_count : 7, // [30:24]
  64. tqm_status_number : 24; // [23:0]
  65. uint32_t buffer_timestamp : 19, // [31:13]
  66. fw_tx_notify_frame : 3, // [12:10]
  67. last_msdu : 1, // [9:9]
  68. first_msdu : 1, // [8:8]
  69. ack_frame_rssi : 8; // [7:0]
  70. struct tx_rate_stats_info tx_rate_stats;
  71. uint32_t looping_count : 4, // [31:28]
  72. tqm_status_number_31_24 : 8, // [27:20]
  73. tid : 4, // [19:16]
  74. sw_peer_id : 16; // [15:0]
  75. #endif
  76. };
  77. /* Description RELEASED_BUFF_OR_DESC_ADDR_INFO
  78. Consumer: WBM/SW/FW
  79. Producer: SW/TQM/RXDMA/REO/SWITCH
  80. Details of the physical address of the buffer or link descriptor
  81. that is being released. Note that within this descriptor,
  82. WBM will look at the 'owner' of the released buffer/descriptor
  83. and forward it to SW/FW is WBM is not the owner.
  84. */
  85. /* Description BUFFER_ADDR_31_0
  86. Address (lower 32 bits) of the MSDU buffer OR MSDU_EXTENSION
  87. descriptor OR Link Descriptor
  88. In case of 'NULL' pointer, this field is set to 0
  89. <legal all>
  90. */
  91. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
  92. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
  93. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MSB 31
  94. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
  95. /* Description BUFFER_ADDR_39_32
  96. Address (upper 8 bits) of the MSDU buffer OR MSDU_EXTENSION
  97. descriptor OR Link Descriptor
  98. In case of 'NULL' pointer, this field is set to 0
  99. <legal all>
  100. */
  101. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
  102. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
  103. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MSB 7
  104. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
  105. /* Description RETURN_BUFFER_MANAGER
  106. Consumer: WBM
  107. Producer: SW/FW
  108. In case of 'NULL' pointer, this field is set to 0
  109. Indicates to which buffer manager the buffer OR MSDU_EXTENSION
  110. descriptor OR link descriptor that is being pointed to
  111. shall be returned after the frame has been processed. It
  112. is used by WBM for routing purposes.
  113. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  114. to the WMB buffer idle list
  115. <enum 1 WBM_CHIP0_IDLE_DESC_LIST> This buffer shall be returned
  116. to the WBM idle link descriptor idle list, where the chip
  117. 0 WBM is chosen in case of a multi-chip config
  118. <enum 2 WBM_CHIP1_IDLE_DESC_LIST> This buffer shall be returned
  119. to the chip 1 WBM idle link descriptor idle list
  120. <enum 3 WBM_CHIP2_IDLE_DESC_LIST> This buffer shall be returned
  121. to the chip 2 WBM idle link descriptor idle list
  122. <enum 12 WBM_CHIP3_IDLE_DESC_LIST> This buffer shall be
  123. returned to chip 3 WBM idle link descriptor idle list
  124. <enum 4 FW_BM> This buffer shall be returned to the FW
  125. <enum 5 SW0_BM> This buffer shall be returned to the SW,
  126. ring 0
  127. <enum 6 SW1_BM> This buffer shall be returned to the SW,
  128. ring 1
  129. <enum 7 SW2_BM> This buffer shall be returned to the SW,
  130. ring 2
  131. <enum 8 SW3_BM> This buffer shall be returned to the SW,
  132. ring 3
  133. <enum 9 SW4_BM> This buffer shall be returned to the SW,
  134. ring 4
  135. <enum 10 SW5_BM> This buffer shall be returned to the SW,
  136. ring 5
  137. <enum 11 SW6_BM> This buffer shall be returned to the SW,
  138. ring 6
  139. <legal 0-12>
  140. */
  141. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
  142. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
  143. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MSB 11
  144. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000f00
  145. /* Description SW_BUFFER_COOKIE
  146. Cookie field exclusively used by SW.
  147. In case of 'NULL' pointer, this field is set to 0
  148. HW ignores the contents, accept that it passes the programmed
  149. value on to other descriptors together with the physical
  150. address
  151. Field can be used by SW to for example associate the buffers
  152. physical address with the virtual address
  153. The bit definitions as used by SW are within SW HLD specification
  154. NOTE1:
  155. The three most significant bits can have a special meaning
  156. in case this struct is embedded in a TX_MPDU_DETAILS STRUCT,
  157. and field transmit_bw_restriction is set
  158. In case of NON punctured transmission:
  159. Sw_buffer_cookie[19:17] = 3'b000: 20 MHz TX only
  160. Sw_buffer_cookie[19:17] = 3'b001: 40 MHz TX only
  161. Sw_buffer_cookie[19:17] = 3'b010: 80 MHz TX only
  162. Sw_buffer_cookie[19:17] = 3'b011: 160 MHz TX only
  163. Sw_buffer_cookie[19:17] = 3'b101: 240 MHz TX only
  164. Sw_buffer_cookie[19:17] = 3'b100: 320 MHz TX only
  165. Sw_buffer_cookie[19:18] = 2'b11: reserved
  166. In case of punctured transmission:
  167. Sw_buffer_cookie[19:16] = 4'b0000: pattern 0 only
  168. Sw_buffer_cookie[19:16] = 4'b0001: pattern 1 only
  169. Sw_buffer_cookie[19:16] = 4'b0010: pattern 2 only
  170. Sw_buffer_cookie[19:16] = 4'b0011: pattern 3 only
  171. Sw_buffer_cookie[19:16] = 4'b0100: pattern 4 only
  172. Sw_buffer_cookie[19:16] = 4'b0101: pattern 5 only
  173. Sw_buffer_cookie[19:16] = 4'b0110: pattern 6 only
  174. Sw_buffer_cookie[19:16] = 4'b0111: pattern 7 only
  175. Sw_buffer_cookie[19:16] = 4'b1000: pattern 8 only
  176. Sw_buffer_cookie[19:16] = 4'b1001: pattern 9 only
  177. Sw_buffer_cookie[19:16] = 4'b1010: pattern 10 only
  178. Sw_buffer_cookie[19:16] = 4'b1011: pattern 11 only
  179. Sw_buffer_cookie[19:18] = 2'b11: reserved
  180. Note: a punctured transmission is indicated by the presence
  181. of TLV TX_PUNCTURE_SETUP embedded in the scheduler TLV
  182. <legal all>
  183. */
  184. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
  185. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 12
  186. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MSB 31
  187. #define WBM_RELEASE_RING_TX_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff000
  188. /* Description RELEASE_SOURCE_MODULE
  189. Indicates which module initiated the release of this buffer
  190. or descriptor
  191. <enum 1 release_source_RXDMA> DO NOT USE
  192. <enum 2 release_source_REO> DO NOT USE
  193. <enum 5 release_source_FW_RX> DO NOT USE
  194. <enum 4 release_source_SW_RX> DO NOT USE
  195. <enum 0 release_source_TQM> TQM released this buffer or
  196. descriptor
  197. <enum 3 release_source_FW_TX> FW released this buffer or
  198. descriptor
  199. <enum 6 release_source_SW_TX> SW released this buffer or
  200. descriptor
  201. <legal 0-6>
  202. */
  203. #define WBM_RELEASE_RING_TX_RELEASE_SOURCE_MODULE_OFFSET 0x00000008
  204. #define WBM_RELEASE_RING_TX_RELEASE_SOURCE_MODULE_LSB 0
  205. #define WBM_RELEASE_RING_TX_RELEASE_SOURCE_MODULE_MSB 2
  206. #define WBM_RELEASE_RING_TX_RELEASE_SOURCE_MODULE_MASK 0x00000007
  207. /* Description BM_ACTION
  208. Consumer: WBM/SW/FW
  209. Producer: SW/TQM/RXDMA/REO/SWITCH
  210. Field only valid when the field return_buffer_manager in
  211. the Released_buff_or_desc_addr_info indicates:
  212. WBM_IDLE_BUF_LIST or
  213. WBM_IDLE_DESC_LIST
  214. An MSDU extension descriptor shall never be marked as WBM
  215. being the 'owner', and thus WBM will forward it to FW/SW
  216. <enum 0 Put_in_idle_list> Put the buffer or descriptor back
  217. in the idle list. In case of MSDU or MDPU link descriptor,
  218. BM does not need to check to release any individual MSDU
  219. buffers
  220. <enum 1 release_msdu_list > This BM action can only be used
  221. in combination with buffer_or_desc_type being msdu_link_descriptor.
  222. Field first_msdu_index points out which MSDU pointer in
  223. the MSDU link descriptor is the first of an MPDU that is
  224. released.
  225. BM shall release all the MSDU buffers linked to this first
  226. MSDU buffer pointer. All related MSDU buffer pointer entries
  227. shall be set to value 0, which represents the 'NULL" pointer.
  228. When all MSDU buffer pointers in the MSDU link descriptor
  229. are 'NULL', the MSDU link descriptor itself shall also
  230. be released.
  231. <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT IMPLEMENTED....
  232. Put the buffer or descriptor back in the idle list. Only
  233. valid in combination with buffer_or_desc_type indicating
  234. MDPU_link_descriptor.
  235. BM shall release the MPDU link descriptor as well as all
  236. MSDUs that are linked to the MPDUs in this descriptor.
  237. <legal 0-2>
  238. */
  239. #define WBM_RELEASE_RING_TX_BM_ACTION_OFFSET 0x00000008
  240. #define WBM_RELEASE_RING_TX_BM_ACTION_LSB 3
  241. #define WBM_RELEASE_RING_TX_BM_ACTION_MSB 5
  242. #define WBM_RELEASE_RING_TX_BM_ACTION_MASK 0x00000038
  243. /* Description BUFFER_OR_DESC_TYPE
  244. Consumer: WBM/SW/FW
  245. Producer: SW/TQM/RXDMA/REO/SWITCH
  246. Field only valid when WBM is marked as the return_buffer_manager
  247. in the Released_Buffer_address_info
  248. Indicates that type of buffer or descriptor is being released
  249. <enum 0 MSDU_rel_buffer> The address points to an MSDU buffer
  250. <enum 1 msdu_link_descriptor> The address points to an TX
  251. MSDU link descriptor
  252. <enum 2 mpdu_link_descriptor> The address points to an MPDU
  253. link descriptor
  254. <enum 3 msdu_ext_descriptor > The address points to an MSDU
  255. extension descriptor.
  256. In case BM finds this one in a release ring, it passes it
  257. on to FW...
  258. <enum 4 queue_ext_descriptor> The address points to an TQM
  259. queue extension descriptor. WBM should treat this is the
  260. same way as a link descriptor. That is, put the 128 byte
  261. buffer back in the link buffer idle list.
  262. <legal 0-4>
  263. */
  264. #define WBM_RELEASE_RING_TX_BUFFER_OR_DESC_TYPE_OFFSET 0x00000008
  265. #define WBM_RELEASE_RING_TX_BUFFER_OR_DESC_TYPE_LSB 6
  266. #define WBM_RELEASE_RING_TX_BUFFER_OR_DESC_TYPE_MSB 8
  267. #define WBM_RELEASE_RING_TX_BUFFER_OR_DESC_TYPE_MASK 0x000001c0
  268. /* Description FIRST_MSDU_INDEX
  269. Consumer: WBM/SW/FW
  270. Producer: SW/TQM/RXDMA/REO/SWITCH
  271. Field only valid for the bm_action release_msdu_list.
  272. The index of the first MSDU in an MSDU link descriptor all
  273. belonging to the same MPDU.
  274. <legal 0-6>
  275. */
  276. #define WBM_RELEASE_RING_TX_FIRST_MSDU_INDEX_OFFSET 0x00000008
  277. #define WBM_RELEASE_RING_TX_FIRST_MSDU_INDEX_LSB 9
  278. #define WBM_RELEASE_RING_TX_FIRST_MSDU_INDEX_MSB 12
  279. #define WBM_RELEASE_RING_TX_FIRST_MSDU_INDEX_MASK 0x00001e00
  280. /* Description TQM_RELEASE_REASON
  281. Consumer: WBM/SW/FW
  282. Producer: TQM
  283. Field only valid when Release_source_module is set to release_source_TQM
  284. (rr = Release Reason)
  285. <enum 0 tqm_rr_frame_acked> frame is removed because an
  286. ACK of BA for it was received
  287. <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a remove
  288. command of type "Remove_mpdus" initiated by SW
  289. <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a remove
  290. command of type "Remove_transmitted_mpdus" initiated by
  291. SW
  292. <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
  293. remove command of type "Remove_untransmitted_mpdus" initiated
  294. by SW
  295. <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
  296. remove command of type "Remove_aged_mpdus" or "Remove_aged_msdus"
  297. initiated by SW
  298. <enum 5 tqm_fw_reason1> frame is removed because a remove
  299. command where fw indicated that remove reason is fw_reason1
  300. <enum 6 tqm_fw_reason2> frame is removed because a remove
  301. command where fw indicated that remove reason is fw_reason1
  302. <enum 7 tqm_fw_reason3> frame is removed because a remove
  303. command where fw indicated that remove reason is fw_reason1
  304. <enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed because
  305. a remove command of type "remove_mpdus_and_disable_queue"
  306. or "remove_msdus_and_disable_flow" initiated by SW
  307. <enum 9 tqm_rr_rem_cmd_till_nonmatching> frame is removed
  308. because remove command of type "remove_till_nonmatching_mpdu"
  309. initiated by SW
  310. <enum 10 tqm_rr_drop_threshold> frame is dropped at TQM
  311. entrance due to one of slow/medium/hard drop threshold criteria
  312. <enum 11 tqm_rr_link_desc_unavailable> frame is dropped
  313. at TQM entrance due to the WBM2TQM_LINK_RING having fewer
  314. descriptors than a threshold programmed in TQM
  315. <enum 12 tqm_rr_drop_or_invalid_msdu> frame is dropped at
  316. TQM entrance due to 'TQM_Drop_frame' being set or "null"
  317. MSDU flow pointer or MSDU flow pointer 'Flow_valid' being
  318. zero or MSDU length being zero
  319. <enum 13 tqm_rr_multicast_drop> frame is dropped at TQM
  320. entrance due to 'TQM_Drop_frame' being set with 'TCL_drop_reason'
  321. set to TCL_multicast_drop_for_vdev.
  322. <enum 14 tqm_rr_vdev_mismatch_drop> frame is dropped at
  323. TQM entrance due to 'TQM_Drop_frame' being set with 'TCL_drop_reason'
  324. set to TCL_vdev_id_mismatch_drop.
  325. Waikiki v1 and Hamilton v2 used value 12 for this.
  326. <legal 0-14>
  327. */
  328. #define WBM_RELEASE_RING_TX_TQM_RELEASE_REASON_OFFSET 0x00000008
  329. #define WBM_RELEASE_RING_TX_TQM_RELEASE_REASON_LSB 13
  330. #define WBM_RELEASE_RING_TX_TQM_RELEASE_REASON_MSB 16
  331. #define WBM_RELEASE_RING_TX_TQM_RELEASE_REASON_MASK 0x0001e000
  332. /* Description RBM_OVERRIDE_VALID
  333. This is set to 0 for Tx cases not involving reinjection,
  334. and set to 1 for TQM release cases requiring FW reinjection
  335. (HastingsPrime FR54309).
  336. When set to 1, WBM releases the MSDU buffers to FW and overrides
  337. the tx_rate_stats field with words 2 and 3 of the 'TX_MSDU_DETAILS'
  338. structure, for FW reinjection of these MSDUs (HastingsPrime
  339. FR54309).
  340. <legal 0-1>
  341. */
  342. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_VALID_OFFSET 0x00000008
  343. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_VALID_LSB 17
  344. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_VALID_MSB 17
  345. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_VALID_MASK 0x00020000
  346. /* Description RBM_OVERRIDE
  347. Field only valid when rbm_override_valid = 1
  348. WBM releases the MSDU buffers to FW and overrides the tx_rate_stats
  349. field with words 2 and 3 of the 'TX_MSDU_DETAILS' structure,
  350. for FW reinjection of these MSDUs (HastingsPrime FR54309).
  351. In Beryllium, rbm_override gives the 'return_buffer_manager'
  352. and whence the WBM output ring corresponding to the FW reinjection
  353. path.
  354. */
  355. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_OFFSET 0x00000008
  356. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_LSB 18
  357. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_MSB 21
  358. #define WBM_RELEASE_RING_TX_RBM_OVERRIDE_MASK 0x003c0000
  359. /* Description RESERVED_2A
  360. <legal 0>
  361. */
  362. #define WBM_RELEASE_RING_TX_RESERVED_2A_OFFSET 0x00000008
  363. #define WBM_RELEASE_RING_TX_RESERVED_2A_LSB 22
  364. #define WBM_RELEASE_RING_TX_RESERVED_2A_MSB 28
  365. #define WBM_RELEASE_RING_TX_RESERVED_2A_MASK 0x1fc00000
  366. /* Description CACHE_ID
  367. To improve WBM performance, out-of-order completions may
  368. be allowed to process multiple MPDUs in parallel.
  369. The MSDUs released from each cache would be in order so 'First_msdu'
  370. and this field together can be used by SW to reorder the
  371. completions back to the original order by keeping all MSDUs
  372. of an MPDU from one cache together before switching to
  373. the next MPDU (from either cache).
  374. <legal all>
  375. */
  376. #define WBM_RELEASE_RING_TX_CACHE_ID_OFFSET 0x00000008
  377. #define WBM_RELEASE_RING_TX_CACHE_ID_LSB 29
  378. #define WBM_RELEASE_RING_TX_CACHE_ID_MSB 29
  379. #define WBM_RELEASE_RING_TX_CACHE_ID_MASK 0x20000000
  380. /* Description COOKIE_CONVERSION_STATUS
  381. 0: 'Sw_buffer_cookie' not converted to 'Buffer_virt_addr'
  382. 1: 'Sw_buffer_cookie' coverted to 'Buffer_virt_addr'
  383. <legal 0>
  384. */
  385. #define WBM_RELEASE_RING_TX_COOKIE_CONVERSION_STATUS_OFFSET 0x00000008
  386. #define WBM_RELEASE_RING_TX_COOKIE_CONVERSION_STATUS_LSB 30
  387. #define WBM_RELEASE_RING_TX_COOKIE_CONVERSION_STATUS_MSB 30
  388. #define WBM_RELEASE_RING_TX_COOKIE_CONVERSION_STATUS_MASK 0x40000000
  389. /* Description WBM_INTERNAL_ERROR
  390. Can only be set by WBM.
  391. Is set when WBM got a buffer pointer but the action was
  392. to push it to the idle link descriptor ring or do link related
  393. activity
  394. OR
  395. Is set when WBM got a link buffer pointer but the action
  396. was to push it to the buffer descriptor ring
  397. <legal all>
  398. */
  399. #define WBM_RELEASE_RING_TX_WBM_INTERNAL_ERROR_OFFSET 0x00000008
  400. #define WBM_RELEASE_RING_TX_WBM_INTERNAL_ERROR_LSB 31
  401. #define WBM_RELEASE_RING_TX_WBM_INTERNAL_ERROR_MSB 31
  402. #define WBM_RELEASE_RING_TX_WBM_INTERNAL_ERROR_MASK 0x80000000
  403. /* Description TQM_STATUS_NUMBER
  404. Field only valid when Release_source_module is set to release_source_TQM
  405. The value in this field is equal to value of the 'TQM_CMD_Number'
  406. field from the TQM command or the 'TQM_add_cmd_Number' field
  407. from the TQM entrance ring descriptor LSB 24-bits.
  408. This field helps to correlate the statuses with the TQM
  409. commands.
  410. NOTE that SW could program this number to be equal to the
  411. PPDU_ID number in case direct correlation with the PPDU
  412. ID is desired
  413. <legal all>
  414. */
  415. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_OFFSET 0x0000000c
  416. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_LSB 0
  417. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_MSB 23
  418. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_MASK 0x00ffffff
  419. /* Description TRANSMIT_COUNT
  420. Field only valid when Release_source_module is set to release_source_TQM
  421. The number of times this frame has been transmitted
  422. */
  423. #define WBM_RELEASE_RING_TX_TRANSMIT_COUNT_OFFSET 0x0000000c
  424. #define WBM_RELEASE_RING_TX_TRANSMIT_COUNT_LSB 24
  425. #define WBM_RELEASE_RING_TX_TRANSMIT_COUNT_MSB 30
  426. #define WBM_RELEASE_RING_TX_TRANSMIT_COUNT_MASK 0x7f000000
  427. /* Description SW_RELEASE_DETAILS_VALID
  428. Consumer: SW
  429. Producer: WBM
  430. When set, some WBM specific release info for SW is valid.
  431. This is set when WMB got a 'release_msdu_list' command from
  432. TQM and the return buffer manager is not WMB. WBM will
  433. then de-aggregate all the MSDUs and pass them one at a time
  434. on to the 'buffer owner'
  435. <legal all>
  436. */
  437. #define WBM_RELEASE_RING_TX_SW_RELEASE_DETAILS_VALID_OFFSET 0x0000000c
  438. #define WBM_RELEASE_RING_TX_SW_RELEASE_DETAILS_VALID_LSB 31
  439. #define WBM_RELEASE_RING_TX_SW_RELEASE_DETAILS_VALID_MSB 31
  440. #define WBM_RELEASE_RING_TX_SW_RELEASE_DETAILS_VALID_MASK 0x80000000
  441. /* Description ACK_FRAME_RSSI
  442. This field is only valid when the source is TQM.
  443. If this frame is removed as the result of the reception
  444. of an ACK or BA, this field indicates the RSSI of the received
  445. ACK or BA frame.
  446. When the frame is removed as result of a direct remove command
  447. from the SW, this field is set to 0x0 (which is never
  448. a valid value when real RSSI is available)
  449. <legal all>
  450. */
  451. #define WBM_RELEASE_RING_TX_ACK_FRAME_RSSI_OFFSET 0x00000010
  452. #define WBM_RELEASE_RING_TX_ACK_FRAME_RSSI_LSB 0
  453. #define WBM_RELEASE_RING_TX_ACK_FRAME_RSSI_MSB 7
  454. #define WBM_RELEASE_RING_TX_ACK_FRAME_RSSI_MASK 0x000000ff
  455. /* Description FIRST_MSDU
  456. Field only valid when SW_release_details_valid is set.
  457. Consumer: SW
  458. Producer: WBM
  459. When set, this MSDU is the first MSDU pointed to in the 'release_msdu_list'
  460. command.
  461. First_msdu ≠ last_msdu indicates the MSDU was part of
  462. an A-MSDU.
  463. <legal all>
  464. */
  465. #define WBM_RELEASE_RING_TX_FIRST_MSDU_OFFSET 0x00000010
  466. #define WBM_RELEASE_RING_TX_FIRST_MSDU_LSB 8
  467. #define WBM_RELEASE_RING_TX_FIRST_MSDU_MSB 8
  468. #define WBM_RELEASE_RING_TX_FIRST_MSDU_MASK 0x00000100
  469. /* Description LAST_MSDU
  470. Field only valid when SW_release_details_valid is set.
  471. Consumer: SW
  472. Producer: WBM
  473. When set, this MSDU is the last MSDU pointed to in the 'release_msdu_list'
  474. command.
  475. First_msdu ≠ last_msdu indicates the MSDU was part of
  476. an A-MSDU.
  477. <legal all>
  478. */
  479. #define WBM_RELEASE_RING_TX_LAST_MSDU_OFFSET 0x00000010
  480. #define WBM_RELEASE_RING_TX_LAST_MSDU_LSB 9
  481. #define WBM_RELEASE_RING_TX_LAST_MSDU_MSB 9
  482. #define WBM_RELEASE_RING_TX_LAST_MSDU_MASK 0x00000200
  483. /* Description FW_TX_NOTIFY_FRAME
  484. Field only valid when SW_release_details_valid is set.
  485. Consumer: SW
  486. Producer: WBM
  487. This is the FW_tx_notify_frame field from the TX_MSDU_DETAILS
  488. for this frame from the MSDU link descriptor
  489. <legal all>
  490. */
  491. #define WBM_RELEASE_RING_TX_FW_TX_NOTIFY_FRAME_OFFSET 0x00000010
  492. #define WBM_RELEASE_RING_TX_FW_TX_NOTIFY_FRAME_LSB 10
  493. #define WBM_RELEASE_RING_TX_FW_TX_NOTIFY_FRAME_MSB 12
  494. #define WBM_RELEASE_RING_TX_FW_TX_NOTIFY_FRAME_MASK 0x00001c00
  495. /* Description BUFFER_TIMESTAMP
  496. Field only valid when SW_release_details_valid is set.
  497. Consumer: SW
  498. Producer: WBM
  499. This is the Buffer_timestamp field from the TX_MSDU_DETAILS
  500. for this frame from the MSDU link descriptor.
  501. Timestamp in units determined by the UMCMN 'TX_TIMESTAMP_RESOLUTION_SELECT'
  502. register
  503. Waikiki v1 and Hamilton used units of 1024 µs.
  504. <legal all>
  505. */
  506. #define WBM_RELEASE_RING_TX_BUFFER_TIMESTAMP_OFFSET 0x00000010
  507. #define WBM_RELEASE_RING_TX_BUFFER_TIMESTAMP_LSB 13
  508. #define WBM_RELEASE_RING_TX_BUFFER_TIMESTAMP_MSB 31
  509. #define WBM_RELEASE_RING_TX_BUFFER_TIMESTAMP_MASK 0xffffe000
  510. /* Description TX_RATE_STATS
  511. Consumer: TQM/SW
  512. Producer: SW/SCH(from TXPCU, PDG) /WBM (from RXDMA)
  513. Details for command execution tracking purposes.
  514. */
  515. /* Description TX_RATE_STATS_INFO_VALID
  516. When set all other fields in this STRUCT contain valid info.
  517. When clear, none of the other fields contain valid info.
  518. <legal all>
  519. */
  520. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_OFFSET 0x00000014
  521. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_LSB 0
  522. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_MSB 0
  523. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_MASK 0x00000001
  524. /* Description TRANSMIT_BW
  525. Field only valid when Tx_rate_stats_info_valid is set
  526. Indicates the BW of the upcoming transmission that shall
  527. likely start in about 3 -4 us on the medium
  528. <enum 0 20_mhz>20 Mhz BW
  529. <enum 1 40_mhz>40 Mhz BW
  530. <enum 2 80_mhz>80 Mhz BW
  531. <enum 3 160_mhz>160 Mhz BW
  532. <enum 4 320_mhz>320 Mhz BW
  533. <enum 5 240_mhz>240 Mhz BW
  534. */
  535. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_BW_OFFSET 0x00000014
  536. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_BW_LSB 1
  537. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_BW_MSB 3
  538. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_BW_MASK 0x0000000e
  539. /* Description TRANSMIT_PKT_TYPE
  540. Field only valid when Tx_rate_stats_info_valid is set
  541. Field filled in by PDG.
  542. Not valid when in SW transmit mode
  543. The packet type
  544. <enum 0 dot11a>802.11a PPDU type
  545. <enum 1 dot11b>802.11b PPDU type
  546. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  547. <enum 3 dot11ac>802.11ac PPDU type
  548. <enum 4 dot11ax>802.11ax PPDU type
  549. <enum 5 dot11ba>802.11ba (WUR) PPDU type
  550. <enum 6 dot11be>802.11be PPDU type
  551. <enum 7 dot11az>802.11az (ranging) PPDU type
  552. <enum 8 dot11n_gf>802.11n Green Field PPDU type (unsupported
  553. & aborted)
  554. */
  555. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_PKT_TYPE_OFFSET 0x00000014
  556. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_PKT_TYPE_LSB 4
  557. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_PKT_TYPE_MSB 7
  558. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_PKT_TYPE_MASK 0x000000f0
  559. /* Description TRANSMIT_STBC
  560. Field only valid when Tx_rate_stats_info_valid is set
  561. Field filled in by PDG.
  562. Not valid when in SW transmit mode
  563. When set, STBC transmission rate was used.
  564. */
  565. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_STBC_OFFSET 0x00000014
  566. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_STBC_LSB 8
  567. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_STBC_MSB 8
  568. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_STBC_MASK 0x00000100
  569. /* Description TRANSMIT_LDPC
  570. Field only valid when Tx_rate_stats_info_valid is set
  571. Field filled in by PDG.
  572. Not valid when in SW transmit mode
  573. When set, use LDPC transmission rates
  574. */
  575. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_LDPC_OFFSET 0x00000014
  576. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_LDPC_LSB 9
  577. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_LDPC_MSB 9
  578. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_LDPC_MASK 0x00000200
  579. /* Description TRANSMIT_SGI
  580. Field only valid when Tx_rate_stats_info_valid is set
  581. Field filled in by PDG.
  582. Not valid when in SW transmit mode
  583. Specify the right GI for HE-Ranging NDPs (11az)/Short NDP.
  584. <enum 0 0_8_us_sgi > Legacy normal GI. Can also be used
  585. for HE
  586. <enum 1 0_4_us_sgi > Legacy short GI. Can also be used
  587. for HE
  588. <enum 2 1_6_us_sgi > HE related GI
  589. <enum 3 3_2_us_sgi > HE related GI
  590. <legal 0 - 3>
  591. */
  592. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_SGI_OFFSET 0x00000014
  593. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_SGI_LSB 10
  594. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_SGI_MSB 11
  595. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_SGI_MASK 0x00000c00
  596. /* Description TRANSMIT_MCS
  597. Field only valid when Tx_rate_stats_info_valid is set
  598. Field filled in by PDG.
  599. Not valid when in SW transmit mode
  600. For details, refer to MCS_TYPE description
  601. <legal all>
  602. */
  603. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_MCS_OFFSET 0x00000014
  604. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_MCS_LSB 12
  605. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_MCS_MSB 15
  606. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TRANSMIT_MCS_MASK 0x0000f000
  607. /* Description OFDMA_TRANSMISSION
  608. Field only valid when Tx_rate_stats_info_valid is set
  609. Field filled in by PDG.
  610. Set when the transmission was an OFDMA transmission (DL
  611. or UL).
  612. <legal all>
  613. */
  614. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_OFDMA_TRANSMISSION_OFFSET 0x00000014
  615. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_OFDMA_TRANSMISSION_LSB 16
  616. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_OFDMA_TRANSMISSION_MSB 16
  617. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_OFDMA_TRANSMISSION_MASK 0x00010000
  618. /* Description TONES_IN_RU
  619. Field only valid when Tx_rate_stats_info_valid is set
  620. Field filled in by PDG.
  621. Not valid when in SW transmit mode
  622. The number of tones in the RU used.
  623. <legal all>
  624. */
  625. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TONES_IN_RU_OFFSET 0x00000014
  626. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TONES_IN_RU_LSB 17
  627. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TONES_IN_RU_MSB 28
  628. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_TONES_IN_RU_MASK 0x1ffe0000
  629. /* Description RESERVED_0A
  630. <legal 0>
  631. */
  632. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_RESERVED_0A_OFFSET 0x00000014
  633. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_RESERVED_0A_LSB 29
  634. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_RESERVED_0A_MSB 31
  635. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_RESERVED_0A_MASK 0xe0000000
  636. /* Description PPDU_TRANSMISSION_TSF
  637. Field only valid when Tx_rate_stats_info_valid is set
  638. Based on a HWSCH configuration register setting, this field
  639. either contains:
  640. Lower 32 bits of the TSF, snapshot of this value when transmission
  641. of the PPDU containing the frame finished.
  642. OR
  643. Lower 32 bits of the TSF, snapshot of this value when transmission
  644. of the PPDU containing the frame started
  645. <legal all>
  646. */
  647. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_OFFSET 0x00000018
  648. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_LSB 0
  649. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_MSB 31
  650. #define WBM_RELEASE_RING_TX_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_MASK 0xffffffff
  651. /* Description SW_PEER_ID
  652. Field only valid when Release_source_module is set to release_source_TQM
  653. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  654. not fetched and hence sw_peer_id and tid = 0
  655. buffer_or_desc_type = e_num 0 MSDU_rel_buffertqm_release_reason
  656. = e_num 1 tqm_rr_rem_cmd_rem
  657. 2) Release of msdu buffer due to Flow is not fetched and
  658. hence sw_peer_id and tid = 0
  659. buffer_or_desc_type = e_num 0 MSDU_rel_buffertqm_release_reason
  660. = e_num 1 tqm_rr_rem_cmd_rem
  661. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  662. command.
  663. buffer_or_desc_type = e_num1 msdu_link_descriptortqm_release_reason
  664. can be:e_num 1 tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  665. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged (this
  666. e_num is used for REMOVE_MPDU as well as REMOVE_MSDU).
  667. Sw_peer_id from the TX_MSDU_FLOW descriptor or TX_MPDU_QUEUE
  668. descriptor
  669. <legal all>
  670. */
  671. #define WBM_RELEASE_RING_TX_SW_PEER_ID_OFFSET 0x0000001c
  672. #define WBM_RELEASE_RING_TX_SW_PEER_ID_LSB 0
  673. #define WBM_RELEASE_RING_TX_SW_PEER_ID_MSB 15
  674. #define WBM_RELEASE_RING_TX_SW_PEER_ID_MASK 0x0000ffff
  675. /* Description TID
  676. Field only valid when Release_source_module is set to release_source_TQM
  677. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  678. not fetched and hence sw_peer_id and tid = 0
  679. buffer_or_desc_type = e_num 0 MSDU_rel_buffertqm_release_reason
  680. = e_num 1 tqm_rr_rem_cmd_rem
  681. 2) Release of msdu buffer due to Flow is not fetched and
  682. hence sw_peer_id and tid = 0
  683. buffer_or_desc_type = e_num 0 MSDU_rel_buffertqm_release_reason
  684. = e_num 1 tqm_rr_rem_cmd_rem
  685. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  686. command.
  687. buffer_or_desc_type = e_num1 msdu_link_descriptortqm_release_reason
  688. can be:e_num 1 tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  689. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged (this
  690. e_num is used for REMOVE_MPDU as well as REMOVE_MSDU).
  691. This field represents the TID from the TX_MSDU_FLOW descriptor
  692. or TX_MPDU_QUEUE descriptor
  693. <legal all>
  694. */
  695. #define WBM_RELEASE_RING_TX_TID_OFFSET 0x0000001c
  696. #define WBM_RELEASE_RING_TX_TID_LSB 16
  697. #define WBM_RELEASE_RING_TX_TID_MSB 19
  698. #define WBM_RELEASE_RING_TX_TID_MASK 0x000f0000
  699. /* Description TQM_STATUS_NUMBER_31_24
  700. Field only valid when Release_source_module is set to release_source_TQM
  701. The value in this field is equal to value of the 'TQM_CMD_Number'
  702. field from the TQM command or the 'TQM_add_cmd_Number' field
  703. from the TQM entrance ring descriptor MSB 8-bits.
  704. This field helps to correlate the statuses with the TQM
  705. commands.
  706. <legal all>
  707. */
  708. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_31_24_OFFSET 0x0000001c
  709. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_31_24_LSB 20
  710. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_31_24_MSB 27
  711. #define WBM_RELEASE_RING_TX_TQM_STATUS_NUMBER_31_24_MASK 0x0ff00000
  712. /* Description LOOPING_COUNT
  713. Consumer: WBM/SW/FW
  714. Producer: SW/TQM/RXDMA/REO/SWITCH
  715. If WBM_internal_error is set, this descriptor is sent to
  716. the dedicated 'WBM_ERROR_RELEASE' ring and Looping_count
  717. is used to indicate an error code.
  718. The values reported are documented further in the WBM MLD
  719. doc.
  720. If WBM_internal_error is not set, the following holds.
  721. A count value that indicates the number of times the producer
  722. of entries into the Buffer Manager Ring has looped around
  723. the ring.
  724. At initialization time, this value is set to 0. On the first
  725. loop, this value is set to 1. After the max value is reached
  726. allowed by the number of bits for this field, the count
  727. value continues with 0 again.
  728. In case SW is the consumer of the ring entries, it can use
  729. this field to figure out up to where the producer of entries
  730. has created new entries. This eliminates the need to check
  731. where the "head pointer' of the ring is located once the
  732. SW starts processing an interrupt indicating that new entries
  733. have been put into this ring...
  734. Also note that SW if it wants only needs to look at the
  735. LSB bit of this count value.
  736. <legal all>
  737. */
  738. #define WBM_RELEASE_RING_TX_LOOPING_COUNT_OFFSET 0x0000001c
  739. #define WBM_RELEASE_RING_TX_LOOPING_COUNT_LSB 28
  740. #define WBM_RELEASE_RING_TX_LOOPING_COUNT_MSB 31
  741. #define WBM_RELEASE_RING_TX_LOOPING_COUNT_MASK 0xf0000000
  742. #endif // WBM_RELEASE_RING_TX