htt_ppdu_stats.h 84 KB

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