wbm_release_ring.h 55 KB

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