htt_ppdu_stats.h 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872
  1. /*
  2. * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * @file htt_ppdu_stats.h
  20. *
  21. * @details the public header file of HTT STATS
  22. */
  23. #ifndef __HTT_PPDU_STATS_H__
  24. #define __HTT_PPDU_STATS_H__
  25. #include <htt.h>
  26. #include <htt_stats.h>
  27. #define HTT_BA_64_BIT_MAP_SIZE_DWORDS 2
  28. #define HTT_BA_256_BIT_MAP_SIZE_DWORDS 8
  29. enum htt_ppdu_stats_tlv_tag {
  30. HTT_PPDU_STATS_COMMON_TLV,
  31. HTT_PPDU_STATS_USR_COMMON_TLV,
  32. HTT_PPDU_STATS_USR_RATE_TLV,
  33. HTT_PPDU_STATS_USR_MPDU_ENQ_BITMAP_64_TLV,
  34. HTT_PPDU_STATS_USR_MPDU_ENQ_BITMAP_256_TLV,
  35. HTT_PPDU_STATS_SCH_CMD_STATUS_TLV,
  36. HTT_PPDU_STATS_USR_COMPLTN_COMMON_TLV,
  37. HTT_PPDU_STATS_USR_COMPLTN_BA_BITMAP_64_TLV,
  38. HTT_PPDU_STATS_USR_COMPLTN_BA_BITMAP_256_TLV,
  39. HTT_PPDU_STATS_USR_COMPLTN_ACK_BA_STATUS_TLV,
  40. HTT_PPDU_STATS_USR_COMPLTN_FLUSH_TLV,
  41. HTT_PPDU_STATS_USR_COMMON_ARRAY_TLV,
  42. HTT_PPDU_STATS_INFO_TLV,
  43. HTT_PPDU_STATS_TX_MGMTCTRL_PAYLOAD_TLV,
  44. /* New TLV's are added above to this line */
  45. HTT_PPDU_STATS_MAX_TAG,
  46. };
  47. typedef enum htt_ppdu_stats_tlv_tag htt_ppdu_stats_tlv_tag_t;
  48. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_M 0x000000ff
  49. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_S 0
  50. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_GET(_var) \
  51. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_M) >> \
  52. HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_S)
  53. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_SET(_var, _val) \
  54. do { \
  55. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE, _val); \
  56. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RATE_S)); \
  57. } while (0)
  58. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_M 0x00000100
  59. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_S 8
  60. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_GET(_var) \
  61. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_M) >> \
  62. HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_S)
  63. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_SET(_var, _val) \
  64. do { \
  65. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU, _val); \
  66. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_IS_AMPDU_S)); \
  67. } while (0)
  68. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_M 0x00000600
  69. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_S 9
  70. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_GET(_var) \
  71. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_M) >> \
  72. HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_S)
  73. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_SET(_var, _val) \
  74. do { \
  75. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED, _val); \
  76. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_BA_ACK_FAILED_S)); \
  77. } while (0)
  78. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_M 0x00003800
  79. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_S 11
  80. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_GET(_var) \
  81. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_M) >> \
  82. HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_S)
  83. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_SET(_var, _val) \
  84. do { \
  85. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW, _val); \
  86. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_BW_S)); \
  87. } while (0)
  88. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_M 0x00004000
  89. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_S 14
  90. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_GET(_var) \
  91. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_M) >> \
  92. HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_S)
  93. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_SET(_var, _val) \
  94. do { \
  95. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI, _val); \
  96. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_S)); \
  97. } while (0)
  98. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_M 0x00008000
  99. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S 15
  100. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_GET(_var) \
  101. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_M) >> \
  102. HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S)
  103. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_SET(_var, _val) \
  104. do { \
  105. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR, _val); \
  106. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S)); \
  107. } while (0)
  108. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_M 0xffff0000
  109. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_S 16
  110. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_GET(_var) \
  111. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_M) >> \
  112. HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_S)
  113. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_SET(_var, _val) \
  114. do { \
  115. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID, _val); \
  116. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_S)); \
  117. } while (0)
  118. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_M 0x0000ffff
  119. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_S 0
  120. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_GET(_var) \
  121. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_M) >> \
  122. HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_S)
  123. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_SET(_var, _val) \
  124. do { \
  125. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS, _val); \
  126. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_SUCC_MSDUS_S)); \
  127. } while (0)
  128. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_M 0xffff0000
  129. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_S 16
  130. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_GET(_var) \
  131. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_M) >> \
  132. HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_S)
  133. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_SET(_var, _val) \
  134. do { \
  135. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS, _val); \
  136. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_RETRY_MSDUS_S)); \
  137. } while (0)
  138. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_M 0x0000ffff
  139. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_S 0
  140. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_GET(_var) \
  141. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_M) >> \
  142. HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_S)
  143. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_SET(_var, _val) \
  144. do { \
  145. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS, _val); \
  146. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_FAILED_MSDUS_S)); \
  147. } while (0)
  148. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_M 0xffff0000
  149. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_S 16
  150. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_GET(_var) \
  151. (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_M) >> \
  152. HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_S)
  153. #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_SET(_var, _val) \
  154. do { \
  155. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR, _val); \
  156. ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_TX_DUR_S)); \
  157. } while (0)
  158. PREPACK struct htt_tx_ppdu_stats_info {
  159. htt_tlv_hdr_t tlv_hdr;
  160. A_UINT32 tx_success_bytes;
  161. A_UINT32 tx_retry_bytes;
  162. A_UINT32 tx_failed_bytes;
  163. A_UINT32 tx_ratecode: 8,
  164. is_ampdu: 1,
  165. ba_ack_failed: 2,
  166. /* 0: 20 MHz
  167. 1: 40 MHz
  168. 2: 80 MHz
  169. 3: 160 MHz or 80+80 MHz */
  170. bw: 3,
  171. sgi: 1,
  172. skipped_rate_ctrl: 1,
  173. peer_id: 16;
  174. A_UINT32 tx_success_msdus: 16,
  175. tx_retry_msdus: 16;
  176. A_UINT32 tx_failed_msdus: 16,
  177. /* united in us */
  178. tx_duration: 16;
  179. /*
  180. * 1 in bit 0 of valid_bitmap represents that bitmap itself is valid.
  181. * If the bitmap is valid (i.e. bit 0 is set), then check the other bits
  182. * of bitmap to know which fields within htt_tx_ppdu_stats_info are valid.
  183. * If bit 1 is set, tx_success_bytes is valid
  184. * If bit 2 is set, tx_retry_bytes is valid
  185. * ...
  186. * If bit 14 is set, tx_duration is valid
  187. * If bit 15 is set, all of ack_rssi_chain are valid,
  188. * for each validation of chain, need to check value in field
  189. * If bit 16 is set, tx_timestamp is valid
  190. * If bit 16 is set, sa_ant_matrix is valid
  191. * If bit 17 is set, tid is valid
  192. */
  193. A_UINT32 valid_bitmap;
  194. A_UINT32 ext_valid_bitmap; /* reserved for future extension valid bitmap */
  195. /* ack rssi for each chain */
  196. A_UINT32 ack_rssi_chain0: 8, /* Units: dB w.r.t noise floor, RSSI of Ack of all active chains. Value of 0x80 indicates invalid.*/
  197. ack_rssi_chain1: 8, /* same as above */
  198. ack_rssi_chain2: 8, /* same as above */
  199. ack_rssi_chain3: 8; /* same as above */
  200. A_UINT32 ack_rssi_chain4: 8, /* same as above */
  201. ack_rssi_chain5: 8, /* same as above */
  202. ack_rssi_chain6: 8, /* same as above */
  203. ack_rssi_chain7: 8; /* same as above */
  204. A_UINT32 tx_timestamp; /* HW assigned timestamp with microsecond unit */
  205. A_UINT32 sa_ant_matrix: 8, /* This sa_ant_matrix provides a bitmask of the antennas used while frame transmit */
  206. tid: 8,
  207. reserved_1: 16;
  208. } POSTPACK;
  209. typedef struct {
  210. htt_tlv_hdr_t tlv_hdr;
  211. A_UINT32 number_of_ppdu_stats;
  212. /*
  213. * tx_ppdu_stats_info is filled by multiple struct htt_tx_ppdu_stats_info
  214. * elements.
  215. * tx_ppdu_stats_info is variable length, with length =
  216. * number_of_ppdu_stats * sizeof (struct htt_tx_ppdu_stats_info)
  217. */
  218. struct htt_tx_ppdu_stats_info tx_ppdu_stats_info[1/*number_of_ppdu_stats*/];
  219. } htt_ppdu_stats_usr_common_array_tlv_v;
  220. #define HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT \
  221. struct { \
  222. htt_tlv_hdr_t tlv_hdr; \
  223. /* Refer bmi_msg.h */ \
  224. A_UINT32 target_type; \
  225. }
  226. typedef HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT htt_ppdu_stats_sch_cmd_tlv_hdr_t;
  227. typedef struct {
  228. /*
  229. * Use a union to allow the HW-independent header portion of this struct
  230. * to be accessed either within a hdr struct, or directly within the
  231. * htt_ppdu_stats_sch_cmd_tlv_v struct.
  232. * For example, the target_type field can be accessed either as
  233. * htt_ppdu_stats_sch_cmd_tlv_v.target_type
  234. * or
  235. * htt_ppdu_stats_sch_cmd_tlv_v.hdr.target_type
  236. */
  237. union {
  238. htt_ppdu_stats_sch_cmd_tlv_hdr_t hdr;
  239. HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT;
  240. };
  241. /*
  242. * The hw portion of this struct contains a scheduler_command_status
  243. * struct, whose definition is different for different target HW types.
  244. * The target_type field within the header can, if set correctly,
  245. * clarify which definition of scheduler_command_status is being used.
  246. */
  247. A_UINT32 hw[1];
  248. } htt_ppdu_stats_sch_cmd_tlv_v;
  249. #define HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_M 0x0000ffff
  250. #define HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_S 0
  251. #define HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_GET(_var) \
  252. (((_var) & HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_M) >> \
  253. HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_S)
  254. #define HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_SET(_var, _val) \
  255. do { \
  256. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID, _val); \
  257. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_S)); \
  258. } while (0)
  259. #define HTT_PPDU_STATS_COMMON_TLV_RING_ID_M 0x00ff0000
  260. #define HTT_PPDU_STATS_COMMON_TLV_RING_ID_S 16
  261. #define HTT_PPDU_STATS_COMMON_TLV_RING_ID_GET(_var) \
  262. (((_var) & HTT_PPDU_STATS_COMMON_TLV_RING_ID_M) >> \
  263. HTT_PPDU_STATS_COMMON_TLV_RING_ID_S)
  264. #define HTT_PPDU_STATS_COMMON_TLV_RING_ID_SET(_var, _val) \
  265. do { \
  266. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_RING_ID, _val); \
  267. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_RING_ID_S)); \
  268. } while (0)
  269. #define HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_M 0xff000000
  270. #define HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_S 24
  271. #define HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_GET(_var) \
  272. (((_var) & HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_M) >> \
  273. HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_S)
  274. #define HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_SET(_var, _val) \
  275. do { \
  276. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_NUM_USERS, _val); \
  277. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_NUM_USERS_S)); \
  278. } while (0)
  279. /* HW queue type */
  280. enum HTT_TX_QUEUE_TYPE {
  281. HTT_TX_QUEUE_INACTIVE,
  282. HTT_TX_QUEUE_DATA,
  283. HTT_TX_QUEUE_BEACON,
  284. HTT_TX_QUEUE_PSPOLL,
  285. HTT_TX_QUEUE_CAB,
  286. HTT_TX_QUEUE_HALPHY,
  287. HTT_TX_QUEUE_QBOOST_RESP,
  288. HTT_TX_QUEUE_NAN_BEACON,
  289. HTT_TX_QUEUE_NAN_MGMT,
  290. HTT_TX_QUEUE_UL_DATA,
  291. HTT_TX_QUEUE_UL_BSR_RESP,
  292. HTT_TX_QUEUE_MGMT,
  293. HTT_TX_QUEUE_MAX,
  294. };
  295. typedef enum HTT_TX_QUEUE_TYPE HTT_TX_QUEUE_TYPE;
  296. /* frame_type */
  297. enum HTT_STATS_FTYPE {
  298. HTT_STATS_FTYPE_SGEN_NDPA = 0,
  299. HTT_STATS_FTYPE_SGEN_NDP,
  300. HTT_STATS_FTYPE_SGEN_BRP,
  301. HTT_STATS_FTYPE_SGEN_BAR,
  302. HTT_STATS_FTYPE_SGEN_RTS,
  303. HTT_STATS_FTYPE_SGEN_CTS,
  304. HTT_STATS_FTYPE_SGEN_CFEND,
  305. HTT_STATS_FTYPE_SGEN_AX_NDPA,
  306. HTT_STATS_FTYPE_SGEN_AX_NDP,
  307. HTT_STATS_FTYPE_SGEN_MU_TRIG,
  308. HTT_STATS_FTYPE_SGEN_MU_BAR,
  309. HTT_STATS_FTYPE_SGEN_MU_BRP,
  310. HTT_STATS_FTYPE_SGEN_MU_RTS,
  311. HTT_STATS_FTYPE_SGEN_MU_BSR,
  312. HTT_STATS_FTYPE_SGEN_UL_BSR,
  313. HTT_STATS_FTYPE_SGEN_UL_BSR_TRIGGER = HTT_STATS_FTYPE_SGEN_UL_BSR, /*alias*/
  314. HTT_STATS_FTYPE_TIDQ_DATA_SU,
  315. HTT_STATS_FTYPE_TIDQ_DATA_MU,
  316. HTT_STATS_FTYPE_SGEN_UL_BSR_RESP,
  317. HTT_STATS_FTYPE_SGEN_QOS_NULL,
  318. HTT_STATS_FTYPE_MAX,
  319. };
  320. typedef enum HTT_STATS_FTYPE HTT_STATS_FTYPE;
  321. /* FRM_TYPE defined in HTT_STATS_FTYPE */
  322. #define HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_M 0x000000ff
  323. #define HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_S 0
  324. #define HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_GET(_var) \
  325. (((_var) & HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_M) >> \
  326. HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_S)
  327. #define HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_SET(_var, _val) \
  328. do { \
  329. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE, _val); \
  330. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_FRM_TYPE_S)); \
  331. } while (0)
  332. /* QTYPE defined in HTT_TX_QUEUE_TYPE */
  333. #define HTT_PPDU_STATS_COMMON_TLV_QTYPE_M 0x0000ff00
  334. #define HTT_PPDU_STATS_COMMON_TLV_QTYPE_S 8
  335. #define HTT_PPDU_STATS_COMMON_TLV_QTYPE_GET(_var) \
  336. (((_var) & HTT_PPDU_STATS_COMMON_TLV_QTYPE_M) >> \
  337. HTT_PPDU_STATS_COMMON_TLV_QTYPE_S)
  338. #define HTT_PPDU_STATS_COMMON_TLV_QTYPE_SET(_var, _val) \
  339. do { \
  340. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_QTYPE, _val); \
  341. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_QTYPE_S)); \
  342. } while (0)
  343. enum HTT_PPDU_STATS_BW {
  344. HTT_PPDU_STATS_BANDWIDTH_5MHZ = 0,
  345. HTT_PPDU_STATS_BANDWIDTH_10MHZ = 1,
  346. HTT_PPDU_STATS_BANDWIDTH_20MHZ = 2,
  347. HTT_PPDU_STATS_BANDWIDTH_40MHZ = 3,
  348. HTT_PPDU_STATS_BANDWIDTH_80MHZ = 4,
  349. HTT_PPDU_STATS_BANDWIDTH_160MHZ = 5, /* includes 80+80 */
  350. HTT_PPDU_STATS_BANDWIDTH_DYN = 6,
  351. };
  352. typedef enum HTT_PPDU_STATS_BW HTT_PPDU_STATS_BW;
  353. enum HTT_PPDU_STATS_SEQ_TYPE {
  354. HTT_SEQTYPE_UNSPECIFIED = 0,
  355. HTT_SEQTYPE_SU = 1,
  356. HTT_SEQTYPE_AC_MU_MIMO = 2,
  357. HTT_SEQTYPE_AX_MU_MIMO = 3,
  358. HTT_SEQTYPE_MU_OFDMA = 4,
  359. HTT_SEQTYPE_UL_TRIG = 5,
  360. HTT_SEQTYPE_BURST_BCN = 6,
  361. HTT_SEQTYPE_UL_BSR_RESP = 7,
  362. HTT_SEQTYPE_UL_BSR_TRIG = 8,
  363. HTT_SEQTYPE_UL_RESP = 9,
  364. };
  365. typedef enum HTT_PPDU_STATS_SEQ_TYPE HTT_PPDU_STATS_SEQ_TYPE;
  366. #define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_M 0x00ff0000
  367. #define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_S 16
  368. #define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_GET(_var) \
  369. (((_var) & HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_M) >> \
  370. HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_S)
  371. #define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_SET(_var, _val) \
  372. do { \
  373. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE, _val); \
  374. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_S)); \
  375. } while (0)
  376. #define HTT_PPDU_STATS_COMMON_TLV_BW_M 0x000f0000
  377. #define HTT_PPDU_STATS_COMMON_TLV_BW_S 16
  378. #define HTT_PPDU_STATS_COMMON_TLV_BW_GET(_var) \
  379. (((_var) & HTT_PPDU_STATS_COMMON_TLV_BW_M) >> \
  380. HTT_PPDU_STATS_COMMON_TLV_BW_S)
  381. #define HTT_PPDU_STATS_COMMON_TLV_BW_SET(_var, _val) \
  382. do { \
  383. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_BW, _val); \
  384. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_BW_S)); \
  385. } while (0)
  386. #define HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_M 0x0000ffff
  387. #define HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_S 0
  388. #define HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_GET(_var) \
  389. (((_var) & HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_M) >> \
  390. HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_S)
  391. #define HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_SET(_var, _val) \
  392. do { \
  393. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_PHY_MODE, _val); \
  394. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_PHY_MODE_S)); \
  395. } while (0)
  396. #define HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_M 0xffff0000
  397. #define HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_S 16
  398. #define HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_GET(_var) \
  399. (((_var) & HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_M) >> \
  400. HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_S)
  401. #define HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_SET(_var, _val) \
  402. do { \
  403. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ, _val); \
  404. ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_CHAN_MHZ_S)); \
  405. } while (0)
  406. typedef struct {
  407. htt_tlv_hdr_t tlv_hdr;
  408. A_UINT32 ppdu_id;
  409. /* BIT [ 15 : 0] :- sched_cmdid
  410. * BIT [ 23 : 16] :- ring_id
  411. * BIT [ 31 : 24] :- num_users
  412. */
  413. union {
  414. A_UINT32 ring_id__sched_cmdid;
  415. struct {
  416. A_UINT32 sched_cmdid: 16,
  417. ring_id: 8,
  418. num_users: 8;
  419. };
  420. };
  421. /* BIT [ 7 : 0] :- frame_type - HTT_STATS_FTYPE
  422. * BIT [ 15: 8] :- queue_type - HTT_TX_QUEUE_TYPE
  423. * BIT [ 19: 16] :- bw - HTT_PPDU_STATS_BW
  424. * BIT [ 27: 20] :- ppdu_seq_type - HTT_PPDU_STATS_SEQ_TYPE
  425. * BIT [ 31: 28] :- reserved
  426. */
  427. union {
  428. A_UINT32 bw__queue_type__frame_type;
  429. A_UINT32 ppdu_seq_type__bw__queue_type__frame_type;
  430. struct {
  431. A_UINT32 frame_type: 8,
  432. queue_type: 8,
  433. bw: 4,
  434. ppdu_seq_type: 8,
  435. reserved0: 4;
  436. };
  437. };
  438. A_UINT32 chain_mask;
  439. A_UINT32 fes_duration_us; /* frame exchange sequence */
  440. A_UINT32 ppdu_sch_eval_start_tstmp_us;
  441. A_UINT32 ppdu_sch_end_tstmp_us;
  442. A_UINT32 ppdu_start_tstmp_us;
  443. /* BIT [15 : 0] - phy mode (WLAN_PHY_MODE) with which ppdu was transmitted
  444. * BIT [31 : 16] - bandwidth (in MHz) with which ppdu was transmitted
  445. */
  446. union {
  447. A_UINT32 chan_mhz__phy_mode;
  448. struct {
  449. A_UINT32 phy_mode: 16,
  450. chan_mhz: 16;
  451. };
  452. };
  453. /*
  454. * The cca_delta_time_us reports the time the tx PPDU in question
  455. * was waiting in the HW tx queue for the clear channel assessment
  456. * to indicate that the transmission could start.
  457. * If this CCA delta time is zero or small, this indicates that the
  458. * air interface was unused prior to the transmission, and thus it's
  459. * improbable that there was a collision with some other transceiver's
  460. * transmission.
  461. * In contrast, a large CCA delta time means that this transceiver had
  462. * to wait a long time for the air interface to be available; it's
  463. * possible that other transceivers were also waiting for the air
  464. * interface to become available, and if the other waiting transceiver's
  465. * CW backoff aligned with this one, to have a transmit collision.
  466. */
  467. A_UINT32 cca_delta_time_us;
  468. /*
  469. * The rxfrm_delta_time_us reports the time the tx PPDU in question
  470. * was waiting in the HW tx queue while there was an ongoing rx,
  471. * either because the rx was already ongoing at the time the tx PPDU
  472. * was enqueued, or because the rx (i.e. the peer's tx) won the air
  473. * interface contention over the local vdev's tx.
  474. */
  475. A_UINT32 rxfrm_delta_time_us;
  476. /*
  477. * The txfrm_delta_time_us reports the time from when the tx PPDU
  478. * in question was enqueued into the HW tx queue until the time the
  479. * tx completion interrupt for the PPDU occurred.
  480. * Thus, the txfrm_delta_time_us incorporates any time the tx PPDU
  481. * had to wait for the air interface to become available, the PPDU
  482. * duration, the block ack reception, and the tx completion interrupt
  483. * latency.
  484. */
  485. A_UINT32 txfrm_delta_time_us;
  486. } htt_ppdu_stats_common_tlv;
  487. #define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_M 0x000000ff
  488. #define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_S 0
  489. #define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_GET(_var) \
  490. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_M) >> \
  491. HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_S)
  492. #define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_SET(_var, _val) \
  493. do { \
  494. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM, _val); \
  495. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_S)); \
  496. } while (0)
  497. #define HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_M 0x0000ff00
  498. #define HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_S 8
  499. #define HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_GET(_var) \
  500. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_M) >> \
  501. HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_S)
  502. #define HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_SET(_var, _val) \
  503. do { \
  504. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID, _val); \
  505. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_VAP_ID_S)); \
  506. } while (0)
  507. #define HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_M 0xffff0000
  508. #define HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_S 16
  509. #define HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_GET(_var) \
  510. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_M) >> \
  511. HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_S)
  512. #define HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_SET(_var, _val) \
  513. do { \
  514. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID, _val); \
  515. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_SW_PEER_ID_S)); \
  516. } while (0)
  517. #define HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_M 0x00000001
  518. #define HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_S 0
  519. #define HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_GET(_var) \
  520. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_M) >> \
  521. HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_S)
  522. #define HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_SET(_var, _val) \
  523. do { \
  524. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_MCAST, _val); \
  525. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_MCAST_S)); \
  526. } while (0)
  527. #define HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_M 0x000003fe
  528. #define HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_S 1
  529. #define HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_GET(_var) \
  530. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_M) >> \
  531. HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_S)
  532. #define HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_SET(_var, _val) \
  533. do { \
  534. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED, _val); \
  535. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_MPDUS_TRIED_S)); \
  536. } while (0)
  537. #define HTT_PPDU_STATS_USER_COMMON_TLV_BW_M 0x00003c00
  538. #define HTT_PPDU_STATS_USER_COMMON_TLV_BW_S 10
  539. #define HTT_PPDU_STATS_USER_COMMON_TLV_BW_GET(_var) \
  540. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_BW_M) >> \
  541. HTT_PPDU_STATS_USER_COMMON_TLV_BW_S)
  542. #define HTT_PPDU_STATS_USER_COMMON_TLV_BW_SET(_var, _val) \
  543. do { \
  544. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_BW, _val); \
  545. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_BW_S)); \
  546. } while (0)
  547. #define HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_M 0x00004000
  548. #define HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_S 14
  549. #define HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_GET(_var) \
  550. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_M) >> \
  551. HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_S)
  552. #define HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_SET(_var, _val) \
  553. do { \
  554. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA, _val); \
  555. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_DELAYED_BA_S)); \
  556. } while (0)
  557. #define HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_M 0x0000ffff
  558. #define HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_S 0
  559. #define HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_GET(_var) \
  560. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_M) >> \
  561. HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_S)
  562. #define HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_SET(_var, _val) \
  563. do { \
  564. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL, _val); \
  565. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_FRAME_CTRL_S)); \
  566. } while (0)
  567. #define HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_M 0xffff0000
  568. #define HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_S 16
  569. #define HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_GET(_var) \
  570. (((_var) & HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_M) >> \
  571. HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_S)
  572. #define HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_SET(_var, _val) \
  573. do { \
  574. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL, _val); \
  575. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_COMMON_TLV_QOS_CTRL_S)); \
  576. } while (0)
  577. typedef struct {
  578. htt_tlv_hdr_t tlv_hdr;
  579. /* BIT [ 7 : 0] :- tid_num
  580. * BIT [ 15: 8] :- vap_id
  581. * BIT [ 31: 16] :- sw_peer_id
  582. */
  583. union {
  584. A_UINT32 sw_peer_id__vapid__tid_num;
  585. struct {
  586. A_UINT32 tid_num: 8,
  587. vap_id: 8,
  588. sw_peer_id: 16;
  589. };
  590. };
  591. /* BIT [ 0 : 0] :- mcast
  592. * BIT [ 9 : 1] :- mpdus_tried
  593. * BIT [ 13: 10] :- bw - HTT_PPDU_STATS_BW
  594. * BIT [ 14: 14] : - delayed_ba
  595. * BIT [ 31: 15] :- rsvd
  596. */
  597. union {
  598. A_UINT32 bw__mpdus_tried__mcast;
  599. struct {
  600. A_UINT32 mcast: 1,
  601. mpdus_tried: 9,
  602. bw: 4,
  603. delayed_ba: 1,
  604. reserved0: 17;
  605. };
  606. };
  607. /* BIT [ 15: 0] :- frame_ctrl
  608. * BIT [ 31: 16] :- qos_ctrl
  609. */
  610. union {
  611. A_UINT32 qos_ctrl_frame_ctrl;
  612. struct {
  613. A_UINT32 frame_ctrl: 16,
  614. qos_ctrl: 16;
  615. };
  616. };
  617. /*
  618. * Data fields containing the physical address info of a MSDU buffer
  619. * as well as the owner and a SW cookie info that can be used by the host
  620. * to look up the virtual address of the MSDU buffer.
  621. * These fields are only valid if is_buffer_addr_info_valid is set to 1.
  622. */
  623. A_UINT32 buffer_paddr_31_0 : 32;
  624. A_UINT32 buffer_paddr_39_32 : 8,
  625. return_buffer_manager : 3,
  626. sw_buffer_cookie : 21;
  627. /*
  628. * host_opaque_cookie : Host can send upto 2 bytes of opaque
  629. * cookie in TCL_DATA_CMD and FW will replay this back in
  630. * HTT PPDU stats. Valid only if sent to FW through
  631. * exception mechanism.
  632. *
  633. * is_standalone : This msdu was sent as a single MSDU/MPDU
  634. * PPDU as indicated by host via TCL_DATA_CMD using
  635. * the send_as_standalone bit.
  636. *
  637. * is_buffer_addr_info_valid : This will be set whenever a MSDU is sent as
  638. * a singleton (single-MSDU PPDU) for FW use-cases or as indicated by host
  639. * via send_as_standalone in TCL_DATA_CMD.
  640. */
  641. A_UINT32 host_opaque_cookie: 16,
  642. is_host_opaque_valid: 1,
  643. is_standalone: 1,
  644. is_buffer_addr_info_valid: 1,
  645. reserved1: 13;
  646. } htt_ppdu_stats_user_common_tlv;
  647. #define HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_M 0x000000ff
  648. #define HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_S 0
  649. #define HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_GET(_var) \
  650. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_M) >> \
  651. HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_S)
  652. #define HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_SET(_var, _val) \
  653. do { \
  654. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM, _val); \
  655. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_S)); \
  656. } while (0)
  657. #define HTT_PPDU_STATS_USER_RATE_TLV_RESERVED_M 0x0000ff00
  658. #define HTT_PPDU_STATS_USER_RATE_TLV_RESERVED_S 8
  659. #define HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_M 0xffff0000
  660. #define HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_S 16
  661. #define HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_GET(_var) \
  662. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_M) >> \
  663. HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_S)
  664. #define HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_SET(_var, _val) \
  665. do { \
  666. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID, _val); \
  667. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_SW_PEER_ID_S)); \
  668. } while (0)
  669. #define HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_M 0x0000000f
  670. #define HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_S 0
  671. #define HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_GET(_var) \
  672. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_M) >> \
  673. HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_S)
  674. #define HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_SET(_var, _val) \
  675. do { \
  676. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_USER_POS, _val); \
  677. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_USER_POS_S)); \
  678. } while (0)
  679. #define HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_M 0x00000ff0
  680. #define HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_S 4
  681. #define HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_GET(_var) \
  682. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_M) >> \
  683. HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_S)
  684. #define HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_SET(_var, _val) \
  685. do { \
  686. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID, _val); \
  687. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_MU_GROUPID_S)); \
  688. } while (0)
  689. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_END_M 0x0000ffff
  690. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_END_S 0
  691. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_END_GET(_var) \
  692. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_RU_END_M) >> \
  693. HTT_PPDU_STATS_USER_RATE_TLV_RU_END_S)
  694. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_END_SET(_var, _val) \
  695. do { \
  696. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_RU_END, _val); \
  697. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_RU_END_S)); \
  698. } while (0)
  699. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_START_M 0xffff0000
  700. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_START_S 16
  701. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_START_GET(_var) \
  702. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_RU_START_M) >> \
  703. HTT_PPDU_STATS_USER_RATE_TLV_RU_START_S)
  704. #define HTT_PPDU_STATS_USER_RATE_TLV_RU_START_SET(_var, _val) \
  705. do { \
  706. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_RU_START, _val); \
  707. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_RU_START_S)); \
  708. } while (0)
  709. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_M 0x00000001
  710. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_S 0
  711. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_GET(_var) \
  712. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_M) >> \
  713. HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_S)
  714. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_SET(_var, _val) \
  715. do { \
  716. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID, _val); \
  717. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_S)); \
  718. } while (0)
  719. #define HTT_PPDU_STATS_BUF_ADDR_39_32_M 0x000000ff
  720. #define HTT_PPDU_STATS_BUF_ADDR_39_32_S 0
  721. #define HTT_PPDU_STATS_BUF_ADDR_39_32__GET(_var) \
  722. (((_var) & HTT_PPDU_STATS_BUF_ADDR_39_32_M) >> \
  723. HTT_PPDU_STATS_BUF_ADDR_39_32_S)
  724. #define HTT_PPDU_STATS_BUF_ADDR_39_32_SET(_var, _val) \
  725. do { \
  726. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_BUF_ADDR_39_32, _val); \
  727. ((_var) |= ((_val) << HTT_PPDU_STATS_BUF_ADDR_39_32_S)); \
  728. } while (0)
  729. #define HTT_PPDU_STATS_RETURN_BUF_MANAGER_M 0x00000700
  730. #define HTT_PPDU_STATS_RETURN_BUF_MANAGER_S 8
  731. #define HTT_PPDU_STATS_RETURN_BUF_MANAGER_GET(_var) \
  732. (((_var) & HTT_PPDU_STATS_RETURN_BUF_MANAGER_M) >> \
  733. HTT_PPDU_STATS_RETURN_BUF_MANAGER_S)
  734. #define HTT_PPDU_STATS_RETURN_BUF_MANAGER_SET(_var, _val) \
  735. do { \
  736. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_RETURN_BUF_MANAGER, _val); \
  737. ((_var) |= ((_val) << HTT_PPDU_STATS_RETURN_BUF_MANAGER_S)); \
  738. } while (0)
  739. #define HTT_PPDU_STATS_SW_BUFFER_COOKIE_M 0xfffff800
  740. #define HTT_PPDU_STATS_SW_BUFFER_COOKIE_S 11
  741. #define HTT_PPDU_STATS_SW_BUFFER_COOKIE_GET(_var) \
  742. (((_var) & HTT_PPDU_STATS_SW_BUFFER_COOKIE_M) >> \
  743. HTT_PPDU_STATS_SW_BUFFER_COOKIE_S)
  744. #define HTT_PPDU_STATS_SW_BUFFER_COOKIE_SET(_var, _val) \
  745. do { \
  746. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_SW_BUFFER_COOKIE, _val); \
  747. ((_var) |= ((_val) << HTT_PPDU_STATS_SW_BUFFER_COOKIE_S)); \
  748. } while (0)
  749. #define HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_M 0x0000FFFF
  750. #define HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_S 0
  751. #define HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_GET(_var) \
  752. (((_var) & HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_M) >> \
  753. HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_S)
  754. #define HTT_PPDU_STAT_HOST_OPAQUE_COOKIE_SET(_var, _val) \
  755. do { \
  756. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_HOST_OPAQUE_COOKIE, _val); \
  757. ((_var) |= ((_val) << HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_S)); \
  758. } while (0)
  759. #define HTT_PPDU_STATS_IS_OPAQUE_VALID_M 0x00010000
  760. #define HTT_PPDU_STATS_IS_OPAQUE_VALID_S 16
  761. #define HTT_PPDU_STATS_IS_OPAQUE_VALID_GET(_var) \
  762. (((_var) & HTT_PPDU_STATS_IS_OPAQUE_VALID_M) >> \
  763. HTT_PPDU_STATS_IS_OPAQUE_VALID_S)
  764. #define HTT_PPDU_STATS_IS_OPAQUE_VALID_SET(_var, _val) \
  765. do { \
  766. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_IS_OPAQUE_VALID, _val); \
  767. ((_var) |= ((_val) << HTT_PPDU_STATS_IS_OPAQUE_VALID_S)); \
  768. } while (0)
  769. #define HTT_PPDU_STATS_IS_STANDALONE_M 0x00020000
  770. #define HTT_PPDU_STATS_IS_STANDALONE_S 17
  771. #define HTT_PPDU_STATS_IS_STANDALONE_GET(_var) \
  772. (((_var) & HTT_PPDU_STATS_IS_STANDALONE_M) >> \
  773. HTT_PPDU_STATS_IS_OPAQUE_VALID_S)
  774. #define HTT_PPDU_STATS_IS_STANDALONE_SET(_var, _val) \
  775. do { \
  776. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_IS_STANDALONE, _val); \
  777. ((_var) |= ((_val) << HTT_PPDU_STATS_IS_STANDALONE_S)); \
  778. } while (0)
  779. #define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_M 0x000400000
  780. #define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_S 18
  781. #define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_GET(_var) \
  782. (((_var) & HTT_PPDU_STATS_IS_BUFF_INFO_VALID_M) >> \
  783. HTT_PPDU_STATS_IS_BUFF_INFO_VALID_S)
  784. #define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_SET(_var, _val) \
  785. do { \
  786. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_IS_BUFF_INFO_VALID, _val); \
  787. ((_var) |= ((_val) << HTT_PPDU_STATS_IS_BUFF_INFO_VALID_S)); \
  788. } while (0)
  789. enum HTT_PPDU_STATS_PPDU_TYPE {
  790. HTT_PPDU_STATS_PPDU_TYPE_SU,
  791. HTT_PPDU_STATS_PPDU_TYPE_MU_MIMO,
  792. HTT_PPDU_STATS_PPDU_TYPE_MU_OFDMA,
  793. HTT_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA,
  794. HTT_PPDU_STATS_PPDU_TYPE_UL_TRIG,
  795. HTT_PPDU_STATS_PPDU_TYPE_BURST_BCN,
  796. HTT_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP,
  797. HTT_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG,
  798. HTT_PPDU_STATS_PPDU_TYPE_UL_RESP,
  799. HTT_PPDU_STATS_PPDU_TYPE_UNKNOWN = 0x1F,
  800. };
  801. typedef enum HTT_PPDU_STATS_PPDU_TYPE HTT_PPDU_STATS_PPDU_TYPE;
  802. #define HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_M 0x0000003E
  803. #define HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_S 1
  804. #define HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_GET(_var) \
  805. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_M) >> \
  806. HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_S)
  807. #define HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_SET(_var, _val) \
  808. do { \
  809. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE, _val); \
  810. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_PPDU_TYPE_S)); \
  811. } while (0)
  812. enum HTT_PPDU_STATS_TXBF_TYPE {
  813. HTT_PPDU_STATS_TXBF_OPEN_LOOP,
  814. HTT_PPDU_STATS_TXBF_IMPLICIT,
  815. HTT_PPDU_STATS_TXBF_EXPLICIT,
  816. HTT_PPDU_STATS_TXBF_MAX,
  817. };
  818. #define HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_M 0x00000003
  819. #define HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_S 0
  820. #define HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_GET(_var) \
  821. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_M) >> \
  822. HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_S)
  823. #define HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_SET(_var, _val) \
  824. do { \
  825. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE, _val); \
  826. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_LTF_SIZE_S)); \
  827. } while (0)
  828. #define HTT_PPDU_STATS_USER_RATE_TLV_STBC_M 0x00000004
  829. #define HTT_PPDU_STATS_USER_RATE_TLV_STBC_S 2
  830. #define HTT_PPDU_STATS_USER_RATE_TLV_STBC_GET(_var) \
  831. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_STBC_M) >> \
  832. HTT_PPDU_STATS_USER_RATE_TLV_STBC_S)
  833. #define HTT_PPDU_STATS_USER_RATE_TLV_STBC_SET(_var, _val) \
  834. do { \
  835. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_STBC, _val); \
  836. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_STBC_S)); \
  837. } while (0)
  838. #define HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_M 0x00000008
  839. #define HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_S 3
  840. #define HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_GET(_var) \
  841. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_M) >> \
  842. HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_S)
  843. #define HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_SET(_var, _val) \
  844. do { \
  845. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_HE_RE, _val); \
  846. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_HE_RE_S)); \
  847. } while (0)
  848. #define HTT_PPDU_STATS_USER_RATE_TLV_TXBF_M 0x000000f0
  849. #define HTT_PPDU_STATS_USER_RATE_TLV_TXBF_S 4
  850. #define HTT_PPDU_STATS_USER_RATE_TLV_TXBF_GET(_var) \
  851. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_TXBF_M) >> \
  852. HTT_PPDU_STATS_USER_RATE_TLV_TXBF_S)
  853. #define HTT_PPDU_STATS_USER_RATE_TLV_TXBF_SET(_var, _val) \
  854. do { \
  855. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_TXBF, _val); \
  856. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_TXBF_S)); \
  857. } while (0)
  858. #define HTT_PPDU_STATS_USER_RATE_TLV_BW_M 0x00000f00
  859. #define HTT_PPDU_STATS_USER_RATE_TLV_BW_S 8
  860. #define HTT_PPDU_STATS_USER_RATE_TLV_BW_GET(_var) \
  861. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_BW_M) >> \
  862. HTT_PPDU_STATS_USER_RATE_TLV_BW_S)
  863. #define HTT_PPDU_STATS_USER_RATE_TLV_BW_SET(_var, _val) \
  864. do { \
  865. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_BW, _val); \
  866. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_BW_S)); \
  867. } while (0)
  868. #define HTT_PPDU_STATS_USER_RATE_TLV_NSS_M 0x0000f000
  869. #define HTT_PPDU_STATS_USER_RATE_TLV_NSS_S 12
  870. #define HTT_PPDU_STATS_USER_RATE_TLV_NSS_GET(_var) \
  871. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_NSS_M) >> \
  872. HTT_PPDU_STATS_USER_RATE_TLV_NSS_S)
  873. #define HTT_PPDU_STATS_USER_RATE_TLV_NSS_SET(_var, _val) \
  874. do { \
  875. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_NSS, _val); \
  876. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_NSS_S)); \
  877. } while (0)
  878. #define HTT_PPDU_STATS_USER_RATE_TLV_MCS_M 0x000f0000
  879. #define HTT_PPDU_STATS_USER_RATE_TLV_MCS_S 16
  880. #define HTT_PPDU_STATS_USER_RATE_TLV_MCS_GET(_var) \
  881. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_MCS_M) >> \
  882. HTT_PPDU_STATS_USER_RATE_TLV_MCS_S)
  883. #define HTT_PPDU_STATS_USER_RATE_TLV_MCS_SET(_var, _val) \
  884. do { \
  885. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_MCS, _val); \
  886. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_MCS_S)); \
  887. } while (0)
  888. /* Refer HTT_STATS_PREAM_TYPE */
  889. #define HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_M 0x00f00000
  890. #define HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_S 20
  891. #define HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_GET(_var) \
  892. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_M) >> \
  893. HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_S)
  894. #define HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_SET(_var, _val) \
  895. do { \
  896. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE, _val); \
  897. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_PREAMBLE_S)); \
  898. } while (0)
  899. /* Guard Intervals */
  900. enum HTT_PPDU_STATS_GI {
  901. HTT_PPDU_STATS_GI_800,
  902. HTT_PPDU_STATS_GI_400,
  903. HTT_PPDU_STATS_GI_1600,
  904. HTT_PPDU_STATS_GI_3200,
  905. HTT_PPDU_STATS_GI_CNT,
  906. };
  907. typedef enum HTT_PPDU_STATS_GI HTT_PPDU_STATS_GI;
  908. /* Refer HTT_PPDU_STATS_GI */
  909. #define HTT_PPDU_STATS_USER_RATE_TLV_GI_M 0x0f000000
  910. #define HTT_PPDU_STATS_USER_RATE_TLV_GI_S 24
  911. #define HTT_PPDU_STATS_USER_RATE_TLV_GI_GET(_var) \
  912. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_GI_M) >> \
  913. HTT_PPDU_STATS_USER_RATE_TLV_GI_S)
  914. #define HTT_PPDU_STATS_USER_RATE_TLV_GI_SET(_var, _val) \
  915. do { \
  916. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_GI, _val); \
  917. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_GI_S)); \
  918. } while (0)
  919. #define HTT_PPDU_STATS_USER_RATE_TLV_DCM_M 0x10000000
  920. #define HTT_PPDU_STATS_USER_RATE_TLV_DCM_S 28
  921. #define HTT_PPDU_STATS_USER_RATE_TLV_DCM_GET(_var) \
  922. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_DCM_M) >> \
  923. HTT_PPDU_STATS_USER_RATE_TLV_DCM_S)
  924. #define HTT_PPDU_STATS_USER_RATE_TLV_DCM_SET(_var, _val) \
  925. do { \
  926. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_DCM, _val); \
  927. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_DCM_S)); \
  928. } while (0)
  929. #define HTT_PPDU_STATS_USER_RATE_TLV_LDPC_M 0x20000000
  930. #define HTT_PPDU_STATS_USER_RATE_TLV_LDPC_S 29
  931. #define HTT_PPDU_STATS_USER_RATE_TLV_LDPC_GET(_var) \
  932. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_LDPC_M) >> \
  933. HTT_PPDU_STATS_USER_RATE_TLV_LDPC_S)
  934. #define HTT_PPDU_STATS_USER_RATE_TLV_LDPC_SET(_var, _val) \
  935. do { \
  936. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_LDPC, _val); \
  937. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_LDPC_S)); \
  938. } while (0)
  939. enum HTT_PPDU_STATS_RESP_PPDU_TYPE {
  940. HTT_PPDU_STATS_RESP_PPDU_TYPE_MU_MIMO_UL,
  941. HTT_PPDU_STATS_RESP_PPDU_TYPE_MU_OFDMA_UL,
  942. };
  943. typedef enum HTT_PPDU_STATS_RESP_PPDU_TYPE HTT_PPDU_STATS_RESP_PPDU_TYPE;
  944. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_M 0xC0000000
  945. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_S 30
  946. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_GET(_var) \
  947. (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_M) >> \
  948. HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_S)
  949. #define HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_SET(_var, _val) \
  950. do { \
  951. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE, _val); \
  952. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_RESP_PPDU_TYPE_S)); \
  953. } while (0)
  954. typedef struct {
  955. htt_tlv_hdr_t tlv_hdr;
  956. /* BIT [ 7 : 0] :- tid_num
  957. * BIT [ 15: 8] :- reserved0
  958. * BIT [ 31: 16] :- sw_peer_id
  959. */
  960. union {
  961. A_UINT32 sw_peer_id__tid_num;
  962. struct {
  963. A_UINT32 tid_num: 8,
  964. reserved0: 8,
  965. sw_peer_id: 16;
  966. };
  967. };
  968. /* BIT [ 3 : 0] :- user_pos
  969. * BIT [ 11: 4] :- mu_group_id
  970. * BIT [ 31: 12] :- reserved1
  971. */
  972. union {
  973. A_UINT32 mu_group_id__user_pos;
  974. struct {
  975. A_UINT32 user_pos: 4,
  976. mu_group_id: 8,
  977. reserved1: 20;
  978. };
  979. };
  980. /* BIT [ 15 : 0] :- ru_end
  981. * BIT [ 31 : 16] :- ru_start
  982. */
  983. union {
  984. A_UINT32 ru_start__ru_end;
  985. struct {
  986. A_UINT32 ru_end: 16,
  987. ru_start: 16;
  988. };
  989. };
  990. /* BIT [ 15 : 0] :- ru_end
  991. * BIT [ 31 : 16] :- ru_start
  992. */
  993. union {
  994. A_UINT32 resp_ru_start__ru_end;
  995. struct {
  996. A_UINT32 resp_ru_end: 16,
  997. resp_ru_start: 16;
  998. };
  999. };
  1000. /* BIT [ 0 : 0 ] :- resp_type_valid
  1001. * BIT [ 5 : 1 ] :- ppdu_type - HTT_PPDU_STAT_PPDU_TYPE
  1002. * BIT [ 31: 6 ] :- reserved2
  1003. */
  1004. union {
  1005. A_UINT32 resp_type_vld_ppdu_type;
  1006. struct {
  1007. A_UINT32 resp_type_vld: 1,
  1008. ppdu_type: 5,
  1009. reserved2: 26;
  1010. };
  1011. };
  1012. /* BIT [ 1 : 0 ] :- ltf_size
  1013. * BIT [ 2 : 2 ] :- stbc
  1014. * BIT [ 3 : 3 ] :- he_re (range extension)
  1015. * BIT [ 7 : 4 ] :- txbf
  1016. * BIT [ 11: 8 ] :- bw
  1017. * BIT [ 15: 12] :- nss NSS 1,2, ...8
  1018. * BIT [ 19: 16] :- mcs
  1019. * BIT [ 23: 20] :- preamble
  1020. * BIT [ 27: 24] :- gi - HTT_PPDU_STATS_GI
  1021. * BIT [ 28: 28] :- dcm
  1022. * BIT [ 29: 29] :- ldpc
  1023. * BIT [ 31: 30] :- reserved4
  1024. */
  1025. union {
  1026. A_UINT32 rate_info;
  1027. struct {
  1028. A_UINT32 ltf_size: 2,
  1029. stbc: 1,
  1030. he_re: 1,
  1031. txbf: 4,
  1032. bw: 4,
  1033. nss: 4,
  1034. mcs: 4,
  1035. preamble: 4,
  1036. gi: 4,
  1037. dcm: 1,
  1038. ldpc: 1,
  1039. reserved4: 2;
  1040. };
  1041. };
  1042. /* Note: resp_rate_info is only valid for if resp_type is UL
  1043. * BIT [ 1 : 0 ] :- ltf_size
  1044. * BIT [ 2 : 2 ] :- stbc
  1045. * BIT [ 3 : 3 ] :- he_re (range extension)
  1046. * BIT [ 7 : 4 ] :- reserved3
  1047. * BIT [ 11: 8 ] :- bw
  1048. * BIT [ 15: 12] :- nss NSS 1,2, ...8
  1049. * BIT [ 19: 16] :- mcs
  1050. * BIT [ 23: 20] :- preamble
  1051. * BIT [ 27: 24] :- gi
  1052. * BIT [ 28: 28] :- dcm
  1053. * BIT [ 29: 29] :- ldpc
  1054. * BIT [ 31: 30] :- resp_ppdu_type - HTT_PPDU_STATS_RESP_PPDU_TYPE
  1055. */
  1056. union {
  1057. A_UINT32 resp_rate_info;
  1058. struct {
  1059. A_UINT32 resp_ltf_size: 2,
  1060. resp_stbc: 1,
  1061. resp_he_re: 1,
  1062. reserved3: 4,
  1063. resp_bw: 4,
  1064. resp_nss: 4,
  1065. resp_mcs: 4,
  1066. resp_preamble: 4,
  1067. resp_gi: 4,
  1068. resp_dcm: 1,
  1069. resp_ldpc: 1,
  1070. resp_ppdu_type: 2;
  1071. };
  1072. };
  1073. } htt_ppdu_stats_user_rate_tlv;
  1074. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_M 0x000000ff
  1075. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_S 0
  1076. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_GET(_var) \
  1077. (((_var) & HTT_PPDU_STATS_EMQ_MPDU_BITMAP_TLV_TID_NUM_M) >> \
  1078. HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_S)
  1079. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_SET(_var, _val) \
  1080. do { \
  1081. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM, _val); \
  1082. ((_var) |= ((_val) << HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_S)); \
  1083. } while (0)
  1084. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_RESERVED_M 0x0000ff00
  1085. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_RESERVED_S 8
  1086. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_M 0xffff0000
  1087. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_S 16
  1088. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_GET(_var) \
  1089. (((_var) & HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_M) >> \
  1090. HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_S)
  1091. #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_SET(_var, _val) \
  1092. do { \
  1093. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID, _val); \
  1094. ((_var) |= ((_val) << HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_SW_PEER_ID_S)); \
  1095. } while (0)
  1096. typedef struct {
  1097. htt_tlv_hdr_t tlv_hdr;
  1098. /* BIT [ 7 : 0] :- tid_num
  1099. * BIT [ 15: 8] :- reserved0
  1100. * BIT [ 31: 16] :- sw_peer_id
  1101. */
  1102. union {
  1103. A_UINT32 sw_peer_id__tid_num;
  1104. struct {
  1105. A_UINT32 tid_num: 8,
  1106. reserved0: 8,
  1107. sw_peer_id: 16;
  1108. };
  1109. };
  1110. A_UINT32 start_seq;
  1111. A_UINT32 enq_bitmap[HTT_BA_64_BIT_MAP_SIZE_DWORDS];
  1112. } htt_ppdu_stats_enq_mpdu_bitmap_64_tlv;
  1113. typedef struct {
  1114. htt_tlv_hdr_t tlv_hdr;
  1115. /* BIT [ 7 : 0] :- tid_num
  1116. * BIT [ 15: 8] :- reserved0
  1117. * BIT [ 31: 16] :- sw_peer_id
  1118. */
  1119. union {
  1120. A_UINT32 sw_peer_id__tid_num;
  1121. struct {
  1122. A_UINT32 tid_num: 8,
  1123. reserved0: 8,
  1124. sw_peer_id: 16;
  1125. };
  1126. };
  1127. A_UINT32 start_seq;
  1128. A_UINT32 enq_bitmap[HTT_BA_256_BIT_MAP_SIZE_DWORDS];
  1129. } htt_ppdu_stats_enq_mpdu_bitmap_256_tlv;
  1130. /* COMPLETION_STATUS defined in HTT_PPDU_STATS_USER_COMPLETION_STATUS */
  1131. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_M 0x000000ff
  1132. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_S 0
  1133. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_GET(_var) \
  1134. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_M) >> \
  1135. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_S)
  1136. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_SET(_var, _val) \
  1137. do { \
  1138. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS, _val); \
  1139. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_COMPLETION_STATUS_S)); \
  1140. } while (0)
  1141. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_M 0x0000ff00
  1142. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_S 8
  1143. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_GET(_var) \
  1144. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_M) >> \
  1145. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_S)
  1146. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_SET(_var, _val) \
  1147. do { \
  1148. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM, _val); \
  1149. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TID_NUM_S)); \
  1150. } while (0)
  1151. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_M 0xffff0000
  1152. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_S 16
  1153. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_GET(_var) \
  1154. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_M) >> \
  1155. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_S)
  1156. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_SET(_var, _val) \
  1157. do { \
  1158. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID, _val); \
  1159. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SW_PEER_ID_S)); \
  1160. } while (0)
  1161. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_M 0x0000ffff
  1162. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_S 0
  1163. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_GET(_var) \
  1164. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_M) >> \
  1165. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_S)
  1166. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_SET(_var, _val) \
  1167. do { \
  1168. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED, _val); \
  1169. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_TRIED_S)); \
  1170. } while (0)
  1171. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_M 0xffff0000
  1172. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_S 16
  1173. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_GET(_var) \
  1174. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_M) >> \
  1175. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_S)
  1176. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_SET(_var, _val) \
  1177. do { \
  1178. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS, _val); \
  1179. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MPDU_SUCCESS_S)); \
  1180. } while (0)
  1181. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_M 0x0000000f
  1182. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_S 0
  1183. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_GET(_var) \
  1184. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_M) >> \
  1185. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_S)
  1186. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_SET(_var, _val) \
  1187. do { \
  1188. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY, _val); \
  1189. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_LONG_RETRY_S)); \
  1190. } while (0)
  1191. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_M 0x000000f0
  1192. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_S 4
  1193. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_GET(_var) \
  1194. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_M) >> \
  1195. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_S)
  1196. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_SET(_var, _val) \
  1197. do { \
  1198. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY, _val); \
  1199. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_SHORT_RETRY_S)); \
  1200. } while (0)
  1201. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_M 0x00000100
  1202. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_S 8
  1203. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_GET(_var) \
  1204. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_M) >> \
  1205. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_S)
  1206. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_SET(_var, _val) \
  1207. do { \
  1208. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU, _val); \
  1209. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_AMPDU_S)); \
  1210. } while (0)
  1211. enum HTT_PPDU_STATS_RESP_TYPE {
  1212. HTT_PPDU_STATS_NO_RESPONSE_EXPECTED_E = 0,
  1213. HTT_PPDU_STATS_ACK_EXPECTED_E = 1,
  1214. HTT_PPDU_STATS_BA_BITMAP_EXPECTED_E = 2,
  1215. HTT_PPDU_STATS_UL_MU_BA_EXPECTED_E = 3,
  1216. HTT_PPDU_STATS_UL_MU_BA_AND_DATA_EXPECTED_E = 4,
  1217. HTT_PPDU_STATS_CTS_EXPECTED_E = 5,
  1218. HTT_PPDU_STATS_MU_CBF_EXPECTED_E = 6,
  1219. };
  1220. typedef enum HTT_PPDU_STATS_RESP_TYPE HTT_PPDU_STATS_RESP_TYPE;
  1221. /* Refer HTT_PPDU_STATS_RESP_TYPE */
  1222. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_M 0x00001e00
  1223. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_S 9
  1224. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_GET(_var) \
  1225. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_M) >> \
  1226. HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_S)
  1227. #define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_SET(_var, _val) \
  1228. do { \
  1229. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE, _val); \
  1230. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_S)); \
  1231. } while (0)
  1232. enum HTT_PPDU_STATS_USER_COMPLETION_STATUS {
  1233. HTT_PPDU_STATS_USER_STATUS_OK,
  1234. HTT_PPDU_STATS_USER_STATUS_FILTERED,
  1235. HTT_PPDU_STATS_USER_STATUS_RESP_TIMEOUT,
  1236. HTT_PPDU_STATS_USER_STATUS_RESP_MISMATCH,
  1237. HTT_PPDU_STATS_USER_STATUS_ABORT,
  1238. };
  1239. typedef enum HTT_PPDU_STATS_USER_COMPLETION_STATUS HTT_PPDU_STATS_USER_COMPLETION_STATUS;
  1240. typedef struct {
  1241. htt_tlv_hdr_t tlv_hdr;
  1242. /* BIT [ 7 : 0] :- completion_status
  1243. * BIT [ 15: 8] :- tid_num
  1244. * BIT [ 31: 16] :- sw_peer_id
  1245. */
  1246. union {
  1247. A_UINT32 sw_peer_id__tid_num__completion_status;
  1248. struct {
  1249. A_UINT32 completion_status: 8,
  1250. tid_num: 8,
  1251. sw_peer_id: 16;
  1252. };
  1253. };
  1254. /* RSSI value of last ack packet (units = dB above noise floor) */
  1255. A_UINT32 ack_rssi;
  1256. /* BIT [ 15 : 0] :- mpdu_tried
  1257. * BIT [ 31 : 16] :- mpdu_success
  1258. */
  1259. union {
  1260. A_UINT32 mpdu_tried__mpdu_success;
  1261. struct {
  1262. A_UINT32 mpdu_tried: 16,
  1263. mpdu_success: 16;
  1264. };
  1265. };
  1266. /* BIT [ 3 : 0] :- long_retries
  1267. * BIT [ 7 : 4] :- short_retries
  1268. * BIT [ 8 : 8] :- is_ampdu
  1269. * BIT [ 12: 9] :- resp_type
  1270. * BIT [ 31: 13] :- reserved0
  1271. */
  1272. union {
  1273. A_UINT32 resp_type_is_ampdu__short_retry__long_retry;
  1274. struct {
  1275. A_UINT32 long_retries: 4,
  1276. short_retries: 4,
  1277. is_ampdu: 1,
  1278. resp_type: 4,
  1279. reserved0: 19;
  1280. };
  1281. };
  1282. } htt_ppdu_stats_user_cmpltn_common_tlv;
  1283. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_M 0x000000ff
  1284. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_S 0
  1285. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_GET(_var) \
  1286. (((_var) & HTT_PPDU_STATS_EMQ_MPDU_BITMAP_TLV_TID_NUM_M) >> \
  1287. HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_S)
  1288. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_SET(_var, _val) \
  1289. do { \
  1290. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM, _val); \
  1291. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_S)); \
  1292. } while (0)
  1293. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_RESERVED_M 0x0000ff00
  1294. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_RESERVED_S 8
  1295. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_M 0xffff0000
  1296. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_S 16
  1297. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_GET(_var) \
  1298. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_M) >> \
  1299. HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_S)
  1300. #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_SET(_var, _val) \
  1301. do { \
  1302. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID, _val); \
  1303. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_SW_PEER_ID_S)); \
  1304. } while (0)
  1305. typedef struct {
  1306. htt_tlv_hdr_t tlv_hdr;
  1307. /* BIT [ 7 : 0] :- tid_num
  1308. * BIT [ 15: 8] :- reserved0
  1309. * BIT [ 31: 16] :- sw_peer_id
  1310. */
  1311. union {
  1312. A_UINT32 sw_peer_id__tid_num;
  1313. struct {
  1314. A_UINT32 tid_num: 8,
  1315. reserved0: 8,
  1316. sw_peer_id: 16;
  1317. };
  1318. };
  1319. A_UINT32 ba_seq_no;
  1320. A_UINT32 ba_bitmap[HTT_BA_64_BIT_MAP_SIZE_DWORDS];
  1321. } htt_ppdu_stats_user_compltn_ba_bitmap_64_tlv;
  1322. typedef struct {
  1323. htt_tlv_hdr_t tlv_hdr;
  1324. /* BIT [ 7 : 0] :- tid_num
  1325. * BIT [ 15: 8] :- reserved0
  1326. * BIT [ 31: 16] :- sw_peer_id
  1327. */
  1328. union {
  1329. A_UINT32 sw_peer_id__tid_num;
  1330. struct {
  1331. A_UINT32 tid_num: 8,
  1332. reserved0: 8,
  1333. sw_peer_id: 16;
  1334. };
  1335. };
  1336. A_UINT32 ba_seq_no;
  1337. A_UINT32 ba_bitmap[HTT_BA_256_BIT_MAP_SIZE_DWORDS];
  1338. } htt_ppdu_stats_user_compltn_ba_bitmap_256_tlv;
  1339. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_M 0x0000ffff
  1340. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_S 0
  1341. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_GET(_var) \
  1342. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_M) >> \
  1343. HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_S)
  1344. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_SET(_var, _val) \
  1345. do { \
  1346. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID, _val); \
  1347. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_SW_PEER_ID_S)); \
  1348. } while (0)
  1349. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_M 0x000001ff
  1350. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_S 0
  1351. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_GET(_var) \
  1352. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_M) >> \
  1353. HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_S)
  1354. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_SET(_var, _val) \
  1355. do { \
  1356. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU, _val); \
  1357. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MPDU_S)); \
  1358. } while (0)
  1359. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_M 0x01fffe00
  1360. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_S 9
  1361. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_GET(_var) \
  1362. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_M) >> \
  1363. HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_S)
  1364. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_SET(_var, _val) \
  1365. do { \
  1366. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU, _val); \
  1367. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_NUM_MSDU_S)); \
  1368. } while (0)
  1369. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_M 0xfe000000
  1370. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_S 25
  1371. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_GET(_var) \
  1372. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_M) >> \
  1373. HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_S)
  1374. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_SET(_var, _val) \
  1375. do { \
  1376. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM, _val); \
  1377. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_TID_NUM_S)); \
  1378. } while (0)
  1379. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_M 0x0000ffff
  1380. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_S 0
  1381. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_GET(_var) \
  1382. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_M) >> \
  1383. HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_S)
  1384. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_SET(_var, _val) \
  1385. do { \
  1386. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ, _val); \
  1387. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_CUR_SEQ_S)); \
  1388. } while (0)
  1389. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_M 0xffff0000
  1390. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_S 16
  1391. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_GET(_var) \
  1392. (((_var) & HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_M) >> \
  1393. HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_S)
  1394. #define HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_SET(_var, _val) \
  1395. do { \
  1396. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ, _val); \
  1397. ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_ACK_BA_STATUS_TLV_START_SEQ_S)); \
  1398. } while (0)
  1399. typedef struct {
  1400. htt_tlv_hdr_t tlv_hdr;
  1401. A_UINT32 ppdu_id;
  1402. /* BIT [ 15 : 0] :- sw_peer_id
  1403. * BIT [ 31 : 16] :- reserved0
  1404. */
  1405. union {
  1406. A_UINT32 rsvd_sw_peer_id;
  1407. struct {
  1408. A_UINT32 sw_peer_id: 16,
  1409. reserved0: 16;
  1410. };
  1411. };
  1412. /* BIT [ 8 : 0] :- num_mpdu
  1413. * BIT [ 24 : 9] :- num_msdu
  1414. * BIT [ 31 : 25] :- tid_num
  1415. */
  1416. union {
  1417. A_UINT32 tid_num__num_msdu__num_mpdu;
  1418. struct {
  1419. A_UINT32 num_mpdu: 9,
  1420. num_msdu: 16,
  1421. tid_num: 7;
  1422. };
  1423. };
  1424. /* BIT [ 15 : 0] :- current_seq
  1425. * BIT [ 31 : 16] :- start_seq
  1426. */
  1427. union {
  1428. A_UINT32 start_seq__current_seq;
  1429. struct {
  1430. A_UINT32 current_seq: 16,
  1431. start_seq: 16;
  1432. };
  1433. };
  1434. A_UINT32 success_bytes;
  1435. } htt_ppdu_stats_user_compltn_ack_ba_status_tlv;
  1436. /* FLOW_TYPE defined in HTT_TX_FLOW_TYPE */
  1437. #define HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_M 0x000000ff
  1438. #define HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_S 0
  1439. #define HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_GET(_var) \
  1440. (((_var) & HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_M) >> \
  1441. HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_S)
  1442. #define HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_SET(_var, _val) \
  1443. do { \
  1444. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE, _val); \
  1445. ((_var) |= ((_val) << HTT_PPDU_STATS_FLUSH_TLV_FLOW_TYPE_S)); \
  1446. } while (0)
  1447. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_M 0x0001ff00
  1448. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_S 8
  1449. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_GET(_var) \
  1450. (((_var) & HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_M) >> \
  1451. HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_S)
  1452. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_SET(_var, _val) \
  1453. do { \
  1454. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU, _val); \
  1455. ((_var) |= ((_val) << HTT_PPDU_STATS_FLUSH_TLV_NUM_MPDU_S)); \
  1456. } while (0)
  1457. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_M 0x7ffe0000
  1458. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_S 17
  1459. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_GET(_var) \
  1460. (((_var) & HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_M) >> \
  1461. HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_S)
  1462. #define HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_SET(_var, _val) \
  1463. do { \
  1464. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU, _val); \
  1465. ((_var) |= ((_val) << HTT_PPDU_STATS_FLUSH_TLV_NUM_MSDU_S)); \
  1466. } while (0)
  1467. #define HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_M 0x000000ff
  1468. #define HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_S 0
  1469. #define HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_GET(_var) \
  1470. (((_var) & HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_M) >> \
  1471. HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_S)
  1472. #define HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_SET(_var, _val) \
  1473. do { \
  1474. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_FLUSH_TLV_TID_NUM, _val); \
  1475. ((_var) |= ((_val) << HTT_PPDU_STATS_FLUSH_TLV_TID_NUM_S)); \
  1476. } while (0)
  1477. #define HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_M 0x0000ff00
  1478. #define HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_S 8
  1479. #define HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_GET(_var) \
  1480. (((_var) & HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_M) >> \
  1481. HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_S)
  1482. #define HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_SET(_var, _val) \
  1483. do { \
  1484. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE, _val); \
  1485. ((_var) |= ((_val) << HTT_PPDU_STATS_FLUSH_TLV_QUEUE_TYPE_S)); \
  1486. } while (0)
  1487. #define HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_M 0xffff0000
  1488. #define HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_S 16
  1489. #define HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_GET(_var) \
  1490. (((_var) & HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_M) >> \
  1491. HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_S)
  1492. #define HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_SET(_var, _val) \
  1493. do { \
  1494. HTT_CHECK_SET_VAL(HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID, _val); \
  1495. ((_var) |= ((_val) << HTT_PPDU_STATS_FLUSH_TLV_SW_PEER_ID_S)); \
  1496. } while (0)
  1497. enum HTT_TX_FLOW_TYPE {
  1498. HTT_TX_TID_FRAMEQ,
  1499. HTT_TX_TQM_MSDUQ,
  1500. HTT_TQM_MPDUQ,
  1501. };
  1502. enum HTT_FLUSH_STATUS_DROP_REASON {
  1503. HTT_FLUSH_PEER_DELETE,
  1504. HTT_FLUSH_TID_DELETE,
  1505. HTT_FLUSH_TTL_EXCEEDED,
  1506. HTT_FLUSH_EXCESS_RETRIES,
  1507. HTT_FLUSH_REINJECT,
  1508. };
  1509. typedef struct {
  1510. htt_tlv_hdr_t tlv_hdr;
  1511. A_UINT32 drop_reason;
  1512. /* BIT [ 7 : 0] :- flow_type
  1513. * BIT [ 16: 8] :- num_mpdu
  1514. * BIT [ 30: 17] :- num_msdu
  1515. * BIT [ 31: 31] :- reserved0
  1516. */
  1517. union {
  1518. A_UINT32 num_msdu__num_mpdu__flow_type;
  1519. struct {
  1520. A_UINT32 flow_type: 8,
  1521. num_mpdu: 9,
  1522. num_msdu: 14,
  1523. reserved0: 1;
  1524. };
  1525. };
  1526. /* BIT [ 7 : 0] :- tid_num
  1527. * BIT [ 15 : 8] :- queue_type
  1528. * BIT [ 31 : 16] :- sw_peer_id
  1529. */
  1530. union {
  1531. A_UINT32 sw_peer_id__queue_type__tid_num;
  1532. struct {
  1533. A_UINT32 tid_num: 8,
  1534. queue_type: 8,
  1535. sw_peer_id: 16;
  1536. };
  1537. };
  1538. } htt_ppdu_stats_flush_tlv;
  1539. typedef struct {
  1540. htt_tlv_hdr_t tlv_hdr;
  1541. /* Future purpose */
  1542. A_UINT32 reserved1; /* set to 0x0 */
  1543. A_UINT32 reserved2; /* set to 0x0 */
  1544. A_UINT32 reserved3; /* set to 0x0 */
  1545. /* mgmt/ctrl frame payload
  1546. * The size of payload (in bytes) can be derived from the length in
  1547. * tlv parametes, minus the 12 bytes of the above fields.
  1548. */
  1549. A_UINT32 payload[1];
  1550. } htt_ppdu_stats_tx_mgmtctrl_payload_tlv;
  1551. #endif //__HTT_PPDU_STATS_H__