wbm_release_ring.h 50 KB

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