reo_get_queue_stats.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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_GET_QUEUE_STATS_H_
  17. #define _REO_GET_QUEUE_STATS_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "uniform_reo_cmd_header.h"
  21. // ################ START SUMMARY #################
  22. //
  23. // Dword Fields
  24. // 0 struct uniform_reo_cmd_header cmd_header;
  25. // 1 rx_reo_queue_desc_addr_31_0[31:0]
  26. // 2 rx_reo_queue_desc_addr_39_32[7:0], clear_stats[8], reserved_2a[31:9]
  27. // 3 reserved_3a[31:0]
  28. // 4 reserved_4a[31:0]
  29. // 5 reserved_5a[31:0]
  30. // 6 reserved_6a[31:0]
  31. // 7 reserved_7a[31:0]
  32. // 8 reserved_8a[31:0]
  33. //
  34. // ################ END SUMMARY #################
  35. #define NUM_OF_DWORDS_REO_GET_QUEUE_STATS 9
  36. struct reo_get_queue_stats {
  37. struct uniform_reo_cmd_header cmd_header;
  38. uint32_t rx_reo_queue_desc_addr_31_0 : 32; //[31:0]
  39. uint32_t rx_reo_queue_desc_addr_39_32 : 8, //[7:0]
  40. clear_stats : 1, //[8]
  41. reserved_2a : 23; //[31:9]
  42. uint32_t reserved_3a : 32; //[31:0]
  43. uint32_t reserved_4a : 32; //[31:0]
  44. uint32_t reserved_5a : 32; //[31:0]
  45. uint32_t reserved_6a : 32; //[31:0]
  46. uint32_t reserved_7a : 32; //[31:0]
  47. uint32_t reserved_8a : 32; //[31:0]
  48. };
  49. /*
  50. struct uniform_reo_cmd_header cmd_header
  51. Consumer: REO
  52. Producer: SW
  53. Details for command execution tracking purposes.
  54. rx_reo_queue_desc_addr_31_0
  55. Consumer: REO
  56. Producer: SW
  57. Address (lower 32 bits) of the REO queue descriptor
  58. <legal all>
  59. rx_reo_queue_desc_addr_39_32
  60. Consumer: REO
  61. Producer: SW
  62. Address (upper 8 bits) of the REO queue descriptor
  63. <legal all>
  64. clear_stats
  65. Clear stat settings....
  66. <enum 0 no_clear> Do NOT clear the stats after
  67. generating the status
  68. <enum 1 clear_the_stats> Clear the stats after
  69. generating the status.
  70. The stats actually cleared are:
  71. Timeout_count
  72. Forward_due_to_bar_count
  73. Duplicate_count
  74. Frames_in_order_count
  75. BAR_received_count
  76. MPDU_Frames_processed_count
  77. MSDU_Frames_processed_count
  78. Total_processed_byte_count
  79. Late_receive_MPDU_count
  80. window_jump_2k
  81. Hole_count
  82. <legal 0-1>
  83. reserved_2a
  84. <legal 0>
  85. reserved_3a
  86. <legal 0>
  87. reserved_4a
  88. <legal 0>
  89. reserved_5a
  90. <legal 0>
  91. reserved_6a
  92. <legal 0>
  93. reserved_7a
  94. <legal 0>
  95. reserved_8a
  96. <legal 0>
  97. */
  98. /* EXTERNAL REFERENCE : struct uniform_reo_cmd_header cmd_header */
  99. /* Description REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_CMD_NUMBER
  100. Consumer: REO/SW/DEBUG
  101. Producer: SW
  102. This number can be used by SW to track, identify and
  103. link the created commands with the command statusses
  104. <legal all>
  105. */
  106. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_CMD_NUMBER_OFFSET 0x00000000
  107. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_CMD_NUMBER_LSB 0
  108. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_CMD_NUMBER_MASK 0x0000ffff
  109. /* Description REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_STATUS_REQUIRED
  110. Consumer: REO
  111. Producer: SW
  112. <enum 0 NoStatus> REO does not need to generate a status
  113. TLV for the execution of this command
  114. <enum 1 StatusRequired> REO shall generate a status TLV
  115. for the execution of this command
  116. <legal all>
  117. */
  118. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_STATUS_REQUIRED_OFFSET 0x00000000
  119. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_STATUS_REQUIRED_LSB 16
  120. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_REO_STATUS_REQUIRED_MASK 0x00010000
  121. /* Description REO_GET_QUEUE_STATS_0_CMD_HEADER_RESERVED_0A
  122. <legal 0>
  123. */
  124. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_RESERVED_0A_OFFSET 0x00000000
  125. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_RESERVED_0A_LSB 17
  126. #define REO_GET_QUEUE_STATS_0_CMD_HEADER_RESERVED_0A_MASK 0xfffe0000
  127. /* Description REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0
  128. Consumer: REO
  129. Producer: SW
  130. Address (lower 32 bits) of the REO queue descriptor
  131. <legal all>
  132. */
  133. #define REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0_OFFSET 0x00000004
  134. #define REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0_LSB 0
  135. #define REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0_MASK 0xffffffff
  136. /* Description REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32
  137. Consumer: REO
  138. Producer: SW
  139. Address (upper 8 bits) of the REO queue descriptor
  140. <legal all>
  141. */
  142. #define REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32_OFFSET 0x00000008
  143. #define REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32_LSB 0
  144. #define REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32_MASK 0x000000ff
  145. /* Description REO_GET_QUEUE_STATS_2_CLEAR_STATS
  146. Clear stat settings....
  147. <enum 0 no_clear> Do NOT clear the stats after
  148. generating the status
  149. <enum 1 clear_the_stats> Clear the stats after
  150. generating the status.
  151. The stats actually cleared are:
  152. Timeout_count
  153. Forward_due_to_bar_count
  154. Duplicate_count
  155. Frames_in_order_count
  156. BAR_received_count
  157. MPDU_Frames_processed_count
  158. MSDU_Frames_processed_count
  159. Total_processed_byte_count
  160. Late_receive_MPDU_count
  161. window_jump_2k
  162. Hole_count
  163. <legal 0-1>
  164. */
  165. #define REO_GET_QUEUE_STATS_2_CLEAR_STATS_OFFSET 0x00000008
  166. #define REO_GET_QUEUE_STATS_2_CLEAR_STATS_LSB 8
  167. #define REO_GET_QUEUE_STATS_2_CLEAR_STATS_MASK 0x00000100
  168. /* Description REO_GET_QUEUE_STATS_2_RESERVED_2A
  169. <legal 0>
  170. */
  171. #define REO_GET_QUEUE_STATS_2_RESERVED_2A_OFFSET 0x00000008
  172. #define REO_GET_QUEUE_STATS_2_RESERVED_2A_LSB 9
  173. #define REO_GET_QUEUE_STATS_2_RESERVED_2A_MASK 0xfffffe00
  174. /* Description REO_GET_QUEUE_STATS_3_RESERVED_3A
  175. <legal 0>
  176. */
  177. #define REO_GET_QUEUE_STATS_3_RESERVED_3A_OFFSET 0x0000000c
  178. #define REO_GET_QUEUE_STATS_3_RESERVED_3A_LSB 0
  179. #define REO_GET_QUEUE_STATS_3_RESERVED_3A_MASK 0xffffffff
  180. /* Description REO_GET_QUEUE_STATS_4_RESERVED_4A
  181. <legal 0>
  182. */
  183. #define REO_GET_QUEUE_STATS_4_RESERVED_4A_OFFSET 0x00000010
  184. #define REO_GET_QUEUE_STATS_4_RESERVED_4A_LSB 0
  185. #define REO_GET_QUEUE_STATS_4_RESERVED_4A_MASK 0xffffffff
  186. /* Description REO_GET_QUEUE_STATS_5_RESERVED_5A
  187. <legal 0>
  188. */
  189. #define REO_GET_QUEUE_STATS_5_RESERVED_5A_OFFSET 0x00000014
  190. #define REO_GET_QUEUE_STATS_5_RESERVED_5A_LSB 0
  191. #define REO_GET_QUEUE_STATS_5_RESERVED_5A_MASK 0xffffffff
  192. /* Description REO_GET_QUEUE_STATS_6_RESERVED_6A
  193. <legal 0>
  194. */
  195. #define REO_GET_QUEUE_STATS_6_RESERVED_6A_OFFSET 0x00000018
  196. #define REO_GET_QUEUE_STATS_6_RESERVED_6A_LSB 0
  197. #define REO_GET_QUEUE_STATS_6_RESERVED_6A_MASK 0xffffffff
  198. /* Description REO_GET_QUEUE_STATS_7_RESERVED_7A
  199. <legal 0>
  200. */
  201. #define REO_GET_QUEUE_STATS_7_RESERVED_7A_OFFSET 0x0000001c
  202. #define REO_GET_QUEUE_STATS_7_RESERVED_7A_LSB 0
  203. #define REO_GET_QUEUE_STATS_7_RESERVED_7A_MASK 0xffffffff
  204. /* Description REO_GET_QUEUE_STATS_8_RESERVED_8A
  205. <legal 0>
  206. */
  207. #define REO_GET_QUEUE_STATS_8_RESERVED_8A_OFFSET 0x00000020
  208. #define REO_GET_QUEUE_STATS_8_RESERVED_8A_LSB 0
  209. #define REO_GET_QUEUE_STATS_8_RESERVED_8A_MASK 0xffffffff
  210. #endif // _REO_GET_QUEUE_STATS_H_