wbm2sw_completion_ring_rx.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  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 _WBM2SW_COMPLETION_RING_RX_H_
  17. #define _WBM2SW_COMPLETION_RING_RX_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "rx_msdu_desc_info.h"
  21. #include "rx_mpdu_desc_info.h"
  22. #define NUM_OF_DWORDS_WBM2SW_COMPLETION_RING_RX 8
  23. struct wbm2sw_completion_ring_rx {
  24. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  25. uint32_t buffer_virt_addr_31_0 : 32; // [31:0]
  26. uint32_t buffer_virt_addr_63_32 : 32; // [31:0]
  27. uint32_t release_source_module : 3, // [2:0]
  28. bm_action : 3, // [5:3]
  29. buffer_or_desc_type : 3, // [8:6]
  30. return_buffer_manager : 4, // [12:9]
  31. reserved_2a : 2, // [14:13]
  32. cache_id : 1, // [15:15]
  33. cookie_conversion_status : 1, // [16:16]
  34. rxdma_push_reason : 2, // [18:17]
  35. rxdma_error_code : 5, // [23:19]
  36. reo_push_reason : 2, // [25:24]
  37. reo_error_code : 5, // [30:26]
  38. wbm_internal_error : 1; // [31:31]
  39. struct rx_mpdu_desc_info rx_mpdu_desc_info_details;
  40. struct rx_msdu_desc_info rx_msdu_desc_info_details;
  41. uint32_t buffer_phys_addr_31_0 : 32; // [31:0]
  42. uint32_t buffer_phys_addr_39_32 : 8, // [7:0]
  43. sw_buffer_cookie : 20, // [27:8]
  44. looping_count : 4; // [31:28]
  45. #else
  46. uint32_t buffer_virt_addr_31_0 : 32; // [31:0]
  47. uint32_t buffer_virt_addr_63_32 : 32; // [31:0]
  48. uint32_t wbm_internal_error : 1, // [31:31]
  49. reo_error_code : 5, // [30:26]
  50. reo_push_reason : 2, // [25:24]
  51. rxdma_error_code : 5, // [23:19]
  52. rxdma_push_reason : 2, // [18:17]
  53. cookie_conversion_status : 1, // [16:16]
  54. cache_id : 1, // [15:15]
  55. reserved_2a : 2, // [14:13]
  56. return_buffer_manager : 4, // [12:9]
  57. buffer_or_desc_type : 3, // [8:6]
  58. bm_action : 3, // [5:3]
  59. release_source_module : 3; // [2:0]
  60. struct rx_mpdu_desc_info rx_mpdu_desc_info_details;
  61. struct rx_msdu_desc_info rx_msdu_desc_info_details;
  62. uint32_t buffer_phys_addr_31_0 : 32; // [31:0]
  63. uint32_t looping_count : 4, // [31:28]
  64. sw_buffer_cookie : 20, // [27:8]
  65. buffer_phys_addr_39_32 : 8; // [7:0]
  66. #endif
  67. };
  68. /* Description BUFFER_VIRT_ADDR_31_0
  69. Lower 32 bits of the 64-bit virtual address corresponding
  70. to the MSDU being released
  71. <legal all>
  72. */
  73. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_31_0_OFFSET 0x00000000
  74. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_31_0_LSB 0
  75. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_31_0_MSB 31
  76. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_31_0_MASK 0xffffffff
  77. /* Description BUFFER_VIRT_ADDR_63_32
  78. Upper 32 bits of the 64-bit virtual address corresponding
  79. to the MSDU being released
  80. <legal all>
  81. */
  82. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_63_32_OFFSET 0x00000004
  83. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_63_32_LSB 0
  84. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_63_32_MSB 31
  85. #define WBM2SW_COMPLETION_RING_RX_BUFFER_VIRT_ADDR_63_32_MASK 0xffffffff
  86. /* Description RELEASE_SOURCE_MODULE
  87. Indicates which module initiated the release of this buffer
  88. or descriptor
  89. <enum 1 release_source_RXDMA> RXDMA released this buffer
  90. or descriptor
  91. <enum 2 release_source_REO> REO released this buffer or
  92. descriptor
  93. <enum 5 release_source_FW_RX> FW released this buffer or
  94. descriptor
  95. <enum 4 release_source_SW_RX> SW released this buffer or
  96. descriptor
  97. <enum 0 release_source_TQM> DO NOT USE
  98. <enum 3 release_source_FW_TX> DO NOT USE
  99. <enum 6 release_source_SW_TX> DO NOT USE
  100. <legal 0-6>
  101. */
  102. #define WBM2SW_COMPLETION_RING_RX_RELEASE_SOURCE_MODULE_OFFSET 0x00000008
  103. #define WBM2SW_COMPLETION_RING_RX_RELEASE_SOURCE_MODULE_LSB 0
  104. #define WBM2SW_COMPLETION_RING_RX_RELEASE_SOURCE_MODULE_MSB 2
  105. #define WBM2SW_COMPLETION_RING_RX_RELEASE_SOURCE_MODULE_MASK 0x00000007
  106. /* Description BM_ACTION
  107. Consumer: WBM/SW/FW
  108. Producer: SW/TQM/RXDMA/REO/SWITCH
  109. Field only valid when the field return_buffer_manager in
  110. the Released_buff_or_desc_addr_info indicates:
  111. WBM_IDLE_BUF_LIST or
  112. WBM_IDLE_DESC_LIST
  113. An MSDU extension descriptor shall never be marked as WBM
  114. being the 'owner', and thus WBM will forward it to FW/SW
  115. <enum 0 Put_in_idle_list> Put the buffer or descriptor back
  116. in the idle list. In case of MSDU or MDPU link descriptor,
  117. BM does not need to check to release any individual MSDU
  118. buffers
  119. <enum 1 release_msdu_list > This BM action can only be used
  120. in combination with buffer_or_desc_type being msdu_link_descriptor.
  121. Field first_msdu_index points out which MSDU pointer in
  122. the MSDU link descriptor is the first of an MPDU that is
  123. released.
  124. BM shall release all the MSDU buffers linked to this first
  125. MSDU buffer pointer. All related MSDU buffer pointer entries
  126. shall be set to value 0, which represents the 'NULL" pointer.
  127. When all MSDU buffer pointers in the MSDU link descriptor
  128. are 'NULL', the MSDU link descriptor itself shall also
  129. be released.
  130. <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT IMPLEMENTED....
  131. Put the buffer or descriptor back in the idle list. Only
  132. valid in combination with buffer_or_desc_type indicating
  133. MDPU_link_descriptor.
  134. BM shall release the MPDU link descriptor as well as all
  135. MSDUs that are linked to the MPDUs in this descriptor.
  136. TODO: Any restrictions?
  137. <legal 0-2>
  138. */
  139. #define WBM2SW_COMPLETION_RING_RX_BM_ACTION_OFFSET 0x00000008
  140. #define WBM2SW_COMPLETION_RING_RX_BM_ACTION_LSB 3
  141. #define WBM2SW_COMPLETION_RING_RX_BM_ACTION_MSB 5
  142. #define WBM2SW_COMPLETION_RING_RX_BM_ACTION_MASK 0x00000038
  143. /* Description BUFFER_OR_DESC_TYPE
  144. Consumer: WBM/SW/FW
  145. Producer: SW/TQM/RXDMA/REO/SWITCH
  146. Field only valid when WBM is marked as the return_buffer_manager
  147. in the Released_Buffer_address_info
  148. Indicates that type of buffer or descriptor is being released
  149. <enum 0 MSDU_rel_buffer> The address points to an MSDU buffer
  150. <enum 1 msdu_link_descriptor> The address points to an TX
  151. MSDU link descriptor
  152. <enum 2 mpdu_link_descriptor> The address points to an MPDU
  153. link descriptor
  154. <enum 3 msdu_ext_descriptor > The address points to an MSDU
  155. extension descriptor.
  156. In case BM finds this one in a release ring, it passes it
  157. on to FW...
  158. <enum 4 queue_ext_descriptor> The address points to an TQM
  159. queue extension descriptor. WBM should treat this is the
  160. same way as a link descriptor. That is, put the 128 byte
  161. buffer back in the link buffer idle list.
  162. TODO: Any restrictions?
  163. <legal 0-4>
  164. */
  165. #define WBM2SW_COMPLETION_RING_RX_BUFFER_OR_DESC_TYPE_OFFSET 0x00000008
  166. #define WBM2SW_COMPLETION_RING_RX_BUFFER_OR_DESC_TYPE_LSB 6
  167. #define WBM2SW_COMPLETION_RING_RX_BUFFER_OR_DESC_TYPE_MSB 8
  168. #define WBM2SW_COMPLETION_RING_RX_BUFFER_OR_DESC_TYPE_MASK 0x000001c0
  169. /* Description RETURN_BUFFER_MANAGER
  170. 'Return_buffer_manager' field of the MSDU's buffer address
  171. info, for debug
  172. */
  173. #define WBM2SW_COMPLETION_RING_RX_RETURN_BUFFER_MANAGER_OFFSET 0x00000008
  174. #define WBM2SW_COMPLETION_RING_RX_RETURN_BUFFER_MANAGER_LSB 9
  175. #define WBM2SW_COMPLETION_RING_RX_RETURN_BUFFER_MANAGER_MSB 12
  176. #define WBM2SW_COMPLETION_RING_RX_RETURN_BUFFER_MANAGER_MASK 0x00001e00
  177. /* Description RESERVED_2A
  178. <legal 0>
  179. */
  180. #define WBM2SW_COMPLETION_RING_RX_RESERVED_2A_OFFSET 0x00000008
  181. #define WBM2SW_COMPLETION_RING_RX_RESERVED_2A_LSB 13
  182. #define WBM2SW_COMPLETION_RING_RX_RESERVED_2A_MSB 14
  183. #define WBM2SW_COMPLETION_RING_RX_RESERVED_2A_MASK 0x00006000
  184. /* Description CACHE_ID
  185. Indicates the WBM cache the MSDU was released from
  186. <legal all>
  187. */
  188. #define WBM2SW_COMPLETION_RING_RX_CACHE_ID_OFFSET 0x00000008
  189. #define WBM2SW_COMPLETION_RING_RX_CACHE_ID_LSB 15
  190. #define WBM2SW_COMPLETION_RING_RX_CACHE_ID_MSB 15
  191. #define WBM2SW_COMPLETION_RING_RX_CACHE_ID_MASK 0x00008000
  192. /* Description COOKIE_CONVERSION_STATUS
  193. 0: 'Sw_buffer_cookie' not converted to 'Buffer_virt_addr'
  194. 1: 'Sw_buffer_cookie' coverted to 'Buffer_virt_addr'
  195. <legal 1>
  196. */
  197. #define WBM2SW_COMPLETION_RING_RX_COOKIE_CONVERSION_STATUS_OFFSET 0x00000008
  198. #define WBM2SW_COMPLETION_RING_RX_COOKIE_CONVERSION_STATUS_LSB 16
  199. #define WBM2SW_COMPLETION_RING_RX_COOKIE_CONVERSION_STATUS_MSB 16
  200. #define WBM2SW_COMPLETION_RING_RX_COOKIE_CONVERSION_STATUS_MASK 0x00010000
  201. /* Description RXDMA_PUSH_REASON
  202. Field only valid when Release_source_module is set to release_source_RXDMA
  203. Indicates why rxdma pushed the frame to this ring
  204. <enum 0 rxdma_error_detected> RXDMA detected an error an
  205. pushed this frame to this queue
  206. <enum 1 rxdma_routing_instruction> RXDMA pushed the frame
  207. to this queue per received routing instructions. No error
  208. within RXDMA was detected
  209. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  210. result the MSDU link descriptor might not have the "last_msdu_in_mpdu_flag"
  211. set, but instead WBM might just see a NULL pointer in the
  212. MSDU link descriptor. This is to be considered a normal
  213. condition for this scenario.
  214. <legal 0 - 2>
  215. */
  216. #define WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_OFFSET 0x00000008
  217. #define WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_LSB 17
  218. #define WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_MSB 18
  219. #define WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_MASK 0x00060000
  220. #define WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_OFFSET 0x00000008
  221. #define WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_LSB 19
  222. #define WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_MSB 23
  223. #define WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_MASK 0x00f80000
  224. /* Description REO_PUSH_REASON
  225. Field only valid when Release_source_module is set to release_source_REO
  226. Indicates why REO pushed the frame to this release ring
  227. <enum 0 reo_error_detected> Reo detected an error an pushed
  228. this frame to this queue
  229. <enum 1 reo_routing_instruction> Reo pushed the frame to
  230. this queue per received routing instructions. No error
  231. within REO was detected
  232. <legal 0 - 1>
  233. */
  234. #define WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_OFFSET 0x00000008
  235. #define WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_LSB 24
  236. #define WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_MSB 25
  237. #define WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_MASK 0x03000000
  238. /* Description REO_ERROR_CODE
  239. Field only valid when 'Reo_push_reason' set to 'reo_error_detected'.
  240. <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor provided
  241. in the REO_ENTRANCE ring is set to 0
  242. <enum 1 reo_queue_desc_not_valid> Reo queue descriptor valid
  243. bit is NOT set
  244. <enum 2 ampdu_in_non_ba> AMPDU frame received without BA
  245. session having been setup.
  246. <enum 3 non_ba_duplicate> Non-BA session, SN equal to SSN,
  247. Retry bit set: duplicate frame
  248. <enum 4 ba_duplicate> BA session, duplicate frame
  249. <enum 5 regular_frame_2k_jump> A normal (management/data
  250. frame) received with 2K jump in SN
  251. <enum 6 bar_frame_2k_jump> A bar received with 2K jump in
  252. SSN
  253. <enum 7 regular_frame_OOR> A normal (management/data frame)
  254. received with SN falling within the OOR window
  255. <enum 8 bar_frame_OOR> A bar received with SSN falling within
  256. the OOR window
  257. <enum 9 bar_frame_no_ba_session> A bar received without
  258. a BA session
  259. <enum 10 bar_frame_sn_equals_ssn> A bar received with SSN
  260. equal to SN
  261. <enum 11 pn_check_failed> PN Check Failed packet.
  262. <enum 12 2k_error_handling_flag_set> Frame is forwarded
  263. as a result of the 'Seq_2k_error_detected_flag' been set
  264. in the REO Queue descriptor
  265. <enum 13 pn_error_handling_flag_set> Frame is forwarded
  266. as a result of the 'pn_error_detected_flag' been set in
  267. the REO Queue descriptor
  268. <enum 14 queue_descriptor_blocked_set> Frame is forwarded
  269. as a result of the queue descriptor(address) being blocked
  270. as SW/FW seems to be currently in the process of making
  271. updates to this descriptor...
  272. <legal 0-14>
  273. */
  274. #define WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_OFFSET 0x00000008
  275. #define WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_LSB 26
  276. #define WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_MSB 30
  277. #define WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_MASK 0x7c000000
  278. /* Description WBM_INTERNAL_ERROR
  279. Can only be set by WBM.
  280. Is set when WBM got a buffer pointer but the action was
  281. to push it to the idle link descriptor ring or do link related
  282. activity
  283. OR
  284. Is set when WBM got a link buffer pointer but the action
  285. was to push it to the buffer descriptor ring
  286. <legal all>
  287. */
  288. #define WBM2SW_COMPLETION_RING_RX_WBM_INTERNAL_ERROR_OFFSET 0x00000008
  289. #define WBM2SW_COMPLETION_RING_RX_WBM_INTERNAL_ERROR_LSB 31
  290. #define WBM2SW_COMPLETION_RING_RX_WBM_INTERNAL_ERROR_MSB 31
  291. #define WBM2SW_COMPLETION_RING_RX_WBM_INTERNAL_ERROR_MASK 0x80000000
  292. /* Description RX_MPDU_DESC_INFO_DETAILS
  293. Consumer: REO/SW/FW
  294. Producer: RXDMA
  295. General information related to the MPDU whose link descriptors
  296. are being released from Rx DMA or REO
  297. */
  298. /* Description MSDU_COUNT
  299. Consumer: REO/SW/FW
  300. Producer: RXDMA
  301. The number of MSDUs within the MPDU
  302. <legal all>
  303. */
  304. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_OFFSET 0x0000000c
  305. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_LSB 0
  306. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_MSB 7
  307. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_MASK 0x000000ff
  308. /* Description FRAGMENT_FLAG
  309. Consumer: REO/SW/FW
  310. Producer: RXDMA
  311. When set, this MPDU is a fragment and REO should forward
  312. this fragment MPDU to the REO destination ring without
  313. any reorder checks, pn checks or bitmap update. This implies
  314. that REO is forwarding the pointer to the MSDU link descriptor.
  315. The destination ring is coming from a programmable register
  316. setting in REO
  317. <legal all>
  318. */
  319. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_OFFSET 0x0000000c
  320. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_LSB 8
  321. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_MSB 8
  322. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_MASK 0x00000100
  323. /* Description MPDU_RETRY_BIT
  324. Consumer: REO/SW/FW
  325. Producer: RXDMA
  326. The retry bit setting from the MPDU header of the received
  327. frame
  328. <legal all>
  329. */
  330. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_OFFSET 0x0000000c
  331. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_LSB 9
  332. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_MSB 9
  333. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_MASK 0x00000200
  334. /* Description AMPDU_FLAG
  335. Consumer: REO/SW/FW
  336. Producer: RXDMA
  337. When set, the MPDU was received as part of an A-MPDU.
  338. <legal all>
  339. */
  340. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_OFFSET 0x0000000c
  341. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_LSB 10
  342. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_MSB 10
  343. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_MASK 0x00000400
  344. /* Description BAR_FRAME
  345. Consumer: REO/SW/FW
  346. Producer: RXDMA
  347. When set, the received frame is a BAR frame. After processing,
  348. this frame shall be pushed to SW or deleted.
  349. <legal all>
  350. */
  351. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_OFFSET 0x0000000c
  352. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_LSB 11
  353. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_MSB 11
  354. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_MASK 0x00000800
  355. /* Description PN_FIELDS_CONTAIN_VALID_INFO
  356. Consumer: REO/SW/FW
  357. Producer: RXDMA
  358. Copied here by RXDMA from RX_MPDU_END
  359. When not set, REO will Not perform a PN sequence number
  360. check
  361. */
  362. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x0000000c
  363. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_LSB 12
  364. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_MSB 12
  365. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x00001000
  366. /* Description RAW_MPDU
  367. Field only valid when first_msdu_in_mpdu_flag is set.
  368. When set, the contents in the MSDU buffer contains a 'RAW'
  369. MPDU. This 'RAW' MPDU might be spread out over multiple
  370. MSDU buffers.
  371. <legal all>
  372. */
  373. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_OFFSET 0x0000000c
  374. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_LSB 13
  375. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_MSB 13
  376. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_MASK 0x00002000
  377. /* Description MORE_FRAGMENT_FLAG
  378. The More Fragment bit setting from the MPDU header of the
  379. received frame
  380. <legal all>
  381. */
  382. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_OFFSET 0x0000000c
  383. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_LSB 14
  384. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_MSB 14
  385. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_MASK 0x00004000
  386. /* Description SRC_INFO
  387. Source (virtual) device/interface info. associated with
  388. this peer
  389. This field gets passed on by REO to PPE in the EDMA descriptor
  390. ('REO_TO_PPE_RING').
  391. <legal all>
  392. */
  393. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_OFFSET 0x0000000c
  394. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_LSB 15
  395. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_MSB 26
  396. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_MASK 0x07ff8000
  397. /* Description MPDU_QOS_CONTROL_VALID
  398. When set, the MPDU has a QoS control field.
  399. In case of ndp or phy_err, this field will never be set.
  400. <legal all>
  401. */
  402. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_OFFSET 0x0000000c
  403. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_LSB 27
  404. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_MSB 27
  405. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_MASK 0x08000000
  406. /* Description TID
  407. Field only valid when mpdu_qos_control_valid is set
  408. The TID field in the QoS control field
  409. <legal all>
  410. */
  411. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_TID_OFFSET 0x0000000c
  412. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_TID_LSB 28
  413. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_TID_MSB 31
  414. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_TID_MASK 0xf0000000
  415. /* Description PEER_META_DATA
  416. Meta data that SW has programmed in the Peer table entry
  417. of the transmitting STA.
  418. <legal all>
  419. */
  420. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_OFFSET 0x00000010
  421. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_LSB 0
  422. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_MSB 31
  423. #define WBM2SW_COMPLETION_RING_RX_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_MASK 0xffffffff
  424. /* Description RX_MSDU_DESC_INFO_DETAILS
  425. Consumer: TQM/SW
  426. Producer: SW/SCH(from TXPCU, PDG) /WBM (from RXDMA)
  427. In case of RXDMA or REO releasing Rx MSDU link descriptors,'
  428. WBM fills this field with Rx_msdu_desc_info_details when
  429. releasing the MSDUs to SW.
  430. */
  431. /* Description FIRST_MSDU_IN_MPDU_FLAG
  432. Parsed from RX_MSDU_END TLV . In the case MSDU spans over
  433. multiple buffers, this field will be valid in the Last
  434. buffer used by the MSDU
  435. <enum 0 Not_first_msdu> This is not the first MSDU in the
  436. MPDU.
  437. <enum 1 first_msdu> This MSDU is the first one in the MPDU.
  438. <legal all>
  439. */
  440. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000014
  441. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_LSB 0
  442. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_MSB 0
  443. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FIRST_MSDU_IN_MPDU_FLAG_MASK 0x00000001
  444. /* Description LAST_MSDU_IN_MPDU_FLAG
  445. Consumer: WBM/REO/SW/FW
  446. Producer: RXDMA
  447. Parsed from RX_MSDU_END TLV . In the case MSDU spans over
  448. multiple buffers, this field will be valid in the Last
  449. buffer used by the MSDU
  450. <enum 0 Not_last_msdu> There are more MSDUs linked to this
  451. MSDU that belongs to this MPDU
  452. <enum 1 Last_msdu> this MSDU is the last one in the MPDU.
  453. This setting is only allowed in combination with 'Msdu_continuation'
  454. set to 0. This implies that when an msdu is spread out over
  455. multiple buffers and thus msdu_continuation is set, only
  456. for the very last buffer of the msdu, can the 'last_msdu_in_mpdu_flag'
  457. be set.
  458. When both first_msdu_in_mpdu_flag and last_msdu_in_mpdu_flag
  459. are set, the MPDU that this MSDU belongs to only contains
  460. a single MSDU.
  461. <legal all>
  462. */
  463. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000014
  464. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_LSB 1
  465. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_MSB 1
  466. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_LAST_MSDU_IN_MPDU_FLAG_MASK 0x00000002
  467. /* Description MSDU_CONTINUATION
  468. When set, this MSDU buffer was not able to hold the entire
  469. MSDU. The next buffer will therefor contain additional
  470. information related to this MSDU.
  471. <legal all>
  472. */
  473. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_OFFSET 0x00000014
  474. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_LSB 2
  475. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_MSB 2
  476. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_CONTINUATION_MASK 0x00000004
  477. /* Description MSDU_LENGTH
  478. Parsed from RX_MSDU_START TLV . In the case MSDU spans over
  479. multiple buffers, this field will be valid in the First
  480. buffer used by MSDU.
  481. Full MSDU length in bytes after decapsulation.
  482. This field is still valid for MPDU frames without A-MSDU.
  483. It still represents MSDU length after decapsulation
  484. Or in case of RAW MPDUs, it indicates the length of the
  485. entire MPDU (without FCS field)
  486. <legal all>
  487. */
  488. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_OFFSET 0x00000014
  489. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_LSB 3
  490. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_MSB 16
  491. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_LENGTH_MASK 0x0001fff8
  492. /* Description MSDU_DROP
  493. Parsed from RX_MSDU_END TLV . In the case MSDU spans over
  494. multiple buffers, this field will be valid in the Last
  495. buffer used by the MSDU
  496. When set, REO shall drop this MSDU and not forward it to
  497. any other ring...
  498. <legal all>
  499. */
  500. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_OFFSET 0x00000014
  501. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_LSB 17
  502. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_MSB 17
  503. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_MSDU_DROP_MASK 0x00020000
  504. /* Description SA_IS_VALID
  505. Parsed from RX_MSDU_END TLV . In the case MSDU spans over
  506. multiple buffers, this field will be valid in the Last
  507. buffer used by the MSDU
  508. Indicates that OLE found a valid SA entry for this MSDU
  509. <legal all>
  510. */
  511. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_OFFSET 0x00000014
  512. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_LSB 18
  513. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_MSB 18
  514. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_SA_IS_VALID_MASK 0x00040000
  515. /* Description DA_IS_VALID
  516. Parsed from RX_MSDU_END TLV . In the case MSDU spans over
  517. multiple buffers, this field will be valid in the Last
  518. buffer used by the MSDU
  519. Indicates that OLE found a valid DA entry for this MSDU
  520. <legal all>
  521. */
  522. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_OFFSET 0x00000014
  523. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_LSB 19
  524. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_MSB 19
  525. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_VALID_MASK 0x00080000
  526. /* Description DA_IS_MCBC
  527. Field Only valid if "da_is_valid" is set
  528. Indicates the DA address was a Multicast of Broadcast address
  529. for this MSDU
  530. <legal all>
  531. */
  532. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_OFFSET 0x00000014
  533. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_LSB 20
  534. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_MSB 20
  535. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DA_IS_MCBC_MASK 0x00100000
  536. /* Description L3_HEADER_PADDING_MSB
  537. Passed on from 'RX_MSDU_END' TLV (only the MSB is reported
  538. as the LSB is always zero)
  539. Number of bytes padded to make sure that the L3 header will
  540. always start of a Dword boundary
  541. <legal all>
  542. */
  543. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_L3_HEADER_PADDING_MSB_OFFSET 0x00000014
  544. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_L3_HEADER_PADDING_MSB_LSB 21
  545. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_L3_HEADER_PADDING_MSB_MSB 21
  546. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_L3_HEADER_PADDING_MSB_MASK 0x00200000
  547. /* Description TCP_UDP_CHKSUM_FAIL
  548. Passed on from 'RX_ATTENTION' TLV
  549. Indicates that the computed checksum did not match the checksum
  550. in the TCP/UDP header.
  551. <legal all>
  552. */
  553. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TCP_UDP_CHKSUM_FAIL_OFFSET 0x00000014
  554. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TCP_UDP_CHKSUM_FAIL_LSB 22
  555. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TCP_UDP_CHKSUM_FAIL_MSB 22
  556. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TCP_UDP_CHKSUM_FAIL_MASK 0x00400000
  557. /* Description IP_CHKSUM_FAIL
  558. Passed on from 'RX_ATTENTION' TLV
  559. Indicates that the computed checksum did not match the checksum
  560. in the IP header.
  561. <legal all>
  562. */
  563. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_IP_CHKSUM_FAIL_OFFSET 0x00000014
  564. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_IP_CHKSUM_FAIL_LSB 23
  565. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_IP_CHKSUM_FAIL_MSB 23
  566. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_IP_CHKSUM_FAIL_MASK 0x00800000
  567. /* Description FR_DS
  568. Passed on from 'RX_MPDU_INFO' structure in 'RX_MPDU_START'
  569. TLV
  570. Set if the 'from DS' bit is set in the frame control.
  571. <legal all>
  572. */
  573. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FR_DS_OFFSET 0x00000014
  574. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FR_DS_LSB 24
  575. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FR_DS_MSB 24
  576. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_FR_DS_MASK 0x01000000
  577. /* Description TO_DS
  578. Passed on from 'RX_MPDU_INFO' structure in 'RX_MPDU_START'
  579. TLV
  580. Set if the 'to DS' bit is set in the frame control.
  581. <legal all>
  582. */
  583. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TO_DS_OFFSET 0x00000014
  584. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TO_DS_LSB 25
  585. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TO_DS_MSB 25
  586. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_TO_DS_MASK 0x02000000
  587. /* Description INTRA_BSS
  588. This packet needs intra-BSS routing by SW as the 'vdev_id'
  589. for the destination is the same as the 'vdev_id' (from 'RX_MPDU_PCU_START')
  590. that this MSDU was got in.
  591. <legal all>
  592. */
  593. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_INTRA_BSS_OFFSET 0x00000014
  594. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_INTRA_BSS_LSB 26
  595. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_INTRA_BSS_MSB 26
  596. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_INTRA_BSS_MASK 0x04000000
  597. /* Description DEST_CHIP_ID
  598. If intra_bss is set, copied by RXOLE/RXDMA from 'ADDR_SEARCH_ENTRY'
  599. to support intra-BSS routing with multi-chip multi-link
  600. operation.
  601. This indicates into which chip's TCL the packet should be
  602. queued.
  603. <legal all>
  604. */
  605. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_ID_OFFSET 0x00000014
  606. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_ID_LSB 27
  607. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_ID_MSB 28
  608. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_ID_MASK 0x18000000
  609. /* Description DECAP_FORMAT
  610. Indicates the format after decapsulation:
  611. <enum 0 RAW> No encapsulation
  612. <enum 1 Native_WiFi>
  613. <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses SNAP/LLC)
  614. <enum 3 802_3> Indicate Ethernet
  615. <legal all>
  616. */
  617. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DECAP_FORMAT_OFFSET 0x00000014
  618. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DECAP_FORMAT_LSB 29
  619. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DECAP_FORMAT_MSB 30
  620. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DECAP_FORMAT_MASK 0x60000000
  621. /* Description DEST_CHIP_PMAC_ID
  622. If intra_bss is set, copied by RXOLE/RXDMA from 'ADDR_SEARCH_ENTRY'
  623. to support intra-BSS routing with multi-chip multi-link
  624. operation.
  625. This indicates into which link/'vdev' the packet should
  626. be queued in TCL.
  627. <legal all>
  628. */
  629. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_PMAC_ID_OFFSET 0x00000014
  630. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_PMAC_ID_LSB 31
  631. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_PMAC_ID_MSB 31
  632. #define WBM2SW_COMPLETION_RING_RX_RX_MSDU_DESC_INFO_DETAILS_DEST_CHIP_PMAC_ID_MASK 0x80000000
  633. /* Description BUFFER_PHYS_ADDR_31_0
  634. LSB 32 bits of the physical address from the MSDU's buffer
  635. address info, for debug
  636. */
  637. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_31_0_OFFSET 0x00000018
  638. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_31_0_LSB 0
  639. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_31_0_MSB 31
  640. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_31_0_MASK 0xffffffff
  641. /* Description BUFFER_PHYS_ADDR_39_32
  642. MSB 8 bits of the physical address from the MSDU's buffer
  643. address info, for debug
  644. */
  645. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_39_32_OFFSET 0x0000001c
  646. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_39_32_LSB 0
  647. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_39_32_MSB 7
  648. #define WBM2SW_COMPLETION_RING_RX_BUFFER_PHYS_ADDR_39_32_MASK 0x000000ff
  649. /* Description SW_BUFFER_COOKIE
  650. 'Sw_buffer_cookie' field of the MSDU's buffer address info
  651. used to fill 'Buffer_virt_addr_*,' for debug
  652. For further debugging, if enabled, WBM may fill the Rx MPDU
  653. sequence number in bits [27:16] (copying from field Reserved_7a
  654. in 'WBM_RELEASE_RING_RX').
  655. */
  656. #define WBM2SW_COMPLETION_RING_RX_SW_BUFFER_COOKIE_OFFSET 0x0000001c
  657. #define WBM2SW_COMPLETION_RING_RX_SW_BUFFER_COOKIE_LSB 8
  658. #define WBM2SW_COMPLETION_RING_RX_SW_BUFFER_COOKIE_MSB 27
  659. #define WBM2SW_COMPLETION_RING_RX_SW_BUFFER_COOKIE_MASK 0x0fffff00
  660. /* Description LOOPING_COUNT
  661. Consumer: WBM/SW/FW
  662. Producer: SW/TQM/RXDMA/REO/SWITCH
  663. If WBM_internal_error is set, this descriptor is sent to
  664. the dedicated 'WBM_ERROR_RELEASE' ring and Looping_count
  665. is used to indicate an error code.
  666. The values reported are documented further in the WBM MLD
  667. doc.
  668. If WBM_internal_error is not set, the following holds.
  669. A count value that indicates the number of times the producer
  670. of entries into the Buffer Manager Ring has looped around
  671. the ring.
  672. At initialization time, this value is set to 0. On the first
  673. loop, this value is set to 1. After the max value is reached
  674. allowed by the number of bits for this field, the count
  675. value continues with 0 again.
  676. In case SW is the consumer of the ring entries, it can use
  677. this field to figure out up to where the producer of entries
  678. has created new entries. This eliminates the need to check
  679. where the "head pointer' of the ring is located once the
  680. SW starts processing an interrupt indicating that new entries
  681. have been put into this ring...
  682. Also note that SW if it wants only needs to look at the
  683. LSB bit of this count value.
  684. <legal all>
  685. */
  686. #define WBM2SW_COMPLETION_RING_RX_LOOPING_COUNT_OFFSET 0x0000001c
  687. #define WBM2SW_COMPLETION_RING_RX_LOOPING_COUNT_LSB 28
  688. #define WBM2SW_COMPLETION_RING_RX_LOOPING_COUNT_MSB 31
  689. #define WBM2SW_COMPLETION_RING_RX_LOOPING_COUNT_MASK 0xf0000000
  690. #endif // WBM2SW_COMPLETION_RING_RX