rx_reo_queue.h 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _RX_REO_QUEUE_H_
  16. #define _RX_REO_QUEUE_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #include "uniform_descriptor_header.h"
  20. #define NUM_OF_DWORDS_RX_REO_QUEUE 32
  21. struct rx_reo_queue {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. struct uniform_descriptor_header descriptor_header;
  24. uint32_t receive_queue_number : 16, // [15:0]
  25. reserved_1b : 16; // [31:16]
  26. uint32_t vld : 1, // [0:0]
  27. associated_link_descriptor_counter : 2, // [2:1]
  28. disable_duplicate_detection : 1, // [3:3]
  29. soft_reorder_enable : 1, // [4:4]
  30. ac : 2, // [6:5]
  31. bar : 1, // [7:7]
  32. rty : 1, // [8:8]
  33. chk_2k_mode : 1, // [9:9]
  34. oor_mode : 1, // [10:10]
  35. ba_window_size : 10, // [20:11]
  36. pn_check_needed : 1, // [21:21]
  37. pn_shall_be_even : 1, // [22:22]
  38. pn_shall_be_uneven : 1, // [23:23]
  39. pn_handling_enable : 1, // [24:24]
  40. pn_size : 2, // [26:25]
  41. ignore_ampdu_flag : 1, // [27:27]
  42. reserved_2b : 4; // [31:28]
  43. uint32_t svld : 1, // [0:0]
  44. ssn : 12, // [12:1]
  45. current_index : 10, // [22:13]
  46. seq_2k_error_detected_flag : 1, // [23:23]
  47. pn_error_detected_flag : 1, // [24:24]
  48. reserved_3a : 6, // [30:25]
  49. pn_valid : 1; // [31:31]
  50. uint32_t pn_31_0 : 32; // [31:0]
  51. uint32_t pn_63_32 : 32; // [31:0]
  52. uint32_t pn_95_64 : 32; // [31:0]
  53. uint32_t pn_127_96 : 32; // [31:0]
  54. uint32_t last_rx_enqueue_timestamp : 32; // [31:0]
  55. uint32_t last_rx_dequeue_timestamp : 32; // [31:0]
  56. uint32_t ptr_to_next_aging_queue_31_0 : 32; // [31:0]
  57. uint32_t ptr_to_next_aging_queue_39_32 : 8, // [7:0]
  58. reserved_11a : 24; // [31:8]
  59. uint32_t ptr_to_previous_aging_queue_31_0 : 32; // [31:0]
  60. uint32_t ptr_to_previous_aging_queue_39_32 : 8, // [7:0]
  61. statistics_counter_index : 6, // [13:8]
  62. reserved_13a : 18; // [31:14]
  63. uint32_t rx_bitmap_31_0 : 32; // [31:0]
  64. uint32_t rx_bitmap_63_32 : 32; // [31:0]
  65. uint32_t rx_bitmap_95_64 : 32; // [31:0]
  66. uint32_t rx_bitmap_127_96 : 32; // [31:0]
  67. uint32_t rx_bitmap_159_128 : 32; // [31:0]
  68. uint32_t rx_bitmap_191_160 : 32; // [31:0]
  69. uint32_t rx_bitmap_223_192 : 32; // [31:0]
  70. uint32_t rx_bitmap_255_224 : 32; // [31:0]
  71. uint32_t rx_bitmap_287_256 : 32; // [31:0]
  72. uint32_t current_mpdu_count : 7, // [6:0]
  73. current_msdu_count : 25; // [31:7]
  74. uint32_t last_sn_reg_index : 4, // [3:0]
  75. timeout_count : 6, // [9:4]
  76. forward_due_to_bar_count : 6, // [15:10]
  77. duplicate_count : 16; // [31:16]
  78. uint32_t frames_in_order_count : 24, // [23:0]
  79. bar_received_count : 8; // [31:24]
  80. uint32_t mpdu_frames_processed_count : 32; // [31:0]
  81. uint32_t msdu_frames_processed_count : 32; // [31:0]
  82. uint32_t total_processed_byte_count : 32; // [31:0]
  83. uint32_t late_receive_mpdu_count : 12, // [11:0]
  84. window_jump_2k : 4, // [15:12]
  85. hole_count : 16; // [31:16]
  86. uint32_t aging_drop_mpdu_count : 16, // [15:0]
  87. aging_drop_interval : 8, // [23:16]
  88. reserved_30 : 8; // [31:24]
  89. uint32_t reserved_31 : 32; // [31:0]
  90. #else
  91. struct uniform_descriptor_header descriptor_header;
  92. uint32_t reserved_1b : 16, // [31:16]
  93. receive_queue_number : 16; // [15:0]
  94. uint32_t reserved_2b : 4, // [31:28]
  95. ignore_ampdu_flag : 1, // [27:27]
  96. pn_size : 2, // [26:25]
  97. pn_handling_enable : 1, // [24:24]
  98. pn_shall_be_uneven : 1, // [23:23]
  99. pn_shall_be_even : 1, // [22:22]
  100. pn_check_needed : 1, // [21:21]
  101. ba_window_size : 10, // [20:11]
  102. oor_mode : 1, // [10:10]
  103. chk_2k_mode : 1, // [9:9]
  104. rty : 1, // [8:8]
  105. bar : 1, // [7:7]
  106. ac : 2, // [6:5]
  107. soft_reorder_enable : 1, // [4:4]
  108. disable_duplicate_detection : 1, // [3:3]
  109. associated_link_descriptor_counter : 2, // [2:1]
  110. vld : 1; // [0:0]
  111. uint32_t pn_valid : 1, // [31:31]
  112. reserved_3a : 6, // [30:25]
  113. pn_error_detected_flag : 1, // [24:24]
  114. seq_2k_error_detected_flag : 1, // [23:23]
  115. current_index : 10, // [22:13]
  116. ssn : 12, // [12:1]
  117. svld : 1; // [0:0]
  118. uint32_t pn_31_0 : 32; // [31:0]
  119. uint32_t pn_63_32 : 32; // [31:0]
  120. uint32_t pn_95_64 : 32; // [31:0]
  121. uint32_t pn_127_96 : 32; // [31:0]
  122. uint32_t last_rx_enqueue_timestamp : 32; // [31:0]
  123. uint32_t last_rx_dequeue_timestamp : 32; // [31:0]
  124. uint32_t ptr_to_next_aging_queue_31_0 : 32; // [31:0]
  125. uint32_t reserved_11a : 24, // [31:8]
  126. ptr_to_next_aging_queue_39_32 : 8; // [7:0]
  127. uint32_t ptr_to_previous_aging_queue_31_0 : 32; // [31:0]
  128. uint32_t reserved_13a : 18, // [31:14]
  129. statistics_counter_index : 6, // [13:8]
  130. ptr_to_previous_aging_queue_39_32 : 8; // [7:0]
  131. uint32_t rx_bitmap_31_0 : 32; // [31:0]
  132. uint32_t rx_bitmap_63_32 : 32; // [31:0]
  133. uint32_t rx_bitmap_95_64 : 32; // [31:0]
  134. uint32_t rx_bitmap_127_96 : 32; // [31:0]
  135. uint32_t rx_bitmap_159_128 : 32; // [31:0]
  136. uint32_t rx_bitmap_191_160 : 32; // [31:0]
  137. uint32_t rx_bitmap_223_192 : 32; // [31:0]
  138. uint32_t rx_bitmap_255_224 : 32; // [31:0]
  139. uint32_t rx_bitmap_287_256 : 32; // [31:0]
  140. uint32_t current_msdu_count : 25, // [31:7]
  141. current_mpdu_count : 7; // [6:0]
  142. uint32_t duplicate_count : 16, // [31:16]
  143. forward_due_to_bar_count : 6, // [15:10]
  144. timeout_count : 6, // [9:4]
  145. last_sn_reg_index : 4; // [3:0]
  146. uint32_t bar_received_count : 8, // [31:24]
  147. frames_in_order_count : 24; // [23:0]
  148. uint32_t mpdu_frames_processed_count : 32; // [31:0]
  149. uint32_t msdu_frames_processed_count : 32; // [31:0]
  150. uint32_t total_processed_byte_count : 32; // [31:0]
  151. uint32_t hole_count : 16, // [31:16]
  152. window_jump_2k : 4, // [15:12]
  153. late_receive_mpdu_count : 12; // [11:0]
  154. uint32_t reserved_30 : 8, // [31:24]
  155. aging_drop_interval : 8, // [23:16]
  156. aging_drop_mpdu_count : 16; // [15:0]
  157. uint32_t reserved_31 : 32; // [31:0]
  158. #endif
  159. };
  160. /* Description DESCRIPTOR_HEADER
  161. Details about which module owns this struct.
  162. Note that sub field "Buffer_type" shall be set to "Receive_REO_queue_descriptor"
  163. */
  164. /* Description OWNER
  165. Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
  166. Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
  167. The owner of this data structure:
  168. <enum 0 WBM_owned> Buffer Manager currently owns this data
  169. structure.
  170. <enum 1 SW_OR_FW_owned> Software of FW currently owns this
  171. data structure.
  172. <enum 2 TQM_owned> Transmit Queue Manager currently owns
  173. this data structure.
  174. <enum 3 RXDMA_owned> Receive DMA currently owns this data
  175. structure.
  176. <enum 4 REO_owned> Reorder currently owns this data structure.
  177. <enum 5 SWITCH_owned> SWITCH currently owns this data structure.
  178. <legal 0-5>
  179. */
  180. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_OWNER_OFFSET 0x00000000
  181. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_OWNER_LSB 0
  182. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_OWNER_MSB 3
  183. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_OWNER_MASK 0x0000000f
  184. /* Description BUFFER_TYPE
  185. Consumer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
  186. Producer: In DEBUG mode: WBM, TQM, TXDMA, RXDMA, REO
  187. Field describing what contents format is of this descriptor
  188. <enum 0 Transmit_MSDU_Link_descriptor>
  189. <enum 1 Transmit_MPDU_Link_descriptor>
  190. <enum 2 Transmit_MPDU_Queue_head_descriptor>
  191. <enum 3 Transmit_MPDU_Queue_ext_descriptor>
  192. <enum 4 Transmit_flow_descriptor>
  193. <enum 5 Transmit_buffer> NOT TO BE USED:
  194. <enum 6 Receive_MSDU_Link_descriptor>
  195. <enum 7 Receive_MPDU_Link_descriptor>
  196. <enum 8 Receive_REO_queue_descriptor>
  197. <enum 9 Receive_REO_queue_1k_descriptor>
  198. <enum 10 Receive_REO_queue_ext_descriptor>
  199. <enum 11 Receive_buffer>
  200. <enum 12 Idle_link_list_entry>
  201. <legal 0-12>
  202. */
  203. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_BUFFER_TYPE_OFFSET 0x00000000
  204. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_BUFFER_TYPE_LSB 4
  205. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_BUFFER_TYPE_MSB 7
  206. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_BUFFER_TYPE_MASK 0x000000f0
  207. /* Description TX_MPDU_QUEUE_NUMBER
  208. Consumer: TQM/Debug
  209. Producer: SW (in 'TX_MPDU_QUEUE_HEAD')/TQM (elsewhere)
  210. Field only valid if Buffer_type is any of Transmit_MPDU_*_descriptor
  211. Indicates the MPDU queue ID to which this MPDU descriptor
  212. belongs
  213. Used for tracking and debugging
  214. Hamilton and Waikiki used bits [19:0] of word 1 of 'TX_MPDU_LINK,'
  215. word 16 of 'TX_MPDU_QUEUE_HEAD' and word 1 of 'TX_MPDU_QUEUE_EXT'
  216. for this.
  217. <legal all>
  218. */
  219. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_TX_MPDU_QUEUE_NUMBER_OFFSET 0x00000000
  220. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_TX_MPDU_QUEUE_NUMBER_LSB 8
  221. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_TX_MPDU_QUEUE_NUMBER_MSB 27
  222. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_TX_MPDU_QUEUE_NUMBER_MASK 0x0fffff00
  223. /* Description RESERVED_0A
  224. <legal 0>
  225. */
  226. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_RESERVED_0A_OFFSET 0x00000000
  227. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_RESERVED_0A_LSB 28
  228. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_RESERVED_0A_MSB 31
  229. #define RX_REO_QUEUE_DESCRIPTOR_HEADER_RESERVED_0A_MASK 0xf0000000
  230. /* Description RECEIVE_QUEUE_NUMBER
  231. Indicates the MPDU queue ID to which this MPDU link descriptor
  232. belongs
  233. Used for tracking and debugging
  234. <legal all>
  235. */
  236. #define RX_REO_QUEUE_RECEIVE_QUEUE_NUMBER_OFFSET 0x00000004
  237. #define RX_REO_QUEUE_RECEIVE_QUEUE_NUMBER_LSB 0
  238. #define RX_REO_QUEUE_RECEIVE_QUEUE_NUMBER_MSB 15
  239. #define RX_REO_QUEUE_RECEIVE_QUEUE_NUMBER_MASK 0x0000ffff
  240. /* Description RESERVED_1B
  241. <legal 0>
  242. */
  243. #define RX_REO_QUEUE_RESERVED_1B_OFFSET 0x00000004
  244. #define RX_REO_QUEUE_RESERVED_1B_LSB 16
  245. #define RX_REO_QUEUE_RESERVED_1B_MSB 31
  246. #define RX_REO_QUEUE_RESERVED_1B_MASK 0xffff0000
  247. /* Description VLD
  248. Valid bit indicating a session is established and the queue
  249. descriptor is valid(Filled by SW)
  250. <legal all>
  251. */
  252. #define RX_REO_QUEUE_VLD_OFFSET 0x00000008
  253. #define RX_REO_QUEUE_VLD_LSB 0
  254. #define RX_REO_QUEUE_VLD_MSB 0
  255. #define RX_REO_QUEUE_VLD_MASK 0x00000001
  256. /* Description ASSOCIATED_LINK_DESCRIPTOR_COUNTER
  257. Indicates which of the 3 link descriptor counters shall
  258. be incremented or decremented when link descriptors are
  259. added or removed from this flow queue.
  260. MSDU link descriptors related with MPDUs stored in the re-order
  261. buffer shall also be included in this count.
  262. <legal 0-2>
  263. */
  264. #define RX_REO_QUEUE_ASSOCIATED_LINK_DESCRIPTOR_COUNTER_OFFSET 0x00000008
  265. #define RX_REO_QUEUE_ASSOCIATED_LINK_DESCRIPTOR_COUNTER_LSB 1
  266. #define RX_REO_QUEUE_ASSOCIATED_LINK_DESCRIPTOR_COUNTER_MSB 2
  267. #define RX_REO_QUEUE_ASSOCIATED_LINK_DESCRIPTOR_COUNTER_MASK 0x00000006
  268. /* Description DISABLE_DUPLICATE_DETECTION
  269. When set, do not perform any duplicate detection.
  270. <legal all>
  271. */
  272. #define RX_REO_QUEUE_DISABLE_DUPLICATE_DETECTION_OFFSET 0x00000008
  273. #define RX_REO_QUEUE_DISABLE_DUPLICATE_DETECTION_LSB 3
  274. #define RX_REO_QUEUE_DISABLE_DUPLICATE_DETECTION_MSB 3
  275. #define RX_REO_QUEUE_DISABLE_DUPLICATE_DETECTION_MASK 0x00000008
  276. /* Description SOFT_REORDER_ENABLE
  277. When set, REO has been instructed to not perform the actual
  278. re-ordering of frames for this queue, but just to insert
  279. the reorder opcodes.
  280. Note that this implies that REO is also not going to perform
  281. any MSDU level operations, and the entire MPDU (and thus
  282. pointer to the MSDU link descriptor) will be pushed to
  283. a destination ring that SW has programmed in a SW programmable
  284. configuration register in REO
  285. <legal all>
  286. */
  287. #define RX_REO_QUEUE_SOFT_REORDER_ENABLE_OFFSET 0x00000008
  288. #define RX_REO_QUEUE_SOFT_REORDER_ENABLE_LSB 4
  289. #define RX_REO_QUEUE_SOFT_REORDER_ENABLE_MSB 4
  290. #define RX_REO_QUEUE_SOFT_REORDER_ENABLE_MASK 0x00000010
  291. /* Description AC
  292. Indicates which access category the queue descriptor belongs
  293. to(filled by SW)
  294. <legal all>
  295. */
  296. #define RX_REO_QUEUE_AC_OFFSET 0x00000008
  297. #define RX_REO_QUEUE_AC_LSB 5
  298. #define RX_REO_QUEUE_AC_MSB 6
  299. #define RX_REO_QUEUE_AC_MASK 0x00000060
  300. /* Description BAR
  301. Indicates if BAR has been received (mostly used for debug
  302. purpose and this is filled by REO)
  303. <legal all>
  304. */
  305. #define RX_REO_QUEUE_BAR_OFFSET 0x00000008
  306. #define RX_REO_QUEUE_BAR_LSB 7
  307. #define RX_REO_QUEUE_BAR_MSB 7
  308. #define RX_REO_QUEUE_BAR_MASK 0x00000080
  309. /* Description RTY
  310. Retry bit is checked if this bit is set.
  311. <legal all>
  312. */
  313. #define RX_REO_QUEUE_RTY_OFFSET 0x00000008
  314. #define RX_REO_QUEUE_RTY_LSB 8
  315. #define RX_REO_QUEUE_RTY_MSB 8
  316. #define RX_REO_QUEUE_RTY_MASK 0x00000100
  317. /* Description CHK_2K_MODE
  318. Indicates what type of operation is expected from Reo when
  319. the received frame SN falls within the 2K window
  320. See REO MLD document for programming details.
  321. <legal all>
  322. */
  323. #define RX_REO_QUEUE_CHK_2K_MODE_OFFSET 0x00000008
  324. #define RX_REO_QUEUE_CHK_2K_MODE_LSB 9
  325. #define RX_REO_QUEUE_CHK_2K_MODE_MSB 9
  326. #define RX_REO_QUEUE_CHK_2K_MODE_MASK 0x00000200
  327. /* Description OOR_MODE
  328. Out of Order mode:
  329. Indicates what type of operation is expected when the received
  330. frame falls within the OOR window.
  331. See REO MLD document for programming details.
  332. <legal all>
  333. */
  334. #define RX_REO_QUEUE_OOR_MODE_OFFSET 0x00000008
  335. #define RX_REO_QUEUE_OOR_MODE_LSB 10
  336. #define RX_REO_QUEUE_OOR_MODE_MSB 10
  337. #define RX_REO_QUEUE_OOR_MODE_MASK 0x00000400
  338. /* Description BA_WINDOW_SIZE
  339. Indicates the negotiated (window size + 1).
  340. It can go up to Max of 256bits.
  341. A value 255 means 256 bitmap, 63 means 64 bitmap, 0 (means
  342. non-BA session, with window size of 0). The 3 values here
  343. are the main values validated, but other values should
  344. work as well.
  345. A value 1023 means 1024 bitmap, 511 means 512 bitmap. The
  346. 2 values here are the main values validated for 1k-bitmap
  347. support, but other values should work as well.
  348. A BA window size of 0 (=> one frame entry bitmap), means
  349. that there is NO RX_REO_QUEUE_EXT descriptor following
  350. this RX_REO_QUEUE STRUCT in memory
  351. A BA window size of 1 - 105 means that there is 1 RX_REO_QUEUE_EXT
  352. descriptor directly following this RX_REO_QUEUE STRUCT
  353. in memory.
  354. A BA window size of 106 - 210 means that there are 2 RX_REO_QUEUE_EXT
  355. descriptors directly following this RX_REO_QUEUE STRUCT
  356. in memory
  357. A BA window size of 211 - 256 means that there are 3 RX_REO_QUEUE_EXT
  358. descriptors directly following this RX_REO_QUEUE STRUCT
  359. in memory
  360. A BA window size of 257 - 315 means that there is one RX_REO_QUEUE_1K
  361. descriptor followed by 3 RX_REO_QUEUE_EXT descriptors directly
  362. following this RX_REO_QUEUE STRUCT in memory
  363. A BA window size of 316 - 420 means that there is one RX_REO_QUEUE_1K
  364. descriptor followed by 4 RX_REO_QUEUE_EXT descriptors directly
  365. following this RX_REO_QUEUE STRUCT in memory
  366. ...
  367. A BA window size of 946 - 1024 means that there is one RX_REO_QUEUE_1K
  368. descriptor followed by 10 RX_REO_QUEUE_EXT descriptors
  369. directly following this RX_REO_QUEUE STRUCT in memory
  370. TODO: Should the above text use '255' and '1023' instead
  371. of '256' and '1024'?
  372. <legal 0 - 1023>
  373. */
  374. #define RX_REO_QUEUE_BA_WINDOW_SIZE_OFFSET 0x00000008
  375. #define RX_REO_QUEUE_BA_WINDOW_SIZE_LSB 11
  376. #define RX_REO_QUEUE_BA_WINDOW_SIZE_MSB 20
  377. #define RX_REO_QUEUE_BA_WINDOW_SIZE_MASK 0x001ff800
  378. /* Description PN_CHECK_NEEDED
  379. When set, REO shall perform the PN increment check
  380. <legal all>
  381. */
  382. #define RX_REO_QUEUE_PN_CHECK_NEEDED_OFFSET 0x00000008
  383. #define RX_REO_QUEUE_PN_CHECK_NEEDED_LSB 21
  384. #define RX_REO_QUEUE_PN_CHECK_NEEDED_MSB 21
  385. #define RX_REO_QUEUE_PN_CHECK_NEEDED_MASK 0x00200000
  386. /* Description PN_SHALL_BE_EVEN
  387. Field only valid when 'pn_check_needed' is set.
  388. When set, REO shall confirm that the received PN number
  389. is not only incremented, but also always an even number
  390. <legal all>
  391. */
  392. #define RX_REO_QUEUE_PN_SHALL_BE_EVEN_OFFSET 0x00000008
  393. #define RX_REO_QUEUE_PN_SHALL_BE_EVEN_LSB 22
  394. #define RX_REO_QUEUE_PN_SHALL_BE_EVEN_MSB 22
  395. #define RX_REO_QUEUE_PN_SHALL_BE_EVEN_MASK 0x00400000
  396. /* Description PN_SHALL_BE_UNEVEN
  397. Field only valid when 'pn_check_needed' is set.
  398. When set, REO shall confirm that the received PN number
  399. is not only incremented, but also always an uneven number
  400. <legal all>
  401. */
  402. #define RX_REO_QUEUE_PN_SHALL_BE_UNEVEN_OFFSET 0x00000008
  403. #define RX_REO_QUEUE_PN_SHALL_BE_UNEVEN_LSB 23
  404. #define RX_REO_QUEUE_PN_SHALL_BE_UNEVEN_MSB 23
  405. #define RX_REO_QUEUE_PN_SHALL_BE_UNEVEN_MASK 0x00800000
  406. /* Description PN_HANDLING_ENABLE
  407. Field only valid when 'pn_check_needed' is set.
  408. When set, and REO detected a PN error, HW shall set the 'pn_error_detected_flag'.
  409. <legal all>
  410. */
  411. #define RX_REO_QUEUE_PN_HANDLING_ENABLE_OFFSET 0x00000008
  412. #define RX_REO_QUEUE_PN_HANDLING_ENABLE_LSB 24
  413. #define RX_REO_QUEUE_PN_HANDLING_ENABLE_MSB 24
  414. #define RX_REO_QUEUE_PN_HANDLING_ENABLE_MASK 0x01000000
  415. /* Description PN_SIZE
  416. Size of the PN field check.
  417. Needed for wrap around handling...
  418. <enum 0 pn_size_24>
  419. <enum 1 pn_size_48>
  420. <enum 2 pn_size_128>
  421. <legal 0-2>
  422. */
  423. #define RX_REO_QUEUE_PN_SIZE_OFFSET 0x00000008
  424. #define RX_REO_QUEUE_PN_SIZE_LSB 25
  425. #define RX_REO_QUEUE_PN_SIZE_MSB 26
  426. #define RX_REO_QUEUE_PN_SIZE_MASK 0x06000000
  427. /* Description IGNORE_AMPDU_FLAG
  428. When set, REO shall ignore the ampdu_flag on the entrance
  429. descriptor for this queue.
  430. <legal all>
  431. */
  432. #define RX_REO_QUEUE_IGNORE_AMPDU_FLAG_OFFSET 0x00000008
  433. #define RX_REO_QUEUE_IGNORE_AMPDU_FLAG_LSB 27
  434. #define RX_REO_QUEUE_IGNORE_AMPDU_FLAG_MSB 27
  435. #define RX_REO_QUEUE_IGNORE_AMPDU_FLAG_MASK 0x08000000
  436. /* Description RESERVED_2B
  437. <legal 0>
  438. */
  439. #define RX_REO_QUEUE_RESERVED_2B_OFFSET 0x00000008
  440. #define RX_REO_QUEUE_RESERVED_2B_LSB 28
  441. #define RX_REO_QUEUE_RESERVED_2B_MSB 31
  442. #define RX_REO_QUEUE_RESERVED_2B_MASK 0xf0000000
  443. /* Description SVLD
  444. Sequence number in next field is valid one. It can be filled
  445. by SW if the want to fill in the any negotiated SSN, otherwise
  446. REO will fill the sequence number of first received packet
  447. and set this bit to 1.
  448. <legal all>
  449. */
  450. #define RX_REO_QUEUE_SVLD_OFFSET 0x0000000c
  451. #define RX_REO_QUEUE_SVLD_LSB 0
  452. #define RX_REO_QUEUE_SVLD_MSB 0
  453. #define RX_REO_QUEUE_SVLD_MASK 0x00000001
  454. /* Description SSN
  455. Starting Sequence number of the session, this changes whenever
  456. window moves. (can be filled by SW then maintained by REO)
  457. <legal all>
  458. */
  459. #define RX_REO_QUEUE_SSN_OFFSET 0x0000000c
  460. #define RX_REO_QUEUE_SSN_LSB 1
  461. #define RX_REO_QUEUE_SSN_MSB 12
  462. #define RX_REO_QUEUE_SSN_MASK 0x00001ffe
  463. /* Description CURRENT_INDEX
  464. Points to last forwarded packet
  465. <legal all>
  466. */
  467. #define RX_REO_QUEUE_CURRENT_INDEX_OFFSET 0x0000000c
  468. #define RX_REO_QUEUE_CURRENT_INDEX_LSB 13
  469. #define RX_REO_QUEUE_CURRENT_INDEX_MSB 22
  470. #define RX_REO_QUEUE_CURRENT_INDEX_MASK 0x007fe000
  471. /* Description SEQ_2K_ERROR_DETECTED_FLAG
  472. Set by REO, can only be cleared by SW
  473. When set, REO has detected a 2k error jump in the sequence
  474. number and from that moment forward, all new frames are
  475. forwarded directly to FW, without duplicate detect, reordering,
  476. etc.
  477. <legal all>
  478. */
  479. #define RX_REO_QUEUE_SEQ_2K_ERROR_DETECTED_FLAG_OFFSET 0x0000000c
  480. #define RX_REO_QUEUE_SEQ_2K_ERROR_DETECTED_FLAG_LSB 23
  481. #define RX_REO_QUEUE_SEQ_2K_ERROR_DETECTED_FLAG_MSB 23
  482. #define RX_REO_QUEUE_SEQ_2K_ERROR_DETECTED_FLAG_MASK 0x00800000
  483. /* Description PN_ERROR_DETECTED_FLAG
  484. Set by REO, can only be cleared by SW
  485. When set, REO has detected a PN error and from that moment
  486. forward, all new frames are forwarded directly to FW, without
  487. duplicate detect, reordering, etc.
  488. <legal all>
  489. */
  490. #define RX_REO_QUEUE_PN_ERROR_DETECTED_FLAG_OFFSET 0x0000000c
  491. #define RX_REO_QUEUE_PN_ERROR_DETECTED_FLAG_LSB 24
  492. #define RX_REO_QUEUE_PN_ERROR_DETECTED_FLAG_MSB 24
  493. #define RX_REO_QUEUE_PN_ERROR_DETECTED_FLAG_MASK 0x01000000
  494. /* Description RESERVED_3A
  495. <legal 0>
  496. */
  497. #define RX_REO_QUEUE_RESERVED_3A_OFFSET 0x0000000c
  498. #define RX_REO_QUEUE_RESERVED_3A_LSB 25
  499. #define RX_REO_QUEUE_RESERVED_3A_MSB 30
  500. #define RX_REO_QUEUE_RESERVED_3A_MASK 0x7e000000
  501. /* Description PN_VALID
  502. PN number in next fields are valid. It can be filled by
  503. SW if it wants to fill in the any negotiated SSN, otherwise
  504. REO will fill the pn based on the first received packet
  505. and set this bit to 1.
  506. <legal all>
  507. */
  508. #define RX_REO_QUEUE_PN_VALID_OFFSET 0x0000000c
  509. #define RX_REO_QUEUE_PN_VALID_LSB 31
  510. #define RX_REO_QUEUE_PN_VALID_MSB 31
  511. #define RX_REO_QUEUE_PN_VALID_MASK 0x80000000
  512. /* Description PN_31_0
  513. Bits [31:0] of the PN number extracted from the IV field
  514. <legal all>
  515. */
  516. #define RX_REO_QUEUE_PN_31_0_OFFSET 0x00000010
  517. #define RX_REO_QUEUE_PN_31_0_LSB 0
  518. #define RX_REO_QUEUE_PN_31_0_MSB 31
  519. #define RX_REO_QUEUE_PN_31_0_MASK 0xffffffff
  520. /* Description PN_63_32
  521. Bits [63:32] of the PN number.
  522. <legal all>
  523. */
  524. #define RX_REO_QUEUE_PN_63_32_OFFSET 0x00000014
  525. #define RX_REO_QUEUE_PN_63_32_LSB 0
  526. #define RX_REO_QUEUE_PN_63_32_MSB 31
  527. #define RX_REO_QUEUE_PN_63_32_MASK 0xffffffff
  528. /* Description PN_95_64
  529. Bits [95:64] of the PN number.
  530. <legal all>
  531. */
  532. #define RX_REO_QUEUE_PN_95_64_OFFSET 0x00000018
  533. #define RX_REO_QUEUE_PN_95_64_LSB 0
  534. #define RX_REO_QUEUE_PN_95_64_MSB 31
  535. #define RX_REO_QUEUE_PN_95_64_MASK 0xffffffff
  536. /* Description PN_127_96
  537. Bits [127:96] of the PN number.
  538. <legal all>
  539. */
  540. #define RX_REO_QUEUE_PN_127_96_OFFSET 0x0000001c
  541. #define RX_REO_QUEUE_PN_127_96_LSB 0
  542. #define RX_REO_QUEUE_PN_127_96_MSB 31
  543. #define RX_REO_QUEUE_PN_127_96_MASK 0xffffffff
  544. /* Description LAST_RX_ENQUEUE_TIMESTAMP
  545. This timestamp is updated when an MPDU is received and accesses
  546. this Queue Descriptor. It does not include the access due
  547. to Command TLVs or Aging (which will be updated in Last_rx_dequeue_timestamp).
  548. <legal all>
  549. */
  550. #define RX_REO_QUEUE_LAST_RX_ENQUEUE_TIMESTAMP_OFFSET 0x00000020
  551. #define RX_REO_QUEUE_LAST_RX_ENQUEUE_TIMESTAMP_LSB 0
  552. #define RX_REO_QUEUE_LAST_RX_ENQUEUE_TIMESTAMP_MSB 31
  553. #define RX_REO_QUEUE_LAST_RX_ENQUEUE_TIMESTAMP_MASK 0xffffffff
  554. /* Description LAST_RX_DEQUEUE_TIMESTAMP
  555. This timestamp is used for Aging. When an MPDU or multiple
  556. MPDUs are forwarded, either due to window movement, bar,
  557. aging or command flush, this timestamp is updated. Also
  558. when the bitmap is all zero and the first time an MPDU is
  559. queued (opcode=QCUR), this timestamp is updated for aging.
  560. <legal all>
  561. */
  562. #define RX_REO_QUEUE_LAST_RX_DEQUEUE_TIMESTAMP_OFFSET 0x00000024
  563. #define RX_REO_QUEUE_LAST_RX_DEQUEUE_TIMESTAMP_LSB 0
  564. #define RX_REO_QUEUE_LAST_RX_DEQUEUE_TIMESTAMP_MSB 31
  565. #define RX_REO_QUEUE_LAST_RX_DEQUEUE_TIMESTAMP_MASK 0xffffffff
  566. /* Description PTR_TO_NEXT_AGING_QUEUE_31_0
  567. Address (address bits 31-0)of next RX_REO_QUEUE descriptor
  568. in the 'receive timestamp' ordered list.
  569. From it the Position of this queue descriptor in the per
  570. AC aging waitlist can be derived.
  571. Value 0x0 indicates the 'NULL' pointer which implies that
  572. this is the last entry in the list.
  573. <legal all>
  574. */
  575. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_31_0_OFFSET 0x00000028
  576. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_31_0_LSB 0
  577. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_31_0_MSB 31
  578. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_31_0_MASK 0xffffffff
  579. /* Description PTR_TO_NEXT_AGING_QUEUE_39_32
  580. Address (address bits 39-32)of next RX_REO_QUEUE descriptor
  581. in the 'receive timestamp' ordered list.
  582. From it the Position of this queue descriptor in the per
  583. AC aging waitlist can be derived.
  584. Value 0x0 indicates the 'NULL' pointer which implies that
  585. this is the last entry in the list.
  586. <legal all>
  587. */
  588. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_39_32_OFFSET 0x0000002c
  589. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_39_32_LSB 0
  590. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_39_32_MSB 7
  591. #define RX_REO_QUEUE_PTR_TO_NEXT_AGING_QUEUE_39_32_MASK 0x000000ff
  592. /* Description RESERVED_11A
  593. <legal 0>
  594. */
  595. #define RX_REO_QUEUE_RESERVED_11A_OFFSET 0x0000002c
  596. #define RX_REO_QUEUE_RESERVED_11A_LSB 8
  597. #define RX_REO_QUEUE_RESERVED_11A_MSB 31
  598. #define RX_REO_QUEUE_RESERVED_11A_MASK 0xffffff00
  599. /* Description PTR_TO_PREVIOUS_AGING_QUEUE_31_0
  600. Address (address bits 31-0)of next RX_REO_QUEUE descriptor
  601. in the 'receive timestamp' ordered list.
  602. From it the Position of this queue descriptor in the per
  603. AC aging waitlist can be derived.
  604. Value 0x0 indicates the 'NULL' pointer which implies that
  605. this is the first entry in the list.
  606. <legal all>
  607. */
  608. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_31_0_OFFSET 0x00000030
  609. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_31_0_LSB 0
  610. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_31_0_MSB 31
  611. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_31_0_MASK 0xffffffff
  612. /* Description PTR_TO_PREVIOUS_AGING_QUEUE_39_32
  613. Address (address bits 39-32)of next RX_REO_QUEUE descriptor
  614. in the 'receive timestamp' ordered list.
  615. From it the Position of this queue descriptor in the per
  616. AC aging waitlist can be derived.
  617. Value 0x0 indicates the 'NULL' pointer which implies that
  618. this is the first entry in the list.
  619. <legal all>
  620. */
  621. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_39_32_OFFSET 0x00000034
  622. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_39_32_LSB 0
  623. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_39_32_MSB 7
  624. #define RX_REO_QUEUE_PTR_TO_PREVIOUS_AGING_QUEUE_39_32_MASK 0x000000ff
  625. /* Description STATISTICS_COUNTER_INDEX
  626. This is used to select one of the REO register sets for
  627. tracking statistics—MSDU count and MSDU byte count in
  628. Waikiki (Not supported in Hamilton).
  629. Usually all the queues pertaining to one virtual device
  630. use one statistics register set, and each virtual device
  631. maps to a different set in case of not too many virtual
  632. devices.
  633. <legal 0-47>
  634. */
  635. #define RX_REO_QUEUE_STATISTICS_COUNTER_INDEX_OFFSET 0x00000034
  636. #define RX_REO_QUEUE_STATISTICS_COUNTER_INDEX_LSB 8
  637. #define RX_REO_QUEUE_STATISTICS_COUNTER_INDEX_MSB 13
  638. #define RX_REO_QUEUE_STATISTICS_COUNTER_INDEX_MASK 0x00003f00
  639. /* Description RESERVED_13A
  640. <legal 0>
  641. */
  642. #define RX_REO_QUEUE_RESERVED_13A_OFFSET 0x00000034
  643. #define RX_REO_QUEUE_RESERVED_13A_LSB 14
  644. #define RX_REO_QUEUE_RESERVED_13A_MSB 31
  645. #define RX_REO_QUEUE_RESERVED_13A_MASK 0xffffc000
  646. /* Description RX_BITMAP_31_0
  647. When a bit is set, the corresponding frame is currently
  648. held in the re-order queue.
  649. The bitmap is Fully managed by HW.
  650. SW shall init this to 0, and then never ever change it
  651. <legal all>
  652. */
  653. #define RX_REO_QUEUE_RX_BITMAP_31_0_OFFSET 0x00000038
  654. #define RX_REO_QUEUE_RX_BITMAP_31_0_LSB 0
  655. #define RX_REO_QUEUE_RX_BITMAP_31_0_MSB 31
  656. #define RX_REO_QUEUE_RX_BITMAP_31_0_MASK 0xffffffff
  657. /* Description RX_BITMAP_63_32
  658. See Rx_bitmap_31_0 description
  659. <legal all>
  660. */
  661. #define RX_REO_QUEUE_RX_BITMAP_63_32_OFFSET 0x0000003c
  662. #define RX_REO_QUEUE_RX_BITMAP_63_32_LSB 0
  663. #define RX_REO_QUEUE_RX_BITMAP_63_32_MSB 31
  664. #define RX_REO_QUEUE_RX_BITMAP_63_32_MASK 0xffffffff
  665. /* Description RX_BITMAP_95_64
  666. See Rx_bitmap_31_0 description
  667. <legal all>
  668. */
  669. #define RX_REO_QUEUE_RX_BITMAP_95_64_OFFSET 0x00000040
  670. #define RX_REO_QUEUE_RX_BITMAP_95_64_LSB 0
  671. #define RX_REO_QUEUE_RX_BITMAP_95_64_MSB 31
  672. #define RX_REO_QUEUE_RX_BITMAP_95_64_MASK 0xffffffff
  673. /* Description RX_BITMAP_127_96
  674. See Rx_bitmap_31_0 description
  675. <legal all>
  676. */
  677. #define RX_REO_QUEUE_RX_BITMAP_127_96_OFFSET 0x00000044
  678. #define RX_REO_QUEUE_RX_BITMAP_127_96_LSB 0
  679. #define RX_REO_QUEUE_RX_BITMAP_127_96_MSB 31
  680. #define RX_REO_QUEUE_RX_BITMAP_127_96_MASK 0xffffffff
  681. /* Description RX_BITMAP_159_128
  682. See Rx_bitmap_31_0 description
  683. <legal all>
  684. */
  685. #define RX_REO_QUEUE_RX_BITMAP_159_128_OFFSET 0x00000048
  686. #define RX_REO_QUEUE_RX_BITMAP_159_128_LSB 0
  687. #define RX_REO_QUEUE_RX_BITMAP_159_128_MSB 31
  688. #define RX_REO_QUEUE_RX_BITMAP_159_128_MASK 0xffffffff
  689. /* Description RX_BITMAP_191_160
  690. See Rx_bitmap_31_0 description
  691. <legal all>
  692. */
  693. #define RX_REO_QUEUE_RX_BITMAP_191_160_OFFSET 0x0000004c
  694. #define RX_REO_QUEUE_RX_BITMAP_191_160_LSB 0
  695. #define RX_REO_QUEUE_RX_BITMAP_191_160_MSB 31
  696. #define RX_REO_QUEUE_RX_BITMAP_191_160_MASK 0xffffffff
  697. /* Description RX_BITMAP_223_192
  698. See Rx_bitmap_31_0 description
  699. <legal all>
  700. */
  701. #define RX_REO_QUEUE_RX_BITMAP_223_192_OFFSET 0x00000050
  702. #define RX_REO_QUEUE_RX_BITMAP_223_192_LSB 0
  703. #define RX_REO_QUEUE_RX_BITMAP_223_192_MSB 31
  704. #define RX_REO_QUEUE_RX_BITMAP_223_192_MASK 0xffffffff
  705. /* Description RX_BITMAP_255_224
  706. See Rx_bitmap_31_0 description
  707. <legal all>
  708. */
  709. #define RX_REO_QUEUE_RX_BITMAP_255_224_OFFSET 0x00000054
  710. #define RX_REO_QUEUE_RX_BITMAP_255_224_LSB 0
  711. #define RX_REO_QUEUE_RX_BITMAP_255_224_MSB 31
  712. #define RX_REO_QUEUE_RX_BITMAP_255_224_MASK 0xffffffff
  713. /* Description RX_BITMAP_287_256
  714. See Rx_bitmap_31_0 description
  715. <legal all>
  716. */
  717. #define RX_REO_QUEUE_RX_BITMAP_287_256_OFFSET 0x00000058
  718. #define RX_REO_QUEUE_RX_BITMAP_287_256_LSB 0
  719. #define RX_REO_QUEUE_RX_BITMAP_287_256_MSB 31
  720. #define RX_REO_QUEUE_RX_BITMAP_287_256_MASK 0xffffffff
  721. /* Description CURRENT_MPDU_COUNT
  722. The number of MPDUs in the queue.
  723. <legal all>
  724. */
  725. #define RX_REO_QUEUE_CURRENT_MPDU_COUNT_OFFSET 0x0000005c
  726. #define RX_REO_QUEUE_CURRENT_MPDU_COUNT_LSB 0
  727. #define RX_REO_QUEUE_CURRENT_MPDU_COUNT_MSB 6
  728. #define RX_REO_QUEUE_CURRENT_MPDU_COUNT_MASK 0x0000007f
  729. /* Description CURRENT_MSDU_COUNT
  730. The number of MSDUs in the queue.
  731. <legal all>
  732. */
  733. #define RX_REO_QUEUE_CURRENT_MSDU_COUNT_OFFSET 0x0000005c
  734. #define RX_REO_QUEUE_CURRENT_MSDU_COUNT_LSB 7
  735. #define RX_REO_QUEUE_CURRENT_MSDU_COUNT_MSB 31
  736. #define RX_REO_QUEUE_CURRENT_MSDU_COUNT_MASK 0xffffff80
  737. /* Description LAST_SN_REG_INDEX
  738. REO has registers to save the last SN seen in up to 9 REO
  739. queues, to support "leaky APs."
  740. This field gives the register number to use for saving the
  741. last SN of this REO queue.
  742. <legal 0-8>
  743. */
  744. #define RX_REO_QUEUE_LAST_SN_REG_INDEX_OFFSET 0x00000060
  745. #define RX_REO_QUEUE_LAST_SN_REG_INDEX_LSB 0
  746. #define RX_REO_QUEUE_LAST_SN_REG_INDEX_MSB 3
  747. #define RX_REO_QUEUE_LAST_SN_REG_INDEX_MASK 0x0000000f
  748. /* Description TIMEOUT_COUNT
  749. The number of times that REO started forwarding frames even
  750. though there is a hole in the bitmap. Forwarding reason
  751. is Timeout
  752. The counter saturates and freezes at 0x3F
  753. <legal all>
  754. */
  755. #define RX_REO_QUEUE_TIMEOUT_COUNT_OFFSET 0x00000060
  756. #define RX_REO_QUEUE_TIMEOUT_COUNT_LSB 4
  757. #define RX_REO_QUEUE_TIMEOUT_COUNT_MSB 9
  758. #define RX_REO_QUEUE_TIMEOUT_COUNT_MASK 0x000003f0
  759. /* Description FORWARD_DUE_TO_BAR_COUNT
  760. The number of times that REO started forwarding frames even
  761. though there is a hole in the bitmap. Forwarding reason
  762. is reception of BAR frame.
  763. The counter saturates and freezes at 0x3F
  764. <legal all>
  765. */
  766. #define RX_REO_QUEUE_FORWARD_DUE_TO_BAR_COUNT_OFFSET 0x00000060
  767. #define RX_REO_QUEUE_FORWARD_DUE_TO_BAR_COUNT_LSB 10
  768. #define RX_REO_QUEUE_FORWARD_DUE_TO_BAR_COUNT_MSB 15
  769. #define RX_REO_QUEUE_FORWARD_DUE_TO_BAR_COUNT_MASK 0x0000fc00
  770. /* Description DUPLICATE_COUNT
  771. The number of duplicate frames that have been detected
  772. <legal all>
  773. */
  774. #define RX_REO_QUEUE_DUPLICATE_COUNT_OFFSET 0x00000060
  775. #define RX_REO_QUEUE_DUPLICATE_COUNT_LSB 16
  776. #define RX_REO_QUEUE_DUPLICATE_COUNT_MSB 31
  777. #define RX_REO_QUEUE_DUPLICATE_COUNT_MASK 0xffff0000
  778. /* Description FRAMES_IN_ORDER_COUNT
  779. The number of frames that have been received in order (without
  780. a hole that prevented them from being forwarded immediately)
  781. This corresponds to the Reorder opcodes:
  782. 'FWDCUR' and 'FWD BUF'
  783. <legal all>
  784. */
  785. #define RX_REO_QUEUE_FRAMES_IN_ORDER_COUNT_OFFSET 0x00000064
  786. #define RX_REO_QUEUE_FRAMES_IN_ORDER_COUNT_LSB 0
  787. #define RX_REO_QUEUE_FRAMES_IN_ORDER_COUNT_MSB 23
  788. #define RX_REO_QUEUE_FRAMES_IN_ORDER_COUNT_MASK 0x00ffffff
  789. /* Description BAR_RECEIVED_COUNT
  790. The number of times a BAR frame is received.
  791. This corresponds to the Reorder opcodes with 'DROP'
  792. The counter saturates and freezes at 0xFF
  793. <legal all>
  794. */
  795. #define RX_REO_QUEUE_BAR_RECEIVED_COUNT_OFFSET 0x00000064
  796. #define RX_REO_QUEUE_BAR_RECEIVED_COUNT_LSB 24
  797. #define RX_REO_QUEUE_BAR_RECEIVED_COUNT_MSB 31
  798. #define RX_REO_QUEUE_BAR_RECEIVED_COUNT_MASK 0xff000000
  799. /* Description MPDU_FRAMES_PROCESSED_COUNT
  800. The total number of MPDU frames that have been processed
  801. by REO. 'Processing' here means that REO has received them
  802. out of the entrance ring, and retrieved the corresponding
  803. RX_REO_QUEUE Descriptor.
  804. Note that this count includes duplicates, frames that later
  805. had errors, etc.
  806. Note that field 'Duplicate_count' indicates how many of
  807. these MPDUs were duplicates.
  808. <legal all>
  809. */
  810. #define RX_REO_QUEUE_MPDU_FRAMES_PROCESSED_COUNT_OFFSET 0x00000068
  811. #define RX_REO_QUEUE_MPDU_FRAMES_PROCESSED_COUNT_LSB 0
  812. #define RX_REO_QUEUE_MPDU_FRAMES_PROCESSED_COUNT_MSB 31
  813. #define RX_REO_QUEUE_MPDU_FRAMES_PROCESSED_COUNT_MASK 0xffffffff
  814. /* Description MSDU_FRAMES_PROCESSED_COUNT
  815. The total number of MSDU frames that have been processed
  816. by REO. 'Processing' here means that REO has received them
  817. out of the entrance ring, and retrieved the corresponding
  818. RX_REO_QUEUE Descriptor.
  819. Note that this count includes duplicates, frames that later
  820. had errors, etc.
  821. <legal all>
  822. */
  823. #define RX_REO_QUEUE_MSDU_FRAMES_PROCESSED_COUNT_OFFSET 0x0000006c
  824. #define RX_REO_QUEUE_MSDU_FRAMES_PROCESSED_COUNT_LSB 0
  825. #define RX_REO_QUEUE_MSDU_FRAMES_PROCESSED_COUNT_MSB 31
  826. #define RX_REO_QUEUE_MSDU_FRAMES_PROCESSED_COUNT_MASK 0xffffffff
  827. /* Description TOTAL_PROCESSED_BYTE_COUNT
  828. An approximation of the number of bytes processed for this
  829. queue.
  830. 'Processing' here means that REO has received them out of
  831. the entrance ring, and retrieved the corresponding RX_REO_QUEUE
  832. Descriptor.
  833. Note that this count includes duplicates, frames that later
  834. had errors, etc.
  835. In 64 byte units
  836. <legal all>
  837. */
  838. #define RX_REO_QUEUE_TOTAL_PROCESSED_BYTE_COUNT_OFFSET 0x00000070
  839. #define RX_REO_QUEUE_TOTAL_PROCESSED_BYTE_COUNT_LSB 0
  840. #define RX_REO_QUEUE_TOTAL_PROCESSED_BYTE_COUNT_MSB 31
  841. #define RX_REO_QUEUE_TOTAL_PROCESSED_BYTE_COUNT_MASK 0xffffffff
  842. /* Description LATE_RECEIVE_MPDU_COUNT
  843. The number of MPDUs received after the window had already
  844. moved on. The 'late' sequence window is defined as (Window
  845. SSN - 256) - (Window SSN - 1)
  846. This corresponds with Out of order detection in duplicate
  847. detect FSM
  848. The counter saturates and freezes at 0xFFF
  849. <legal all>
  850. */
  851. #define RX_REO_QUEUE_LATE_RECEIVE_MPDU_COUNT_OFFSET 0x00000074
  852. #define RX_REO_QUEUE_LATE_RECEIVE_MPDU_COUNT_LSB 0
  853. #define RX_REO_QUEUE_LATE_RECEIVE_MPDU_COUNT_MSB 11
  854. #define RX_REO_QUEUE_LATE_RECEIVE_MPDU_COUNT_MASK 0x00000fff
  855. /* Description WINDOW_JUMP_2K
  856. The number of times the window moved more then 2K
  857. The counter saturates and freezes at 0xF
  858. (Note: field name can not start with number: previous 2k_window_jump)
  859. <legal all>
  860. */
  861. #define RX_REO_QUEUE_WINDOW_JUMP_2K_OFFSET 0x00000074
  862. #define RX_REO_QUEUE_WINDOW_JUMP_2K_LSB 12
  863. #define RX_REO_QUEUE_WINDOW_JUMP_2K_MSB 15
  864. #define RX_REO_QUEUE_WINDOW_JUMP_2K_MASK 0x0000f000
  865. /* Description HOLE_COUNT
  866. The number of times a hole was created in the receive bitmap.
  867. This corresponds to the Reorder opcodes with 'QCUR'
  868. <legal all>
  869. */
  870. #define RX_REO_QUEUE_HOLE_COUNT_OFFSET 0x00000074
  871. #define RX_REO_QUEUE_HOLE_COUNT_LSB 16
  872. #define RX_REO_QUEUE_HOLE_COUNT_MSB 31
  873. #define RX_REO_QUEUE_HOLE_COUNT_MASK 0xffff0000
  874. /* Description AGING_DROP_MPDU_COUNT
  875. The number of holes in the bitmap that moved due to aging
  876. counter expiry
  877. <legal all>
  878. */
  879. #define RX_REO_QUEUE_AGING_DROP_MPDU_COUNT_OFFSET 0x00000078
  880. #define RX_REO_QUEUE_AGING_DROP_MPDU_COUNT_LSB 0
  881. #define RX_REO_QUEUE_AGING_DROP_MPDU_COUNT_MSB 15
  882. #define RX_REO_QUEUE_AGING_DROP_MPDU_COUNT_MASK 0x0000ffff
  883. /* Description AGING_DROP_INTERVAL
  884. The number of times holes got removed from the bitmap due
  885. to aging counter expiry
  886. <legal all>
  887. */
  888. #define RX_REO_QUEUE_AGING_DROP_INTERVAL_OFFSET 0x00000078
  889. #define RX_REO_QUEUE_AGING_DROP_INTERVAL_LSB 16
  890. #define RX_REO_QUEUE_AGING_DROP_INTERVAL_MSB 23
  891. #define RX_REO_QUEUE_AGING_DROP_INTERVAL_MASK 0x00ff0000
  892. /* Description RESERVED_30
  893. <legal 0>
  894. */
  895. #define RX_REO_QUEUE_RESERVED_30_OFFSET 0x00000078
  896. #define RX_REO_QUEUE_RESERVED_30_LSB 24
  897. #define RX_REO_QUEUE_RESERVED_30_MSB 31
  898. #define RX_REO_QUEUE_RESERVED_30_MASK 0xff000000
  899. /* Description RESERVED_31
  900. <legal 0>
  901. */
  902. #define RX_REO_QUEUE_RESERVED_31_OFFSET 0x0000007c
  903. #define RX_REO_QUEUE_RESERVED_31_LSB 0
  904. #define RX_REO_QUEUE_RESERVED_31_MSB 31
  905. #define RX_REO_QUEUE_RESERVED_31_MASK 0xffffffff
  906. #endif // RX_REO_QUEUE