reo_get_queue_stats.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #define NUM_OF_DWORDS_REO_GET_QUEUE_STATS 10
  22. #define NUM_OF_QWORDS_REO_GET_QUEUE_STATS 5
  23. struct reo_get_queue_stats {
  24. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  25. struct uniform_reo_cmd_header cmd_header;
  26. uint32_t rx_reo_queue_desc_addr_31_0 : 32; // [31:0]
  27. uint32_t rx_reo_queue_desc_addr_39_32 : 8, // [7:0]
  28. clear_stats : 1, // [8:8]
  29. reserved_2a : 23; // [31:9]
  30. uint32_t reserved_3a : 32; // [31:0]
  31. uint32_t reserved_4a : 32; // [31:0]
  32. uint32_t reserved_5a : 32; // [31:0]
  33. uint32_t reserved_6a : 32; // [31:0]
  34. uint32_t reserved_7a : 32; // [31:0]
  35. uint32_t reserved_8a : 32; // [31:0]
  36. uint32_t tlv64_padding : 32; // [31:0]
  37. #else
  38. struct uniform_reo_cmd_header cmd_header;
  39. uint32_t rx_reo_queue_desc_addr_31_0 : 32; // [31:0]
  40. uint32_t reserved_2a : 23, // [31:9]
  41. clear_stats : 1, // [8:8]
  42. rx_reo_queue_desc_addr_39_32 : 8; // [7:0]
  43. uint32_t reserved_3a : 32; // [31:0]
  44. uint32_t reserved_4a : 32; // [31:0]
  45. uint32_t reserved_5a : 32; // [31:0]
  46. uint32_t reserved_6a : 32; // [31:0]
  47. uint32_t reserved_7a : 32; // [31:0]
  48. uint32_t reserved_8a : 32; // [31:0]
  49. uint32_t tlv64_padding : 32; // [31:0]
  50. #endif
  51. };
  52. /* Description CMD_HEADER
  53. Consumer: REO
  54. Producer: SW
  55. Details for command execution tracking purposes.
  56. */
  57. /* Description REO_CMD_NUMBER
  58. Consumer: REO/SW/DEBUG
  59. Producer: SW
  60. This number can be used by SW to track, identify and link
  61. the created commands with the command statusses
  62. <legal all>
  63. */
  64. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_CMD_NUMBER_OFFSET 0x0000000000000000
  65. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_CMD_NUMBER_LSB 0
  66. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_CMD_NUMBER_MSB 15
  67. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_CMD_NUMBER_MASK 0x000000000000ffff
  68. /* Description REO_STATUS_REQUIRED
  69. Consumer: REO
  70. Producer: SW
  71. <enum 0 NoStatus> REO does not need to generate a status
  72. TLV for the execution of this command
  73. <enum 1 StatusRequired> REO shall generate a status TLV
  74. for the execution of this command
  75. <legal all>
  76. */
  77. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_STATUS_REQUIRED_OFFSET 0x0000000000000000
  78. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_STATUS_REQUIRED_LSB 16
  79. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_STATUS_REQUIRED_MSB 16
  80. #define REO_GET_QUEUE_STATS_CMD_HEADER_REO_STATUS_REQUIRED_MASK 0x0000000000010000
  81. /* Description RESERVED_0A
  82. <legal 0>
  83. */
  84. #define REO_GET_QUEUE_STATS_CMD_HEADER_RESERVED_0A_OFFSET 0x0000000000000000
  85. #define REO_GET_QUEUE_STATS_CMD_HEADER_RESERVED_0A_LSB 17
  86. #define REO_GET_QUEUE_STATS_CMD_HEADER_RESERVED_0A_MSB 31
  87. #define REO_GET_QUEUE_STATS_CMD_HEADER_RESERVED_0A_MASK 0x00000000fffe0000
  88. /* Description RX_REO_QUEUE_DESC_ADDR_31_0
  89. Consumer: REO
  90. Producer: SW
  91. Address (lower 32 bits) of the REO queue descriptor
  92. <legal all>
  93. */
  94. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_31_0_OFFSET 0x0000000000000000
  95. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_31_0_LSB 32
  96. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_31_0_MSB 63
  97. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_31_0_MASK 0xffffffff00000000
  98. /* Description RX_REO_QUEUE_DESC_ADDR_39_32
  99. Consumer: REO
  100. Producer: SW
  101. Address (upper 8 bits) of the REO queue descriptor
  102. <legal all>
  103. */
  104. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_39_32_OFFSET 0x0000000000000008
  105. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_39_32_LSB 0
  106. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_39_32_MSB 7
  107. #define REO_GET_QUEUE_STATS_RX_REO_QUEUE_DESC_ADDR_39_32_MASK 0x00000000000000ff
  108. /* Description CLEAR_STATS
  109. Clear stat settings....
  110. <enum 0 no_clear> Do NOT clear the stats after generating
  111. the status
  112. <enum 1 clear_the_stats> Clear the stats after generating
  113. the status.
  114. The stats actually cleared are:
  115. Timeout_count
  116. Forward_due_to_bar_count
  117. Duplicate_count
  118. Frames_in_order_count
  119. BAR_received_count
  120. MPDU_Frames_processed_count
  121. MSDU_Frames_processed_count
  122. Total_processed_byte_count
  123. Late_receive_MPDU_count
  124. window_jump_2k
  125. Hole_count
  126. <legal 0-1>
  127. */
  128. #define REO_GET_QUEUE_STATS_CLEAR_STATS_OFFSET 0x0000000000000008
  129. #define REO_GET_QUEUE_STATS_CLEAR_STATS_LSB 8
  130. #define REO_GET_QUEUE_STATS_CLEAR_STATS_MSB 8
  131. #define REO_GET_QUEUE_STATS_CLEAR_STATS_MASK 0x0000000000000100
  132. /* Description RESERVED_2A
  133. <legal 0>
  134. */
  135. #define REO_GET_QUEUE_STATS_RESERVED_2A_OFFSET 0x0000000000000008
  136. #define REO_GET_QUEUE_STATS_RESERVED_2A_LSB 9
  137. #define REO_GET_QUEUE_STATS_RESERVED_2A_MSB 31
  138. #define REO_GET_QUEUE_STATS_RESERVED_2A_MASK 0x00000000fffffe00
  139. /* Description RESERVED_3A
  140. <legal 0>
  141. */
  142. #define REO_GET_QUEUE_STATS_RESERVED_3A_OFFSET 0x0000000000000008
  143. #define REO_GET_QUEUE_STATS_RESERVED_3A_LSB 32
  144. #define REO_GET_QUEUE_STATS_RESERVED_3A_MSB 63
  145. #define REO_GET_QUEUE_STATS_RESERVED_3A_MASK 0xffffffff00000000
  146. /* Description RESERVED_4A
  147. <legal 0>
  148. */
  149. #define REO_GET_QUEUE_STATS_RESERVED_4A_OFFSET 0x0000000000000010
  150. #define REO_GET_QUEUE_STATS_RESERVED_4A_LSB 0
  151. #define REO_GET_QUEUE_STATS_RESERVED_4A_MSB 31
  152. #define REO_GET_QUEUE_STATS_RESERVED_4A_MASK 0x00000000ffffffff
  153. /* Description RESERVED_5A
  154. <legal 0>
  155. */
  156. #define REO_GET_QUEUE_STATS_RESERVED_5A_OFFSET 0x0000000000000010
  157. #define REO_GET_QUEUE_STATS_RESERVED_5A_LSB 32
  158. #define REO_GET_QUEUE_STATS_RESERVED_5A_MSB 63
  159. #define REO_GET_QUEUE_STATS_RESERVED_5A_MASK 0xffffffff00000000
  160. /* Description RESERVED_6A
  161. <legal 0>
  162. */
  163. #define REO_GET_QUEUE_STATS_RESERVED_6A_OFFSET 0x0000000000000018
  164. #define REO_GET_QUEUE_STATS_RESERVED_6A_LSB 0
  165. #define REO_GET_QUEUE_STATS_RESERVED_6A_MSB 31
  166. #define REO_GET_QUEUE_STATS_RESERVED_6A_MASK 0x00000000ffffffff
  167. /* Description RESERVED_7A
  168. <legal 0>
  169. */
  170. #define REO_GET_QUEUE_STATS_RESERVED_7A_OFFSET 0x0000000000000018
  171. #define REO_GET_QUEUE_STATS_RESERVED_7A_LSB 32
  172. #define REO_GET_QUEUE_STATS_RESERVED_7A_MSB 63
  173. #define REO_GET_QUEUE_STATS_RESERVED_7A_MASK 0xffffffff00000000
  174. /* Description RESERVED_8A
  175. <legal 0>
  176. */
  177. #define REO_GET_QUEUE_STATS_RESERVED_8A_OFFSET 0x0000000000000020
  178. #define REO_GET_QUEUE_STATS_RESERVED_8A_LSB 0
  179. #define REO_GET_QUEUE_STATS_RESERVED_8A_MSB 31
  180. #define REO_GET_QUEUE_STATS_RESERVED_8A_MASK 0x00000000ffffffff
  181. /* Description TLV64_PADDING
  182. Automatic DWORD padding inserted while converting TLV32
  183. to TLV64 for 64 bit ARCH
  184. <legal 0>
  185. */
  186. #define REO_GET_QUEUE_STATS_TLV64_PADDING_OFFSET 0x0000000000000020
  187. #define REO_GET_QUEUE_STATS_TLV64_PADDING_LSB 32
  188. #define REO_GET_QUEUE_STATS_TLV64_PADDING_MSB 63
  189. #define REO_GET_QUEUE_STATS_TLV64_PADDING_MASK 0xffffffff00000000
  190. #endif // REO_GET_QUEUE_STATS