wbm_release_ring.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578
  1. /*
  2. * Copyright (c) 2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _WBM_RELEASE_RING_H_
  19. #define _WBM_RELEASE_RING_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #include "buffer_addr_info.h"
  23. #include "tx_rate_stats_info.h"
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0-1 struct buffer_addr_info released_buff_or_desc_addr_info;
  28. // 2 release_source_module[2:0], bm_action[5:3], buffer_or_desc_type[8:6], first_msdu_index[12:9], tqm_release_reason[15:13], rxdma_push_reason[17:16], rxdma_error_code[22:18], reo_push_reason[24:23], reo_error_code[29:25], wbm_internal_error[30], reserved_2[31]
  29. // 3 tqm_status_number[23:0], transmit_count[30:24], reserved_3a[31]
  30. // 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]
  31. // 5-6 struct tx_rate_stats_info tx_rate_stats;
  32. // 7 sw_peer_id[15:0], tid[19:16], ring_id[27:20], looping_count[31:28]
  33. //
  34. // ################ END SUMMARY #################
  35. #define NUM_OF_DWORDS_WBM_RELEASE_RING 8
  36. struct wbm_release_ring {
  37. struct buffer_addr_info released_buff_or_desc_addr_info;
  38. uint32_t release_source_module : 3, //[2:0]
  39. bm_action : 3, //[5:3]
  40. buffer_or_desc_type : 3, //[8:6]
  41. first_msdu_index : 4, //[12:9]
  42. tqm_release_reason : 3, //[15:13]
  43. rxdma_push_reason : 2, //[17:16]
  44. rxdma_error_code : 5, //[22:18]
  45. reo_push_reason : 2, //[24:23]
  46. reo_error_code : 5, //[29:25]
  47. wbm_internal_error : 1, //[30]
  48. reserved_2 : 1; //[31]
  49. uint32_t tqm_status_number : 24, //[23:0]
  50. transmit_count : 7, //[30:24]
  51. reserved_3a : 1; //[31]
  52. uint32_t ack_frame_rssi : 8, //[7:0]
  53. sw_release_details_valid : 1, //[8]
  54. first_msdu : 1, //[9]
  55. last_msdu : 1, //[10]
  56. msdu_part_of_amsdu : 1, //[11]
  57. fw_tx_notify_frame : 1, //[12]
  58. buffer_timestamp : 19; //[31:13]
  59. struct tx_rate_stats_info tx_rate_stats;
  60. uint32_t sw_peer_id : 16, //[15:0]
  61. tid : 4, //[19:16]
  62. ring_id : 8, //[27:20]
  63. looping_count : 4; //[31:28]
  64. };
  65. /*
  66. struct buffer_addr_info released_buff_or_desc_addr_info
  67. Consumer: WBM/SW/FW
  68. Producer: SW/TQM/RXDMA/REO/SWITCH
  69. Details of the physical address of the buffer or link
  70. descriptor that is being released. Note that within this
  71. descriptor, WBM will look at the 'owner' of the released
  72. buffer/descriptor and forward it to SW/FW is WBM is not the
  73. owner.
  74. release_source_module
  75. Indicates which module initiated the release of this
  76. buffer or descriptor
  77. <enum 0 release_source_TQM> TQM released this buffer or
  78. descriptor
  79. <enum 1 release_source_RXDMA> RXDMA released this buffer
  80. or descriptor
  81. <enum 2 release_source_REO> REO released this buffer or
  82. descriptor
  83. <enum 3 release_source_FW> FW released this buffer or
  84. descriptor
  85. <enum 4 release_source_SW> SW released this buffer or
  86. descriptor
  87. <legal 0-4>
  88. bm_action
  89. Consumer: WBM/SW/FW
  90. Producer: SW/TQM/RXDMA/REO/SWITCH
  91. Field only valid when the field return_buffer_manager in
  92. the Released_buff_or_desc_addr_info indicates:
  93. WBM_IDLE_BUF_LIST or
  94. WBM_IDLE_DESC_LIST
  95. An MSDU extension descriptor shall never be marked as
  96. <enum 0 Put_in_idle_list> Put the buffer or descriptor
  97. back in the idle list. In case of MSDU or MDPU link
  98. descriptor, BM does not need to check to release any
  99. individual MSDU buffers
  100. <enum 1 release_msdu_list > This BM action can only be
  101. used in combination with buffer_or_desc_type being
  102. msdu_link_descriptor. Field first_msdu_index points out
  103. which MSDU pointer in the MSDU link descriptor is the first
  104. of an MPDU that is released.
  105. BM shall release all the MSDU buffers linked to this
  106. first MSDU buffer pointer. All related MSDU buffer pointer
  107. entries shall be set to value 0, which represents the 'NULL
  108. pointer. When all MSDU buffer pointers in the MSDU link
  109. descriptor are 'NULL', the MSDU link descriptor itself shall
  110. also be released.
  111. <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
  112. IMPLEMENTED....
  113. Put the buffer or descriptor back in the idle list. Only
  114. valid in combination with buffer_or_desc_type indicating
  115. MDPU_link_descriptor.
  116. BM shall release the MPDU link descriptor as well as all
  117. MSDUs that are linked to the MPDUs in this descriptor.
  118. <legal 0-2>
  119. buffer_or_desc_type
  120. Consumer: WBM/SW/FW
  121. Producer: SW/TQM/RXDMA/REO/SWITCH
  122. Field only valid when WBM is marked as the
  123. return_buffer_manager in the Released_Buffer_address_info
  124. Indicates that type of buffer or descriptor is being
  125. released
  126. <enum 0 MSDU_rel_buffer> The address points to an MSDU
  127. buffer
  128. <enum 1 msdu_link_descriptor> The address points to an
  129. TX MSDU link descriptor
  130. <enum 2 mpdu_link_descriptor> The address points to an
  131. MPDU link descriptor
  132. <enum 3 msdu_ext_descriptor > The address points to an
  133. MSDU extension descriptor.
  134. In case BM finds this one in a release ring, it passes
  135. it on to FW...
  136. <enum 4 queue_ext_descriptor> The address points to an
  137. TQM queue extension descriptor. WBM should treat this is the
  138. same way as a link descriptor. That is, put the 128 byte
  139. buffer back in the link buffer idle list.
  140. <legal 0-4>
  141. first_msdu_index
  142. Consumer: WBM/SW/FW
  143. Producer: SW/TQM/RXDMA/REO/SWITCH
  144. Field only valid for the bm_action release_msdu_list.
  145. The index of the first MSDU in an MSDU link descriptor
  146. all belonging to the same MPDU.
  147. <legal 0-6>
  148. tqm_release_reason
  149. Consumer: WBM/SW/FW
  150. Producer: TQM
  151. Field only valid when Release_source_module is set to
  152. release_source_TQM
  153. (rr = Release Reason)
  154. <enum 0 tqm_rr_frame_acked> frame is removed because an
  155. ACK of BA for it was received
  156. <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
  157. remove command of type Remove_mpdus initiated by SW
  158. <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
  159. remove command of type Remove_transmitted_mpdus initiated by
  160. SW
  161. <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
  162. remove command of type Remove_untransmitted_mpdus initiated
  163. by SW
  164. <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
  165. remove command of type Remove_aged_mpdus or
  166. Remove_aged_msdus initiated by SW
  167. <enum 5 tqm_fw_reason1> frame is removed because a
  168. remove command where fw indicated that remove reason is
  169. fw_reason1
  170. <enum 6 tqm_fw_reason2> frame is removed because a
  171. remove command where fw indicated that remove reason is
  172. fw_reason1
  173. <enum 7 tqm_fw_reason3> frame is removed because a
  174. remove command where fw indicated that remove reason is
  175. fw_reason1
  176. <legal 0-7>
  177. rxdma_push_reason
  178. Field only valid when Release_source_module is set to
  179. release_source_RXDMA
  180. Indicates why rxdma pushed the frame to this ring
  181. <enum 0 rxdma_error_detected> RXDMA detected an error an
  182. pushed this frame to this queue
  183. <enum 1 rxdma_routing_instruction> RXDMA pushed the
  184. frame to this queue per received routing instructions. No
  185. error within RXDMA was detected
  186. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  187. result the MSDU link descriptor might not have the
  188. last_msdu_in_mpdu_flag set, but instead WBM might just see a
  189. NULL pointer in the MSDU link descriptor. This is to be
  190. considered a normal condition for this scenario.
  191. <legal 0 - 2>
  192. rxdma_error_code
  193. Field only valid when 'rxdma_push_reason' set to
  194. 'rxdma_error_detected'.
  195. <enum 0 rxdma_overflow_err>MPDU frame is not complete
  196. due to a FIFO overflow error in RXPCU.
  197. <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
  198. due to receiving incomplete MPDU from the PHY
  199. <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
  200. error or CRYPTO received an encrypted frame, but did not get
  201. a valid corresponding key id in the peer entry.
  202. <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
  203. error
  204. <enum 5 rxdma_unecrypted_err>CRYPTO reported an
  205. unencrypted frame error when encrypted was expected
  206. <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
  207. length error
  208. <enum 7 rxdma_msdu_limit_err>RX OLE reported that max
  209. number of MSDUs allowed in an MPDU got exceeded
  210. <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
  211. error
  212. <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
  213. parsing error
  214. <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
  215. during SA search
  216. <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
  217. during DA search
  218. <enum 12 rxdma_flow_timeout_err>RX OLE reported a
  219. timeout during flow search
  220. <enum 13 rxdma_flush_request>RXDMA received a flush
  221. request
  222. <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
  223. present as well as a fragmented MPDU. A-MSDU defragmentation
  224. is not supported in Lithium SW so this is treated as an
  225. error.
  226. reo_push_reason
  227. Field only valid when Release_source_module is set to
  228. release_source_REO
  229. Indicates why REO pushed the frame to this release ring
  230. <enum 0 reo_error_detected> Reo detected an error an
  231. pushed this frame to this queue
  232. <enum 1 reo_routing_instruction> Reo pushed the frame to
  233. this queue per received routing instructions. No error
  234. within REO was detected
  235. <legal 0 - 1>
  236. reo_error_code
  237. Field only valid when 'Reo_push_reason' set to
  238. 'reo_error_detected'.
  239. <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
  240. provided in the REO_ENTRANCE ring is set to 0
  241. <enum 1 reo_queue_desc_not_valid> Reo queue descriptor
  242. valid bit is NOT set
  243. <enum 2 ampdu_in_non_ba> AMPDU frame received without BA
  244. session having been setup.
  245. <enum 3 non_ba_duplicate> Non-BA session, SN equal to
  246. SSN, Retry bit set: duplicate frame
  247. <enum 4 ba_duplicate> BA session, duplicate frame
  248. <enum 5 regular_frame_2k_jump> A normal (management/data
  249. frame) received with 2K jump in SN
  250. <enum 6 bar_frame_2k_jump> A bar received with 2K jump
  251. in SSN
  252. <enum 7 regular_frame_OOR> A normal (management/data
  253. frame) received with SN falling within the OOR window
  254. <enum 8 bar_frame_OOR> A bar received with SSN falling
  255. within the OOR window
  256. <enum 9 bar_frame_no_ba_session> A bar received without
  257. a BA session
  258. <enum 10 bar_frame_sn_equals_ssn> A bar received with
  259. SSN equal to SN
  260. <enum 11 pn_check_failed> PN Check Failed packet.
  261. <enum 12 2k_error_handling_flag_set> Frame is forwarded
  262. as a result of the 'Seq_2k_error_detected_flag' been set in
  263. the REO Queue descriptor
  264. <enum 13 pn_error_handling_flag_set> Frame is forwarded
  265. as a result of the 'pn_error_detected_flag' been set in the
  266. REO Queue descriptor
  267. <enum 14 queue_descriptor_blocked_set> Frame is
  268. forwarded as a result of the queue descriptor(address) being
  269. blocked as SW/FW seems to be currently in the process of
  270. making updates to this descriptor...
  271. <legal 0-14>
  272. wbm_internal_error
  273. Can only be set by WBM.
  274. Is set when WBM got a buffer pointer but the action was
  275. to push it to the idle link descriptor ring or do link
  276. related activity
  277. OR
  278. Is set when WBM got a link buffer pointer but the action
  279. was to push it to the buffer descriptor ring
  280. <legal all>
  281. reserved_2
  282. <legal 0>
  283. tqm_status_number
  284. Field only valid when Release_source_module is set to
  285. release_source_TQM
  286. The value in this field is equal to value of the
  287. 'TQM_CMD_Number' field the TQM command or the
  288. 'TQM_add_cmd_Number' field from the TQM entrance ring
  289. descriptor
  290. This field helps to correlate the statuses with the TQM
  291. commands.
  292. NOTE that SW could program this number to be equal to
  293. the PPDU_ID number in case direct correlation with the PPDU
  294. ID is desired
  295. <legal all>
  296. transmit_count
  297. Field only valid when Release_source_module is set to
  298. release_source_TQM
  299. The number of times this frame has been transmitted
  300. reserved_3a
  301. <legal 0>
  302. ack_frame_rssi
  303. This field is only valid when the source is TQM.
  304. If this frame is removed as the result of the reception
  305. of an ACK or BA, this field indicates the RSSI of the
  306. received ACK or BA frame.
  307. When the frame is removed as result of a direct remove
  308. command from the SW, this field is set to 0x0 (which is
  309. never a valid value when real RSSI is available)
  310. <legal all>
  311. sw_release_details_valid
  312. Consumer: SW
  313. Producer: WBM
  314. When set, some WBM specific release info for SW is
  315. valid.
  316. This is set when WMB got a 'release_msdu_list' command
  317. from TQM and the return buffer manager is not WMB. WBM will
  318. then de-aggregate all the MSDUs and pass them one at a time
  319. on to the 'buffer owner'
  320. <legal all>
  321. first_msdu
  322. Field only valid when SW_release_details_valid is set.
  323. Consumer: SW
  324. Producer: WBM
  325. When set, this MSDU is the first MSDU pointed to in the
  326. 'release_msdu_list' command.
  327. <legal all>
  328. last_msdu
  329. Field only valid when SW_release_details_valid is set.
  330. Consumer: SW
  331. Producer: WBM
  332. When set, this MSDU is the last MSDU pointed to in the
  333. 'release_msdu_list' command.
  334. <legal all>
  335. msdu_part_of_amsdu
  336. Field only valid when SW_release_details_valid is set.
  337. Consumer: SW
  338. Producer: WBM
  339. When set, this MSDU was part of an A-MSDU in MPDU
  340. <legal all>
  341. fw_tx_notify_frame
  342. Field only valid when SW_release_details_valid is set.
  343. Consumer: SW
  344. Producer: WBM
  345. This is the FW_tx_notify_frame field from the
  346. <legal all>
  347. buffer_timestamp
  348. Field only valid when SW_release_details_valid is set.
  349. Consumer: SW
  350. Producer: WBM
  351. This is the Buffer_timestamp field from the
  352. <legal all>
  353. struct tx_rate_stats_info tx_rate_stats
  354. Consumer: TQM
  355. Producer: SW/SCH(from TXPCU, PDG)
  356. Details for command execution tracking purposes.
  357. sw_peer_id
  358. Field only valid when Release_source_module is set to
  359. release_source_TQM
  360. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  361. not fetched and hence sw_peer_id and tid = 0
  362. buffer_or_desc_type = e_num 0
  363. MSDU_rel_buffertqm_release_reason = e_num 1
  364. tqm_rr_rem_cmd_rem
  365. 2) Release of msdu buffer due to Flow is not fetched and
  366. hence sw_peer_id and tid = 0
  367. buffer_or_desc_type = e_num 0
  368. MSDU_rel_buffertqm_release_reason = e_num 1
  369. tqm_rr_rem_cmd_rem
  370. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  371. command.
  372. buffer_or_desc_type = e_num1
  373. msdu_link_descriptortqm_release_reason can be:e_num 1
  374. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  375. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  376. Sw_peer_id from the TX_MSDU_FLOW descriptor or
  377. TX_MPDU_QUEUE descriptor
  378. <legal all>
  379. tid
  380. Field only valid when Release_source_module is set to
  381. release_source_TQM
  382. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  383. not fetched and hence sw_peer_id and tid = 0
  384. buffer_or_desc_type = e_num 0
  385. MSDU_rel_buffertqm_release_reason = e_num 1
  386. tqm_rr_rem_cmd_rem
  387. 2) Release of msdu buffer due to Flow is not fetched and
  388. hence sw_peer_id and tid = 0
  389. buffer_or_desc_type = e_num 0
  390. MSDU_rel_buffertqm_release_reason = e_num 1
  391. tqm_rr_rem_cmd_rem
  392. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  393. command.
  394. buffer_or_desc_type = e_num1
  395. msdu_link_descriptortqm_release_reason can be:e_num 1
  396. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  397. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  398. This field represents the TID from the TX_MSDU_FLOW
  399. descriptor or TX_MPDU_QUEUE descriptor
  400. <legal all>
  401. ring_id
  402. Consumer: TQM/REO/RXDMA/SW
  403. Producer: SRNG (of RXDMA)
  404. For debugging.
  405. This field is filled in by the SRNG module.
  406. It help to identify the ring that is being looked <legal
  407. all>
  408. looping_count
  409. Consumer: WBM/SW/FW
  410. Producer: SW/TQM/RXDMA/REO/SWITCH
  411. A count value that indicates the number of times the
  412. producer of entries into the Buffer Manager Ring has looped
  413. around the ring.
  414. At initialization time, this value is set to 0. On the
  415. first loop, this value is set to 1. After the max value is
  416. reached allowed by the number of bits for this field, the
  417. count value continues with 0 again.
  418. In case SW is the consumer of the ring entries, it can
  419. use this field to figure out up to where the producer of
  420. entries has created new entries. This eliminates the need to
  421. check where the head pointer' of the ring is located once
  422. the SW starts processing an interrupt indicating that new
  423. entries have been put into this ring...
  424. Also note that SW if it wants only needs to look at the
  425. LSB bit of this count value.
  426. <legal all>
  427. */
  428. #define WBM_RELEASE_RING_0_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_OFFSET 0x00000000
  429. #define WBM_RELEASE_RING_0_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_LSB 28
  430. #define WBM_RELEASE_RING_0_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_MASK 0xffffffff
  431. #define WBM_RELEASE_RING_1_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_OFFSET 0x00000004
  432. #define WBM_RELEASE_RING_1_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_LSB 28
  433. #define WBM_RELEASE_RING_1_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_MASK 0xffffffff
  434. /* Description WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE
  435. Indicates which module initiated the release of this
  436. buffer or descriptor
  437. <enum 0 release_source_TQM> TQM released this buffer or
  438. descriptor
  439. <enum 1 release_source_RXDMA> RXDMA released this buffer
  440. or descriptor
  441. <enum 2 release_source_REO> REO released this buffer or
  442. descriptor
  443. <enum 3 release_source_FW> FW released this buffer or
  444. descriptor
  445. <enum 4 release_source_SW> SW released this buffer or
  446. descriptor
  447. <legal 0-4>
  448. */
  449. #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_OFFSET 0x00000008
  450. #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_LSB 0
  451. #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_MASK 0x00000007
  452. /* Description WBM_RELEASE_RING_2_BM_ACTION
  453. Consumer: WBM/SW/FW
  454. Producer: SW/TQM/RXDMA/REO/SWITCH
  455. Field only valid when the field return_buffer_manager in
  456. the Released_buff_or_desc_addr_info indicates:
  457. WBM_IDLE_BUF_LIST or
  458. WBM_IDLE_DESC_LIST
  459. An MSDU extension descriptor shall never be marked as
  460. <enum 0 Put_in_idle_list> Put the buffer or descriptor
  461. back in the idle list. In case of MSDU or MDPU link
  462. descriptor, BM does not need to check to release any
  463. individual MSDU buffers
  464. <enum 1 release_msdu_list > This BM action can only be
  465. used in combination with buffer_or_desc_type being
  466. msdu_link_descriptor. Field first_msdu_index points out
  467. which MSDU pointer in the MSDU link descriptor is the first
  468. of an MPDU that is released.
  469. BM shall release all the MSDU buffers linked to this
  470. first MSDU buffer pointer. All related MSDU buffer pointer
  471. entries shall be set to value 0, which represents the 'NULL
  472. pointer. When all MSDU buffer pointers in the MSDU link
  473. descriptor are 'NULL', the MSDU link descriptor itself shall
  474. also be released.
  475. <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
  476. IMPLEMENTED....
  477. Put the buffer or descriptor back in the idle list. Only
  478. valid in combination with buffer_or_desc_type indicating
  479. MDPU_link_descriptor.
  480. BM shall release the MPDU link descriptor as well as all
  481. MSDUs that are linked to the MPDUs in this descriptor.
  482. <legal 0-2>
  483. */
  484. #define WBM_RELEASE_RING_2_BM_ACTION_OFFSET 0x00000008
  485. #define WBM_RELEASE_RING_2_BM_ACTION_LSB 3
  486. #define WBM_RELEASE_RING_2_BM_ACTION_MASK 0x00000038
  487. /* Description WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE
  488. Consumer: WBM/SW/FW
  489. Producer: SW/TQM/RXDMA/REO/SWITCH
  490. Field only valid when WBM is marked as the
  491. return_buffer_manager in the Released_Buffer_address_info
  492. Indicates that type of buffer or descriptor is being
  493. released
  494. <enum 0 MSDU_rel_buffer> The address points to an MSDU
  495. buffer
  496. <enum 1 msdu_link_descriptor> The address points to an
  497. TX MSDU link descriptor
  498. <enum 2 mpdu_link_descriptor> The address points to an
  499. MPDU link descriptor
  500. <enum 3 msdu_ext_descriptor > The address points to an
  501. MSDU extension descriptor.
  502. In case BM finds this one in a release ring, it passes
  503. it on to FW...
  504. <enum 4 queue_ext_descriptor> The address points to an
  505. TQM queue extension descriptor. WBM should treat this is the
  506. same way as a link descriptor. That is, put the 128 byte
  507. buffer back in the link buffer idle list.
  508. <legal 0-4>
  509. */
  510. #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_OFFSET 0x00000008
  511. #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_LSB 6
  512. #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_MASK 0x000001c0
  513. /* Description WBM_RELEASE_RING_2_FIRST_MSDU_INDEX
  514. Consumer: WBM/SW/FW
  515. Producer: SW/TQM/RXDMA/REO/SWITCH
  516. Field only valid for the bm_action release_msdu_list.
  517. The index of the first MSDU in an MSDU link descriptor
  518. all belonging to the same MPDU.
  519. <legal 0-6>
  520. */
  521. #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_OFFSET 0x00000008
  522. #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_LSB 9
  523. #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_MASK 0x00001e00
  524. /* Description WBM_RELEASE_RING_2_TQM_RELEASE_REASON
  525. Consumer: WBM/SW/FW
  526. Producer: TQM
  527. Field only valid when Release_source_module is set to
  528. release_source_TQM
  529. (rr = Release Reason)
  530. <enum 0 tqm_rr_frame_acked> frame is removed because an
  531. ACK of BA for it was received
  532. <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
  533. remove command of type Remove_mpdus initiated by SW
  534. <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
  535. remove command of type Remove_transmitted_mpdus initiated by
  536. SW
  537. <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
  538. remove command of type Remove_untransmitted_mpdus initiated
  539. by SW
  540. <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
  541. remove command of type Remove_aged_mpdus or
  542. Remove_aged_msdus initiated by SW
  543. <enum 5 tqm_fw_reason1> frame is removed because a
  544. remove command where fw indicated that remove reason is
  545. fw_reason1
  546. <enum 6 tqm_fw_reason2> frame is removed because a
  547. remove command where fw indicated that remove reason is
  548. fw_reason1
  549. <enum 7 tqm_fw_reason3> frame is removed because a
  550. remove command where fw indicated that remove reason is
  551. fw_reason1
  552. <legal 0-7>
  553. */
  554. #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_OFFSET 0x00000008
  555. #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB 13
  556. #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_MASK 0x0000e000
  557. /* Description WBM_RELEASE_RING_2_RXDMA_PUSH_REASON
  558. Field only valid when Release_source_module is set to
  559. release_source_RXDMA
  560. Indicates why rxdma pushed the frame to this ring
  561. <enum 0 rxdma_error_detected> RXDMA detected an error an
  562. pushed this frame to this queue
  563. <enum 1 rxdma_routing_instruction> RXDMA pushed the
  564. frame to this queue per received routing instructions. No
  565. error within RXDMA was detected
  566. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  567. result the MSDU link descriptor might not have the
  568. last_msdu_in_mpdu_flag set, but instead WBM might just see a
  569. NULL pointer in the MSDU link descriptor. This is to be
  570. considered a normal condition for this scenario.
  571. <legal 0 - 2>
  572. */
  573. #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_OFFSET 0x00000008
  574. #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_LSB 16
  575. #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_MASK 0x00030000
  576. /* Description WBM_RELEASE_RING_2_RXDMA_ERROR_CODE
  577. Field only valid when 'rxdma_push_reason' set to
  578. 'rxdma_error_detected'.
  579. <enum 0 rxdma_overflow_err>MPDU frame is not complete
  580. due to a FIFO overflow error in RXPCU.
  581. <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
  582. due to receiving incomplete MPDU from the PHY
  583. <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
  584. error or CRYPTO received an encrypted frame, but did not get
  585. a valid corresponding key id in the peer entry.
  586. <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
  587. error
  588. <enum 5 rxdma_unecrypted_err>CRYPTO reported an
  589. unencrypted frame error when encrypted was expected
  590. <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
  591. length error
  592. <enum 7 rxdma_msdu_limit_err>RX OLE reported that max
  593. number of MSDUs allowed in an MPDU got exceeded
  594. <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
  595. error
  596. <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
  597. parsing error
  598. <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
  599. during SA search
  600. <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
  601. during DA search
  602. <enum 12 rxdma_flow_timeout_err>RX OLE reported a
  603. timeout during flow search
  604. <enum 13 rxdma_flush_request>RXDMA received a flush
  605. request
  606. <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
  607. present as well as a fragmented MPDU. A-MSDU defragmentation
  608. is not supported in Lithium SW so this is treated as an
  609. error.
  610. */
  611. #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_OFFSET 0x00000008
  612. #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_LSB 18
  613. #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_MASK 0x007c0000
  614. /* Description WBM_RELEASE_RING_2_REO_PUSH_REASON
  615. Field only valid when Release_source_module is set to
  616. release_source_REO
  617. Indicates why REO pushed the frame to this release ring
  618. <enum 0 reo_error_detected> Reo detected an error an
  619. pushed this frame to this queue
  620. <enum 1 reo_routing_instruction> Reo pushed the frame to
  621. this queue per received routing instructions. No error
  622. within REO was detected
  623. <legal 0 - 1>
  624. */
  625. #define WBM_RELEASE_RING_2_REO_PUSH_REASON_OFFSET 0x00000008
  626. #define WBM_RELEASE_RING_2_REO_PUSH_REASON_LSB 23
  627. #define WBM_RELEASE_RING_2_REO_PUSH_REASON_MASK 0x01800000
  628. /* Description WBM_RELEASE_RING_2_REO_ERROR_CODE
  629. Field only valid when 'Reo_push_reason' set to
  630. 'reo_error_detected'.
  631. <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
  632. provided in the REO_ENTRANCE ring is set to 0
  633. <enum 1 reo_queue_desc_not_valid> Reo queue descriptor
  634. valid bit is NOT set
  635. <enum 2 ampdu_in_non_ba> AMPDU frame received without BA
  636. session having been setup.
  637. <enum 3 non_ba_duplicate> Non-BA session, SN equal to
  638. SSN, Retry bit set: duplicate frame
  639. <enum 4 ba_duplicate> BA session, duplicate frame
  640. <enum 5 regular_frame_2k_jump> A normal (management/data
  641. frame) received with 2K jump in SN
  642. <enum 6 bar_frame_2k_jump> A bar received with 2K jump
  643. in SSN
  644. <enum 7 regular_frame_OOR> A normal (management/data
  645. frame) received with SN falling within the OOR window
  646. <enum 8 bar_frame_OOR> A bar received with SSN falling
  647. within the OOR window
  648. <enum 9 bar_frame_no_ba_session> A bar received without
  649. a BA session
  650. <enum 10 bar_frame_sn_equals_ssn> A bar received with
  651. SSN equal to SN
  652. <enum 11 pn_check_failed> PN Check Failed packet.
  653. <enum 12 2k_error_handling_flag_set> Frame is forwarded
  654. as a result of the 'Seq_2k_error_detected_flag' been set in
  655. the REO Queue descriptor
  656. <enum 13 pn_error_handling_flag_set> Frame is forwarded
  657. as a result of the 'pn_error_detected_flag' been set in the
  658. REO Queue descriptor
  659. <enum 14 queue_descriptor_blocked_set> Frame is
  660. forwarded as a result of the queue descriptor(address) being
  661. blocked as SW/FW seems to be currently in the process of
  662. making updates to this descriptor...
  663. <legal 0-14>
  664. */
  665. #define WBM_RELEASE_RING_2_REO_ERROR_CODE_OFFSET 0x00000008
  666. #define WBM_RELEASE_RING_2_REO_ERROR_CODE_LSB 25
  667. #define WBM_RELEASE_RING_2_REO_ERROR_CODE_MASK 0x3e000000
  668. /* Description WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR
  669. Can only be set by WBM.
  670. Is set when WBM got a buffer pointer but the action was
  671. to push it to the idle link descriptor ring or do link
  672. related activity
  673. OR
  674. Is set when WBM got a link buffer pointer but the action
  675. was to push it to the buffer descriptor ring
  676. <legal all>
  677. */
  678. #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET 0x00000008
  679. #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB 30
  680. #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK 0x40000000
  681. /* Description WBM_RELEASE_RING_2_RESERVED_2
  682. <legal 0>
  683. */
  684. #define WBM_RELEASE_RING_2_RESERVED_2_OFFSET 0x00000008
  685. #define WBM_RELEASE_RING_2_RESERVED_2_LSB 31
  686. #define WBM_RELEASE_RING_2_RESERVED_2_MASK 0x80000000
  687. /* Description WBM_RELEASE_RING_3_TQM_STATUS_NUMBER
  688. Field only valid when Release_source_module is set to
  689. release_source_TQM
  690. The value in this field is equal to value of the
  691. 'TQM_CMD_Number' field the TQM command or the
  692. 'TQM_add_cmd_Number' field from the TQM entrance ring
  693. descriptor
  694. This field helps to correlate the statuses with the TQM
  695. commands.
  696. NOTE that SW could program this number to be equal to
  697. the PPDU_ID number in case direct correlation with the PPDU
  698. ID is desired
  699. <legal all>
  700. */
  701. #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_OFFSET 0x0000000c
  702. #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_LSB 0
  703. #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_MASK 0x00ffffff
  704. /* Description WBM_RELEASE_RING_3_TRANSMIT_COUNT
  705. Field only valid when Release_source_module is set to
  706. release_source_TQM
  707. The number of times this frame has been transmitted
  708. */
  709. #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_OFFSET 0x0000000c
  710. #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_LSB 24
  711. #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_MASK 0x7f000000
  712. /* Description WBM_RELEASE_RING_3_RESERVED_3A
  713. <legal 0>
  714. */
  715. #define WBM_RELEASE_RING_3_RESERVED_3A_OFFSET 0x0000000c
  716. #define WBM_RELEASE_RING_3_RESERVED_3A_LSB 31
  717. #define WBM_RELEASE_RING_3_RESERVED_3A_MASK 0x80000000
  718. /* Description WBM_RELEASE_RING_4_ACK_FRAME_RSSI
  719. This field is only valid when the source is TQM.
  720. If this frame is removed as the result of the reception
  721. of an ACK or BA, this field indicates the RSSI of the
  722. received ACK or BA frame.
  723. When the frame is removed as result of a direct remove
  724. command from the SW, this field is set to 0x0 (which is
  725. never a valid value when real RSSI is available)
  726. <legal all>
  727. */
  728. #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_OFFSET 0x00000010
  729. #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_LSB 0
  730. #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_MASK 0x000000ff
  731. /* Description WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID
  732. Consumer: SW
  733. Producer: WBM
  734. When set, some WBM specific release info for SW is
  735. valid.
  736. This is set when WMB got a 'release_msdu_list' command
  737. from TQM and the return buffer manager is not WMB. WBM will
  738. then de-aggregate all the MSDUs and pass them one at a time
  739. on to the 'buffer owner'
  740. <legal all>
  741. */
  742. #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_OFFSET 0x00000010
  743. #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_LSB 8
  744. #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_MASK 0x00000100
  745. /* Description WBM_RELEASE_RING_4_FIRST_MSDU
  746. Field only valid when SW_release_details_valid is set.
  747. Consumer: SW
  748. Producer: WBM
  749. When set, this MSDU is the first MSDU pointed to in the
  750. 'release_msdu_list' command.
  751. <legal all>
  752. */
  753. #define WBM_RELEASE_RING_4_FIRST_MSDU_OFFSET 0x00000010
  754. #define WBM_RELEASE_RING_4_FIRST_MSDU_LSB 9
  755. #define WBM_RELEASE_RING_4_FIRST_MSDU_MASK 0x00000200
  756. /* Description WBM_RELEASE_RING_4_LAST_MSDU
  757. Field only valid when SW_release_details_valid is set.
  758. Consumer: SW
  759. Producer: WBM
  760. When set, this MSDU is the last MSDU pointed to in the
  761. 'release_msdu_list' command.
  762. <legal all>
  763. */
  764. #define WBM_RELEASE_RING_4_LAST_MSDU_OFFSET 0x00000010
  765. #define WBM_RELEASE_RING_4_LAST_MSDU_LSB 10
  766. #define WBM_RELEASE_RING_4_LAST_MSDU_MASK 0x00000400
  767. /* Description WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU
  768. Field only valid when SW_release_details_valid is set.
  769. Consumer: SW
  770. Producer: WBM
  771. When set, this MSDU was part of an A-MSDU in MPDU
  772. <legal all>
  773. */
  774. #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_OFFSET 0x00000010
  775. #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_LSB 11
  776. #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_MASK 0x00000800
  777. /* Description WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME
  778. Field only valid when SW_release_details_valid is set.
  779. Consumer: SW
  780. Producer: WBM
  781. This is the FW_tx_notify_frame field from the
  782. <legal all>
  783. */
  784. #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_OFFSET 0x00000010
  785. #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_LSB 12
  786. #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_MASK 0x00001000
  787. /* Description WBM_RELEASE_RING_4_BUFFER_TIMESTAMP
  788. Field only valid when SW_release_details_valid is set.
  789. Consumer: SW
  790. Producer: WBM
  791. This is the Buffer_timestamp field from the
  792. <legal all>
  793. */
  794. #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_OFFSET 0x00000010
  795. #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_LSB 13
  796. #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_MASK 0xffffe000
  797. #define WBM_RELEASE_RING_5_TX_RATE_STATS_INFO_TX_RATE_STATS_OFFSET 0x00000014
  798. #define WBM_RELEASE_RING_5_TX_RATE_STATS_INFO_TX_RATE_STATS_LSB 13
  799. #define WBM_RELEASE_RING_5_TX_RATE_STATS_INFO_TX_RATE_STATS_MASK 0xffffffff
  800. #define WBM_RELEASE_RING_6_TX_RATE_STATS_INFO_TX_RATE_STATS_OFFSET 0x00000018
  801. #define WBM_RELEASE_RING_6_TX_RATE_STATS_INFO_TX_RATE_STATS_LSB 13
  802. #define WBM_RELEASE_RING_6_TX_RATE_STATS_INFO_TX_RATE_STATS_MASK 0xffffffff
  803. /* Description WBM_RELEASE_RING_7_SW_PEER_ID
  804. Field only valid when Release_source_module is set to
  805. release_source_TQM
  806. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  807. not fetched and hence sw_peer_id and tid = 0
  808. buffer_or_desc_type = e_num 0
  809. MSDU_rel_buffertqm_release_reason = e_num 1
  810. tqm_rr_rem_cmd_rem
  811. 2) Release of msdu buffer due to Flow is not fetched and
  812. hence sw_peer_id and tid = 0
  813. buffer_or_desc_type = e_num 0
  814. MSDU_rel_buffertqm_release_reason = e_num 1
  815. tqm_rr_rem_cmd_rem
  816. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  817. command.
  818. buffer_or_desc_type = e_num1
  819. msdu_link_descriptortqm_release_reason can be:e_num 1
  820. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  821. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  822. Sw_peer_id from the TX_MSDU_FLOW descriptor or
  823. TX_MPDU_QUEUE descriptor
  824. <legal all>
  825. */
  826. #define WBM_RELEASE_RING_7_SW_PEER_ID_OFFSET 0x0000001c
  827. #define WBM_RELEASE_RING_7_SW_PEER_ID_LSB 0
  828. #define WBM_RELEASE_RING_7_SW_PEER_ID_MASK 0x0000ffff
  829. /* Description WBM_RELEASE_RING_7_TID
  830. Field only valid when Release_source_module is set to
  831. release_source_TQM
  832. 1) Release of msdu buffer due to drop_frame = 1. Flow is
  833. not fetched and hence sw_peer_id and tid = 0
  834. buffer_or_desc_type = e_num 0
  835. MSDU_rel_buffertqm_release_reason = e_num 1
  836. tqm_rr_rem_cmd_rem
  837. 2) Release of msdu buffer due to Flow is not fetched and
  838. hence sw_peer_id and tid = 0
  839. buffer_or_desc_type = e_num 0
  840. MSDU_rel_buffertqm_release_reason = e_num 1
  841. tqm_rr_rem_cmd_rem
  842. 3) Release of msdu link due to remove_mpdu or acked_mpdu
  843. command.
  844. buffer_or_desc_type = e_num1
  845. msdu_link_descriptortqm_release_reason can be:e_num 1
  846. tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
  847. e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
  848. This field represents the TID from the TX_MSDU_FLOW
  849. descriptor or TX_MPDU_QUEUE descriptor
  850. <legal all>
  851. */
  852. #define WBM_RELEASE_RING_7_TID_OFFSET 0x0000001c
  853. #define WBM_RELEASE_RING_7_TID_LSB 16
  854. #define WBM_RELEASE_RING_7_TID_MASK 0x000f0000
  855. /* Description WBM_RELEASE_RING_7_RING_ID
  856. Consumer: TQM/REO/RXDMA/SW
  857. Producer: SRNG (of RXDMA)
  858. For debugging.
  859. This field is filled in by the SRNG module.
  860. It help to identify the ring that is being looked <legal
  861. all>
  862. */
  863. #define WBM_RELEASE_RING_7_RING_ID_OFFSET 0x0000001c
  864. #define WBM_RELEASE_RING_7_RING_ID_LSB 20
  865. #define WBM_RELEASE_RING_7_RING_ID_MASK 0x0ff00000
  866. /* Description WBM_RELEASE_RING_7_LOOPING_COUNT
  867. Consumer: WBM/SW/FW
  868. Producer: SW/TQM/RXDMA/REO/SWITCH
  869. A count value that indicates the number of times the
  870. producer of entries into the Buffer Manager Ring has looped
  871. around the ring.
  872. At initialization time, this value is set to 0. On the
  873. first loop, this value is set to 1. After the max value is
  874. reached allowed by the number of bits for this field, the
  875. count value continues with 0 again.
  876. In case SW is the consumer of the ring entries, it can
  877. use this field to figure out up to where the producer of
  878. entries has created new entries. This eliminates the need to
  879. check where the head pointer' of the ring is located once
  880. the SW starts processing an interrupt indicating that new
  881. entries have been put into this ring...
  882. Also note that SW if it wants only needs to look at the
  883. LSB bit of this count value.
  884. <legal all>
  885. */
  886. #define WBM_RELEASE_RING_7_LOOPING_COUNT_OFFSET 0x0000001c
  887. #define WBM_RELEASE_RING_7_LOOPING_COUNT_LSB 28
  888. #define WBM_RELEASE_RING_7_LOOPING_COUNT_MASK 0xf0000000
  889. #endif // _WBM_RELEASE_RING_H_