wbm_release_ring.h 53 KB

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