wbm2sw_completion_ring_rx.h 40 KB

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