wbm_release_ring.h 37 KB

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