reo_entrance_ring.h 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525
  1. /*
  2. * Copyright (c) 2019, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef _REO_ENTRANCE_RING_H_
  17. #define _REO_ENTRANCE_RING_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "rx_mpdu_details.h"
  21. // ################ START SUMMARY #################
  22. //
  23. // Dword Fields
  24. // 0-3 struct rx_mpdu_details reo_level_mpdu_frame_info;
  25. // 4 rx_reo_queue_desc_addr_31_0[31:0]
  26. // 5 rx_reo_queue_desc_addr_39_32[7:0], rounded_mpdu_byte_count[21:8], reo_destination_indication[26:22], frameless_bar[27], reserved_5a[31:28]
  27. // 6 rxdma_push_reason[1:0], rxdma_error_code[6:2], mpdu_fragment_number[10:7], sw_exception[11], sw_exception_mpdu_delink[12], sw_exception_destination_ring_valid[13], sw_exception_destination_ring[18:14], reserved_6a[31:19]
  28. // 7 phy_ppdu_id[15:0], reserved_7a[19:16], ring_id[27:20], looping_count[31:28]
  29. //
  30. // ################ END SUMMARY #################
  31. #define NUM_OF_DWORDS_REO_ENTRANCE_RING 8
  32. struct reo_entrance_ring {
  33. struct rx_mpdu_details reo_level_mpdu_frame_info;
  34. uint32_t rx_reo_queue_desc_addr_31_0 : 32; //[31:0]
  35. uint32_t rx_reo_queue_desc_addr_39_32 : 8, //[7:0]
  36. rounded_mpdu_byte_count : 14, //[21:8]
  37. reo_destination_indication : 5, //[26:22]
  38. frameless_bar : 1, //[27]
  39. reserved_5a : 4; //[31:28]
  40. uint32_t rxdma_push_reason : 2, //[1:0]
  41. rxdma_error_code : 5, //[6:2]
  42. mpdu_fragment_number : 4, //[10:7]
  43. sw_exception : 1, //[11]
  44. sw_exception_mpdu_delink : 1, //[12]
  45. sw_exception_destination_ring_valid: 1, //[13]
  46. sw_exception_destination_ring : 5, //[18:14]
  47. reserved_6a : 13; //[31:19]
  48. uint32_t phy_ppdu_id : 16, //[15:0]
  49. reserved_7a : 4, //[19:16]
  50. ring_id : 8, //[27:20]
  51. looping_count : 4; //[31:28]
  52. };
  53. /*
  54. struct rx_mpdu_details reo_level_mpdu_frame_info
  55. Consumer: REO
  56. Producer: RXDMA
  57. Details related to the MPDU being pushed into the REO
  58. rx_reo_queue_desc_addr_31_0
  59. Consumer: REO
  60. Producer: RXDMA
  61. Address (lower 32 bits) of the REO queue descriptor.
  62. <legal all>
  63. rx_reo_queue_desc_addr_39_32
  64. Consumer: REO
  65. Producer: RXDMA
  66. Address (upper 8 bits) of the REO queue descriptor.
  67. <legal all>
  68. rounded_mpdu_byte_count
  69. An approximation of the number of bytes received in this
  70. MPDU.
  71. Used to keeps stats on the amount of data flowing
  72. through a queue.
  73. <legal all>
  74. reo_destination_indication
  75. RXDMA copy the MPDU's first MSDU's destination
  76. indication field here. This is used for REO to be able to
  77. re-route the packet to a different SW destination ring if
  78. the packet is detected as error in REO.
  79. The ID of the REO exit ring where the MSDU frame shall
  80. push after (MPDU level) reordering has finished.
  81. <enum 0 reo_destination_tcl> Reo will push the frame
  82. into the REO2TCL ring
  83. <enum 1 reo_destination_sw1> Reo will push the frame
  84. into the REO2SW1 ring
  85. <enum 2 reo_destination_sw2> Reo will push the frame
  86. into the REO2SW2 ring
  87. <enum 3 reo_destination_sw3> Reo will push the frame
  88. into the REO2SW3 ring
  89. <enum 4 reo_destination_sw4> Reo will push the frame
  90. into the REO2SW4 ring
  91. <enum 5 reo_destination_release> Reo will push the frame
  92. into the REO_release ring
  93. <enum 6 reo_destination_fw> Reo will push the frame into
  94. the REO2FW ring
  95. <enum 7 reo_destination_sw5> Reo will push the frame
  96. into the REO2SW5 ring (REO remaps this in chips without
  97. REO2SW5 ring, e.g. Pine)
  98. <enum 8 reo_destination_sw6> Reo will push the frame
  99. into the REO2SW6 ring (REO remaps this in chips without
  100. REO2SW6 ring, e.g. Pine)
  101. <enum 9 reo_destination_9> REO remaps this <enum 10
  102. reo_destination_10> REO remaps this
  103. <enum 11 reo_destination_11> REO remaps this
  104. <enum 12 reo_destination_12> REO remaps this <enum 13
  105. reo_destination_13> REO remaps this
  106. <enum 14 reo_destination_14> REO remaps this
  107. <enum 15 reo_destination_15> REO remaps this
  108. <enum 16 reo_destination_16> REO remaps this
  109. <enum 17 reo_destination_17> REO remaps this
  110. <enum 18 reo_destination_18> REO remaps this
  111. <enum 19 reo_destination_19> REO remaps this
  112. <enum 20 reo_destination_20> REO remaps this
  113. <enum 21 reo_destination_21> REO remaps this
  114. <enum 22 reo_destination_22> REO remaps this
  115. <enum 23 reo_destination_23> REO remaps this
  116. <enum 24 reo_destination_24> REO remaps this
  117. <enum 25 reo_destination_25> REO remaps this
  118. <enum 26 reo_destination_26> REO remaps this
  119. <enum 27 reo_destination_27> REO remaps this
  120. <enum 28 reo_destination_28> REO remaps this
  121. <enum 29 reo_destination_29> REO remaps this
  122. <enum 30 reo_destination_30> REO remaps this
  123. <enum 31 reo_destination_31> REO remaps this
  124. <legal all>
  125. frameless_bar
  126. When set, this REO entrance ring struct contains BAR
  127. info from a multi TID BAR frame. The original multi TID BAR
  128. frame itself contained all the REO info for the first TID,
  129. but all the subsequent TID info and their linkage to the REO
  130. descriptors is passed down as 'frameless' BAR info.
  131. The only fields valid in this descriptor when this bit
  132. is set are:
  133. Rx_reo_queue_desc_addr_31_0
  134. RX_reo_queue_desc_addr_39_32
  135. And within the
  136. Reo_level_mpdu_frame_info:
  137. Within Rx_mpdu_desc_info_details:
  138. Mpdu_Sequence_number
  139. BAR_frame
  140. Peer_meta_data
  141. All other fields shall be set to 0
  142. <legal all>
  143. reserved_5a
  144. <legal 0>
  145. rxdma_push_reason
  146. Indicates why rxdma pushed the frame to this ring
  147. This field is ignored by REO.
  148. <enum 0 rxdma_error_detected> RXDMA detected an error an
  149. pushed this frame to this queue
  150. <enum 1 rxdma_routing_instruction> RXDMA pushed the
  151. frame to this queue per received routing instructions. No
  152. error within RXDMA was detected
  153. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  154. result the MSDU link descriptor might not have the
  155. last_msdu_in_mpdu_flag set, but instead WBM might just see a
  156. NULL pointer in the MSDU link descriptor. This is to be
  157. considered a normal condition for this scenario.
  158. <legal 0 - 2>
  159. rxdma_error_code
  160. Field only valid when 'rxdma_push_reason' set to
  161. 'rxdma_error_detected'.
  162. This field is ignored by REO.
  163. <enum 0 rxdma_overflow_err>MPDU frame is not complete
  164. due to a FIFO overflow error in RXPCU.
  165. <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
  166. due to receiving incomplete MPDU from the PHY
  167. <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
  168. error or CRYPTO received an encrypted frame, but did not get
  169. a valid corresponding key id in the peer entry.
  170. <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
  171. error
  172. <enum 5 rxdma_unecrypted_err>CRYPTO reported an
  173. unencrypted frame error when encrypted was expected
  174. <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
  175. length error
  176. <enum 7 rxdma_msdu_limit_err>RX OLE reported that max
  177. number of MSDUs allowed in an MPDU got exceeded
  178. <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
  179. error
  180. <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
  181. parsing error
  182. <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
  183. during SA search
  184. <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
  185. during DA search
  186. <enum 12 rxdma_flow_timeout_err>RX OLE reported a
  187. timeout during flow search
  188. <enum 13 rxdma_flush_request>RXDMA received a flush
  189. request
  190. <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
  191. present as well as a fragmented MPDU. A-MSDU defragmentation
  192. is not supported in Lithium SW so this is treated as an
  193. error.
  194. mpdu_fragment_number
  195. Field only valid when Reo_level_mpdu_frame_info.
  196. Rx_mpdu_desc_info_details.Fragment_flag is set.
  197. The fragment number from the 802.11 header.
  198. Note that the sequence number is embedded in the field:
  199. Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details.
  200. Mpdu_sequence_number
  201. <legal all>
  202. sw_exception
  203. When not set, REO is performing all its default MPDU
  204. processing operations,
  205. When set, this REO entrance descriptor is generated by
  206. FW, and should be processed as an exception. This implies:
  207. NO re-order function is needed.
  208. MPDU delinking is determined by the setting of field
  209. SW_excection_mpdu_delink
  210. Destination ring selection is based on the setting of
  211. the field SW_exception_destination_ring_valid
  212. In the destination ring descriptor set bit:
  213. SW_exception_entry
  214. Feature supported only in HastingsPrime
  215. <legal all>
  216. sw_exception_mpdu_delink
  217. Field only valid when SW_exception is set.
  218. 1'b0: REO should NOT delink the MPDU, and thus pass this
  219. MPDU on to the destination ring as is. This implies that in
  220. the REO_DESTINATION_RING struct field
  221. Buf_or_link_desc_addr_info should point to an MSDU link
  222. descriptor
  223. 1'b1: REO should perform the normal MPDU delink into
  224. MSDU operations.
  225. Feature supported only in HastingsPrime
  226. <legal all>
  227. sw_exception_destination_ring_valid
  228. Field only valid when SW_exception is set.
  229. 1'b0: REO shall push the MPDU (or delinked MPDU based on
  230. the setting of SW_exception_mpdu_delink) to the destination
  231. ring according to field reo_destination_indication.
  232. 1'b1: REO shall push the MPDU (or delinked MPDU based on
  233. the setting of SW_exception_mpdu_delink) to the destination
  234. ring according to field SW_exception_destination_ring.
  235. Feature supported only in HastingsPrime
  236. <legal all>
  237. sw_exception_destination_ring
  238. Field only valid when fields SW_exception and
  239. SW_exception_destination_ring_valid are set.
  240. The ID of the ring where REO shall push this frame.
  241. <enum 0 reo_destination_tcl> Reo will push the frame
  242. into the REO2TCL ring
  243. <enum 1 reo_destination_sw1> Reo will push the frame
  244. into the REO2SW1 ring
  245. <enum 2 reo_destination_sw2> Reo will push the frame
  246. into the REO2SW1 ring
  247. <enum 3 reo_destination_sw3> Reo will push the frame
  248. into the REO2SW1 ring
  249. <enum 4 reo_destination_sw4> Reo will push the frame
  250. into the REO2SW1 ring
  251. <enum 5 reo_destination_release> Reo will push the frame
  252. into the REO_release ring
  253. <enum 6 reo_destination_fw> Reo will push the frame into
  254. the REO2FW ring
  255. <enum 7 reo_destination_sw5> REO remaps this
  256. <enum 8 reo_destination_sw6> REO remaps this
  257. <enum 9 reo_destination_9> REO remaps this
  258. <enum 10 reo_destination_10> REO remaps this
  259. <enum 11 reo_destination_11> REO remaps this
  260. <enum 12 reo_destination_12> REO remaps this <enum 13
  261. reo_destination_13> REO remaps this
  262. <enum 14 reo_destination_14> REO remaps this
  263. <enum 15 reo_destination_15> REO remaps this
  264. <enum 16 reo_destination_16> REO remaps this
  265. <enum 17 reo_destination_17> REO remaps this
  266. <enum 18 reo_destination_18> REO remaps this
  267. <enum 19 reo_destination_19> REO remaps this
  268. <enum 20 reo_destination_20> REO remaps this
  269. <enum 21 reo_destination_21> REO remaps this
  270. <enum 22 reo_destination_22> REO remaps this
  271. <enum 23 reo_destination_23> REO remaps this
  272. <enum 24 reo_destination_24> REO remaps this
  273. <enum 25 reo_destination_25> REO remaps this
  274. <enum 26 reo_destination_26> REO remaps this
  275. <enum 27 reo_destination_27> REO remaps this
  276. <enum 28 reo_destination_28> REO remaps this
  277. <enum 29 reo_destination_29> REO remaps this
  278. <enum 30 reo_destination_30> REO remaps this
  279. <enum 31 reo_destination_31> REO remaps this
  280. Feature supported only in HastingsPrime
  281. <legal all>
  282. reserved_6a
  283. <legal 0>
  284. phy_ppdu_id
  285. A PPDU counter value that PHY increments for every PPDU
  286. received
  287. The counter value wraps around. Pine RXDMA can be
  288. configured to copy this from the RX_PPDU_START TLV for every
  289. output descriptor.
  290. This field is ignored by REO.
  291. Feature supported only in Pine
  292. <legal all>
  293. reserved_7a
  294. <legal 0>
  295. ring_id
  296. Consumer: SW/REO/DEBUG
  297. Producer: SRNG (of RXDMA)
  298. For debugging.
  299. This field is filled in by the SRNG module.
  300. It help to identify the ring that is being looked <legal
  301. all>
  302. looping_count
  303. Consumer: SW/REO/DEBUG
  304. Producer: SRNG (of RXDMA)
  305. For debugging.
  306. This field is filled in by the SRNG module.
  307. A count value that indicates the number of times the
  308. producer of entries into this Ring has looped around the
  309. ring.
  310. At initialization time, this value is set to 0. On the
  311. first loop, this value is set to 1. After the max value is
  312. reached allowed by the number of bits for this field, the
  313. count value continues with 0 again.
  314. In case SW is the consumer of the ring entries, it can
  315. use this field to figure out up to where the producer of
  316. entries has created new entries. This eliminates the need to
  317. check where the head pointer' of the ring is located once
  318. the SW starts processing an interrupt indicating that new
  319. entries have been put into this ring...
  320. Also note that SW if it wants only needs to look at the
  321. LSB bit of this count value.
  322. <legal all>
  323. */
  324. /* EXTERNAL REFERENCE : struct rx_mpdu_details reo_level_mpdu_frame_info */
  325. /* EXTERNAL REFERENCE : struct buffer_addr_info msdu_link_desc_addr_info */
  326. /* Description REO_ENTRANCE_RING_0_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0
  327. Address (lower 32 bits) of the MSDU buffer OR
  328. MSDU_EXTENSION descriptor OR Link Descriptor
  329. In case of 'NULL' pointer, this field is set to 0
  330. <legal all>
  331. */
  332. #define REO_ENTRANCE_RING_0_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
  333. #define REO_ENTRANCE_RING_0_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
  334. #define REO_ENTRANCE_RING_0_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
  335. /* Description REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32
  336. Address (upper 8 bits) of the MSDU buffer OR
  337. MSDU_EXTENSION descriptor OR Link Descriptor
  338. In case of 'NULL' pointer, this field is set to 0
  339. <legal all>
  340. */
  341. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
  342. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
  343. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
  344. /* Description REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER
  345. Consumer: WBM
  346. Producer: SW/FW
  347. In case of 'NULL' pointer, this field is set to 0
  348. Indicates to which buffer manager the buffer OR
  349. MSDU_EXTENSION descriptor OR link descriptor that is being
  350. pointed to shall be returned after the frame has been
  351. processed. It is used by WBM for routing purposes.
  352. <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
  353. to the WMB buffer idle list
  354. <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
  355. returned to the WMB idle link descriptor idle list
  356. <enum 2 FW_BM> This buffer shall be returned to the FW
  357. <enum 3 SW0_BM> This buffer shall be returned to the SW,
  358. ring 0
  359. <enum 4 SW1_BM> This buffer shall be returned to the SW,
  360. ring 1
  361. <enum 5 SW2_BM> This buffer shall be returned to the SW,
  362. ring 2
  363. <enum 6 SW3_BM> This buffer shall be returned to the SW,
  364. ring 3
  365. <enum 7 SW4_BM> This buffer shall be returned to the SW,
  366. ring 4
  367. <legal all>
  368. */
  369. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
  370. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
  371. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700
  372. /* Description REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE
  373. Cookie field exclusively used by SW.
  374. In case of 'NULL' pointer, this field is set to 0
  375. HW ignores the contents, accept that it passes the
  376. programmed value on to other descriptors together with the
  377. physical address
  378. Field can be used by SW to for example associate the
  379. buffers physical address with the virtual address
  380. The bit definitions as used by SW are within SW HLD
  381. specification
  382. NOTE:
  383. The three most significant bits can have a special
  384. meaning in case this struct is embedded in a TX_MPDU_DETAILS
  385. STRUCT, and field transmit_bw_restriction is set
  386. In case of NON punctured transmission:
  387. Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
  388. Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
  389. Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
  390. Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
  391. In case of punctured transmission:
  392. Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only
  393. Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only
  394. Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only
  395. Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only
  396. Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only
  397. Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only
  398. Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only
  399. Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only
  400. Note: a punctured transmission is indicated by the
  401. presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler
  402. TLV
  403. <legal all>
  404. */
  405. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
  406. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11
  407. #define REO_ENTRANCE_RING_1_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800
  408. /* EXTERNAL REFERENCE : struct rx_mpdu_desc_info rx_mpdu_desc_info_details */
  409. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT
  410. Consumer: REO/SW/FW
  411. Producer: RXDMA
  412. The number of MSDUs within the MPDU
  413. <legal all>
  414. */
  415. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_OFFSET 0x00000008
  416. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_LSB 0
  417. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_MASK 0x000000ff
  418. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_SEQUENCE_NUMBER
  419. Consumer: REO/SW/FW
  420. Producer: RXDMA
  421. The field can have two different meanings based on the
  422. setting of field 'BAR_frame':
  423. 'BAR_frame' is NOT set:
  424. The MPDU sequence number of the received frame.
  425. 'BAR_frame' is set.
  426. The MPDU Start sequence number from the BAR frame
  427. <legal all>
  428. */
  429. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_SEQUENCE_NUMBER_OFFSET 0x00000008
  430. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_SEQUENCE_NUMBER_LSB 8
  431. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_SEQUENCE_NUMBER_MASK 0x000fff00
  432. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG
  433. Consumer: REO/SW/FW
  434. Producer: RXDMA
  435. When set, this MPDU is a fragment and REO should forward
  436. this fragment MPDU to the REO destination ring without any
  437. reorder checks, pn checks or bitmap update. This implies
  438. that REO is forwarding the pointer to the MSDU link
  439. descriptor. The destination ring is coming from a
  440. programmable register setting in REO
  441. <legal all>
  442. */
  443. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_OFFSET 0x00000008
  444. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_LSB 20
  445. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_MASK 0x00100000
  446. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT
  447. Consumer: REO/SW/FW
  448. Producer: RXDMA
  449. The retry bit setting from the MPDU header of the
  450. received frame
  451. <legal all>
  452. */
  453. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_OFFSET 0x00000008
  454. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_LSB 21
  455. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_MASK 0x00200000
  456. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG
  457. Consumer: REO/SW/FW
  458. Producer: RXDMA
  459. When set, the MPDU was received as part of an A-MPDU.
  460. <legal all>
  461. */
  462. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_OFFSET 0x00000008
  463. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_LSB 22
  464. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_MASK 0x00400000
  465. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME
  466. Consumer: REO/SW/FW
  467. Producer: RXDMA
  468. When set, the received frame is a BAR frame. After
  469. processing, this frame shall be pushed to SW or deleted.
  470. <legal all>
  471. */
  472. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_OFFSET 0x00000008
  473. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_LSB 23
  474. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_MASK 0x00800000
  475. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO
  476. Consumer: REO/SW/FW
  477. Producer: RXDMA
  478. Copied here by RXDMA from RX_MPDU_END
  479. When not set, REO will Not perform a PN sequence number
  480. check
  481. */
  482. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000008
  483. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_LSB 24
  484. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x01000000
  485. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IS_VALID
  486. When set, OLE found a valid SA entry for all MSDUs in
  487. this MPDU
  488. <legal all>
  489. */
  490. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IS_VALID_OFFSET 0x00000008
  491. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IS_VALID_LSB 25
  492. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IS_VALID_MASK 0x02000000
  493. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT
  494. When set, at least 1 MSDU within the MPDU has an
  495. unsuccessful MAC source address search due to the expiration
  496. of the search timer.
  497. <legal all>
  498. */
  499. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT_OFFSET 0x00000008
  500. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT_LSB 26
  501. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SA_IDX_TIMEOUT_MASK 0x04000000
  502. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_VALID
  503. When set, OLE found a valid DA entry for all MSDUs in
  504. this MPDU
  505. <legal all>
  506. */
  507. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_VALID_OFFSET 0x00000008
  508. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_VALID_LSB 27
  509. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_VALID_MASK 0x08000000
  510. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_MCBC
  511. Field Only valid if da_is_valid is set
  512. When set, at least one of the DA addresses is a
  513. Multicast or Broadcast address.
  514. <legal all>
  515. */
  516. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_MCBC_OFFSET 0x00000008
  517. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_MCBC_LSB 28
  518. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IS_MCBC_MASK 0x10000000
  519. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT
  520. When set, at least 1 MSDU within the MPDU has an
  521. unsuccessful MAC destination address search due to the
  522. expiration of the search timer.
  523. <legal all>
  524. */
  525. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT_OFFSET 0x00000008
  526. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT_LSB 29
  527. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_DA_IDX_TIMEOUT_MASK 0x20000000
  528. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU
  529. Field only valid when first_msdu_in_mpdu_flag is set.
  530. When set, the contents in the MSDU buffer contains a
  531. 'RAW' MPDU. This 'RAW' MPDU might be spread out over
  532. multiple MSDU buffers.
  533. <legal all>
  534. */
  535. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_OFFSET 0x00000008
  536. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_LSB 30
  537. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_MASK 0x40000000
  538. /* Description REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG
  539. The More Fragment bit setting from the MPDU header of
  540. the received frame
  541. <legal all>
  542. */
  543. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_OFFSET 0x00000008
  544. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_LSB 31
  545. #define REO_ENTRANCE_RING_2_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_MASK 0x80000000
  546. /* Description REO_ENTRANCE_RING_3_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA
  547. Meta data that SW has programmed in the Peer table entry
  548. of the transmitting STA.
  549. <legal all>
  550. */
  551. #define REO_ENTRANCE_RING_3_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_OFFSET 0x0000000c
  552. #define REO_ENTRANCE_RING_3_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_LSB 0
  553. #define REO_ENTRANCE_RING_3_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_MASK 0xffffffff
  554. /* Description REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0
  555. Consumer: REO
  556. Producer: RXDMA
  557. Address (lower 32 bits) of the REO queue descriptor.
  558. <legal all>
  559. */
  560. #define REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0_OFFSET 0x00000010
  561. #define REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0_LSB 0
  562. #define REO_ENTRANCE_RING_4_RX_REO_QUEUE_DESC_ADDR_31_0_MASK 0xffffffff
  563. /* Description REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32
  564. Consumer: REO
  565. Producer: RXDMA
  566. Address (upper 8 bits) of the REO queue descriptor.
  567. <legal all>
  568. */
  569. #define REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32_OFFSET 0x00000014
  570. #define REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32_LSB 0
  571. #define REO_ENTRANCE_RING_5_RX_REO_QUEUE_DESC_ADDR_39_32_MASK 0x000000ff
  572. /* Description REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT
  573. An approximation of the number of bytes received in this
  574. MPDU.
  575. Used to keeps stats on the amount of data flowing
  576. through a queue.
  577. <legal all>
  578. */
  579. #define REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT_OFFSET 0x00000014
  580. #define REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT_LSB 8
  581. #define REO_ENTRANCE_RING_5_ROUNDED_MPDU_BYTE_COUNT_MASK 0x003fff00
  582. /* Description REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION
  583. RXDMA copy the MPDU's first MSDU's destination
  584. indication field here. This is used for REO to be able to
  585. re-route the packet to a different SW destination ring if
  586. the packet is detected as error in REO.
  587. The ID of the REO exit ring where the MSDU frame shall
  588. push after (MPDU level) reordering has finished.
  589. <enum 0 reo_destination_tcl> Reo will push the frame
  590. into the REO2TCL ring
  591. <enum 1 reo_destination_sw1> Reo will push the frame
  592. into the REO2SW1 ring
  593. <enum 2 reo_destination_sw2> Reo will push the frame
  594. into the REO2SW2 ring
  595. <enum 3 reo_destination_sw3> Reo will push the frame
  596. into the REO2SW3 ring
  597. <enum 4 reo_destination_sw4> Reo will push the frame
  598. into the REO2SW4 ring
  599. <enum 5 reo_destination_release> Reo will push the frame
  600. into the REO_release ring
  601. <enum 6 reo_destination_fw> Reo will push the frame into
  602. the REO2FW ring
  603. <enum 7 reo_destination_sw5> Reo will push the frame
  604. into the REO2SW5 ring (REO remaps this in chips without
  605. REO2SW5 ring, e.g. Pine)
  606. <enum 8 reo_destination_sw6> Reo will push the frame
  607. into the REO2SW6 ring (REO remaps this in chips without
  608. REO2SW6 ring, e.g. Pine)
  609. <enum 9 reo_destination_9> REO remaps this <enum 10
  610. reo_destination_10> REO remaps this
  611. <enum 11 reo_destination_11> REO remaps this
  612. <enum 12 reo_destination_12> REO remaps this <enum 13
  613. reo_destination_13> REO remaps this
  614. <enum 14 reo_destination_14> REO remaps this
  615. <enum 15 reo_destination_15> REO remaps this
  616. <enum 16 reo_destination_16> REO remaps this
  617. <enum 17 reo_destination_17> REO remaps this
  618. <enum 18 reo_destination_18> REO remaps this
  619. <enum 19 reo_destination_19> REO remaps this
  620. <enum 20 reo_destination_20> REO remaps this
  621. <enum 21 reo_destination_21> REO remaps this
  622. <enum 22 reo_destination_22> REO remaps this
  623. <enum 23 reo_destination_23> REO remaps this
  624. <enum 24 reo_destination_24> REO remaps this
  625. <enum 25 reo_destination_25> REO remaps this
  626. <enum 26 reo_destination_26> REO remaps this
  627. <enum 27 reo_destination_27> REO remaps this
  628. <enum 28 reo_destination_28> REO remaps this
  629. <enum 29 reo_destination_29> REO remaps this
  630. <enum 30 reo_destination_30> REO remaps this
  631. <enum 31 reo_destination_31> REO remaps this
  632. <legal all>
  633. */
  634. #define REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION_OFFSET 0x00000014
  635. #define REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION_LSB 22
  636. #define REO_ENTRANCE_RING_5_REO_DESTINATION_INDICATION_MASK 0x07c00000
  637. /* Description REO_ENTRANCE_RING_5_FRAMELESS_BAR
  638. When set, this REO entrance ring struct contains BAR
  639. info from a multi TID BAR frame. The original multi TID BAR
  640. frame itself contained all the REO info for the first TID,
  641. but all the subsequent TID info and their linkage to the REO
  642. descriptors is passed down as 'frameless' BAR info.
  643. The only fields valid in this descriptor when this bit
  644. is set are:
  645. Rx_reo_queue_desc_addr_31_0
  646. RX_reo_queue_desc_addr_39_32
  647. And within the
  648. Reo_level_mpdu_frame_info:
  649. Within Rx_mpdu_desc_info_details:
  650. Mpdu_Sequence_number
  651. BAR_frame
  652. Peer_meta_data
  653. All other fields shall be set to 0
  654. <legal all>
  655. */
  656. #define REO_ENTRANCE_RING_5_FRAMELESS_BAR_OFFSET 0x00000014
  657. #define REO_ENTRANCE_RING_5_FRAMELESS_BAR_LSB 27
  658. #define REO_ENTRANCE_RING_5_FRAMELESS_BAR_MASK 0x08000000
  659. /* Description REO_ENTRANCE_RING_5_RESERVED_5A
  660. <legal 0>
  661. */
  662. #define REO_ENTRANCE_RING_5_RESERVED_5A_OFFSET 0x00000014
  663. #define REO_ENTRANCE_RING_5_RESERVED_5A_LSB 28
  664. #define REO_ENTRANCE_RING_5_RESERVED_5A_MASK 0xf0000000
  665. /* Description REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON
  666. Indicates why rxdma pushed the frame to this ring
  667. This field is ignored by REO.
  668. <enum 0 rxdma_error_detected> RXDMA detected an error an
  669. pushed this frame to this queue
  670. <enum 1 rxdma_routing_instruction> RXDMA pushed the
  671. frame to this queue per received routing instructions. No
  672. error within RXDMA was detected
  673. <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
  674. result the MSDU link descriptor might not have the
  675. last_msdu_in_mpdu_flag set, but instead WBM might just see a
  676. NULL pointer in the MSDU link descriptor. This is to be
  677. considered a normal condition for this scenario.
  678. <legal 0 - 2>
  679. */
  680. #define REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON_OFFSET 0x00000018
  681. #define REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON_LSB 0
  682. #define REO_ENTRANCE_RING_6_RXDMA_PUSH_REASON_MASK 0x00000003
  683. /* Description REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE
  684. Field only valid when 'rxdma_push_reason' set to
  685. 'rxdma_error_detected'.
  686. This field is ignored by REO.
  687. <enum 0 rxdma_overflow_err>MPDU frame is not complete
  688. due to a FIFO overflow error in RXPCU.
  689. <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
  690. due to receiving incomplete MPDU from the PHY
  691. <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
  692. error or CRYPTO received an encrypted frame, but did not get
  693. a valid corresponding key id in the peer entry.
  694. <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
  695. error
  696. <enum 5 rxdma_unecrypted_err>CRYPTO reported an
  697. unencrypted frame error when encrypted was expected
  698. <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
  699. length error
  700. <enum 7 rxdma_msdu_limit_err>RX OLE reported that max
  701. number of MSDUs allowed in an MPDU got exceeded
  702. <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
  703. error
  704. <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
  705. parsing error
  706. <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
  707. during SA search
  708. <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
  709. during DA search
  710. <enum 12 rxdma_flow_timeout_err>RX OLE reported a
  711. timeout during flow search
  712. <enum 13 rxdma_flush_request>RXDMA received a flush
  713. request
  714. <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
  715. present as well as a fragmented MPDU. A-MSDU defragmentation
  716. is not supported in Lithium SW so this is treated as an
  717. error.
  718. */
  719. #define REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE_OFFSET 0x00000018
  720. #define REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE_LSB 2
  721. #define REO_ENTRANCE_RING_6_RXDMA_ERROR_CODE_MASK 0x0000007c
  722. /* Description REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER
  723. Field only valid when Reo_level_mpdu_frame_info.
  724. Rx_mpdu_desc_info_details.Fragment_flag is set.
  725. The fragment number from the 802.11 header.
  726. Note that the sequence number is embedded in the field:
  727. Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details.
  728. Mpdu_sequence_number
  729. <legal all>
  730. */
  731. #define REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER_OFFSET 0x00000018
  732. #define REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER_LSB 7
  733. #define REO_ENTRANCE_RING_6_MPDU_FRAGMENT_NUMBER_MASK 0x00000780
  734. /* Description REO_ENTRANCE_RING_6_SW_EXCEPTION
  735. When not set, REO is performing all its default MPDU
  736. processing operations,
  737. When set, this REO entrance descriptor is generated by
  738. FW, and should be processed as an exception. This implies:
  739. NO re-order function is needed.
  740. MPDU delinking is determined by the setting of field
  741. SW_excection_mpdu_delink
  742. Destination ring selection is based on the setting of
  743. the field SW_exception_destination_ring_valid
  744. In the destination ring descriptor set bit:
  745. SW_exception_entry
  746. Feature supported only in HastingsPrime
  747. <legal all>
  748. */
  749. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_OFFSET 0x00000018
  750. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_LSB 11
  751. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_MASK 0x00000800
  752. /* Description REO_ENTRANCE_RING_6_SW_EXCEPTION_MPDU_DELINK
  753. Field only valid when SW_exception is set.
  754. 1'b0: REO should NOT delink the MPDU, and thus pass this
  755. MPDU on to the destination ring as is. This implies that in
  756. the REO_DESTINATION_RING struct field
  757. Buf_or_link_desc_addr_info should point to an MSDU link
  758. descriptor
  759. 1'b1: REO should perform the normal MPDU delink into
  760. MSDU operations.
  761. Feature supported only in HastingsPrime
  762. <legal all>
  763. */
  764. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_MPDU_DELINK_OFFSET 0x00000018
  765. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_MPDU_DELINK_LSB 12
  766. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_MPDU_DELINK_MASK 0x00001000
  767. /* Description REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_VALID
  768. Field only valid when SW_exception is set.
  769. 1'b0: REO shall push the MPDU (or delinked MPDU based on
  770. the setting of SW_exception_mpdu_delink) to the destination
  771. ring according to field reo_destination_indication.
  772. 1'b1: REO shall push the MPDU (or delinked MPDU based on
  773. the setting of SW_exception_mpdu_delink) to the destination
  774. ring according to field SW_exception_destination_ring.
  775. Feature supported only in HastingsPrime
  776. <legal all>
  777. */
  778. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_VALID_OFFSET 0x00000018
  779. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_VALID_LSB 13
  780. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_VALID_MASK 0x00002000
  781. /* Description REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING
  782. Field only valid when fields SW_exception and
  783. SW_exception_destination_ring_valid are set.
  784. The ID of the ring where REO shall push this frame.
  785. <enum 0 reo_destination_tcl> Reo will push the frame
  786. into the REO2TCL ring
  787. <enum 1 reo_destination_sw1> Reo will push the frame
  788. into the REO2SW1 ring
  789. <enum 2 reo_destination_sw2> Reo will push the frame
  790. into the REO2SW1 ring
  791. <enum 3 reo_destination_sw3> Reo will push the frame
  792. into the REO2SW1 ring
  793. <enum 4 reo_destination_sw4> Reo will push the frame
  794. into the REO2SW1 ring
  795. <enum 5 reo_destination_release> Reo will push the frame
  796. into the REO_release ring
  797. <enum 6 reo_destination_fw> Reo will push the frame into
  798. the REO2FW ring
  799. <enum 7 reo_destination_sw5> REO remaps this
  800. <enum 8 reo_destination_sw6> REO remaps this
  801. <enum 9 reo_destination_9> REO remaps this
  802. <enum 10 reo_destination_10> REO remaps this
  803. <enum 11 reo_destination_11> REO remaps this
  804. <enum 12 reo_destination_12> REO remaps this <enum 13
  805. reo_destination_13> REO remaps this
  806. <enum 14 reo_destination_14> REO remaps this
  807. <enum 15 reo_destination_15> REO remaps this
  808. <enum 16 reo_destination_16> REO remaps this
  809. <enum 17 reo_destination_17> REO remaps this
  810. <enum 18 reo_destination_18> REO remaps this
  811. <enum 19 reo_destination_19> REO remaps this
  812. <enum 20 reo_destination_20> REO remaps this
  813. <enum 21 reo_destination_21> REO remaps this
  814. <enum 22 reo_destination_22> REO remaps this
  815. <enum 23 reo_destination_23> REO remaps this
  816. <enum 24 reo_destination_24> REO remaps this
  817. <enum 25 reo_destination_25> REO remaps this
  818. <enum 26 reo_destination_26> REO remaps this
  819. <enum 27 reo_destination_27> REO remaps this
  820. <enum 28 reo_destination_28> REO remaps this
  821. <enum 29 reo_destination_29> REO remaps this
  822. <enum 30 reo_destination_30> REO remaps this
  823. <enum 31 reo_destination_31> REO remaps this
  824. Feature supported only in HastingsPrime
  825. <legal all>
  826. */
  827. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_OFFSET 0x00000018
  828. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_LSB 14
  829. #define REO_ENTRANCE_RING_6_SW_EXCEPTION_DESTINATION_RING_MASK 0x0007c000
  830. /* Description REO_ENTRANCE_RING_6_RESERVED_6A
  831. <legal 0>
  832. */
  833. #define REO_ENTRANCE_RING_6_RESERVED_6A_OFFSET 0x00000018
  834. #define REO_ENTRANCE_RING_6_RESERVED_6A_LSB 19
  835. #define REO_ENTRANCE_RING_6_RESERVED_6A_MASK 0xfff80000
  836. /* Description REO_ENTRANCE_RING_7_PHY_PPDU_ID
  837. A PPDU counter value that PHY increments for every PPDU
  838. received
  839. The counter value wraps around. Pine RXDMA can be
  840. configured to copy this from the RX_PPDU_START TLV for every
  841. output descriptor.
  842. This field is ignored by REO.
  843. Feature supported only in Pine
  844. <legal all>
  845. */
  846. #define REO_ENTRANCE_RING_7_PHY_PPDU_ID_OFFSET 0x0000001c
  847. #define REO_ENTRANCE_RING_7_PHY_PPDU_ID_LSB 0
  848. #define REO_ENTRANCE_RING_7_PHY_PPDU_ID_MASK 0x0000ffff
  849. /* Description REO_ENTRANCE_RING_7_RESERVED_7A
  850. <legal 0>
  851. */
  852. #define REO_ENTRANCE_RING_7_RESERVED_7A_OFFSET 0x0000001c
  853. #define REO_ENTRANCE_RING_7_RESERVED_7A_LSB 16
  854. #define REO_ENTRANCE_RING_7_RESERVED_7A_MASK 0x000f0000
  855. /* Description REO_ENTRANCE_RING_7_RING_ID
  856. Consumer: SW/REO/DEBUG
  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 REO_ENTRANCE_RING_7_RING_ID_OFFSET 0x0000001c
  864. #define REO_ENTRANCE_RING_7_RING_ID_LSB 20
  865. #define REO_ENTRANCE_RING_7_RING_ID_MASK 0x0ff00000
  866. /* Description REO_ENTRANCE_RING_7_LOOPING_COUNT
  867. Consumer: SW/REO/DEBUG
  868. Producer: SRNG (of RXDMA)
  869. For debugging.
  870. This field is filled in by the SRNG module.
  871. A count value that indicates the number of times the
  872. producer of entries into this Ring has looped around the
  873. ring.
  874. At initialization time, this value is set to 0. On the
  875. first loop, this value is set to 1. After the max value is
  876. reached allowed by the number of bits for this field, the
  877. count value continues with 0 again.
  878. In case SW is the consumer of the ring entries, it can
  879. use this field to figure out up to where the producer of
  880. entries has created new entries. This eliminates the need to
  881. check where the head pointer' of the ring is located once
  882. the SW starts processing an interrupt indicating that new
  883. entries have been put into this ring...
  884. Also note that SW if it wants only needs to look at the
  885. LSB bit of this count value.
  886. <legal all>
  887. */
  888. #define REO_ENTRANCE_RING_7_LOOPING_COUNT_OFFSET 0x0000001c
  889. #define REO_ENTRANCE_RING_7_LOOPING_COUNT_LSB 28
  890. #define REO_ENTRANCE_RING_7_LOOPING_COUNT_MASK 0xf0000000
  891. #endif // _REO_ENTRANCE_RING_H_