htt_ppdu_stats.h 70 KB

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