wbm_release_ring.h 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032
  1. /*
  2. * Copyright (c) 2020 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. //
  19. // DO NOT EDIT! This file is automatically generated
  20. // These definitions are tied to a particular hardware layout
  21. #ifndef _WBM_RELEASE_RING_H_
  22. #define _WBM_RELEASE_RING_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. #include "buffer_addr_info.h"
  26. #include "tx_rate_stats_info.h"
  27. // ################ START SUMMARY #################
  28. //
  29. // Dword Fields
  30. // 0-1 struct buffer_addr_info released_buff_or_desc_addr_info;
  31. // 2 release_source_module[2:0], bm_action[5:3], buffer_or_desc_type[8:6], first_msdu_index[12:9], tqm_release_reason[16:13], rxdma_push_reason[18:17], rxdma_error_code[23:19], reo_push_reason[25:24], reo_error_code[30:26], wbm_internal_error[31]
  32. // 3 tqm_status_number[23:0], transmit_count[30:24], msdu_continuation[31]
  33. // 4 ack_frame_rssi[7:0], sw_release_details_valid[8], first_msdu[9], last_msdu[10], msdu_part_of_amsdu[11], fw_tx_notify_frame[12], buffer_timestamp[31:13]
  34. // 5-6 struct tx_rate_stats_info tx_rate_stats;
  35. // 7 sw_peer_id[15:0], tid[19:16], ring_id[27:20], looping_count[31:28]
  36. //
  37. // ################ END SUMMARY #################
  38. #define NUM_OF_DWORDS_WBM_RELEASE_RING 8
  39. struct wbm_release_ring {
  40. struct buffer_addr_info released_buff_or_desc_addr_info;
  41. uint32_t release_source_module : 3, //[2:0]
  42. bm_action : 3, //[5:3]
  43. buffer_or_desc_type : 3, //[8:6]
  44. first_msdu_index : 4, //[12:9]
  45. tqm_release_reason : 4, //[16:13]
  46. rxdma_push_reason : 2, //[18:17]
  47. rxdma_error_code : 5, //[23:19]
  48. reo_push_reason : 2, //[25:24]
  49. reo_error_code : 5, //[30:26]
  50. wbm_internal_error : 1; //[31]
  51. uint32_t tqm_status_number : 24, //[23:0]
  52. transmit_count : 7, //[30:24]
  53. msdu_continuation : 1; //[31]
  54. uint32_t ack_frame_rssi : 8, //[7:0]
  55. sw_release_details_valid : 1, //[8]
  56. first_msdu : 1, //[9]
  57. last_msdu : 1, //[10]
  58. msdu_part_of_amsdu : 1, //[11]
  59. fw_tx_notify_frame : 1, //[12]
  60. buffer_timestamp : 19; //[31:13]
  61. struct tx_rate_stats_info tx_rate_stats;
  62. uint32_t sw_peer_id : 16, //[15:0]
  63. tid : 4, //[19:16]
  64. ring_id : 8, //[27:20]
  65. looping_count : 4; //[31:28]
  66. };
  67. /*
  68. struct buffer_addr_info released_buff_or_desc_addr_info
  69. Consumer: WBM/SW/FW
  70. Producer: SW/TQM/RXDMA/REO/SWITCH
  71. Details of the physical address of the buffer or link
  72. descriptor that is being released. Note that within this
  73. descriptor, WBM will look at the 'owner' of the released
  74. buffer/descriptor and forward it to SW/FW is WBM is not the
  75. owner.
  76. In case of TQM releasing Tx MSDU link descriptors with
  77. Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
  78. WBM can optionally release the MSDU buffers pointed to by
  79. the MSDU link descriptors to FW and override the
  80. tx_rate_stats field, for FW reinjection of these MSDUs
  81. (FR54309). This is not supported in Pine.
  82. release_source_module
  83. Indicates which module initiated the release of this
  84. buffer or descriptor
  85. <enum 0 release_source_TQM> TQM released this buffer or
  86. descriptor
  87. <enum 1 release_source_RXDMA> RXDMA released this buffer
  88. or descriptor
  89. <enum 2 release_source_REO> REO released this buffer or
  90. descriptor
  91. <enum 3 release_source_FW> FW released this buffer or
  92. descriptor
  93. <enum 4 release_source_SW> SW released this buffer or
  94. descriptor
  95. <legal 0-4>
  96. bm_action
  97. Consumer: WBM/SW/FW
  98. Producer: SW/TQM/RXDMA/REO/SWITCH
  99. Field only valid when the field return_buffer_manager in
  100. the Released_buff_or_desc_addr_info indicates:
  101. WBM_IDLE_BUF_LIST or
  102. WBM_IDLE_DESC_LIST
  103. An MSDU extension descriptor shall never be marked as
  104. <enum 0 Put_in_idle_list> Put the buffer or descriptor
  105. back in the idle list. In case of MSDU or MDPU link
  106. descriptor, BM does not need to check to release any
  107. individual MSDU buffers
  108. <enum 1 release_msdu_list > This BM action can only be
  109. used in combination with buffer_or_desc_type being
  110. msdu_link_descriptor. Field first_msdu_index points out
  111. which MSDU pointer in the MSDU link descriptor is the first
  112. of an MPDU that is released.
  113. BM shall release all the MSDU buffers linked to this
  114. first MSDU buffer pointer. All related MSDU buffer pointer
  115. entries shall be set to value 0, which represents the 'NULL
  116. pointer. When all MSDU buffer pointers in the MSDU link
  117. descriptor are 'NULL', the MSDU link descriptor itself shall
  118. also be released.
  119. <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
  120. IMPLEMENTED....
  121. Put the buffer or descriptor back in the idle list. Only
  122. valid in combination with buffer_or_desc_type indicating
  123. MDPU_link_descriptor.
  124. BM shall release the MPDU link descriptor as well as all
  125. MSDUs that are linked to the MPDUs in this descriptor.
  126. <legal 0-2>
  127. buffer_or_desc_type
  128. Consumer: WBM/SW/FW
  129. Producer: SW/TQM/RXDMA/REO/SWITCH
  130. Field only valid when WBM is marked as the
  131. return_buffer_manager in the Released_Buffer_address_info
  132. Indicates that type of buffer or descriptor is being
  133. released
  134. <enum 0 MSDU_rel_buffer> The address points to an MSDU
  135. buffer
  136. <enum 1 msdu_link_descriptor> The address points to an
  137. TX MSDU link descriptor
  138. <enum 2 mpdu_link_descriptor> The address points to an
  139. MPDU link descriptor
  140. <enum 3 msdu_ext_descriptor > The address points to an
  141. MSDU extension descriptor.
  142. In case BM finds this one in a release ring, it passes
  143. it on to FW...
  144. <enum 4 queue_ext_descriptor> The address points to an
  145. TQM queue extension descriptor. WBM should treat this is the
  146. same way as a link descriptor. That is, put the 128 byte
  147. buffer back in the link buffer idle list.
  148. <legal 0-4>
  149. first_msdu_index
  150. Consumer: WBM/SW/FW
  151. Producer: SW/TQM/RXDMA/REO/SWITCH
  152. Field only valid for the bm_action release_msdu_list.
  153. The index of the first MSDU in an MSDU link descriptor
  154. all belonging to the same MPDU.
  155. <legal 0-6>
  156. tqm_release_reason
  157. Consumer: WBM/SW/FW
  158. Producer: TQM
  159. Field only valid when Release_source_module is set to
  160. release_source_TQM
  161. (rr = Release Reason)
  162. <enum 0 tqm_rr_frame_acked> frame is removed because an
  163. ACK of BA for it was received
  164. <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
  165. remove command of type Remove_mpdus initiated by SW
  166. <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
  167. remove command of type Remove_transmitted_mpdus initiated by
  168. SW
  169. <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
  170. remove command of type Remove_untransmitted_mpdus initiated
  171. by SW
  172. <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
  173. remove command of type Remove_aged_mpdus or
  174. Remove_aged_msdus initiated by SW
  175. <enum 5 tqm_fw_reason1> frame is removed because a
  176. remove command where fw indicated that remove reason is
  177. fw_reason1
  178. <enum 6 tqm_fw_reason2> frame is removed because a
  179. remove command where fw indicated that remove reason is
  180. fw_reason1
  181. <enum 7 tqm_fw_reason3> frame is removed because a
  182. remove command where fw indicated that remove reason is
  183. fw_reason1
  184. <enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed
  185. because a remove command of type
  186. remove_mpdus_and_disable_queue or
  187. remove_msdus_and_disable_flow initiated by SW
  188. <legal 0-8>
  189. In case of TQM releasing Tx MSDU link descriptors with
  190. Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
  191. WBM can optionally release the MSDU buffers pointed to by
  192. the MSDU link descriptors to FW and override the
  193. tx_rate_stats field, for FW reinjection of these MSDUs
  194. (FR54309). This is not supported in Pine.
  195. rxdma_push_reason
  196. Field only valid when Release_source_module is set to
  197. release_source_RXDMA
  198. Indicates why rxdma pushed the frame to this ring
  199. <enum 0 rxdma_error_detected> RXDMA detected an error an
  200. pushed this frame to this queue
  201. <enum 1 rxdma_routing_instruction> RXDMA pushed the
  202. frame to this queue per received routing instructions. No
  203. error within RXDMA was detected
  204. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  205. result the MSDU link descriptor might not have the
  206. last_msdu_in_mpdu_flag set, but instead WBM might just see a
  207. NULL pointer in the MSDU link descriptor. This is to be
  208. considered a normal condition for this scenario.
  209. <legal 0 - 2>
  210. rxdma_error_code
  211. Field only valid when 'rxdma_push_reason' set to
  212. 'rxdma_error_detected'.
  213. <enum 0 rxdma_overflow_err>MPDU frame is not complete
  214. due to a FIFO overflow error in RXPCU.
  215. <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
  216. due to receiving incomplete MPDU from the PHY
  217. <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
  218. error or CRYPTO received an encrypted frame, but did not get
  219. a valid corresponding key id in the peer entry.
  220. <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
  221. error
  222. <enum 5 rxdma_unecrypted_err>CRYPTO reported an
  223. unencrypted frame error when encrypted was expected
  224. <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
  225. length error
  226. <enum 7 rxdma_msdu_limit_err>RX OLE reported that max
  227. number of MSDUs allowed in an MPDU got exceeded
  228. <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
  229. error
  230. <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
  231. parsing error
  232. <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
  233. during SA search
  234. <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
  235. during DA search
  236. <enum 12 rxdma_flow_timeout_err>RX OLE reported a
  237. timeout during flow search
  238. <enum 13 rxdma_flush_request>RXDMA received a flush
  239. request
  240. <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
  241. present as well as a fragmented MPDU. A-MSDU defragmentation
  242. is not supported in Lithium SW so this is treated as an
  243. error.
  244. reo_push_reason
  245. Field only valid when Release_source_module is set to
  246. release_source_REO
  247. Indicates why REO pushed the frame to this release ring
  248. <enum 0 reo_error_detected> Reo detected an error an
  249. pushed this frame to this queue
  250. <enum 1 reo_routing_instruction> Reo pushed the frame to
  251. this queue per received routing instructions. No error
  252. within REO was detected
  253. <legal 0 - 1>
  254. reo_error_code
  255. Field only valid when 'Reo_push_reason' set to
  256. 'reo_error_detected'.
  257. <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
  258. provided in the REO_ENTRANCE ring is set to 0
  259. <enum 1 reo_queue_desc_not_valid> Reo queue descriptor
  260. valid bit is NOT set
  261. <enum 2 ampdu_in_non_ba> AMPDU frame received without BA
  262. session having been setup.
  263. <enum 3 non_ba_duplicate> Non-BA session, SN equal to
  264. SSN, Retry bit set: duplicate frame
  265. <enum 4 ba_duplicate> BA session, duplicate frame
  266. <enum 5 regular_frame_2k_jump> A normal (management/data
  267. frame) received with 2K jump in SN
  268. <enum 6 bar_frame_2k_jump> A bar received with 2K jump
  269. in SSN
  270. <enum 7 regular_frame_OOR> A normal (management/data
  271. frame) received with SN falling within the OOR window
  272. <enum 8 bar_frame_OOR> A bar received with SSN falling
  273. within the OOR window
  274. <enum 9 bar_frame_no_ba_session> A bar received without
  275. a BA session
  276. <enum 10 bar_frame_sn_equals_ssn> A bar received with
  277. SSN equal to SN
  278. <enum 11 pn_check_failed> PN Check Failed packet.
  279. <enum 12 2k_error_handling_flag_set> Frame is forwarded
  280. as a result of the 'Seq_2k_error_detected_flag' been set in
  281. the REO Queue descriptor
  282. <enum 13 pn_error_handling_flag_set> Frame is forwarded
  283. as a result of the 'pn_error_detected_flag' been set in the
  284. REO Queue descriptor
  285. <enum 14 queue_descriptor_blocked_set> Frame is
  286. forwarded as a result of the queue descriptor(address) being
  287. blocked as SW/FW seems to be currently in the process of
  288. making updates to this descriptor...
  289. <legal 0-14>
  290. wbm_internal_error
  291. Can only be set by WBM.
  292. Is set when WBM got a buffer pointer but the action was
  293. to push it to the idle link descriptor ring or do link
  294. related activity
  295. OR
  296. Is set when WBM got a link buffer pointer but the action
  297. was to push it to the buffer descriptor ring
  298. <legal all>
  299. tqm_status_number
  300. Field only valid when Release_source_module is set to
  301. release_source_TQM
  302. The value in this field is equal to value of the
  303. 'TQM_CMD_Number' field the TQM command or the
  304. 'TQM_add_cmd_Number' field from the TQM entrance ring
  305. descriptor
  306. This field helps to correlate the statuses with the TQM
  307. commands.
  308. NOTE that SW could program this number to be equal to
  309. the PPDU_ID number in case direct correlation with the PPDU
  310. ID is desired
  311. <legal all>
  312. transmit_count
  313. Field only valid when Release_source_module is set to
  314. release_source_TQM
  315. The number of times this frame has been transmitted
  316. msdu_continuation
  317. FR53947 requests MSDU_continuation reporting for Rx
  318. MSDUs in Pine and HastingsPrime for which
  319. SW_release_details_valid may not be set.
  320. <legal all>
  321. ack_frame_rssi
  322. This field is only valid when the source is TQM.
  323. If this frame is removed as the result of the reception
  324. of an ACK or BA, this field indicates the RSSI of the
  325. received ACK or BA frame.
  326. When the frame is removed as result of a direct remove
  327. command from the SW, this field is set to 0x0 (which is
  328. never a valid value when real RSSI is available)
  329. <legal all>
  330. sw_release_details_valid
  331. Consumer: SW
  332. Producer: WBM
  333. When set, some WBM specific release info for SW is
  334. valid.
  335. This is set when WMB got a 'release_msdu_list' command
  336. from TQM and the return buffer manager is not WMB. WBM will
  337. then de-aggregate all the MSDUs and pass them one at a time
  338. on to the 'buffer owner'
  339. <legal all>
  340. first_msdu
  341. Field only valid when SW_release_details_valid is set.
  342. Consumer: SW
  343. Producer: WBM
  344. When set, this MSDU is the first MSDU pointed to in the
  345. 'release_msdu_list' command.
  346. FR53947 extends this to Rx MSDUs in Pine and
  347. HastingsPrime for which SW_release_details_valid may not be
  348. set.
  349. <legal all>
  350. last_msdu
  351. Field only valid when SW_release_details_valid is set.
  352. Consumer: SW
  353. Producer: WBM
  354. When set, this MSDU is the last MSDU pointed to in the
  355. 'release_msdu_list' command.
  356. FR53947 extends this to Rx MSDUs in Pine and
  357. HastingsPrime for which SW_release_details_valid may not be
  358. set.
  359. <legal all>
  360. msdu_part_of_amsdu
  361. Field only valid when SW_release_details_valid is set.
  362. Consumer: SW
  363. Producer: WBM
  364. When set, this MSDU was part of an A-MSDU in MPDU
  365. <legal all>
  366. fw_tx_notify_frame
  367. Field only valid when SW_release_details_valid is set.
  368. Consumer: SW
  369. Producer: WBM
  370. This is the FW_tx_notify_frame field from the
  371. <legal all>
  372. buffer_timestamp
  373. Field only valid when SW_release_details_valid is set.
  374. Consumer: SW
  375. Producer: WBM
  376. This is the Buffer_timestamp field from the
  377. TX_MSDU_DETAILS for this frame from the MSDU link
  378. descriptor.
  379. Timestamp in units of 1024 µs
  380. <legal all>
  381. struct tx_rate_stats_info tx_rate_stats
  382. Consumer: TQM
  383. Producer: SW/SCH(from TXPCU, PDG)
  384. Details for command execution tracking purposes.
  385. In case of TQM releasing Tx MSDU link descriptors with
  386. Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
  387. WBM can optionally release the MSDU buffers pointed to by
  388. the MSDU link descriptors to FW and override the
  389. tx_rate_stats field with words 2 and 3 of the
  390. 'TX_MSDU_DETAILS' structure, for FW reinjection of these
  391. MSDUs (FR54309). This is not supported in Pine.
  392. sw_peer_id
  393. Field only valid when Release_source_module is set to
  394. release_source_TQM
  395. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  396. not fetched and hence sw_peer_id and tid = 0
  397. buffer_or_desc_type = e_num 0
  398. MSDU_rel_buffertqm_release_reason = e_num 1
  399. tqm_rr_rem_cmd_rem
  400. 2) Release of msdu buffer due to Flow is not fetched and
  401. hence sw_peer_id and tid = 0
  402. buffer_or_desc_type = e_num 0
  403. MSDU_rel_buffertqm_release_reason = e_num 1
  404. tqm_rr_rem_cmd_rem
  405. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  406. command.
  407. buffer_or_desc_type = e_num1
  408. msdu_link_descriptortqm_release_reason can be:e_num 1
  409. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  410. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  411. Sw_peer_id from the TX_MSDU_FLOW descriptor or
  412. TX_MPDU_QUEUE descriptor
  413. <legal all>
  414. tid
  415. Field only valid when Release_source_module is set to
  416. release_source_TQM
  417. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  418. not fetched and hence sw_peer_id and tid = 0
  419. buffer_or_desc_type = e_num 0
  420. MSDU_rel_buffertqm_release_reason = e_num 1
  421. tqm_rr_rem_cmd_rem
  422. 2) Release of msdu buffer due to Flow is not fetched and
  423. hence sw_peer_id and tid = 0
  424. buffer_or_desc_type = e_num 0
  425. MSDU_rel_buffertqm_release_reason = e_num 1
  426. tqm_rr_rem_cmd_rem
  427. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  428. command.
  429. buffer_or_desc_type = e_num1
  430. msdu_link_descriptortqm_release_reason can be:e_num 1
  431. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  432. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  433. This field represents the TID from the TX_MSDU_FLOW
  434. descriptor or TX_MPDU_QUEUE descriptor
  435. <legal all>
  436. ring_id
  437. Consumer: TQM/REO/RXDMA/SW
  438. Producer: SRNG (of RXDMA)
  439. For debugging.
  440. This field is filled in by the SRNG module.
  441. It help to identify the ring that is being looked <legal
  442. all>
  443. looping_count
  444. Consumer: WBM/SW/FW
  445. Producer: SW/TQM/RXDMA/REO/SWITCH
  446. A count value that indicates the number of times the
  447. producer of entries into the Buffer Manager Ring has looped
  448. around the ring.
  449. At initialization time, this value is set to 0. On the
  450. first loop, this value is set to 1. After the max value is
  451. reached allowed by the number of bits for this field, the
  452. count value continues with 0 again.
  453. In case SW is the consumer of the ring entries, it can
  454. use this field to figure out up to where the producer of
  455. entries has created new entries. This eliminates the need to
  456. check where the head pointer' of the ring is located once
  457. the SW starts processing an interrupt indicating that new
  458. entries have been put into this ring...
  459. Also note that SW if it wants only needs to look at the
  460. LSB bit of this count value.
  461. <legal all>
  462. */
  463. /* EXTERNAL REFERENCE : struct buffer_addr_info released_buff_or_desc_addr_info */
  464. /* Description WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0
  465. Address (lower 32 bits) of the MSDU buffer OR
  466. MSDU_EXTENSION descriptor OR Link Descriptor
  467. In case of 'NULL' pointer, this field is set to 0
  468. <legal all>
  469. */
  470. #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
  471. #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
  472. #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
  473. /* Description WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32
  474. Address (upper 8 bits) of the MSDU buffer OR
  475. MSDU_EXTENSION descriptor OR Link Descriptor
  476. In case of 'NULL' pointer, this field is set to 0
  477. <legal all>
  478. */
  479. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
  480. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
  481. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
  482. /* Description WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER
  483. Consumer: WBM
  484. Producer: SW/FW
  485. In case of 'NULL' pointer, this field is set to 0
  486. Indicates to which buffer manager the buffer OR
  487. MSDU_EXTENSION descriptor OR link descriptor that is being
  488. pointed to shall be returned after the frame has been
  489. processed. It is used by WBM for routing purposes.
  490. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  491. to the WMB buffer idle list
  492. <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
  493. returned to the WMB idle link descriptor idle list
  494. <enum 2 FW_BM> This buffer shall be returned to the FW
  495. <enum 3 SW0_BM> This buffer shall be returned to the SW,
  496. ring 0
  497. <enum 4 SW1_BM> This buffer shall be returned to the SW,
  498. ring 1
  499. <enum 5 SW2_BM> This buffer shall be returned to the SW,
  500. ring 2
  501. <enum 6 SW3_BM> This buffer shall be returned to the SW,
  502. ring 3
  503. <enum 7 SW4_BM> This buffer shall be returned to the SW,
  504. ring 4
  505. <legal all>
  506. */
  507. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
  508. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
  509. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700
  510. /* Description WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE
  511. Cookie field exclusively used by SW.
  512. In case of 'NULL' pointer, this field is set to 0
  513. HW ignores the contents, accept that it passes the
  514. programmed value on to other descriptors together with the
  515. physical address
  516. Field can be used by SW to for example associate the
  517. buffers physical address with the virtual address
  518. The bit definitions as used by SW are within SW HLD
  519. specification
  520. NOTE:
  521. The three most significant bits can have a special
  522. meaning in case this struct is embedded in a TX_MPDU_DETAILS
  523. STRUCT, and field transmit_bw_restriction is set
  524. In case of NON punctured transmission:
  525. Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
  526. Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
  527. Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
  528. Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
  529. In case of punctured transmission:
  530. Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only
  531. Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only
  532. Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only
  533. Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only
  534. Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only
  535. Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only
  536. Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only
  537. Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only
  538. Note: a punctured transmission is indicated by the
  539. presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler
  540. TLV
  541. <legal all>
  542. */
  543. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
  544. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11
  545. #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800
  546. /* Description WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE
  547. Indicates which module initiated the release of this
  548. buffer or descriptor
  549. <enum 0 release_source_TQM> TQM released this buffer or
  550. descriptor
  551. <enum 1 release_source_RXDMA> RXDMA released this buffer
  552. or descriptor
  553. <enum 2 release_source_REO> REO released this buffer or
  554. descriptor
  555. <enum 3 release_source_FW> FW released this buffer or
  556. descriptor
  557. <enum 4 release_source_SW> SW released this buffer or
  558. descriptor
  559. <legal 0-4>
  560. */
  561. #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_OFFSET 0x00000008
  562. #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_LSB 0
  563. #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_MASK 0x00000007
  564. /* Description WBM_RELEASE_RING_2_BM_ACTION
  565. Consumer: WBM/SW/FW
  566. Producer: SW/TQM/RXDMA/REO/SWITCH
  567. Field only valid when the field return_buffer_manager in
  568. the Released_buff_or_desc_addr_info indicates:
  569. WBM_IDLE_BUF_LIST or
  570. WBM_IDLE_DESC_LIST
  571. An MSDU extension descriptor shall never be marked as
  572. <enum 0 Put_in_idle_list> Put the buffer or descriptor
  573. back in the idle list. In case of MSDU or MDPU link
  574. descriptor, BM does not need to check to release any
  575. individual MSDU buffers
  576. <enum 1 release_msdu_list > This BM action can only be
  577. used in combination with buffer_or_desc_type being
  578. msdu_link_descriptor. Field first_msdu_index points out
  579. which MSDU pointer in the MSDU link descriptor is the first
  580. of an MPDU that is released.
  581. BM shall release all the MSDU buffers linked to this
  582. first MSDU buffer pointer. All related MSDU buffer pointer
  583. entries shall be set to value 0, which represents the 'NULL
  584. pointer. When all MSDU buffer pointers in the MSDU link
  585. descriptor are 'NULL', the MSDU link descriptor itself shall
  586. also be released.
  587. <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
  588. IMPLEMENTED....
  589. Put the buffer or descriptor back in the idle list. Only
  590. valid in combination with buffer_or_desc_type indicating
  591. MDPU_link_descriptor.
  592. BM shall release the MPDU link descriptor as well as all
  593. MSDUs that are linked to the MPDUs in this descriptor.
  594. <legal 0-2>
  595. */
  596. #define WBM_RELEASE_RING_2_BM_ACTION_OFFSET 0x00000008
  597. #define WBM_RELEASE_RING_2_BM_ACTION_LSB 3
  598. #define WBM_RELEASE_RING_2_BM_ACTION_MASK 0x00000038
  599. /* Description WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE
  600. Consumer: WBM/SW/FW
  601. Producer: SW/TQM/RXDMA/REO/SWITCH
  602. Field only valid when WBM is marked as the
  603. return_buffer_manager in the Released_Buffer_address_info
  604. Indicates that type of buffer or descriptor is being
  605. released
  606. <enum 0 MSDU_rel_buffer> The address points to an MSDU
  607. buffer
  608. <enum 1 msdu_link_descriptor> The address points to an
  609. TX MSDU link descriptor
  610. <enum 2 mpdu_link_descriptor> The address points to an
  611. MPDU link descriptor
  612. <enum 3 msdu_ext_descriptor > The address points to an
  613. MSDU extension descriptor.
  614. In case BM finds this one in a release ring, it passes
  615. it on to FW...
  616. <enum 4 queue_ext_descriptor> The address points to an
  617. TQM queue extension descriptor. WBM should treat this is the
  618. same way as a link descriptor. That is, put the 128 byte
  619. buffer back in the link buffer idle list.
  620. <legal 0-4>
  621. */
  622. #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_OFFSET 0x00000008
  623. #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_LSB 6
  624. #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_MASK 0x000001c0
  625. /* Description WBM_RELEASE_RING_2_FIRST_MSDU_INDEX
  626. Consumer: WBM/SW/FW
  627. Producer: SW/TQM/RXDMA/REO/SWITCH
  628. Field only valid for the bm_action release_msdu_list.
  629. The index of the first MSDU in an MSDU link descriptor
  630. all belonging to the same MPDU.
  631. <legal 0-6>
  632. */
  633. #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_OFFSET 0x00000008
  634. #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_LSB 9
  635. #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_MASK 0x00001e00
  636. /* Description WBM_RELEASE_RING_2_TQM_RELEASE_REASON
  637. Consumer: WBM/SW/FW
  638. Producer: TQM
  639. Field only valid when Release_source_module is set to
  640. release_source_TQM
  641. (rr = Release Reason)
  642. <enum 0 tqm_rr_frame_acked> frame is removed because an
  643. ACK of BA for it was received
  644. <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
  645. remove command of type Remove_mpdus initiated by SW
  646. <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
  647. remove command of type Remove_transmitted_mpdus initiated by
  648. SW
  649. <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
  650. remove command of type Remove_untransmitted_mpdus initiated
  651. by SW
  652. <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
  653. remove command of type Remove_aged_mpdus or
  654. Remove_aged_msdus initiated by SW
  655. <enum 5 tqm_fw_reason1> frame is removed because a
  656. remove command where fw indicated that remove reason is
  657. fw_reason1
  658. <enum 6 tqm_fw_reason2> frame is removed because a
  659. remove command where fw indicated that remove reason is
  660. fw_reason1
  661. <enum 7 tqm_fw_reason3> frame is removed because a
  662. remove command where fw indicated that remove reason is
  663. fw_reason1
  664. <enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed
  665. because a remove command of type
  666. remove_mpdus_and_disable_queue or
  667. remove_msdus_and_disable_flow initiated by SW
  668. <legal 0-8>
  669. In case of TQM releasing Tx MSDU link descriptors with
  670. Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
  671. WBM can optionally release the MSDU buffers pointed to by
  672. the MSDU link descriptors to FW and override the
  673. tx_rate_stats field, for FW reinjection of these MSDUs
  674. (FR54309). This is not supported in Pine.
  675. */
  676. #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_OFFSET 0x00000008
  677. #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB 13
  678. #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_MASK 0x0001e000
  679. /* Description WBM_RELEASE_RING_2_RXDMA_PUSH_REASON
  680. Field only valid when Release_source_module is set to
  681. release_source_RXDMA
  682. Indicates why rxdma pushed the frame to this ring
  683. <enum 0 rxdma_error_detected> RXDMA detected an error an
  684. pushed this frame to this queue
  685. <enum 1 rxdma_routing_instruction> RXDMA pushed the
  686. frame to this queue per received routing instructions. No
  687. error within RXDMA was detected
  688. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  689. result the MSDU link descriptor might not have the
  690. last_msdu_in_mpdu_flag set, but instead WBM might just see a
  691. NULL pointer in the MSDU link descriptor. This is to be
  692. considered a normal condition for this scenario.
  693. <legal 0 - 2>
  694. */
  695. #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_OFFSET 0x00000008
  696. #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_LSB 17
  697. #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_MASK 0x00060000
  698. /* Description WBM_RELEASE_RING_2_RXDMA_ERROR_CODE
  699. Field only valid when 'rxdma_push_reason' set to
  700. 'rxdma_error_detected'.
  701. <enum 0 rxdma_overflow_err>MPDU frame is not complete
  702. due to a FIFO overflow error in RXPCU.
  703. <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
  704. due to receiving incomplete MPDU from the PHY
  705. <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
  706. error or CRYPTO received an encrypted frame, but did not get
  707. a valid corresponding key id in the peer entry.
  708. <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
  709. error
  710. <enum 5 rxdma_unecrypted_err>CRYPTO reported an
  711. unencrypted frame error when encrypted was expected
  712. <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
  713. length error
  714. <enum 7 rxdma_msdu_limit_err>RX OLE reported that max
  715. number of MSDUs allowed in an MPDU got exceeded
  716. <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
  717. error
  718. <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
  719. parsing error
  720. <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
  721. during SA search
  722. <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
  723. during DA search
  724. <enum 12 rxdma_flow_timeout_err>RX OLE reported a
  725. timeout during flow search
  726. <enum 13 rxdma_flush_request>RXDMA received a flush
  727. request
  728. <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
  729. present as well as a fragmented MPDU. A-MSDU defragmentation
  730. is not supported in Lithium SW so this is treated as an
  731. error.
  732. */
  733. #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_OFFSET 0x00000008
  734. #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_LSB 19
  735. #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_MASK 0x00f80000
  736. /* Description WBM_RELEASE_RING_2_REO_PUSH_REASON
  737. Field only valid when Release_source_module is set to
  738. release_source_REO
  739. Indicates why REO pushed the frame to this release ring
  740. <enum 0 reo_error_detected> Reo detected an error an
  741. pushed this frame to this queue
  742. <enum 1 reo_routing_instruction> Reo pushed the frame to
  743. this queue per received routing instructions. No error
  744. within REO was detected
  745. <legal 0 - 1>
  746. */
  747. #define WBM_RELEASE_RING_2_REO_PUSH_REASON_OFFSET 0x00000008
  748. #define WBM_RELEASE_RING_2_REO_PUSH_REASON_LSB 24
  749. #define WBM_RELEASE_RING_2_REO_PUSH_REASON_MASK 0x03000000
  750. /* Description WBM_RELEASE_RING_2_REO_ERROR_CODE
  751. Field only valid when 'Reo_push_reason' set to
  752. 'reo_error_detected'.
  753. <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
  754. provided in the REO_ENTRANCE ring is set to 0
  755. <enum 1 reo_queue_desc_not_valid> Reo queue descriptor
  756. valid bit is NOT set
  757. <enum 2 ampdu_in_non_ba> AMPDU frame received without BA
  758. session having been setup.
  759. <enum 3 non_ba_duplicate> Non-BA session, SN equal to
  760. SSN, Retry bit set: duplicate frame
  761. <enum 4 ba_duplicate> BA session, duplicate frame
  762. <enum 5 regular_frame_2k_jump> A normal (management/data
  763. frame) received with 2K jump in SN
  764. <enum 6 bar_frame_2k_jump> A bar received with 2K jump
  765. in SSN
  766. <enum 7 regular_frame_OOR> A normal (management/data
  767. frame) received with SN falling within the OOR window
  768. <enum 8 bar_frame_OOR> A bar received with SSN falling
  769. within the OOR window
  770. <enum 9 bar_frame_no_ba_session> A bar received without
  771. a BA session
  772. <enum 10 bar_frame_sn_equals_ssn> A bar received with
  773. SSN equal to SN
  774. <enum 11 pn_check_failed> PN Check Failed packet.
  775. <enum 12 2k_error_handling_flag_set> Frame is forwarded
  776. as a result of the 'Seq_2k_error_detected_flag' been set in
  777. the REO Queue descriptor
  778. <enum 13 pn_error_handling_flag_set> Frame is forwarded
  779. as a result of the 'pn_error_detected_flag' been set in the
  780. REO Queue descriptor
  781. <enum 14 queue_descriptor_blocked_set> Frame is
  782. forwarded as a result of the queue descriptor(address) being
  783. blocked as SW/FW seems to be currently in the process of
  784. making updates to this descriptor...
  785. <legal 0-14>
  786. */
  787. #define WBM_RELEASE_RING_2_REO_ERROR_CODE_OFFSET 0x00000008
  788. #define WBM_RELEASE_RING_2_REO_ERROR_CODE_LSB 26
  789. #define WBM_RELEASE_RING_2_REO_ERROR_CODE_MASK 0x7c000000
  790. /* Description WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR
  791. Can only be set by WBM.
  792. Is set when WBM got a buffer pointer but the action was
  793. to push it to the idle link descriptor ring or do link
  794. related activity
  795. OR
  796. Is set when WBM got a link buffer pointer but the action
  797. was to push it to the buffer descriptor ring
  798. <legal all>
  799. */
  800. #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET 0x00000008
  801. #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB 31
  802. #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK 0x80000000
  803. /* Description WBM_RELEASE_RING_3_TQM_STATUS_NUMBER
  804. Field only valid when Release_source_module is set to
  805. release_source_TQM
  806. The value in this field is equal to value of the
  807. 'TQM_CMD_Number' field the TQM command or the
  808. 'TQM_add_cmd_Number' field from the TQM entrance ring
  809. descriptor
  810. This field helps to correlate the statuses with the TQM
  811. commands.
  812. NOTE that SW could program this number to be equal to
  813. the PPDU_ID number in case direct correlation with the PPDU
  814. ID is desired
  815. <legal all>
  816. */
  817. #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_OFFSET 0x0000000c
  818. #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_LSB 0
  819. #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_MASK 0x00ffffff
  820. /* Description WBM_RELEASE_RING_3_TRANSMIT_COUNT
  821. Field only valid when Release_source_module is set to
  822. release_source_TQM
  823. The number of times this frame has been transmitted
  824. */
  825. #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_OFFSET 0x0000000c
  826. #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_LSB 24
  827. #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_MASK 0x7f000000
  828. /* Description WBM_RELEASE_RING_3_MSDU_CONTINUATION
  829. FR53947 requests MSDU_continuation reporting for Rx
  830. MSDUs in Pine and HastingsPrime for which
  831. SW_release_details_valid may not be set.
  832. <legal all>
  833. */
  834. #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_OFFSET 0x0000000c
  835. #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_LSB 31
  836. #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_MASK 0x80000000
  837. /* Description WBM_RELEASE_RING_4_ACK_FRAME_RSSI
  838. This field is only valid when the source is TQM.
  839. If this frame is removed as the result of the reception
  840. of an ACK or BA, this field indicates the RSSI of the
  841. received ACK or BA frame.
  842. When the frame is removed as result of a direct remove
  843. command from the SW, this field is set to 0x0 (which is
  844. never a valid value when real RSSI is available)
  845. <legal all>
  846. */
  847. #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_OFFSET 0x00000010
  848. #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_LSB 0
  849. #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_MASK 0x000000ff
  850. /* Description WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID
  851. Consumer: SW
  852. Producer: WBM
  853. When set, some WBM specific release info for SW is
  854. valid.
  855. This is set when WMB got a 'release_msdu_list' command
  856. from TQM and the return buffer manager is not WMB. WBM will
  857. then de-aggregate all the MSDUs and pass them one at a time
  858. on to the 'buffer owner'
  859. <legal all>
  860. */
  861. #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_OFFSET 0x00000010
  862. #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_LSB 8
  863. #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_MASK 0x00000100
  864. /* Description WBM_RELEASE_RING_4_FIRST_MSDU
  865. Field only valid when SW_release_details_valid is set.
  866. Consumer: SW
  867. Producer: WBM
  868. When set, this MSDU is the first MSDU pointed to in the
  869. 'release_msdu_list' command.
  870. FR53947 extends this to Rx MSDUs in Pine and
  871. HastingsPrime for which SW_release_details_valid may not be
  872. set.
  873. <legal all>
  874. */
  875. #define WBM_RELEASE_RING_4_FIRST_MSDU_OFFSET 0x00000010
  876. #define WBM_RELEASE_RING_4_FIRST_MSDU_LSB 9
  877. #define WBM_RELEASE_RING_4_FIRST_MSDU_MASK 0x00000200
  878. /* Description WBM_RELEASE_RING_4_LAST_MSDU
  879. Field only valid when SW_release_details_valid is set.
  880. Consumer: SW
  881. Producer: WBM
  882. When set, this MSDU is the last MSDU pointed to in the
  883. 'release_msdu_list' command.
  884. FR53947 extends this to Rx MSDUs in Pine and
  885. HastingsPrime for which SW_release_details_valid may not be
  886. set.
  887. <legal all>
  888. */
  889. #define WBM_RELEASE_RING_4_LAST_MSDU_OFFSET 0x00000010
  890. #define WBM_RELEASE_RING_4_LAST_MSDU_LSB 10
  891. #define WBM_RELEASE_RING_4_LAST_MSDU_MASK 0x00000400
  892. /* Description WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU
  893. Field only valid when SW_release_details_valid is set.
  894. Consumer: SW
  895. Producer: WBM
  896. When set, this MSDU was part of an A-MSDU in MPDU
  897. <legal all>
  898. */
  899. #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_OFFSET 0x00000010
  900. #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_LSB 11
  901. #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_MASK 0x00000800
  902. /* Description WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME
  903. Field only valid when SW_release_details_valid is set.
  904. Consumer: SW
  905. Producer: WBM
  906. This is the FW_tx_notify_frame field from the
  907. <legal all>
  908. */
  909. #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_OFFSET 0x00000010
  910. #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_LSB 12
  911. #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_MASK 0x00001000
  912. /* Description WBM_RELEASE_RING_4_BUFFER_TIMESTAMP
  913. Field only valid when SW_release_details_valid is set.
  914. Consumer: SW
  915. Producer: WBM
  916. This is the Buffer_timestamp field from the
  917. TX_MSDU_DETAILS for this frame from the MSDU link
  918. descriptor.
  919. Timestamp in units of 1024 µs
  920. <legal all>
  921. */
  922. #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_OFFSET 0x00000010
  923. #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_LSB 13
  924. #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_MASK 0xffffe000
  925. /* EXTERNAL REFERENCE : struct tx_rate_stats_info tx_rate_stats */
  926. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID
  927. When set all other fields in this STRUCT contain valid
  928. info.
  929. <legal all>
  930. */
  931. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_OFFSET 0x00000014
  932. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_LSB 0
  933. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_MASK 0x00000001
  934. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW
  935. Field only valid when Tx_rate_stats_info_valid is set
  936. Indicates the BW of the upcoming transmission that shall
  937. likely start in about 3 -4 us on the medium
  938. <enum 0 transmit_bw_20_MHz>
  939. <enum 1 transmit_bw_40_MHz>
  940. <enum 2 transmit_bw_80_MHz>
  941. <enum 3 transmit_bw_160_MHz>
  942. <legal all>
  943. */
  944. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_OFFSET 0x00000014
  945. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_LSB 1
  946. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_MASK 0x00000006
  947. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE
  948. Field only valid when Tx_rate_stats_info_valid is set
  949. Field filled in by PDG.
  950. Not valid when in SW transmit mode
  951. The packet type
  952. <enum 0 dot11a>802.11a PPDU type
  953. <enum 1 dot11b>802.11b PPDU type
  954. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  955. <enum 3 dot11ac>802.11ac PPDU type
  956. <enum 4 dot11ax>802.11ax PPDU type
  957. <enum 5 dot11ba>802.11ba (WUR) PPDU type
  958. */
  959. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_OFFSET 0x00000014
  960. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_LSB 3
  961. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_MASK 0x00000078
  962. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC
  963. Field only valid when Tx_rate_stats_info_valid is set
  964. Field filled in by PDG.
  965. Not valid when in SW transmit mode
  966. When set, STBC transmission rate was used.
  967. */
  968. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_OFFSET 0x00000014
  969. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_LSB 7
  970. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_MASK 0x00000080
  971. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC
  972. Field only valid when Tx_rate_stats_info_valid is set
  973. Field filled in by PDG.
  974. Not valid when in SW transmit mode
  975. When set, use LDPC transmission rates
  976. */
  977. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_OFFSET 0x00000014
  978. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_LSB 8
  979. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_MASK 0x00000100
  980. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI
  981. Field only valid when Tx_rate_stats_info_valid is set
  982. Field filled in by PDG.
  983. Not valid when in SW transmit mode
  984. <enum 0 0_8_us_sgi > Legacy normal GI. Can also be
  985. used for HE
  986. <enum 1 0_4_us_sgi > Legacy short GI. Can also be
  987. used for HE
  988. <enum 2 1_6_us_sgi > HE related GI
  989. <enum 3 3_2_us_sgi > HE related GI
  990. <legal 0 - 3>
  991. */
  992. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_OFFSET 0x00000014
  993. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_LSB 9
  994. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_MASK 0x00000600
  995. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS
  996. Field only valid when Tx_rate_stats_info_valid is set
  997. Field filled in by PDG.
  998. Not valid when in SW transmit mode
  999. For details, refer to MCS_TYPE description
  1000. <legal all>
  1001. */
  1002. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_OFFSET 0x00000014
  1003. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_LSB 11
  1004. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_MASK 0x00007800
  1005. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION
  1006. Field only valid when Tx_rate_stats_info_valid is set
  1007. Field filled in by PDG.
  1008. Set when the transmission was an OFDMA transmission (DL
  1009. or UL).
  1010. <legal all>
  1011. */
  1012. #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_OFFSET 0x00000014
  1013. #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_LSB 15
  1014. #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_MASK 0x00008000
  1015. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU
  1016. Field only valid when Tx_rate_stats_info_valid is set
  1017. Field filled in by PDG.
  1018. Not valid when in SW transmit mode
  1019. The number of tones in the RU used.
  1020. <legal all>
  1021. */
  1022. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_OFFSET 0x00000014
  1023. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_LSB 16
  1024. #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_MASK 0x0fff0000
  1025. /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A
  1026. <legal 0>
  1027. */
  1028. #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_OFFSET 0x00000014
  1029. #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_LSB 28
  1030. #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_MASK 0xf0000000
  1031. /* Description WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF
  1032. Field only valid when Tx_rate_stats_info_valid is set
  1033. Based on a HWSCH configuration register setting, this
  1034. field either contains:
  1035. Lower 32 bits of the TSF, snapshot of this value when
  1036. transmission of the PPDU containing the frame finished.
  1037. OR
  1038. Lower 32 bits of the TSF, snapshot of this value when
  1039. transmission of the PPDU containing the frame started
  1040. <legal all>
  1041. */
  1042. #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_OFFSET 0x00000018
  1043. #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_LSB 0
  1044. #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_MASK 0xffffffff
  1045. /* Description WBM_RELEASE_RING_7_SW_PEER_ID
  1046. Field only valid when Release_source_module is set to
  1047. release_source_TQM
  1048. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  1049. not fetched and hence sw_peer_id and tid = 0
  1050. buffer_or_desc_type = e_num 0
  1051. MSDU_rel_buffertqm_release_reason = e_num 1
  1052. tqm_rr_rem_cmd_rem
  1053. 2) Release of msdu buffer due to Flow is not fetched and
  1054. hence sw_peer_id and tid = 0
  1055. buffer_or_desc_type = e_num 0
  1056. MSDU_rel_buffertqm_release_reason = e_num 1
  1057. tqm_rr_rem_cmd_rem
  1058. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  1059. command.
  1060. buffer_or_desc_type = e_num1
  1061. msdu_link_descriptortqm_release_reason can be:e_num 1
  1062. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  1063. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  1064. Sw_peer_id from the TX_MSDU_FLOW descriptor or
  1065. TX_MPDU_QUEUE descriptor
  1066. <legal all>
  1067. */
  1068. #define WBM_RELEASE_RING_7_SW_PEER_ID_OFFSET 0x0000001c
  1069. #define WBM_RELEASE_RING_7_SW_PEER_ID_LSB 0
  1070. #define WBM_RELEASE_RING_7_SW_PEER_ID_MASK 0x0000ffff
  1071. /* Description WBM_RELEASE_RING_7_TID
  1072. Field only valid when Release_source_module is set to
  1073. release_source_TQM
  1074. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  1075. not fetched and hence sw_peer_id and tid = 0
  1076. buffer_or_desc_type = e_num 0
  1077. MSDU_rel_buffertqm_release_reason = e_num 1
  1078. tqm_rr_rem_cmd_rem
  1079. 2) Release of msdu buffer due to Flow is not fetched and
  1080. hence sw_peer_id and tid = 0
  1081. buffer_or_desc_type = e_num 0
  1082. MSDU_rel_buffertqm_release_reason = e_num 1
  1083. tqm_rr_rem_cmd_rem
  1084. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  1085. command.
  1086. buffer_or_desc_type = e_num1
  1087. msdu_link_descriptortqm_release_reason can be:e_num 1
  1088. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  1089. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  1090. This field represents the TID from the TX_MSDU_FLOW
  1091. descriptor or TX_MPDU_QUEUE descriptor
  1092. <legal all>
  1093. */
  1094. #define WBM_RELEASE_RING_7_TID_OFFSET 0x0000001c
  1095. #define WBM_RELEASE_RING_7_TID_LSB 16
  1096. #define WBM_RELEASE_RING_7_TID_MASK 0x000f0000
  1097. /* Description WBM_RELEASE_RING_7_RING_ID
  1098. Consumer: TQM/REO/RXDMA/SW
  1099. Producer: SRNG (of RXDMA)
  1100. For debugging.
  1101. This field is filled in by the SRNG module.
  1102. It help to identify the ring that is being looked <legal
  1103. all>
  1104. */
  1105. #define WBM_RELEASE_RING_7_RING_ID_OFFSET 0x0000001c
  1106. #define WBM_RELEASE_RING_7_RING_ID_LSB 20
  1107. #define WBM_RELEASE_RING_7_RING_ID_MASK 0x0ff00000
  1108. /* Description WBM_RELEASE_RING_7_LOOPING_COUNT
  1109. Consumer: WBM/SW/FW
  1110. Producer: SW/TQM/RXDMA/REO/SWITCH
  1111. A count value that indicates the number of times the
  1112. producer of entries into the Buffer Manager Ring has looped
  1113. around the ring.
  1114. At initialization time, this value is set to 0. On the
  1115. first loop, this value is set to 1. After the max value is
  1116. reached allowed by the number of bits for this field, the
  1117. count value continues with 0 again.
  1118. In case SW is the consumer of the ring entries, it can
  1119. use this field to figure out up to where the producer of
  1120. entries has created new entries. This eliminates the need to
  1121. check where the head pointer' of the ring is located once
  1122. the SW starts processing an interrupt indicating that new
  1123. entries have been put into this ring...
  1124. Also note that SW if it wants only needs to look at the
  1125. LSB bit of this count value.
  1126. <legal all>
  1127. */
  1128. #define WBM_RELEASE_RING_7_LOOPING_COUNT_OFFSET 0x0000001c
  1129. #define WBM_RELEASE_RING_7_LOOPING_COUNT_LSB 28
  1130. #define WBM_RELEASE_RING_7_LOOPING_COUNT_MASK 0xf0000000
  1131. #endif // _WBM_RELEASE_RING_H_