cdp_txrx_stats_struct.h 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410
  1. /*
  2. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * @file cdp_txrx_stats_struct.h
  21. * @brief Define the host data path stats API functions
  22. * called by the host control SW and the OS interface module
  23. */
  24. #ifndef _CDP_TXRX_STATS_STRUCT_H_
  25. #define _CDP_TXRX_STATS_STRUCT_H_
  26. #include <qdf_types.h>
  27. #include <cdp_txrx_hist_struct.h>
  28. #define TXRX_STATS_LEVEL_OFF 0
  29. #define TXRX_STATS_LEVEL_BASIC 1
  30. #define TXRX_STATS_LEVEL_FULL 2
  31. #define BSS_CHAN_INFO_READ 1
  32. #define BSS_CHAN_INFO_READ_AND_CLEAR 2
  33. #define TX_FRAME_TYPE_DATA 0
  34. #define TX_FRAME_TYPE_MGMT 1
  35. #define TX_FRAME_TYPE_BEACON 2
  36. #ifndef TXRX_STATS_LEVEL
  37. #define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_BASIC
  38. #endif
  39. /* 1 additional MCS is for invalid values */
  40. #ifdef WLAN_FEATURE_11BE
  41. #define MAX_MCS (16 + 1)
  42. #else
  43. #define MAX_MCS (14 + 1)
  44. #endif
  45. #define MAX_MCS_11A 8
  46. #define MAX_MCS_11B 7
  47. #define MAX_MCS_11AC 12
  48. /* 1 additional GI is for invalid values */
  49. #define MAX_GI (4 + 1)
  50. #define SS_COUNT 8
  51. #define MAX_BW 7
  52. #define MAX_RECEPTION_TYPES 4
  53. #define MAX_TRANSMIT_TYPES 9
  54. #define MAX_USER_POS 8
  55. #define MAX_MU_GROUP_ID 64
  56. #ifdef WLAN_FEATURE_11BE
  57. #define MAX_RU_LOCATIONS 16
  58. #else
  59. #define MAX_RU_LOCATIONS 6
  60. #endif
  61. #define RU_26 1
  62. #define RU_52 2
  63. #define RU_106 4
  64. #define RU_242 9
  65. #define RU_484 18
  66. #define RU_996 37
  67. /* WME stream classes */
  68. #define WME_AC_BE 0 /* best effort */
  69. #define WME_AC_BK 1 /* background */
  70. #define WME_AC_VI 2 /* video */
  71. #define WME_AC_VO 3 /* voice */
  72. #define WME_AC_MAX 4 /* MAX AC Value */
  73. #define CDP_MAX_RX_RINGS 8 /* max rx rings */
  74. #define CDP_MAX_TX_COMP_RINGS 5 /* max tx/completion rings */
  75. #define CDP_MAX_TX_TQM_STATUS 9 /* max tx tqm completion status */
  76. #define CDP_MAX_TX_HTT_STATUS 7 /* max tx htt completion status */
  77. #define CDP_DMA_CODE_MAX 14 /* max rxdma error */
  78. #define CDP_REO_CODE_MAX 15 /* max reo error */
  79. /*
  80. * Max of TxRx context
  81. */
  82. #define CDP_MAX_TXRX_CTX CDP_MAX_RX_RINGS
  83. /* TID level VoW stats macros
  84. * to add and get stats
  85. */
  86. #define PFLOW_TXRX_TIDQ_STATS_ADD(_peer, _tid, _var, _val) \
  87. (((_peer)->tidq_stats[_tid]).stats[_var]) += _val
  88. #define PFLOW_TXRX_TIDQ_STATS_GET(_peer, _tid, _var, _val) \
  89. ((_peer)->tidq_stats[_tid].stats[_var])
  90. /*
  91. * Video only stats
  92. */
  93. #define PFLOW_CTRL_PDEV_VIDEO_STATS_SET(_pdev, _var, _val) \
  94. (((_pdev)->vow.vistats[_var]).value) = _val
  95. #define PFLOW_CTRL_PDEV_VIDEO_STATS_GET(_pdev, _var) \
  96. ((_pdev)->vow.vistats[_var].value)
  97. #define PFLOW_CTRL_PDEV_VIDEO_STATS_ADD(_pdev, _var, _val) \
  98. (((_pdev)->vow.vistats[_var]).value) += _val
  99. /*
  100. * video delay stats
  101. */
  102. #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_SET(_pdev, _var, _val) \
  103. (((_pdev)->vow.delaystats[_var]).value) = _val
  104. #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_GET(_pdev, _var) \
  105. ((_pdev)->vow.delaystats[_var].value)
  106. #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_ADD(_pdev, _var, _val) \
  107. (((_pdev)->vow.delaystats[_var]).value) += _val
  108. /*
  109. * Number of TLVs sent by FW. Needs to reflect
  110. * HTT_PPDU_STATS_MAX_TAG declared in FW
  111. */
  112. #define CDP_PPDU_STATS_MAX_TAG 14
  113. #define CDP_MAX_DATA_TIDS 9
  114. #define CDP_MAX_VOW_TID 4
  115. #define CDP_MAX_TIDS 17
  116. #define CDP_WDI_NUM_EVENTS WDI_NUM_EVENTS
  117. #define CDP_FCTL_RETRY 0x0800
  118. #define CDP_FC_IS_RETRY_SET(_fc) \
  119. ((_fc) & qdf_cpu_to_le16(CDP_FCTL_RETRY))
  120. #define CDP_INVALID_SNR 255
  121. #define CDP_SNR_MULTIPLIER BIT(8)
  122. #define CDP_SNR_MUL(x, mul) ((x) * (mul))
  123. #define CDP_SNR_RND(x, mul) ((((x) % (mul)) >= ((mul) / 2)) ?\
  124. ((x) + ((mul) - 1)) / (mul) : (x) / (mul))
  125. #define CDP_SNR_OUT(x) (CDP_SNR_RND((x), CDP_SNR_MULTIPLIER))
  126. #define CDP_SNR_IN(x) (CDP_SNR_MUL((x), CDP_SNR_MULTIPLIER))
  127. #define CDP_SNR_AVG(x, y) ((((x) << 2) + (y) - (x)) >> 2)
  128. #define CDP_SNR_UPDATE_AVG(x, y) x = CDP_SNR_AVG((x), CDP_SNR_IN((y)))
  129. /*Max SU EVM count */
  130. #define DP_RX_MAX_SU_EVM_COUNT 32
  131. #define WDI_EVENT_BASE 0x100
  132. #define CDP_TXRX_RATECODE_MCS_MASK 0xF
  133. #define CDP_TXRX_RATECODE_NSS_MASK 0x3
  134. #define CDP_TXRX_RATECODE_NSS_LSB 4
  135. #define CDP_TXRX_RATECODE_PREM_MASK 0x3
  136. #define CDP_TXRX_RATECODE_PREM_LSB 6
  137. /* Below BW_GAIN should be added to the SNR value of every ppdu based on the
  138. * bandwidth. This table is obtained from HALPHY.
  139. * BW BW_Gain
  140. * 20 0
  141. * 40 3dBm
  142. * 80 6dBm
  143. * 160/80P80 9dBm
  144. * 320 12dBm
  145. */
  146. #define PKT_BW_GAIN_20MHZ 0
  147. #define PKT_BW_GAIN_40MHZ 3
  148. #define PKT_BW_GAIN_80MHZ 6
  149. #define PKT_BW_GAIN_160MHZ 9
  150. #ifdef WLAN_FEATURE_11BE
  151. #define PKT_BW_GAIN_320MHZ 12
  152. #endif
  153. /*
  154. * cdp_tx_transmit_type: Transmit type index
  155. * SU: SU Transmit type index
  156. * MU_MIMO: MU_MIMO Transmit type index
  157. * MU_OFDMA: MU_OFDMA Transmit type index
  158. * MU_MIMO_OFDMA: MU MIMO OFDMA Transmit type index
  159. */
  160. enum cdp_tx_transmit_type {
  161. SU = 0,
  162. MU_MIMO,
  163. MU_OFDMA,
  164. MU_MIMO_OFDMA,
  165. };
  166. /*
  167. * cdp_ru_index: Different RU index
  168. *
  169. * RU_26_INDEX : 26-tone Resource Unit index
  170. * RU_52_INDEX : 52-tone Resource Unit index
  171. * RU_52_26_INDEX : 52_26-tone Resource Unit index
  172. * RU_106_INDEX: 106-tone Resource Unit index
  173. * RU_106_26_INDEX: 106_26-tone Resource Unit index
  174. * RU_242_INDEX: 242-tone Resource Unit index
  175. * RU_484_INDEX: 484-tone Resource Unit index
  176. * RU_484_242_INDEX: 484_242-tone Resource Unit index
  177. * RU_996_INDEX: 996-tone Resource Unit index
  178. * RU_996_484_INDEX: 996_484-tone Resource Unit index
  179. * RU_996_484_242_INDEX: 996_484_242-tone Resource Unit index
  180. * RU_2X996_INDEX: 2X996-tone Resource Unit index
  181. * RU_2X996_484_INDEX: 2X996_484-tone Resource Unit index
  182. * RU_3X996_INDEX: 3X996-tone Resource Unit index
  183. * RU_3X996_484_INDEX: 3X996_484-tone Resource Unit index
  184. * RU_4X996_INDEX: 4X996-tone Resource Unit index
  185. */
  186. #ifdef WLAN_FEATURE_11BE
  187. enum cdp_ru_index {
  188. RU_26_INDEX = 0,
  189. RU_52_INDEX,
  190. RU_52_26_INDEX,
  191. RU_106_INDEX,
  192. RU_106_26_INDEX,
  193. RU_242_INDEX,
  194. RU_484_INDEX,
  195. RU_484_242_INDEX,
  196. RU_996_INDEX,
  197. RU_996_484_INDEX,
  198. RU_996_484_242_INDEX,
  199. RU_2X996_INDEX,
  200. RU_2X996_484_INDEX,
  201. RU_3X996_INDEX,
  202. RU_3X996_484_INDEX,
  203. RU_4X996_INDEX,
  204. RU_INDEX_MAX,
  205. };
  206. #else
  207. enum cdp_ru_index {
  208. RU_26_INDEX = 0,
  209. RU_52_INDEX,
  210. RU_106_INDEX,
  211. RU_242_INDEX,
  212. RU_484_INDEX,
  213. RU_996_INDEX,
  214. RU_INDEX_MAX,
  215. };
  216. #endif
  217. struct cdp_ru_debug {
  218. char *ru_type;
  219. };
  220. #ifdef WLAN_FEATURE_11BE
  221. static const struct cdp_ru_debug cdp_ru_string[RU_INDEX_MAX] = {
  222. { "RU_26" },
  223. { "RU_52" },
  224. { "RU_52_26" },
  225. { "RU_106" },
  226. { "RU_106_26" },
  227. { "RU_242" },
  228. { "RU_484" },
  229. { "RU_484_242" },
  230. { "RU_996" },
  231. { "RU_996_484" },
  232. { "RU_996_484_242" },
  233. { "RU_2x996" },
  234. { "RU_2x996_484" },
  235. { "RU_3x996" },
  236. { "RU_3x996_484" },
  237. { "RU_4x996" },
  238. };
  239. #else
  240. static const struct cdp_ru_debug cdp_ru_string[RU_INDEX_MAX] = {
  241. { "RU_26" },
  242. { "RU_52" },
  243. { "RU_106" },
  244. { "RU_242" },
  245. { "RU_484" },
  246. { "RU_996" }
  247. };
  248. #endif
  249. #ifdef FEATURE_TSO_STATS
  250. /* Number of TSO Packet Statistics captured */
  251. #define CDP_MAX_TSO_PACKETS 5
  252. /* Information for Number of Segments for a TSO Packet captured */
  253. #define CDP_MAX_TSO_SEGMENTS 2
  254. /* Information for Number of Fragments for a TSO Segment captured */
  255. #define CDP_MAX_TSO_FRAGMENTS 6
  256. #endif /* FEATURE_TSO_STATS */
  257. /* Different Packet Types */
  258. enum cdp_packet_type {
  259. DOT11_A = 0,
  260. DOT11_B = 1,
  261. DOT11_N = 2,
  262. DOT11_AC = 3,
  263. DOT11_AX = 4,
  264. #ifdef WLAN_FEATURE_11BE
  265. DOT11_BE = 5,
  266. #endif
  267. DOT11_MAX,
  268. };
  269. #define MCS_VALID 1
  270. #define MCS_INVALID 0
  271. #define CDP_MAX_MCS_STRING_LEN 34
  272. /*
  273. * struct cdp_rate_debug
  274. *
  275. * @mcs_type: print string for a given mcs
  276. * @valid: valid mcs rate?
  277. */
  278. struct cdp_rate_debug {
  279. char mcs_type[CDP_MAX_MCS_STRING_LEN];
  280. uint8_t valid;
  281. };
  282. #ifdef WLAN_FEATURE_11BE
  283. static const struct cdp_rate_debug cdp_rate_string[DOT11_MAX][MAX_MCS] = {
  284. {
  285. {"OFDM 48 Mbps", MCS_VALID},
  286. {"OFDM 24 Mbps", MCS_VALID},
  287. {"OFDM 12 Mbps", MCS_VALID},
  288. {"OFDM 6 Mbps ", MCS_VALID},
  289. {"OFDM 54 Mbps", MCS_VALID},
  290. {"OFDM 36 Mbps", MCS_VALID},
  291. {"OFDM 18 Mbps", MCS_VALID},
  292. {"OFDM 9 Mbps ", MCS_VALID},
  293. {"INVALID ", MCS_INVALID},
  294. {"INVALID ", MCS_INVALID},
  295. {"INVALID ", MCS_INVALID},
  296. {"INVALID ", MCS_INVALID},
  297. {"INVALID ", MCS_INVALID},
  298. {"INVALID ", MCS_INVALID},
  299. {"INVALID ", MCS_INVALID},
  300. {"INVALID ", MCS_INVALID},
  301. {"INVALID ", MCS_INVALID},
  302. },
  303. {
  304. {"CCK 11 Mbps Long ", MCS_VALID},
  305. {"CCK 5.5 Mbps Long ", MCS_VALID},
  306. {"CCK 2 Mbps Long ", MCS_VALID},
  307. {"CCK 1 Mbps Long ", MCS_VALID},
  308. {"CCK 11 Mbps Short ", MCS_VALID},
  309. {"CCK 5.5 Mbps Short", MCS_VALID},
  310. {"CCK 2 Mbps Short ", MCS_VALID},
  311. {"INVALID ", MCS_INVALID},
  312. {"INVALID ", MCS_INVALID},
  313. {"INVALID ", MCS_INVALID},
  314. {"INVALID ", MCS_INVALID},
  315. {"INVALID ", MCS_INVALID},
  316. {"INVALID ", MCS_INVALID},
  317. {"INVALID ", MCS_INVALID},
  318. {"INVALID ", MCS_INVALID},
  319. {"INVALID ", MCS_INVALID},
  320. {"INVALID ", MCS_INVALID},
  321. },
  322. {
  323. {"HT MCS 0 (BPSK 1/2) ", MCS_VALID},
  324. {"HT MCS 1 (QPSK 1/2) ", MCS_VALID},
  325. {"HT MCS 2 (QPSK 3/4) ", MCS_VALID},
  326. {"HT MCS 3 (16-QAM 1/2)", MCS_VALID},
  327. {"HT MCS 4 (16-QAM 3/4)", MCS_VALID},
  328. {"HT MCS 5 (64-QAM 2/3)", MCS_VALID},
  329. {"HT MCS 6 (64-QAM 3/4)", MCS_VALID},
  330. {"HT MCS 7 (64-QAM 5/6)", MCS_VALID},
  331. {"INVALID ", MCS_INVALID},
  332. {"INVALID ", MCS_INVALID},
  333. {"INVALID ", MCS_INVALID},
  334. {"INVALID ", MCS_INVALID},
  335. {"INVALID ", MCS_INVALID},
  336. {"INVALID ", MCS_INVALID},
  337. {"INVALID ", MCS_INVALID},
  338. {"INVALID ", MCS_INVALID},
  339. {"INVALID ", MCS_INVALID},
  340. },
  341. {
  342. {"VHT MCS 0 (BPSK 1/2) ", MCS_VALID},
  343. {"VHT MCS 1 (QPSK 1/2) ", MCS_VALID},
  344. {"VHT MCS 2 (QPSK 3/4) ", MCS_VALID},
  345. {"VHT MCS 3 (16-QAM 1/2) ", MCS_VALID},
  346. {"VHT MCS 4 (16-QAM 3/4) ", MCS_VALID},
  347. {"VHT MCS 5 (64-QAM 2/3) ", MCS_VALID},
  348. {"VHT MCS 6 (64-QAM 3/4) ", MCS_VALID},
  349. {"VHT MCS 7 (64-QAM 5/6) ", MCS_VALID},
  350. {"VHT MCS 8 (256-QAM 3/4) ", MCS_VALID},
  351. {"VHT MCS 9 (256-QAM 5/6) ", MCS_VALID},
  352. {"VHT MCS 10 (1024-QAM 3/4)", MCS_VALID},
  353. {"VHT MCS 11 (1024-QAM 5/6)", MCS_VALID},
  354. {"INVALID ", MCS_INVALID},
  355. {"INVALID ", MCS_INVALID},
  356. {"INVALID ", MCS_INVALID},
  357. {"INVALID ", MCS_INVALID},
  358. },
  359. {
  360. {"HE MCS 0 (BPSK 1/2) ", MCS_VALID},
  361. {"HE MCS 1 (QPSK 1/2) ", MCS_VALID},
  362. {"HE MCS 2 (QPSK 3/4) ", MCS_VALID},
  363. {"HE MCS 3 (16-QAM 1/2) ", MCS_VALID},
  364. {"HE MCS 4 (16-QAM 3/4) ", MCS_VALID},
  365. {"HE MCS 5 (64-QAM 2/3) ", MCS_VALID},
  366. {"HE MCS 6 (64-QAM 3/4) ", MCS_VALID},
  367. {"HE MCS 7 (64-QAM 5/6) ", MCS_VALID},
  368. {"HE MCS 8 (256-QAM 3/4) ", MCS_VALID},
  369. {"HE MCS 9 (256-QAM 5/6) ", MCS_VALID},
  370. {"HE MCS 10 (1024-QAM 3/4)", MCS_VALID},
  371. {"HE MCS 11 (1024-QAM 5/6)", MCS_VALID},
  372. {"HE MCS 12 (4096-QAM 3/4)", MCS_VALID},
  373. {"HE MCS 13 (4096-QAM 5/6)", MCS_VALID},
  374. {"INVALID ", MCS_INVALID},
  375. {"INVALID ", MCS_INVALID},
  376. {"INVALID ", MCS_INVALID},
  377. },
  378. {
  379. {"EHT MCS 0 (BPSK 1/2) ", MCS_VALID},
  380. {"EHT MCS 1 (QPSK 1/2) ", MCS_VALID},
  381. {"EHT MCS 2 (QPSK 3/4) ", MCS_VALID},
  382. {"EHT MCS 3 (16-QAM 1/2) ", MCS_VALID},
  383. {"EHT MCS 4 (16-QAM 3/4) ", MCS_VALID},
  384. {"EHT MCS 5 (64-QAM 2/3) ", MCS_VALID},
  385. {"EHT MCS 6 (64-QAM 3/4) ", MCS_VALID},
  386. {"EHT MCS 7 (64-QAM 5/6) ", MCS_VALID},
  387. {"EHT MCS 8 (256-QAM 3/4) ", MCS_VALID},
  388. {"EHT MCS 9 (256-QAM 5/6) ", MCS_VALID},
  389. {"EHT MCS 10 (1024-QAM 3/4)", MCS_VALID},
  390. {"EHT MCS 11 (1024-QAM 5/6)", MCS_VALID},
  391. {"EHT MCS 12 (4096-QAM 3/4)", MCS_VALID},
  392. {"EHT MCS 13 (4096-QAM 5/6)", MCS_VALID},
  393. {"EHT MCS 14 (BPSK-DCM 1/2)", MCS_VALID},
  394. {"EHT MCS 15 (BPSK-DCM 1/2)", MCS_VALID},
  395. {"INVALID ", MCS_INVALID},
  396. }
  397. };
  398. #else
  399. static const struct cdp_rate_debug cdp_rate_string[DOT11_MAX][MAX_MCS] = {
  400. {
  401. {"OFDM 48 Mbps", MCS_VALID},
  402. {"OFDM 24 Mbps", MCS_VALID},
  403. {"OFDM 12 Mbps", MCS_VALID},
  404. {"OFDM 6 Mbps ", MCS_VALID},
  405. {"OFDM 54 Mbps", MCS_VALID},
  406. {"OFDM 36 Mbps", MCS_VALID},
  407. {"OFDM 18 Mbps", MCS_VALID},
  408. {"OFDM 9 Mbps ", MCS_VALID},
  409. {"INVALID ", MCS_INVALID},
  410. {"INVALID ", MCS_INVALID},
  411. {"INVALID ", MCS_INVALID},
  412. {"INVALID ", MCS_INVALID},
  413. {"INVALID ", MCS_INVALID},
  414. },
  415. {
  416. {"CCK 11 Mbps Long ", MCS_VALID},
  417. {"CCK 5.5 Mbps Long ", MCS_VALID},
  418. {"CCK 2 Mbps Long ", MCS_VALID},
  419. {"CCK 1 Mbps Long ", MCS_VALID},
  420. {"CCK 11 Mbps Short ", MCS_VALID},
  421. {"CCK 5.5 Mbps Short", MCS_VALID},
  422. {"CCK 2 Mbps Short ", MCS_VALID},
  423. {"INVALID ", MCS_INVALID},
  424. {"INVALID ", MCS_INVALID},
  425. {"INVALID ", MCS_INVALID},
  426. {"INVALID ", MCS_INVALID},
  427. {"INVALID ", MCS_INVALID},
  428. {"INVALID ", MCS_INVALID},
  429. },
  430. {
  431. {"HT MCS 0 (BPSK 1/2) ", MCS_VALID},
  432. {"HT MCS 1 (QPSK 1/2) ", MCS_VALID},
  433. {"HT MCS 2 (QPSK 3/4) ", MCS_VALID},
  434. {"HT MCS 3 (16-QAM 1/2)", MCS_VALID},
  435. {"HT MCS 4 (16-QAM 3/4)", MCS_VALID},
  436. {"HT MCS 5 (64-QAM 2/3)", MCS_VALID},
  437. {"HT MCS 6 (64-QAM 3/4)", MCS_VALID},
  438. {"HT MCS 7 (64-QAM 5/6)", MCS_VALID},
  439. {"INVALID ", MCS_INVALID},
  440. {"INVALID ", MCS_INVALID},
  441. {"INVALID ", MCS_INVALID},
  442. {"INVALID ", MCS_INVALID},
  443. {"INVALID ", MCS_INVALID},
  444. },
  445. {
  446. {"VHT MCS 0 (BPSK 1/2) ", MCS_VALID},
  447. {"VHT MCS 1 (QPSK 1/2) ", MCS_VALID},
  448. {"VHT MCS 2 (QPSK 3/4) ", MCS_VALID},
  449. {"VHT MCS 3 (16-QAM 1/2) ", MCS_VALID},
  450. {"VHT MCS 4 (16-QAM 3/4) ", MCS_VALID},
  451. {"VHT MCS 5 (64-QAM 2/3) ", MCS_VALID},
  452. {"VHT MCS 6 (64-QAM 3/4) ", MCS_VALID},
  453. {"VHT MCS 7 (64-QAM 5/6) ", MCS_VALID},
  454. {"VHT MCS 8 (256-QAM 3/4) ", MCS_VALID},
  455. {"VHT MCS 9 (256-QAM 5/6) ", MCS_VALID},
  456. {"VHT MCS 10 (1024-QAM 3/4)", MCS_VALID},
  457. {"VHT MCS 11 (1024-QAM 5/6)", MCS_VALID},
  458. {"INVALID ", MCS_INVALID},
  459. },
  460. {
  461. {"HE MCS 0 (BPSK 1/2) ", MCS_VALID},
  462. {"HE MCS 1 (QPSK 1/2) ", MCS_VALID},
  463. {"HE MCS 2 (QPSK 3/4) ", MCS_VALID},
  464. {"HE MCS 3 (16-QAM 1/2) ", MCS_VALID},
  465. {"HE MCS 4 (16-QAM 3/4) ", MCS_VALID},
  466. {"HE MCS 5 (64-QAM 2/3) ", MCS_VALID},
  467. {"HE MCS 6 (64-QAM 3/4) ", MCS_VALID},
  468. {"HE MCS 7 (64-QAM 5/6) ", MCS_VALID},
  469. {"HE MCS 8 (256-QAM 3/4) ", MCS_VALID},
  470. {"HE MCS 9 (256-QAM 5/6) ", MCS_VALID},
  471. {"HE MCS 10 (1024-QAM 3/4)", MCS_VALID},
  472. {"HE MCS 11 (1024-QAM 5/6)", MCS_VALID},
  473. {"HE MCS 12 (4096-QAM 3/4)", MCS_VALID},
  474. {"HE MCS 13 (4096-QAM 5/6)", MCS_VALID},
  475. {"INVALID ", MCS_INVALID},
  476. }
  477. };
  478. #endif
  479. /*
  480. * cdp_mu_packet_type: MU Rx type index
  481. * RX_TYPE_MU_MIMO: MU MIMO Rx type index
  482. * RX_TYPE_MU_OFDMA: MU OFDMA Rx type index
  483. * MU_MIMO_OFDMA: MU Rx MAX type index
  484. */
  485. enum cdp_mu_packet_type {
  486. RX_TYPE_MU_MIMO = 0,
  487. RX_TYPE_MU_OFDMA = 1,
  488. RX_TYPE_MU_MAX = 2,
  489. };
  490. enum WDI_EVENT {
  491. WDI_EVENT_TX_STATUS = WDI_EVENT_BASE,
  492. WDI_EVENT_OFFLOAD_ALL,
  493. WDI_EVENT_RX_DESC_REMOTE,
  494. WDI_EVENT_RX_PEER_INVALID,
  495. WDI_EVENT_DBG_PRINT, /* NEED to integrate pktlog changes*/
  496. WDI_EVENT_RX_CBF_REMOTE,
  497. WDI_EVENT_RATE_FIND,
  498. WDI_EVENT_RATE_UPDATE,
  499. WDI_EVENT_SW_EVENT,
  500. WDI_EVENT_RX_DESC,
  501. WDI_EVENT_LITE_T2H,
  502. WDI_EVENT_LITE_RX,
  503. WDI_EVENT_RX_PPDU_DESC,
  504. WDI_EVENT_TX_PPDU_DESC,
  505. WDI_EVENT_TX_MSDU_DESC,
  506. WDI_EVENT_TX_DATA,
  507. WDI_EVENT_RX_DATA,
  508. WDI_EVENT_TX_MGMT_CTRL,
  509. WDI_EVENT_TX_PKT_CAPTURE,
  510. WDI_EVENT_HTT_STATS,
  511. WDI_EVENT_TX_BEACON,
  512. WDI_EVENT_PEER_STATS,
  513. WDI_EVENT_TX_SOJOURN_STAT,
  514. WDI_EVENT_UPDATE_DP_STATS,
  515. WDI_EVENT_RX_MGMT_CTRL,
  516. WDI_EVENT_PEER_CREATE,
  517. WDI_EVENT_PEER_DESTROY,
  518. WDI_EVENT_PEER_FLUSH_RATE_STATS,
  519. WDI_EVENT_FLUSH_RATE_STATS_REQ,
  520. WDI_EVENT_RX_MPDU,
  521. WDI_EVENT_HMWDS_AST_ADD_STATUS,
  522. WDI_EVENT_PEER_QOS_STATS,
  523. WDI_EVENT_PKT_CAPTURE_TX_DATA,
  524. WDI_EVENT_PKT_CAPTURE_RX_DATA,
  525. WDI_EVENT_PKT_CAPTURE_RX_DATA_NO_PEER,
  526. WDI_EVENT_PKT_CAPTURE_OFFLOAD_TX_DATA,
  527. WDI_EVENT_RX_CBF,
  528. WDI_EVENT_PKT_CAPTURE_PPDU_STATS,
  529. WDI_EVENT_HOST_SW_EVENT,
  530. #ifdef QCA_WIFI_QCN9224
  531. WDI_EVENT_HYBRID_TX,
  532. #ifdef WLAN_FEATURE_11BE_MLO
  533. WDI_EVENT_MLO_TSTMP,
  534. #endif
  535. #endif
  536. /* End of new event items */
  537. WDI_EVENT_LAST
  538. };
  539. #define WDI_NUM_EVENTS WDI_EVENT_LAST - WDI_EVENT_BASE
  540. struct cdp_stats_extd {
  541. };
  542. /* TID level Tx/Rx stats
  543. *
  544. */
  545. enum cdp_txrx_tidq_stats {
  546. /* Tx Counters */
  547. TX_MSDU_TOTAL_LINUX_SUBSYSTEM,
  548. TX_MSDU_TOTAL_FROM_OSIF,
  549. TX_MSDU_TX_COMP_PKT_CNT,
  550. /* Rx Counters */
  551. RX_MSDU_TOTAL_FROM_FW,
  552. RX_MSDU_MCAST_FROM_FW,
  553. RX_TID_MISMATCH_FROM_FW,
  554. RX_MSDU_MISC_PKTS,
  555. RX_MSDU_IS_ARP,
  556. RX_MSDU_IS_EAP,
  557. RX_MSDU_IS_DHCP,
  558. RX_AGGREGATE_10,
  559. RX_AGGREGATE_20,
  560. RX_AGGREGATE_30,
  561. RX_AGGREGATE_40,
  562. RX_AGGREGATE_50,
  563. RX_AGGREGATE_60,
  564. RX_AGGREGATE_MORE,
  565. RX_AMSDU_1,
  566. RX_AMSDU_2,
  567. RX_AMSDU_3,
  568. RX_AMSDU_4,
  569. RX_AMSDU_MORE,
  570. RX_MSDU_CHAINED_FROM_FW,
  571. RX_MSDU_REORDER_FAILED_FROM_FW,
  572. RX_MSDU_REORDER_FLUSHED_FROM_FW,
  573. RX_MSDU_DISCARD_FROM_FW,
  574. RX_MSDU_DUPLICATE_FROM_FW,
  575. RX_MSDU_DELIVERED_TO_STACK,
  576. TIDQ_STATS_MAX,
  577. };
  578. struct cdp_tidq_stats {
  579. uint32_t stats[TIDQ_STATS_MAX];
  580. };
  581. #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
  582. /**
  583. * struct cdp_rx_ppdu_cfr_info - struct for storing ppdu info extracted from HW
  584. * TLVs, this will be used for CFR correlation
  585. *
  586. * @bb_captured_channel : Set by RXPCU when MACRX_FREEZE_CAPTURE_CHANNEL TLV is
  587. * sent to PHY, SW checks it to correlate current PPDU TLVs with uploaded
  588. * channel information.
  589. *
  590. * @bb_captured_timeout : Set by RxPCU to indicate channel capture condition is
  591. * met, but MACRX_FREEZE_CAPTURE_CHANNEL is not sent to PHY due to AST delay,
  592. * which means the rx_frame_falling edge to FREEZE TLV ready time exceeds
  593. * the threshold time defined by RXPCU register FREEZE_TLV_DELAY_CNT_THRESH.
  594. * Bb_captured_reason is still valid in this case.
  595. *
  596. * @bb_captured_reason : Copy capture_reason of MACRX_FREEZE_CAPTURE_CHANNEL
  597. * TLV to here for FW usage. Valid when bb_captured_channel or
  598. * bb_captured_timeout is set.
  599. * <enum 0 freeze_reason_TM>
  600. * <enum 1 freeze_reason_FTM>
  601. * <enum 2 freeze_reason_ACK_resp_to_TM_FTM>
  602. * <enum 3 freeze_reason_TA_RA_TYPE_FILTER>
  603. * <enum 4 freeze_reason_NDPA_NDP>
  604. * <enum 5 freeze_reason_ALL_PACKET>
  605. * <legal 0-5>
  606. *
  607. * @rx_location_info_valid: Indicates whether CFR DMA address in the PPDU TLV
  608. * is valid
  609. * <enum 0 rx_location_info_is_not_valid>
  610. * <enum 1 rx_location_info_is_valid>
  611. * <legal all>
  612. *
  613. * @chan_capture_status : capture status reported by ucode
  614. * a. CAPTURE_IDLE: FW has disabled "REPETITIVE_CHE_CAPTURE_CTRL"
  615. * b. CAPTURE_BUSY: previous PPDU’s channel capture upload DMA ongoing. (Note
  616. * that this upload is triggered after receiving freeze_channel_capture TLV
  617. * after last PPDU is rx)
  618. * c. CAPTURE_ACTIVE: channel capture is enabled and no previous channel
  619. * capture ongoing
  620. * d. CAPTURE_NO_BUFFER: next buffer in IPC ring not available
  621. *
  622. * @rtt_che_buffer_pointer_high8 : The high 8 bits of the 40 bits pointer to
  623. * external RTT channel information buffer
  624. *
  625. * @rtt_che_buffer_pointer_low32 : The low 32 bits of the 40 bits pointer to
  626. * external RTT channel information buffer
  627. *
  628. * @rtt_cfo_measurement : raw cfo data extracted from hardware, which is 14 bit
  629. * signed number. The first bit used for sign representation and 13 bits for
  630. * fractional part.
  631. *
  632. * @agc_gain_info0: Chain 0 & chain 1 agc gain information reported by PHY
  633. *
  634. * @agc_gain_info1: Chain 2 & chain 3 agc gain information reported by PHY
  635. *
  636. * @agc_gain_info2: Chain 4 & chain 5 agc gain information reported by PHY
  637. *
  638. * @agc_gain_info3: Chain 6 & chain 7 agc gain information reported by PHY
  639. *
  640. * @rx_start_ts: Rx packet timestamp, the time the first L-STF ADC sample
  641. * arrived at Rx antenna.
  642. *
  643. * @mcs_rate: Indicates the mcs/rate in which packet is received.
  644. * If HT,
  645. * 0-7: MCS0-MCS7
  646. * If VHT,
  647. * 0-9: MCS0 to MCS9
  648. * If HE,
  649. * 0-11: MCS0 to MCS11,
  650. * 12-13: 4096QAM,
  651. * 14-15: reserved
  652. * If Legacy,
  653. * 0: 48 Mbps
  654. * 1: 24 Mbps
  655. * 2: 12 Mbps
  656. * 3: 6 Mbps
  657. * 4: 54 Mbps
  658. * 5: 36 Mbps
  659. * 6: 18 Mbps
  660. * 7: 9 Mbps
  661. *
  662. * @gi_type: Indicates the gaurd interval.
  663. * 0: 0.8 us
  664. * 1: 0.4 us
  665. * 2: 1.6 us
  666. * 3: 3.2 us
  667. */
  668. struct cdp_rx_ppdu_cfr_info {
  669. bool bb_captured_channel;
  670. bool bb_captured_timeout;
  671. uint8_t bb_captured_reason;
  672. bool rx_location_info_valid;
  673. uint8_t chan_capture_status;
  674. uint8_t rtt_che_buffer_pointer_high8;
  675. uint32_t rtt_che_buffer_pointer_low32;
  676. int16_t rtt_cfo_measurement;
  677. uint32_t agc_gain_info0;
  678. uint32_t agc_gain_info1;
  679. uint32_t agc_gain_info2;
  680. uint32_t agc_gain_info3;
  681. uint32_t rx_start_ts;
  682. uint32_t mcs_rate;
  683. uint32_t gi_type;
  684. };
  685. #endif
  686. /*
  687. * struct cdp_rx_su_evm_info: Rx evm info
  688. * @number_of_symbols: number of symbols
  689. * @nss_count: number of spatial streams
  690. * @pilot_count: number of pilot count
  691. */
  692. struct cdp_rx_su_evm_info {
  693. uint16_t number_of_symbols;
  694. uint8_t nss_count;
  695. uint8_t pilot_count;
  696. uint32_t pilot_evm[DP_RX_MAX_SU_EVM_COUNT];
  697. };
  698. /*
  699. * cdp_delay_stats_mode: Different types of delay statistics
  700. *
  701. * @CDP_DELAY_STATS_SW_ENQ: Stack to hw enqueue delay
  702. * @CDP_DELAY_STATS_TX_INTERFRAME: Interframe delay at radio entry point
  703. * @CDP_DELAY_STATS_FW_HW_TRANSMIT: Hw enqueue to tx completion delay
  704. * @CDP_DELAY_STATS_REAP_STACK: Delay in ring reap to indicating network stack
  705. * @CDP_DELAY_STATS_RX_INTERFRAME: Rx inteframe delay
  706. * @CDP_DELAY_STATS_MODE_MAX: Maximum delay mode
  707. */
  708. enum cdp_delay_stats_mode {
  709. CDP_DELAY_STATS_SW_ENQ,
  710. CDP_DELAY_STATS_TX_INTERFRAME,
  711. CDP_DELAY_STATS_FW_HW_TRANSMIT,
  712. CDP_DELAY_STATS_REAP_STACK,
  713. CDP_DELAY_STATS_RX_INTERFRAME,
  714. CDP_DELAY_STATS_MODE_MAX,
  715. };
  716. /*
  717. * cdp_delay_bucket_index
  718. * Index to be used for all delay stats
  719. */
  720. enum cdp_delay_bucket_index {
  721. CDP_DELAY_BUCKET_0,
  722. CDP_DELAY_BUCKET_1,
  723. CDP_DELAY_BUCKET_2,
  724. CDP_DELAY_BUCKET_3,
  725. CDP_DELAY_BUCKET_4,
  726. CDP_DELAY_BUCKET_5,
  727. CDP_DELAY_BUCKET_6,
  728. CDP_DELAY_BUCKET_7,
  729. CDP_DELAY_BUCKET_8,
  730. CDP_DELAY_BUCKET_9,
  731. CDP_DELAY_BUCKET_10,
  732. CDP_DELAY_BUCKET_11,
  733. CDP_DELAY_BUCKET_12,
  734. CDP_DELAY_BUCKET_MAX,
  735. };
  736. /*
  737. * struct cdp_tx_host_drop - packet drop due to following reasons.
  738. */
  739. enum cdp_tx_sw_drop {
  740. TX_DESC_ERR,
  741. TX_HAL_RING_ACCESS_ERR,
  742. TX_DMA_MAP_ERR,
  743. TX_HW_ENQUEUE,
  744. TX_SW_ENQUEUE,
  745. TX_MAX_DROP,
  746. };
  747. /*
  748. * struct cdp_rx_host_drop - packet drop due to following reasons.
  749. */
  750. enum cdp_rx_sw_drop {
  751. INTRABSS_DROP,
  752. MSDU_DONE_FAILURE,
  753. INVALID_PEER_VDEV,
  754. POLICY_CHECK_DROP,
  755. MEC_DROP,
  756. NAWDS_MCAST_DROP,
  757. MESH_FILTER_DROP,
  758. ENQUEUE_DROP,
  759. RX_MAX_DROP,
  760. };
  761. /*
  762. * struct cdp_delay_stats
  763. * @delay_bucket: division of buckets as per latency
  764. * @min_delay: minimum delay
  765. * @max_delay: maximum delay
  766. * @avg_delay: average delay
  767. */
  768. struct cdp_delay_stats {
  769. uint64_t delay_bucket[CDP_DELAY_BUCKET_MAX];
  770. uint32_t min_delay;
  771. uint32_t max_delay;
  772. uint32_t avg_delay;
  773. };
  774. /*
  775. * struct cdp_tid_tx_stats
  776. * @swq_delay: delay between wifi driver entry point and enqueue to HW in tx
  777. * @hwtx_delay: delay between wifi driver exit (enqueue to HW) and tx completion
  778. * @intfrm_delay: interframe delay
  779. * @success_cnt: total successful transmit count
  780. * @comp_fail_cnt: firmware drop found in tx completion path
  781. * @swdrop_cnt: software drop in tx path
  782. * @tqm_status_cnt: TQM completion status count
  783. * @htt_status_cnt: HTT completion status count
  784. */
  785. struct cdp_tid_tx_stats {
  786. struct cdp_delay_stats swq_delay;
  787. struct cdp_delay_stats hwtx_delay;
  788. struct cdp_delay_stats intfrm_delay;
  789. uint64_t success_cnt;
  790. uint64_t comp_fail_cnt;
  791. uint64_t swdrop_cnt[TX_MAX_DROP];
  792. uint64_t tqm_status_cnt[CDP_MAX_TX_TQM_STATUS];
  793. uint64_t htt_status_cnt[CDP_MAX_TX_HTT_STATUS];
  794. };
  795. /*
  796. * cdp_reo_error_stats
  797. * @err_src_reo_code_inv: Wireless Buffer Manager source receive reorder ring reason unknown
  798. * @err_reo_codes: Receive reoder error codes
  799. */
  800. struct cdp_reo_error_stats {
  801. uint64_t err_src_reo_code_inv;
  802. uint64_t err_reo_codes[CDP_REO_CODE_MAX];
  803. };
  804. /*
  805. * cdp_rxdma_error_stats
  806. * @err_src_rxdma_code_inv: DMA reason unknown count
  807. * @err_reo_codes: Receive reoder error codes count
  808. */
  809. struct cdp_rxdma_error_stats {
  810. uint64_t err_src_rxdma_code_inv;
  811. uint64_t err_dma_codes[CDP_DMA_CODE_MAX];
  812. };
  813. /*
  814. * struct cdp_tid_tx_stats
  815. * @to_stack_delay: Time taken between ring reap to indication to network stack
  816. * @intfrm_delay: Interframe rx delay
  817. * @delivered_cnt: Total packets indicated to stack
  818. * @intrabss_cnt: Rx total intraBSS frames
  819. * @msdu_cnt: number of msdu received from HW
  820. * @mcast_msdu_cnt: Num Mcast Msdus received from HW in Rx
  821. * @bcast_msdu_cnt: Num Bcast Msdus received from HW in Rx
  822. * @fail_cnt: Rx deliver drop counters
  823. * @reo_err: V3 reo error statistics
  824. * @rxdma_err: V3 rxdma error statistics
  825. */
  826. struct cdp_tid_rx_stats {
  827. struct cdp_delay_stats to_stack_delay;
  828. struct cdp_delay_stats intfrm_delay;
  829. uint64_t delivered_to_stack;
  830. uint64_t intrabss_cnt;
  831. uint64_t msdu_cnt;
  832. uint64_t mcast_msdu_cnt;
  833. uint64_t bcast_msdu_cnt;
  834. uint64_t fail_cnt[RX_MAX_DROP];
  835. struct cdp_reo_error_stats reo_err;
  836. struct cdp_rxdma_error_stats rxdma_err;
  837. };
  838. /*
  839. * struct cdp_tid_stats
  840. * @ingress_stack: Total packets received from linux stack
  841. * @osif_drop: drops in osif layer
  842. * @tid_tx_stats: transmit counters per tid
  843. * @tid_rx_stats: receive counters per tid
  844. */
  845. struct cdp_tid_stats {
  846. uint64_t ingress_stack;
  847. uint64_t osif_drop;
  848. struct cdp_tid_tx_stats tid_tx_stats[CDP_MAX_TX_COMP_RINGS]
  849. [CDP_MAX_DATA_TIDS];
  850. struct cdp_tid_rx_stats tid_rx_stats[CDP_MAX_RX_RINGS]
  851. [CDP_MAX_DATA_TIDS];
  852. };
  853. /*
  854. * struct cdp_delay_tx_stats: Tx delay stats
  855. * @tx_swq_delay: software enqueue delay
  856. * @hwtx_delay: HW enque to completion delay
  857. */
  858. struct cdp_delay_tx_stats {
  859. struct cdp_hist_stats tx_swq_delay;
  860. struct cdp_hist_stats hwtx_delay;
  861. };
  862. /*
  863. * struct cdp_delay_rx_stats: Rx delay stats
  864. * @to_stack_delay: To stack delay
  865. */
  866. struct cdp_delay_rx_stats {
  867. struct cdp_hist_stats to_stack_delay;
  868. };
  869. /*
  870. * struct cdp_delay_tid_stats: Delay tid stats
  871. * @tx_delay: Tx delay related stats
  872. * @rx_delay: Rx delay related stats
  873. */
  874. struct cdp_delay_tid_stats {
  875. struct cdp_delay_tx_stats tx_delay;
  876. struct cdp_delay_rx_stats rx_delay;
  877. };
  878. /*
  879. * cdp_peer_ext_stats: Peer extended stats
  880. * @delay_stats: Per TID delay stats
  881. */
  882. struct cdp_peer_ext_stats {
  883. struct cdp_delay_tid_stats delay_stats[CDP_MAX_DATA_TIDS]
  884. [CDP_MAX_TXRX_CTX];
  885. /*Customer can add MSDU level Tx/Rx stats */
  886. };
  887. /* struct cdp_pkt_info - packet info
  888. * @num: no of packets
  889. * @bytes: total no of bytes
  890. */
  891. struct cdp_pkt_info {
  892. uint32_t num;
  893. uint64_t bytes;
  894. };
  895. /* struct cdp_pkt_type - packet type
  896. * @mcs_count: Counter array for each MCS index
  897. */
  898. struct cdp_pkt_type {
  899. uint32_t mcs_count[MAX_MCS];
  900. };
  901. /*
  902. * struct cdp_rx_mu - Rx MU Stats
  903. * @ppdu_nss[SS_COUNT]: Packet Count in spatial streams
  904. * @mpdu_cnt_fcs_ok: Rx success mpdu count
  905. * @mpdu_cnt_fcs_err: Rx fail mpdu count
  906. * @cdp_pkt_type: counter array for each MCS index
  907. */
  908. struct cdp_rx_mu {
  909. uint32_t ppdu_nss[SS_COUNT];
  910. uint32_t mpdu_cnt_fcs_ok;
  911. uint32_t mpdu_cnt_fcs_err;
  912. struct cdp_pkt_type ppdu;
  913. };
  914. /* struct cdp_tx_pkt_info - tx packet info
  915. * num_msdu - successful msdu
  916. * num_mpdu - successful mpdu from compltn common
  917. * mpdu_tried - mpdu tried
  918. *
  919. * tx packet info counter field for mpdu success/tried and msdu
  920. */
  921. struct cdp_tx_pkt_info {
  922. uint32_t num_msdu;
  923. uint32_t num_mpdu;
  924. uint32_t mpdu_tried;
  925. };
  926. #ifdef FEATURE_TSO_STATS
  927. /**
  928. * struct cdp_tso_seg_histogram - Segment histogram for TCP Packets
  929. * @segs_1: packets with single segments
  930. * @segs_2_5: packets with 2-5 segments
  931. * @segs_6_10: packets with 6-10 segments
  932. * @segs_11_15: packets with 11-15 segments
  933. * @segs_16_20: packets with 16-20 segments
  934. * @segs_20_plus: packets with 20 plus segments
  935. */
  936. struct cdp_tso_seg_histogram {
  937. uint64_t segs_1;
  938. uint64_t segs_2_5;
  939. uint64_t segs_6_10;
  940. uint64_t segs_11_15;
  941. uint64_t segs_16_20;
  942. uint64_t segs_20_plus;
  943. };
  944. /**
  945. * struct cdp_tso_packet_info - Stats for TSO segments within a TSO packet
  946. * @tso_seg: TSO Segment information
  947. * @num_seg: Number of segments
  948. * @tso_packet_len: Size of the tso packet
  949. * @tso_seg_idx: segment number
  950. */
  951. struct cdp_tso_packet_info {
  952. struct qdf_tso_seg_t tso_seg[CDP_MAX_TSO_SEGMENTS];
  953. uint8_t num_seg;
  954. size_t tso_packet_len;
  955. uint32_t tso_seg_idx;
  956. };
  957. /**
  958. * struct cdp_tso_info - stats for tso packets
  959. * @tso_packet_info: TSO packet information
  960. */
  961. struct cdp_tso_info {
  962. struct cdp_tso_packet_info tso_packet_info[CDP_MAX_TSO_PACKETS];
  963. };
  964. #endif /* FEATURE_TSO_STATS */
  965. /**
  966. * struct cdp_tso_stats - TSO stats information
  967. * @num_tso_pkts: Total number of TSO Packets
  968. * @tso_comp: Total tso packet completions
  969. * @dropped_host: TSO packets dropped by host
  970. * @tso_no_mem_dropped: TSO packets dropped by host due to descriptor
  971. unavailablity
  972. * @dropped_target: TSO packets_dropped by target
  973. * @tso_info: Per TSO packet counters
  974. * @seg_histogram: TSO histogram stats
  975. */
  976. struct cdp_tso_stats {
  977. struct cdp_pkt_info num_tso_pkts;
  978. uint32_t tso_comp;
  979. struct cdp_pkt_info dropped_host;
  980. struct cdp_pkt_info tso_no_mem_dropped;
  981. uint32_t dropped_target;
  982. #ifdef FEATURE_TSO_STATS
  983. struct cdp_tso_info tso_info;
  984. struct cdp_tso_seg_histogram seg_histogram;
  985. #endif /* FEATURE_TSO_STATS */
  986. };
  987. #define CDP_PEER_STATS_START 0
  988. enum cdp_peer_stats_type {
  989. cdp_peer_stats_min = CDP_PEER_STATS_START,
  990. /* Tx types */
  991. cdp_peer_tx_ucast = cdp_peer_stats_min,
  992. cdp_peer_tx_mcast,
  993. cdp_peer_tx_rate,
  994. cdp_peer_tx_last_tx_rate,
  995. cdp_peer_tx_inactive_time,
  996. cdp_peer_tx_ratecode,
  997. cdp_peer_tx_flags,
  998. cdp_peer_tx_power,
  999. /* Rx types */
  1000. cdp_peer_rx_rate,
  1001. cdp_peer_rx_last_rx_rate,
  1002. cdp_peer_rx_ratecode,
  1003. cdp_peer_rx_ucast,
  1004. cdp_peer_rx_flags,
  1005. cdp_peer_rx_avg_snr,
  1006. cdp_peer_stats_max,
  1007. };
  1008. /*
  1009. * The max size of cdp_peer_stats_param_t is limited to 16 bytes.
  1010. * If the buffer size is exceeding this size limit,
  1011. * dp_txrx_get_peer_stats is to be used instead.
  1012. */
  1013. typedef union cdp_peer_stats_buf {
  1014. /* Tx types */
  1015. struct cdp_pkt_info tx_ucast;
  1016. struct cdp_pkt_info tx_mcast;
  1017. uint32_t tx_rate;
  1018. uint32_t last_tx_rate;
  1019. uint32_t tx_inactive_time;
  1020. uint32_t tx_flags;
  1021. uint32_t tx_power;
  1022. uint16_t tx_ratecode;
  1023. /* Rx types */
  1024. struct cdp_pkt_info rx_ucast;
  1025. uint32_t rx_rate;
  1026. uint32_t last_rx_rate;
  1027. uint32_t rx_ratecode;
  1028. uint32_t rx_flags;
  1029. uint32_t rx_avg_snr;
  1030. } cdp_peer_stats_param_t; /* Max union size 16 bytes */
  1031. /**
  1032. * enum cdp_protocol_trace - Protocols supported by per-peer protocol trace
  1033. * @CDP_TRACE_ICMP: ICMP packets
  1034. * @CDP_TRACE_EAP: EAPOL packets
  1035. * @CDP_TRACE_ARP: ARP packets
  1036. *
  1037. * Enumeration of all protocols supported by per-peer protocol trace feature
  1038. */
  1039. enum cdp_protocol_trace {
  1040. CDP_TRACE_ICMP,
  1041. CDP_TRACE_EAP,
  1042. CDP_TRACE_ARP,
  1043. CDP_TRACE_MAX
  1044. };
  1045. /**
  1046. * struct protocol_trace_count - type of count on per-peer protocol trace
  1047. * @egress_cnt: how many packets go out of host driver
  1048. * @ingress_cnt: how many packets come into the host driver
  1049. *
  1050. * Type of count on per-peer protocol trace
  1051. */
  1052. struct protocol_trace_count {
  1053. uint16_t egress_cnt;
  1054. uint16_t ingress_cnt;
  1055. };
  1056. /* struct cdp_tx_stats - tx stats
  1057. * @cdp_pkt_info comp_pkt: Pkt Info for which completions were received
  1058. * @cdp_pkt_info ucast: Unicast Packet Count
  1059. * @cdp_pkt_info mcast: Multicast Packet Count
  1060. * @cdp_pkt_info bcast: Broadcast Packet Count
  1061. * @cdp_pkt_info nawds_mcast: NAWDS Multicast Packet Count
  1062. * @cdp_pkt_info tx_success: Successful Tx Packets
  1063. * @nawds_mcast_drop: NAWDS Multicast Drop Count
  1064. * @protocol_trace_cnt: per-peer protocol counter
  1065. * @tx_failed: Total Tx failure
  1066. * @ofdma: Total Packets as ofdma
  1067. * @stbc: Packets in STBC
  1068. * @ldpc: Packets in LDPC
  1069. * @retries: Packet retries
  1070. * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
  1071. * @amsdu_cnt: Number of MSDUs part of AMSDU
  1072. * @tx_rate: Tx Rate
  1073. * @last_tx_rate: Last tx rate for unicast packets
  1074. * @last_tx_rate_mcs: Tx rate mcs for unicast packets
  1075. * @mcast_last_tx_rate: Last tx rate for multicast packets
  1076. * @mcast_last_tx_rate_mcs: Last tx rate mcs for multicast
  1077. * @last_per: Tx Per
  1078. * @rnd_avg_tx_rate: Rounded average tx rate
  1079. * @avg_tx_rate: Average TX rate
  1080. * @last_ack_rssi: RSSI of last acked packet
  1081. * @tx_bytes_success_last: last Tx success bytes
  1082. * @tx_data_success_last: last Tx success data
  1083. * @tx_byte_rate: Bytes Trasmitted in last one sec
  1084. * @tx_data_rate: Data Transmitted in last one sec
  1085. * @sgi_count[MAX_GI]: SGI count
  1086. * @pream_punct_cnt: Preamble Punctured count
  1087. * @nss[SS_COUNT]: Packet count for different num_spatial_stream values
  1088. * @bw[MAX_BW]: Packet Count for different bandwidths
  1089. * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
  1090. * @excess_retries_per_ac[WME_AC_MAX]: Wireless Multimedia type Count
  1091. * @dot11_tx_pkts: dot11 tx packets
  1092. * @fw_rem: Discarded by firmware
  1093. * @fw_rem_notx: firmware_discard_untransmitted
  1094. * @fw_rem_tx: firmware_discard_transmitted
  1095. * @age_out: aged out in mpdu/msdu queues
  1096. * @fw_reason1: discarded by firmware reason 1
  1097. * @fw_reason2: discarded by firmware reason 2
  1098. * @fw_reason3: discarded by firmware reason 3
  1099. * @mcs_count: MCS Count
  1100. * @an_tx_cnt: ald tx count
  1101. * @an_tx_rates_used: ald rx rate used
  1102. * @an_tx_bytes: ald tx bytes
  1103. * @ald_txcount: ald tx count
  1104. * @ald_lastper: ald last PER
  1105. * @ald_max4msframelen: ald max frame len
  1106. * @an_tx_ratecount: ald tx ratecount
  1107. * @ald_retries: ald retries
  1108. * @ald_ac_nobufs: #buffer overflows per node per AC
  1109. * @ald_ac_excretries: #pkts dropped after excessive retries per node per AC
  1110. * @rssi_chain: rssi chain
  1111. * @inactive_time: inactive time in secs
  1112. * @tx_flags: tx flags
  1113. * @tx_power: Tx power latest
  1114. * @is_tx_no_ack: no ack received
  1115. * @tx_ratecode: Tx rate code of last frame
  1116. * @is_tx_nodefkey: tx failed 'cuz no defkey
  1117. * @is_tx_noheadroom: tx failed 'cuz no space
  1118. * @is_crypto_enmicfail:
  1119. * @is_tx_nonode: tx failed for no node
  1120. * @is_tx_unknownmgt: tx of unknown mgt frame
  1121. * @is_tx_badcipher: tx failed 'cuz key type
  1122. * @ampdu_cnt: completion of aggregation
  1123. * @non_ampdu_cnt: tx completion not aggregated
  1124. * @failed_retry_count: packets failed due to retry above 802.11 retry limit
  1125. * @retry_count: packets successfully send after one or more retry
  1126. * @multiple_retry_count: packets successfully sent after more than one retry
  1127. * @transmit_type: pkt info for tx transmit type
  1128. * @mu_group_id: mumimo mu group id
  1129. * @ru_start: RU start index
  1130. * @ru_tones: RU tones size
  1131. * @ru_loc: pkt info for RU location 26/ 52/ 106/ 242/ 484 counter
  1132. * @num_ppdu_cookie_valid : Number of comp received with valid ppdu cookie
  1133. * @tx_success_twt: Successful Tx Packets in TWT session
  1134. * @nss_info: NSS 1,2, ...8
  1135. * @mcs_info: MCS index
  1136. * @bw_info: Bandwidth
  1137. * <enum 0 bw_20_MHz>
  1138. * <enum 1 bw_40_MHz>
  1139. * <enum 2 bw_80_MHz>
  1140. * <enum 3 bw_160_MHz>
  1141. * @gi_info: <enum 0 0_8_us_sgi > Legacy normal GI
  1142. * <enum 1 0_4_us_sgi > Legacy short GI
  1143. * <enum 2 1_6_us_sgi > HE related GI
  1144. * <enum 3 3_2_us_sgi > HE
  1145. * @preamble_info: preamble
  1146. * @last_tx_ts: last timestamp in jiffies when tx comp occurred
  1147. */
  1148. struct cdp_tx_stats {
  1149. struct cdp_pkt_info comp_pkt;
  1150. struct cdp_pkt_info ucast;
  1151. struct cdp_pkt_info mcast;
  1152. struct cdp_pkt_info bcast;
  1153. struct cdp_pkt_info nawds_mcast;
  1154. #ifdef VDEV_PEER_PROTOCOL_COUNT
  1155. struct protocol_trace_count protocol_trace_cnt[CDP_TRACE_MAX];
  1156. #endif
  1157. struct cdp_pkt_info tx_success;
  1158. uint32_t nawds_mcast_drop;
  1159. uint32_t tx_failed;
  1160. uint32_t ofdma;
  1161. uint32_t stbc;
  1162. uint32_t ldpc;
  1163. uint32_t retries;
  1164. uint32_t non_amsdu_cnt;
  1165. uint32_t amsdu_cnt;
  1166. uint32_t tx_rate;
  1167. uint32_t last_tx_rate;
  1168. uint32_t last_tx_rate_mcs;
  1169. uint32_t mcast_last_tx_rate;
  1170. uint32_t mcast_last_tx_rate_mcs;
  1171. uint32_t last_per;
  1172. uint64_t rnd_avg_tx_rate;
  1173. uint64_t avg_tx_rate;
  1174. uint32_t last_ack_rssi;
  1175. uint32_t tx_bytes_success_last;
  1176. uint32_t tx_data_success_last;
  1177. uint32_t tx_byte_rate;
  1178. uint32_t tx_data_rate;
  1179. uint32_t tx_data_ucast_last;
  1180. uint32_t tx_data_ucast_rate;
  1181. struct cdp_pkt_type pkt_type[DOT11_MAX];
  1182. uint32_t sgi_count[MAX_GI];
  1183. uint32_t pream_punct_cnt;
  1184. uint32_t nss[SS_COUNT];
  1185. uint32_t bw[MAX_BW];
  1186. uint32_t wme_ac_type[WME_AC_MAX];
  1187. uint32_t excess_retries_per_ac[WME_AC_MAX];
  1188. struct cdp_pkt_info dot11_tx_pkts;
  1189. struct {
  1190. struct cdp_pkt_info fw_rem;
  1191. uint32_t fw_rem_notx;
  1192. uint32_t fw_rem_tx;
  1193. uint32_t age_out;
  1194. uint32_t fw_reason1;
  1195. uint32_t fw_reason2;
  1196. uint32_t fw_reason3;
  1197. } dropped;
  1198. uint32_t fw_tx_cnt;
  1199. uint32_t fw_tx_bytes;
  1200. uint32_t fw_txcount;
  1201. uint32_t fw_max4msframelen;
  1202. uint32_t fw_ratecount;
  1203. uint32_t ac_nobufs[WME_AC_MAX];
  1204. uint32_t rssi_chain[WME_AC_MAX];
  1205. uint32_t inactive_time;
  1206. uint32_t tx_flags;
  1207. uint32_t tx_power;
  1208. /* MSDUs which the target sent but couldn't get an ack for */
  1209. struct cdp_pkt_info is_tx_no_ack;
  1210. uint16_t tx_ratecode;
  1211. /*add for peer and upadted from ppdu*/
  1212. uint32_t ampdu_cnt;
  1213. uint32_t non_ampdu_cnt;
  1214. uint32_t failed_retry_count;
  1215. uint32_t retry_count;
  1216. uint32_t multiple_retry_count;
  1217. uint32_t last_tx_rate_used;
  1218. struct cdp_tx_pkt_info transmit_type[MAX_TRANSMIT_TYPES];
  1219. uint32_t mu_group_id[MAX_MU_GROUP_ID];
  1220. uint32_t ru_start;
  1221. uint32_t ru_tones;
  1222. struct cdp_tx_pkt_info ru_loc[MAX_RU_LOCATIONS];
  1223. uint32_t num_ppdu_cookie_valid;
  1224. uint32_t no_ack_count[QDF_PROTO_SUBTYPE_MAX];
  1225. struct cdp_pkt_info tx_success_twt;
  1226. uint32_t nss_info:4,
  1227. mcs_info:4,
  1228. bw_info:4,
  1229. gi_info:4,
  1230. preamble_info:4;
  1231. /* mpdu retry count in case of successful transmission */
  1232. uint32_t mpdu_success_with_retries;
  1233. unsigned long last_tx_ts;
  1234. };
  1235. /* struct cdp_rx_stats - rx Level Stats
  1236. * @to_stack: Total packets sent up the stack
  1237. * @rcvd_reo[CDP_MAX_RX_RINGS]: Packets received on the reo ring
  1238. * @unicast: Total unicast packets
  1239. * @multicast: Total multicast packets
  1240. * @bcast: Broadcast Packet Count
  1241. * @raw: Raw Pakets received
  1242. * @nawds_mcast_drop: Total multicast packets
  1243. * @mec_drop: Total MEC packets dropped
  1244. * @last_rx_ts: last timestamp in jiffies when RX happened
  1245. * @pkts: Intra BSS packets received
  1246. * @fail: Intra BSS packets failed
  1247. * @mdns_no_fwd: Intra BSS MDNS packets not forwarded
  1248. * @protocol_trace_cnt: per-peer protocol counters
  1249. * @mic_err: Rx MIC errors CCMP
  1250. * @decrypt_err: Rx Decryption Errors CRC
  1251. * @fcserr: rx MIC check failed (CCMP)
  1252. * @pn_err: pn check failed
  1253. * @oor_err: Rx OOR errors
  1254. * @jump_2k_err: 2k jump errors
  1255. * @rxdma_wifi_parse_err: rxdma wifi parse errors
  1256. * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
  1257. * @reception_type[MAX_RECEPTION_TYPES]: Reception type os packets
  1258. * @mcs_count[MAX_MCS]: mcs count
  1259. * @sgi_count[MAX_GI]: sgi count
  1260. * @nss[SS_COUNT]: packet count in spatiel Streams
  1261. * @ppdu_nss[SS_COUNT]: PPDU packet count in spatial streams
  1262. * @mpdu_cnt_fcs_ok: SU Rx success mpdu count
  1263. * @mpdu_cnt_fcs_err: SU Rx fail mpdu count
  1264. * @su_ax_ppdu_cnt: SU Rx packet count
  1265. * @ppdu_cnt[MAX_RECEPTION_TYPES]: PPDU packet count in reception type
  1266. * @rx_mu[RX_TYPE_MU_MAX]: Rx MU stats
  1267. * @bw[MAX_BW]: Packet Count in different bandwidths
  1268. * @non_ampdu_cnt: Number of MSDUs with no MPDU level aggregation
  1269. * @ampdu_cnt: Number of MSDUs part of AMSPU
  1270. * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
  1271. * @amsdu_cnt: Number of MSDUs part of AMSDU
  1272. * @bar_recv_cnt: Number of bar received
  1273. * @avg_snr: Average snr
  1274. * @rx_rate: Rx rate
  1275. * @last_rx_rate: Previous rx rate
  1276. * @rnd_avg_rx_rate: Rounded average rx rate
  1277. * @avg_rx_rate: Average Rx rate
  1278. * @dot11_rx_pkts: dot11 rx packets
  1279. * @rx_bytes_last: last Rx success bytes
  1280. * @rx_data_last: last rx success data
  1281. * @rx_byte_rate: bytes received in last one sec
  1282. * @rx_data_rate: data received in last one sec
  1283. * @rx_retries: retries of packet in rx
  1284. * @rx_mpdus: mpdu in rx
  1285. * @rx_ppdus: ppdu in rx
  1286. * @is_rx_tooshort: tooshort
  1287. * @is_rx_decap: rx decap
  1288. * @rx_ccmpmic: rx MIC check failed (CCMP)
  1289. * @rx_tkipmic: rx MIC check failed (TKIP)
  1290. * @rx_tkipicv: rx ICV check failed (TKIP)
  1291. * @rx_wpimic: rx MIC check failed (WPI)
  1292. * @rx_wepfail: rx wep processing failed
  1293. * @rx_aggr: aggregation on rx
  1294. * @rx_discard: packets discard in rx
  1295. * @rx_ratecode: Rx rate code of last frame
  1296. * @rx_flags: rx flags
  1297. * @rx_snr_measured_time: Time at which snr is measured
  1298. * @snr: SNR of received signal
  1299. * @last_snr: Previous snr
  1300. * @multipass_rx_pkt_drop: Dropped multipass rx pkt
  1301. * @peer_unauth_rx_pkt_drop: Unauth rx packet drops
  1302. * @policy_check_drop: policy check drops
  1303. * @rx_mpdu_cnt: rx mpdu count per MCS rate
  1304. * @nss_info: NSS 1,2, ...8
  1305. * @mcs_info: MCS index
  1306. * @bw_info: Bandwidth
  1307. * <enum 0 bw_20_MHz>
  1308. * <enum 1 bw_40_MHz>
  1309. * <enum 2 bw_80_MHz>
  1310. * <enum 3 bw_160_MHz>
  1311. * @gi_info: <enum 0 0_8_us_sgi > Legacy normal GI
  1312. * <enum 1 0_4_us_sgi > Legacy short GI
  1313. * <enum 2 1_6_us_sgi > HE related GI
  1314. * <enum 3 3_2_us_sgi > HE
  1315. * @preamble_info: preamble
  1316. * @to_stack_twt: Total packets sent up the stack in TWT session
  1317. */
  1318. struct cdp_rx_stats {
  1319. struct cdp_pkt_info to_stack;
  1320. struct cdp_pkt_info rcvd_reo[CDP_MAX_RX_RINGS];
  1321. struct cdp_pkt_info unicast;
  1322. struct cdp_pkt_info multicast;
  1323. struct cdp_pkt_info bcast;
  1324. struct cdp_pkt_info raw;
  1325. uint32_t nawds_mcast_drop;
  1326. struct cdp_pkt_info mec_drop;
  1327. unsigned long last_rx_ts;
  1328. struct {
  1329. struct cdp_pkt_info pkts;
  1330. struct cdp_pkt_info fail;
  1331. uint32_t mdns_no_fwd;
  1332. } intra_bss;
  1333. #ifdef VDEV_PEER_PROTOCOL_COUNT
  1334. struct protocol_trace_count protocol_trace_cnt[CDP_TRACE_MAX];
  1335. #endif
  1336. struct {
  1337. uint32_t mic_err;
  1338. uint32_t decrypt_err;
  1339. uint32_t fcserr;
  1340. uint32_t pn_err;
  1341. uint32_t oor_err;
  1342. uint32_t jump_2k_err;
  1343. uint32_t rxdma_wifi_parse_err;
  1344. } err;
  1345. uint32_t wme_ac_type[WME_AC_MAX];
  1346. uint32_t reception_type[MAX_RECEPTION_TYPES];
  1347. struct cdp_pkt_type pkt_type[DOT11_MAX];
  1348. uint32_t sgi_count[MAX_GI];
  1349. uint32_t nss[SS_COUNT];
  1350. uint32_t ppdu_nss[SS_COUNT];
  1351. uint32_t mpdu_cnt_fcs_ok;
  1352. uint32_t mpdu_cnt_fcs_err;
  1353. struct cdp_pkt_type su_ax_ppdu_cnt;
  1354. uint32_t ppdu_cnt[MAX_RECEPTION_TYPES];
  1355. struct cdp_rx_mu rx_mu[RX_TYPE_MU_MAX];
  1356. uint32_t bw[MAX_BW];
  1357. uint32_t non_ampdu_cnt;
  1358. uint32_t ampdu_cnt;
  1359. uint32_t non_amsdu_cnt;
  1360. uint32_t amsdu_cnt;
  1361. uint32_t bar_recv_cnt;
  1362. uint32_t avg_snr;
  1363. uint32_t rx_rate;
  1364. uint32_t last_rx_rate;
  1365. uint32_t rnd_avg_rx_rate;
  1366. uint32_t avg_rx_rate;
  1367. struct cdp_pkt_info dot11_rx_pkts;
  1368. uint32_t rx_bytes_success_last;
  1369. uint32_t rx_data_success_last;
  1370. uint32_t rx_byte_rate;
  1371. uint32_t rx_data_rate;
  1372. uint32_t rx_retries;
  1373. uint32_t rx_mpdus;
  1374. uint32_t rx_ppdus;
  1375. /*add for peer updated for ppdu*/
  1376. uint32_t rx_aggr;
  1377. uint32_t rx_discard;
  1378. uint32_t rx_ratecode;
  1379. uint32_t rx_flags;
  1380. uint32_t rx_snr_measured_time;
  1381. uint8_t snr;
  1382. uint8_t last_snr;
  1383. uint32_t multipass_rx_pkt_drop;
  1384. uint32_t peer_unauth_rx_pkt_drop;
  1385. uint32_t policy_check_drop;
  1386. uint32_t rx_mpdu_cnt[MAX_MCS];
  1387. uint32_t nss_info:4,
  1388. mcs_info:4,
  1389. bw_info:4,
  1390. gi_info:4,
  1391. preamble_info:4;
  1392. struct cdp_pkt_info to_stack_twt;
  1393. };
  1394. /* struct cdp_tx_ingress_stats - Tx ingress Stats
  1395. * @rcvd: Total packets received for transmission
  1396. * @processed: Tx packets processed
  1397. * @inspect_pkts: Total packets passed to inspect handler
  1398. * @nawds_mcast: NAWDS Multicast Packet Count
  1399. * @bcast: Number of broadcast packets
  1400. * @raw_pkt: Total Raw packets
  1401. * @dma_map_error: DMA map error
  1402. * @num_frags_overflow_err: msdu's nbuf count exceeds num of segemnts
  1403. * @num_seg: No of segments in TSO packets
  1404. * @tso_pkt:total no of TSO packets
  1405. * @non_tso_pkts: non - TSO packets
  1406. * @dropped_host: TSO packets dropped by host
  1407. * @dropped_target:TSO packets dropped by target
  1408. * @sg_pkt: Total scatter gather packets
  1409. * @non_sg_pkts: non SG packets
  1410. * @dropped_host: SG packets dropped by host
  1411. * @dropped_target: SG packets dropped by target
  1412. * @dma_map_error: Dma map error
  1413. * @mcast_pkt: total no of multicast conversion packets
  1414. * @dropped_map_error: packets dropped due to map error
  1415. * @dropped_self_mac: packets dropped due to self Mac address
  1416. * @dropped_send_fail: Packets dropped due to send fail
  1417. * @ucast: total unicast packets transmitted
  1418. * @fail_seg_alloc: Segment allocation failure
  1419. * @clone_fail: NBUF clone failure
  1420. * @igmp_rcvd: igmp pkts received for conversion to ucast pkts
  1421. * @igmp_ucast_converted: unicast pkts sent as part of VoW IGMP improvements
  1422. * @dropped_pkt: Total scatter gather packets
  1423. * @desc_na: Desc Not Available
  1424. * @exc_desc_na: Exception desc Not Available
  1425. * @ring_full: ring full
  1426. * @enqueue_fail: hw enqueue fail
  1427. * @dma_error: dma fail
  1428. * @res_full: Resource Full: Congestion Control
  1429. * @fail_per_pkt_vdev_id_check: Per pkt vdev id check
  1430. * @exception_fw: packets sent to fw
  1431. * @completion_fw: packets completions received from fw
  1432. * @cce_classified:Number of packets classified by CCE
  1433. * @cce_classified_raw:Number of raw packets classified by CCE
  1434. * @sniffer_rcvd: Number of packets received with ppdu cookie
  1435. */
  1436. struct cdp_tx_ingress_stats {
  1437. struct cdp_pkt_info rcvd;
  1438. struct cdp_pkt_info processed;
  1439. struct cdp_pkt_info reinject_pkts;
  1440. struct cdp_pkt_info inspect_pkts;
  1441. struct cdp_pkt_info nawds_mcast;
  1442. struct cdp_pkt_info bcast;
  1443. struct {
  1444. struct cdp_pkt_info raw_pkt;
  1445. uint32_t dma_map_error;
  1446. uint32_t invalid_raw_pkt_datatype;
  1447. uint32_t num_frags_overflow_err;
  1448. } raw;
  1449. /* Scatter Gather packet info */
  1450. struct {
  1451. struct cdp_pkt_info sg_pkt;
  1452. struct cdp_pkt_info non_sg_pkts;
  1453. struct cdp_pkt_info dropped_host;
  1454. uint32_t dropped_target;
  1455. uint32_t dma_map_error;
  1456. } sg;
  1457. /* Multicast Enhancement packets info */
  1458. struct {
  1459. struct cdp_pkt_info mcast_pkt;
  1460. uint32_t dropped_map_error;
  1461. uint32_t dropped_self_mac;
  1462. uint32_t dropped_send_fail;
  1463. uint32_t ucast;
  1464. uint32_t fail_seg_alloc;
  1465. uint32_t clone_fail;
  1466. } mcast_en;
  1467. /* IGMP Multicast Enhancement packets info */
  1468. struct {
  1469. uint32_t igmp_rcvd;
  1470. uint32_t igmp_ucast_converted;
  1471. } igmp_mcast_en;
  1472. /* Packets dropped on the Tx side */
  1473. struct {
  1474. struct cdp_pkt_info dropped_pkt;
  1475. struct cdp_pkt_info desc_na;
  1476. struct cdp_pkt_info desc_na_exc_alloc_fail;
  1477. struct cdp_pkt_info desc_na_exc_outstand;
  1478. struct cdp_pkt_info exc_desc_na;
  1479. uint32_t ring_full;
  1480. uint32_t enqueue_fail;
  1481. uint32_t dma_error;
  1482. uint32_t res_full;
  1483. /* headroom insufficient */
  1484. uint32_t headroom_insufficient;
  1485. uint32_t fail_per_pkt_vdev_id_check;
  1486. } dropped;
  1487. /* Mesh packets info */
  1488. struct {
  1489. uint32_t exception_fw;
  1490. uint32_t completion_fw;
  1491. } mesh;
  1492. uint32_t cce_classified;
  1493. uint32_t cce_classified_raw;
  1494. struct cdp_pkt_info sniffer_rcvd;
  1495. struct cdp_tso_stats tso_stats;
  1496. };
  1497. /* struct cdp_rx_ingress_stats - rx ingress stats
  1498. * @reo_rcvd_pkt: packets received at REO block
  1499. * @ null_q_desc_pkt: null queue desc pkt count
  1500. * @ routed_eapol_pkt: routed eapol pkt count
  1501. */
  1502. struct cdp_rx_ingress_stats {
  1503. struct cdp_pkt_info reo_rcvd_pkt;
  1504. struct cdp_pkt_info null_q_desc_pkt;
  1505. struct cdp_pkt_info routed_eapol_pkt;
  1506. };
  1507. /* struct cdp_vdev_stats - vdev stats structure
  1508. * @tx_i: ingress tx stats
  1509. * @rx_i: ingress rx stats
  1510. * @tx: cdp tx stats
  1511. * @rx: cdp rx stats
  1512. * @tso_stats: tso stats
  1513. */
  1514. struct cdp_vdev_stats {
  1515. struct cdp_tx_ingress_stats tx_i;
  1516. struct cdp_rx_ingress_stats rx_i;
  1517. struct cdp_tx_stats tx;
  1518. struct cdp_rx_stats rx;
  1519. struct cdp_tso_stats tso_stats;
  1520. };
  1521. /* struct cdp_peer_stats - peer stats structure
  1522. * @tx: cdp tx stats
  1523. * @rx: cdp rx stats
  1524. */
  1525. struct cdp_peer_stats {
  1526. /* CDP Tx Stats */
  1527. struct cdp_tx_stats tx;
  1528. /* CDP Rx Stats */
  1529. struct cdp_rx_stats rx;
  1530. };
  1531. /* struct cdp_peer_tid_stats - Per peer and per TID stats
  1532. * @tx_avg_jitter: tx average jitter
  1533. * @tx_avg_delay: tx average delay
  1534. * @tx_avg_err: tx average error
  1535. * @tx_total_success: tx total success
  1536. * @tx_drop: tx drop
  1537. */
  1538. struct cdp_peer_tid_stats {
  1539. #ifdef WLAN_PEER_JITTER
  1540. uint32_t tx_avg_jitter;
  1541. uint32_t tx_avg_delay;
  1542. uint64_t tx_avg_err;
  1543. uint64_t tx_total_success;
  1544. uint64_t tx_drop;
  1545. #endif
  1546. };
  1547. /* struct cdp_interface_peer_stats - interface structure for txrx peer stats
  1548. * @peer_mac: peer mac address
  1549. * @vdev_id : vdev_id for the peer
  1550. * @rssi_changed: denotes rssi is changed
  1551. * @last_peer_tx_rate: peer tx rate for last transmission
  1552. * @peer_tx_rate: tx rate for current transmission
  1553. * @peer_rssi: current rssi value of peer
  1554. * @tx_packet_count: tx packet count
  1555. * @rx_packet_count: rx packet count
  1556. * @tx_byte_count: tx byte count
  1557. * @rx_byte_count: rx byte count
  1558. * @per: per error rate
  1559. * @ack_rssi: RSSI of the last ack received
  1560. * @free_buff: free tx descriptor count
  1561. */
  1562. struct cdp_interface_peer_stats {
  1563. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  1564. uint8_t vdev_id;
  1565. uint8_t rssi_changed;
  1566. uint32_t last_peer_tx_rate;
  1567. uint32_t peer_tx_rate;
  1568. uint32_t peer_rssi;
  1569. uint32_t tx_packet_count;
  1570. uint32_t rx_packet_count;
  1571. uint32_t tx_byte_count;
  1572. uint32_t rx_byte_count;
  1573. uint32_t per;
  1574. uint32_t ack_rssi;
  1575. uint32_t free_buff;
  1576. };
  1577. /* struct cdp_interface_peer_qos_stats - interface structure for peer qos stats
  1578. * @peer_mac: peer mac address
  1579. * @frame_control: frame control field
  1580. * @qos_control: qos control field
  1581. * @frame_control_info_valid: frame_control valid
  1582. * @qos_control_info_valid: qos_control valid
  1583. * @vdev_id : vdev_id for the peer
  1584. */
  1585. struct cdp_interface_peer_qos_stats {
  1586. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  1587. uint16_t frame_control;
  1588. uint16_t qos_control;
  1589. uint8_t frame_control_info_valid;
  1590. uint8_t qos_control_info_valid;
  1591. uint8_t vdev_id;
  1592. };
  1593. /* Tx completions per interrupt */
  1594. struct cdp_hist_tx_comp {
  1595. uint32_t pkts_1;
  1596. uint32_t pkts_2_20;
  1597. uint32_t pkts_21_40;
  1598. uint32_t pkts_41_60;
  1599. uint32_t pkts_61_80;
  1600. uint32_t pkts_81_100;
  1601. uint32_t pkts_101_200;
  1602. uint32_t pkts_201_plus;
  1603. };
  1604. /* Rx ring descriptors reaped per interrupt */
  1605. struct cdp_hist_rx_ind {
  1606. uint32_t pkts_1;
  1607. uint32_t pkts_2_20;
  1608. uint32_t pkts_21_40;
  1609. uint32_t pkts_41_60;
  1610. uint32_t pkts_61_80;
  1611. uint32_t pkts_81_100;
  1612. uint32_t pkts_101_200;
  1613. uint32_t pkts_201_plus;
  1614. };
  1615. struct cdp_htt_tlv_hdr {
  1616. /* BIT [11 : 0] :- tag
  1617. * BIT [23 : 12] :- length
  1618. * BIT [31 : 24] :- reserved
  1619. */
  1620. uint32_t tag__length;
  1621. };
  1622. #define HTT_STATS_SUBTYPE_MAX 16
  1623. struct cdp_htt_rx_pdev_fw_stats_tlv {
  1624. struct cdp_htt_tlv_hdr tlv_hdr;
  1625. /* BIT [ 7 : 0] :- mac_id
  1626. * BIT [31 : 8] :- reserved
  1627. */
  1628. uint32_t mac_id__word;
  1629. /* Num PPDU status processed from HW */
  1630. uint32_t ppdu_recvd;
  1631. /* Num MPDU across PPDUs with FCS ok */
  1632. uint32_t mpdu_cnt_fcs_ok;
  1633. /* Num MPDU across PPDUs with FCS err */
  1634. uint32_t mpdu_cnt_fcs_err;
  1635. /* Num MSDU across PPDUs */
  1636. uint32_t tcp_msdu_cnt;
  1637. /* Num MSDU across PPDUs */
  1638. uint32_t tcp_ack_msdu_cnt;
  1639. /* Num MSDU across PPDUs */
  1640. uint32_t udp_msdu_cnt;
  1641. /* Num MSDU across PPDUs */
  1642. uint32_t other_msdu_cnt;
  1643. /* Num MPDU on FW ring indicated */
  1644. uint32_t fw_ring_mpdu_ind;
  1645. /* Num MGMT MPDU given to protocol */
  1646. uint32_t fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  1647. /* Num ctrl MPDU given to protocol */
  1648. uint32_t fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
  1649. /* Num mcast data packet received */
  1650. uint32_t fw_ring_mcast_data_msdu;
  1651. /* Num broadcast data packet received */
  1652. uint32_t fw_ring_bcast_data_msdu;
  1653. /* Num unicat data packet received */
  1654. uint32_t fw_ring_ucast_data_msdu;
  1655. /* Num null data packet received */
  1656. uint32_t fw_ring_null_data_msdu;
  1657. /* Num MPDU on FW ring dropped */
  1658. uint32_t fw_ring_mpdu_drop;
  1659. /* Num buf indication to offload */
  1660. uint32_t ofld_local_data_ind_cnt;
  1661. /* Num buf recycle from offload */
  1662. uint32_t ofld_local_data_buf_recycle_cnt;
  1663. /* Num buf indication to data_rx */
  1664. uint32_t drx_local_data_ind_cnt;
  1665. /* Num buf recycle from data_rx */
  1666. uint32_t drx_local_data_buf_recycle_cnt;
  1667. /* Num buf indication to protocol */
  1668. uint32_t local_nondata_ind_cnt;
  1669. /* Num buf recycle from protocol */
  1670. uint32_t local_nondata_buf_recycle_cnt;
  1671. /* Num buf fed */
  1672. uint32_t fw_status_buf_ring_refill_cnt;
  1673. /* Num ring empty encountered */
  1674. uint32_t fw_status_buf_ring_empty_cnt;
  1675. /* Num buf fed */
  1676. uint32_t fw_pkt_buf_ring_refill_cnt;
  1677. /* Num ring empty encountered */
  1678. uint32_t fw_pkt_buf_ring_empty_cnt;
  1679. /* Num buf fed */
  1680. uint32_t fw_link_buf_ring_refill_cnt;
  1681. /* Num ring empty encountered */
  1682. uint32_t fw_link_buf_ring_empty_cnt;
  1683. /* Num buf fed */
  1684. uint32_t host_pkt_buf_ring_refill_cnt;
  1685. /* Num ring empty encountered */
  1686. uint32_t host_pkt_buf_ring_empty_cnt;
  1687. /* Num buf fed */
  1688. uint32_t mon_pkt_buf_ring_refill_cnt;
  1689. /* Num ring empty encountered */
  1690. uint32_t mon_pkt_buf_ring_empty_cnt;
  1691. /* Num buf fed */
  1692. uint32_t mon_status_buf_ring_refill_cnt;
  1693. /* Num ring empty encountered */
  1694. uint32_t mon_status_buf_ring_empty_cnt;
  1695. /* Num buf fed */
  1696. uint32_t mon_desc_buf_ring_refill_cnt;
  1697. /* Num ring empty encountered */
  1698. uint32_t mon_desc_buf_ring_empty_cnt;
  1699. /* Num buf fed */
  1700. uint32_t mon_dest_ring_update_cnt;
  1701. /* Num ring full encountered */
  1702. uint32_t mon_dest_ring_full_cnt;
  1703. /* Num rx suspend is attempted */
  1704. uint32_t rx_suspend_cnt;
  1705. /* Num rx suspend failed */
  1706. uint32_t rx_suspend_fail_cnt;
  1707. /* Num rx resume attempted */
  1708. uint32_t rx_resume_cnt;
  1709. /* Num rx resume failed */
  1710. uint32_t rx_resume_fail_cnt;
  1711. /* Num rx ring switch */
  1712. uint32_t rx_ring_switch_cnt;
  1713. /* Num rx ring restore */
  1714. uint32_t rx_ring_restore_cnt;
  1715. /* Num rx flush issued */
  1716. uint32_t rx_flush_cnt;
  1717. };
  1718. /* == TX PDEV STATS == */
  1719. struct cdp_htt_tx_pdev_stats_cmn_tlv {
  1720. struct cdp_htt_tlv_hdr tlv_hdr;
  1721. /* BIT [ 7 : 0] :- mac_id
  1722. * BIT [31 : 8] :- reserved
  1723. */
  1724. uint32_t mac_id__word;
  1725. /* Num queued to HW */
  1726. uint32_t hw_queued;
  1727. /* Num PPDU reaped from HW */
  1728. uint32_t hw_reaped;
  1729. /* Num underruns */
  1730. uint32_t underrun;
  1731. /* Num HW Paused counter. */
  1732. uint32_t hw_paused;
  1733. /* Num HW flush counter. */
  1734. uint32_t hw_flush;
  1735. /* Num HW filtered counter. */
  1736. uint32_t hw_filt;
  1737. /* Num PPDUs cleaned up in TX abort */
  1738. uint32_t tx_abort;
  1739. /* Num MPDUs requed by SW */
  1740. uint32_t mpdu_requed;
  1741. /* excessive retries */
  1742. uint32_t tx_xretry;
  1743. /* Last used data hw rate code */
  1744. uint32_t data_rc;
  1745. /* frames dropped due to excessive sw retries */
  1746. uint32_t mpdu_dropped_xretry;
  1747. /* illegal rate phy errors */
  1748. uint32_t illgl_rate_phy_err;
  1749. /* wal pdev continuous xretry */
  1750. uint32_t cont_xretry;
  1751. /* wal pdev continuous xretry */
  1752. uint32_t tx_timeout;
  1753. /* wal pdev resets */
  1754. uint32_t pdev_resets;
  1755. /* PhY/BB underrun */
  1756. uint32_t phy_underrun;
  1757. /* MPDU is more than txop limit */
  1758. uint32_t txop_ovf;
  1759. /* Number of Sequences posted */
  1760. uint32_t seq_posted;
  1761. /* Number of Sequences failed queueing */
  1762. uint32_t seq_failed_queueing;
  1763. /* Number of Sequences completed */
  1764. uint32_t seq_completed;
  1765. /* Number of Sequences restarted */
  1766. uint32_t seq_restarted;
  1767. /* Number of MU Sequences posted */
  1768. uint32_t mu_seq_posted;
  1769. /* Number of time HW ring is paused between seq switch within ISR */
  1770. uint32_t seq_switch_hw_paused;
  1771. /* Number of times seq continuation in DSR */
  1772. uint32_t next_seq_posted_dsr;
  1773. /* Number of times seq continuation in ISR */
  1774. uint32_t seq_posted_isr;
  1775. /* Number of seq_ctrl cached. */
  1776. uint32_t seq_ctrl_cached;
  1777. /* Number of MPDUs successfully transmitted */
  1778. uint32_t mpdu_count_tqm;
  1779. /* Number of MSDUs successfully transmitted */
  1780. uint32_t msdu_count_tqm;
  1781. /* Number of MPDUs dropped */
  1782. uint32_t mpdu_removed_tqm;
  1783. /* Number of MSDUs dropped */
  1784. uint32_t msdu_removed_tqm;
  1785. /* Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */
  1786. uint32_t mpdus_sw_flush;
  1787. /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
  1788. uint32_t mpdus_hw_filter;
  1789. /* Num MPDUs truncated by PDG (TXOP, TBTT, PPDU_duration based on rate, dyn_bw) */
  1790. uint32_t mpdus_truncated;
  1791. /* Num MPDUs that was tried but didn't receive ACK or BA */
  1792. uint32_t mpdus_ack_failed;
  1793. /* Num MPDUs that was dropped due to expiry (MSDU TTL). */
  1794. uint32_t mpdus_expired;
  1795. /* Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */
  1796. uint32_t mpdus_seq_hw_retry;
  1797. /* Num of TQM acked cmds processed */
  1798. uint32_t ack_tlv_proc;
  1799. /* coex_abort_mpdu_cnt valid. */
  1800. uint32_t coex_abort_mpdu_cnt_valid;
  1801. /* coex_abort_mpdu_cnt from TX FES stats. */
  1802. uint32_t coex_abort_mpdu_cnt;
  1803. /* Number of total PPDUs(DATA, MGMT, excludes selfgen) tried over the air (OTA) */
  1804. uint32_t num_total_ppdus_tried_ota;
  1805. /* Number of data PPDUs tried over the air (OTA) */
  1806. uint32_t num_data_ppdus_tried_ota;
  1807. /* Num Local control/mgmt frames (MSDUs) queued */
  1808. uint32_t local_ctrl_mgmt_enqued;
  1809. /* local_ctrl_mgmt_freed:
  1810. * Num Local control/mgmt frames (MSDUs) done
  1811. * It includes all local ctrl/mgmt completions
  1812. * (acked, no ack, flush, TTL, etc)
  1813. */
  1814. uint32_t local_ctrl_mgmt_freed;
  1815. /* Num Local data frames (MSDUs) queued */
  1816. uint32_t local_data_enqued;
  1817. /* local_data_freed:
  1818. * Num Local data frames (MSDUs) done
  1819. * It includes all local data completions
  1820. * (acked, no ack, flush, TTL, etc)
  1821. */
  1822. uint32_t local_data_freed;
  1823. /* Num MPDUs tried by SW */
  1824. uint32_t mpdu_tried;
  1825. /* Num of waiting seq posted in isr completion handler */
  1826. uint32_t isr_wait_seq_posted;
  1827. uint32_t tx_active_dur_us_low;
  1828. uint32_t tx_active_dur_us_high;
  1829. };
  1830. struct cdp_htt_tx_pdev_stats_urrn_tlv_v {
  1831. struct cdp_htt_tlv_hdr tlv_hdr;
  1832. uint32_t urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */
  1833. };
  1834. /* NOTE: Variable length TLV, use length spec to infer array size */
  1835. struct cdp_htt_tx_pdev_stats_flush_tlv_v {
  1836. struct cdp_htt_tlv_hdr tlv_hdr;
  1837. uint32_t flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
  1838. };
  1839. /* NOTE: Variable length TLV, use length spec to infer array size */
  1840. struct cdp_htt_tx_pdev_stats_sifs_tlv_v {
  1841. struct cdp_htt_tlv_hdr tlv_hdr;
  1842. uint32_t sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */
  1843. };
  1844. /* NOTE: Variable length TLV, use length spec to infer array size */
  1845. struct cdp_htt_tx_pdev_stats_phy_err_tlv_v {
  1846. struct cdp_htt_tlv_hdr tlv_hdr;
  1847. uint32_t phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */
  1848. };
  1849. /* == RX PDEV/SOC STATS == */
  1850. /* HTT_STATS_RX_SOC_FW_STATS_TAG */
  1851. struct cdp_htt_rx_soc_fw_stats_tlv {
  1852. struct cdp_htt_tlv_hdr tlv_hdr;
  1853. /* Num Packets received on REO FW ring */
  1854. uint32_t fw_reo_ring_data_msdu;
  1855. /* Num bc/mc packets indicated from fw to host */
  1856. uint32_t fw_to_host_data_msdu_bcmc;
  1857. /* Num unicast packets indicated from fw to host */
  1858. uint32_t fw_to_host_data_msdu_uc;
  1859. /* Num remote buf recycle from offload */
  1860. uint32_t ofld_remote_data_buf_recycle_cnt;
  1861. /* Num remote free buf given to offload */
  1862. uint32_t ofld_remote_free_buf_indication_cnt;
  1863. };
  1864. struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v {
  1865. struct cdp_htt_tlv_hdr tlv_hdr;
  1866. /* Num total buf refilled from refill ring */
  1867. uint32_t refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  1868. };
  1869. struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v {
  1870. struct cdp_htt_tlv_hdr tlv_hdr;
  1871. /* Num error MPDU for each RxDMA error type */
  1872. uint32_t fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
  1873. };
  1874. struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v {
  1875. struct cdp_htt_tlv_hdr tlv_hdr;
  1876. /* Num MPDU dropped */
  1877. uint32_t fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
  1878. };
  1879. #define HTT_STATS_PHY_ERR_MAX 43
  1880. struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv {
  1881. struct cdp_htt_tlv_hdr tlv_hdr;
  1882. /* BIT [ 7 : 0] :- mac_id
  1883. * BIT [31 : 8] :- reserved
  1884. */
  1885. uint32_t mac_id__word;
  1886. /* Num of phy err */
  1887. uint32_t total_phy_err_cnt;
  1888. /* Counts of different types of phy errs
  1889. * The mapping of PHY error types to phy_err array elements is HW dependent.
  1890. * The only currently-supported mapping is shown below:
  1891. *
  1892. * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
  1893. * 1 phyrx_err_synth_off
  1894. * 2 phyrx_err_ofdma_timing
  1895. * 3 phyrx_err_ofdma_signal_parity
  1896. * 4 phyrx_err_ofdma_rate_illegal
  1897. * 5 phyrx_err_ofdma_length_illegal
  1898. * 6 phyrx_err_ofdma_restart
  1899. * 7 phyrx_err_ofdma_service
  1900. * 8 phyrx_err_ppdu_ofdma_power_drop
  1901. * 9 phyrx_err_cck_blokker
  1902. * 10 phyrx_err_cck_timing
  1903. * 11 phyrx_err_cck_header_crc
  1904. * 12 phyrx_err_cck_rate_illegal
  1905. * 13 phyrx_err_cck_length_illegal
  1906. * 14 phyrx_err_cck_restart
  1907. * 15 phyrx_err_cck_service
  1908. * 16 phyrx_err_cck_power_drop
  1909. * 17 phyrx_err_ht_crc_err
  1910. * 18 phyrx_err_ht_length_illegal
  1911. * 19 phyrx_err_ht_rate_illegal
  1912. * 20 phyrx_err_ht_zlf
  1913. * 21 phyrx_err_false_radar_ext
  1914. * 22 phyrx_err_green_field
  1915. * 23 phyrx_err_bw_gt_dyn_bw
  1916. * 24 phyrx_err_leg_ht_mismatch
  1917. * 25 phyrx_err_vht_crc_error
  1918. * 26 phyrx_err_vht_siga_unsupported
  1919. * 27 phyrx_err_vht_lsig_len_invalid
  1920. * 28 phyrx_err_vht_ndp_or_zlf
  1921. * 29 phyrx_err_vht_nsym_lt_zero
  1922. * 30 phyrx_err_vht_rx_extra_symbol_mismatch
  1923. * 31 phyrx_err_vht_rx_skip_group_id0
  1924. * 32 phyrx_err_vht_rx_skip_group_id1to62
  1925. * 33 phyrx_err_vht_rx_skip_group_id63
  1926. * 34 phyrx_err_ofdm_ldpc_decoder_disabled
  1927. * 35 phyrx_err_defer_nap
  1928. * 36 phyrx_err_fdomain_timeout
  1929. * 37 phyrx_err_lsig_rel_check
  1930. * 38 phyrx_err_bt_collision
  1931. * 39 phyrx_err_unsupported_mu_feedback
  1932. * 40 phyrx_err_ppdu_tx_interrupt_rx
  1933. * 41 phyrx_err_unsupported_cbf
  1934. * 42 phyrx_err_other
  1935. */
  1936. uint32_t phy_err[HTT_STATS_PHY_ERR_MAX];
  1937. };
  1938. struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v {
  1939. struct cdp_htt_tlv_hdr tlv_hdr;
  1940. /* Num ring empty encountered */
  1941. uint32_t refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  1942. };
  1943. struct cdp_htt_tx_pdev_stats {
  1944. struct cdp_htt_tx_pdev_stats_cmn_tlv cmn_tlv;
  1945. struct cdp_htt_tx_pdev_stats_urrn_tlv_v underrun_tlv;
  1946. struct cdp_htt_tx_pdev_stats_sifs_tlv_v sifs_tlv;
  1947. struct cdp_htt_tx_pdev_stats_flush_tlv_v flush_tlv;
  1948. struct cdp_htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv;
  1949. };
  1950. struct cdp_htt_rx_soc_stats_t {
  1951. struct cdp_htt_rx_soc_fw_stats_tlv fw_tlv;
  1952. struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv;
  1953. struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv;
  1954. };
  1955. struct cdp_htt_rx_pdev_stats {
  1956. struct cdp_htt_rx_soc_stats_t soc_stats;
  1957. struct cdp_htt_rx_pdev_fw_stats_tlv fw_stats_tlv;
  1958. struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv;
  1959. struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop;
  1960. struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
  1961. };
  1962. #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
  1963. /* Since protocol type enumeration value is passed as CCE metadata
  1964. * to firmware, add a constant offset before passing it to firmware
  1965. */
  1966. #define RX_PROTOCOL_TAG_START_OFFSET 128
  1967. /* This should align with packet type enumerations in ieee80211_ioctl.h
  1968. * and wmi_unified_param.h files
  1969. */
  1970. #define RX_PROTOCOL_TAG_MAX 24
  1971. /* Macro that should be used to dump the statistics counter for all
  1972. * protocol types
  1973. */
  1974. #define RX_PROTOCOL_TAG_ALL 0xff
  1975. #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
  1976. #ifdef WLAN_FEATURE_11BE
  1977. #define OFDMA_NUM_RU_SIZE 16
  1978. #else
  1979. #define OFDMA_NUM_RU_SIZE 7
  1980. #endif
  1981. #define OFDMA_NUM_USERS 37
  1982. #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
  1983. /*
  1984. * mac_freeze_capture_reason - capture reason counters
  1985. * @FREEZE_REASON_TM: When m_directed_ftm is enabled, this CFR data is
  1986. * captured for a Timing Measurement (TM) frame.
  1987. * @FREEZE_REASON_FTM: When m_directed_ftm is enabled, this CFR data is
  1988. * captured for a Fine Timing Measurement (FTM) frame.
  1989. * @FREEZE_REASON_ACK_RESP_TO_TM_FTM: When m_all_ftm_ack is enabled, this CFR
  1990. * data is captured for an ACK received for the FTM/TM frame sent to a station.
  1991. * @FREEZE_REASON_TA_RA_TYPE_FILTER: When m_ta_ra_filter is enabled, this CFR
  1992. * data is captured for a PPDU received,since the CFR TA_RA filter is met.
  1993. * @FREEZE_REASON_NDPA_NDP: When m_ndpa_ndp_directed(or)m_ndpa_ndp_all is
  1994. * enabled, this CFR data is captured for an NDP frame received.
  1995. * @FREEZE_REASON_ALL_PACKET: When m_all_packet is enabled, this CFR data is
  1996. * captured for an incoming PPDU.
  1997. */
  1998. enum mac_freeze_capture_reason {
  1999. FREEZE_REASON_TM = 0,
  2000. FREEZE_REASON_FTM,
  2001. FREEZE_REASON_ACK_RESP_TO_TM_FTM,
  2002. FREEZE_REASON_TA_RA_TYPE_FILTER,
  2003. FREEZE_REASON_NDPA_NDP,
  2004. FREEZE_REASON_ALL_PACKET,
  2005. FREEZE_REASON_MAX,
  2006. };
  2007. /*
  2008. * chan_capture_status: capture status counters
  2009. * @CAPTURE_IDLE: CFR data is not captured, since VCSR setting for CFR/RCC is
  2010. * not enabled.
  2011. * @CAPTURE_BUSY: CFR data is not available, since previous channel
  2012. * upload is in progress
  2013. * @CAPTURE_ACTIVE: CFR data is captured in HW registers
  2014. * @CAPTURE_NO_BUFFER: CFR data is not captured, since no buffer is available
  2015. * in IPC ring to DMA CFR data
  2016. */
  2017. enum chan_capture_status {
  2018. CAPTURE_IDLE = 0,
  2019. CAPTURE_BUSY,
  2020. CAPTURE_ACTIVE,
  2021. CAPTURE_NO_BUFFER,
  2022. CAPTURE_MAX,
  2023. };
  2024. /* struct cdp_cfr_rcc_stats - CFR RCC debug statistics
  2025. * @bb_captured_channel_cnt: No. of PPDUs for which MAC sent Freeze TLV to PHY
  2026. * @bb_captured_timeout_cnt: No. of PPDUs for which CFR filter criteria matched
  2027. * but MAC did not send Freeze TLV to PHY as time exceeded freeze tlv delay
  2028. * count threshold
  2029. * @rx_loc_info_valid_cnt: No. of PPDUs for which PHY could find a valid buffer
  2030. * in ucode IPC ring
  2031. * @chan_capture_status[]: capture status counters
  2032. * [0] - No. of PPDUs with capture status CAPTURE_IDLE
  2033. * [1] - No. of PPDUs with capture status CAPTURE_BUSY
  2034. * [2] - No. of PPDUs with capture status CAPTURE_ACTIVE
  2035. * [3] - No. of PPDUs with capture status CAPTURE_NO_BUFFER
  2036. * @reason_cnt[]: capture reason counters
  2037. * [0] - No. PPDUs filtered due to freeze_reason_TM
  2038. * [1] - No. PPDUs filtered due to freeze_reason_FTM
  2039. * [2] - No. PPDUs filtered due to freeze_reason_ACK_resp_to_TM_FTM
  2040. * [3] - No. PPDUs filtered due to freeze_reason_TA_RA_TYPE_FILTER
  2041. * [4] - No. PPDUs filtered due to freeze_reason_NDPA_NDP
  2042. * [5] - No. PPDUs filtered due to freeze_reason_ALL_PACKET
  2043. */
  2044. struct cdp_cfr_rcc_stats {
  2045. uint64_t bb_captured_channel_cnt;
  2046. uint64_t bb_captured_timeout_cnt;
  2047. uint64_t rx_loc_info_valid_cnt;
  2048. uint64_t chan_capture_status[CAPTURE_MAX];
  2049. uint64_t reason_cnt[FREEZE_REASON_MAX];
  2050. };
  2051. #else
  2052. struct cdp_cfr_rcc_stats {
  2053. };
  2054. #endif
  2055. /* struct cdp_soc_stats - soc stats
  2056. * @tx.egress: Total packets transmitted
  2057. * @rx.ingress: Total rx packets count
  2058. * @rx.err_ring_pkts: Total Packets in Rx Error ring
  2059. * @rx.rx_frags: No of Fragments
  2060. * @rx.reo_reinject: No of reinjected packets
  2061. * @rx.bar_frame: Number of bar frames received
  2062. * @rx.err.rejected: RX msdu rejected count on delivery to vdev stack_fn
  2063. * @rx.err.raw_frm_drop: RX raw frame dropped count
  2064. */
  2065. struct cdp_soc_stats {
  2066. struct {
  2067. struct cdp_pkt_info egress;
  2068. } tx;
  2069. struct {
  2070. struct cdp_pkt_info ingress;
  2071. uint32_t err_ring_pkts;
  2072. uint32_t rx_frags;
  2073. uint32_t reo_reinject;
  2074. uint32_t bar_frame;
  2075. struct {
  2076. uint32_t rx_rejected;
  2077. uint32_t rx_raw_frm_drop;
  2078. } err;
  2079. } rx;
  2080. };
  2081. /* struct cdp_pdev_stats - pdev stats
  2082. * @msdu_not_done: packets dropped because msdu done bit not set
  2083. * @mec:Multicast Echo check
  2084. * @mesh_filter: Mesh Filtered packets
  2085. * @mon_rx_drop: packets dropped on monitor vap
  2086. * @wifi_parse: rxdma errors due to wifi parse error
  2087. * @mon_radiotap_update_err: not enough space to update radiotap
  2088. * @pkts: total packets replenished
  2089. * @rxdma_err: rxdma errors for replenished
  2090. * @nbuf_alloc_fail: nbuf alloc failed
  2091. * @frag_alloc_fail: frag alloc failed
  2092. * @map_err: Mapping failure
  2093. * @x86_fail: x86 failures
  2094. * @low_thresh_intrs: low threshold interrupts
  2095. * @rx_raw_pkts: Rx Raw Packets
  2096. * @mesh_mem_alloc: Mesh Rx Stats Alloc fail
  2097. * @tso_desc_cnt: TSO descriptors
  2098. * @sg_desc_cnt: SG Descriptors
  2099. * @vlan_tag_stp_cnt: Vlan tagged Stp packets in wifi parse error
  2100. * @desc_alloc_fail: desc alloc failed errors
  2101. * @ip_csum_err: ip checksum errors
  2102. * @tcp_udp_csum_err: tcp/udp checksum errors
  2103. * @buf_freelist: buffers added back in freelist
  2104. * @tx_i: Tx Ingress stats
  2105. * @rx_i: Rx Ingress stats
  2106. * @tx:CDP Tx Stats
  2107. * @rx: CDP Rx Stats
  2108. * @tx_comp_histogram: Number of Tx completions per interrupt
  2109. * @rx_ind_histogram: Number of Rx ring descriptors reaped per interrupt
  2110. * @ppdu_stats_counter: ppdu stats counter
  2111. * @cdp_delayed_ba_not_recev: counter for delayed ba not received
  2112. * @htt_tx_pdev_stats: htt pdev stats for tx
  2113. * @htt_rx_pdev_stats: htt pdev stats for rx
  2114. * @data_rx_ru_size: UL ofdma data ru size counter array
  2115. * @nondata_rx_ru_size: UL ofdma non data ru size counter array
  2116. * @data_rx_ppdu: data rx ppdu counter
  2117. * @data_user: data user counter array
  2118. * @tx_ppdu_proc: stats counter for tx ppdu processed
  2119. * @ack_ba_comes_twice: stats counter for ack_ba_comes twice
  2120. * @ppdu_drop: stats counter for ppdu_desc drop once threshold reached
  2121. * @ppdu_wrap_drop: stats counter for ppdu desc drop on wrap around
  2122. * @peer_unauth_rx_pkt_drop: stats counter for drops due to unauthorized peer
  2123. */
  2124. struct cdp_pdev_stats {
  2125. struct {
  2126. uint32_t msdu_not_done;
  2127. uint32_t mec;
  2128. uint32_t mesh_filter;
  2129. uint32_t wifi_parse;
  2130. /* Monitor mode related */
  2131. uint32_t mon_rx_drop;
  2132. uint32_t mon_radiotap_update_err;
  2133. } dropped;
  2134. struct {
  2135. struct cdp_pkt_info pkts;
  2136. uint32_t rxdma_err;
  2137. uint32_t nbuf_alloc_fail;
  2138. uint32_t frag_alloc_fail;
  2139. uint32_t map_err;
  2140. uint32_t x86_fail;
  2141. uint32_t low_thresh_intrs;
  2142. } replenish;
  2143. uint32_t rx_raw_pkts;
  2144. uint32_t mesh_mem_alloc;
  2145. uint32_t tso_desc_cnt;
  2146. uint32_t sg_desc_cnt;
  2147. uint32_t vlan_tag_stp_cnt;
  2148. /* Rx errors */
  2149. struct {
  2150. uint32_t desc_alloc_fail;
  2151. uint32_t ip_csum_err;
  2152. uint32_t tcp_udp_csum_err;
  2153. uint32_t rxdma_error;
  2154. uint32_t reo_error;
  2155. } err;
  2156. uint32_t buf_freelist;
  2157. struct cdp_tx_ingress_stats tx_i;
  2158. struct cdp_rx_ingress_stats rx_i;
  2159. struct cdp_tx_stats tx;
  2160. struct cdp_rx_stats rx;
  2161. struct cdp_hist_tx_comp tx_comp_histogram;
  2162. struct cdp_hist_rx_ind rx_ind_histogram;
  2163. uint64_t ppdu_stats_counter[CDP_PPDU_STATS_MAX_TAG];
  2164. uint32_t cdp_delayed_ba_not_recev;
  2165. struct cdp_htt_tx_pdev_stats htt_tx_pdev_stats;
  2166. struct cdp_htt_rx_pdev_stats htt_rx_pdev_stats;
  2167. /* Received wdi messages from fw */
  2168. uint32_t wdi_event[CDP_WDI_NUM_EVENTS];
  2169. struct cdp_tid_stats tid_stats;
  2170. /* numbers of data/nondata per RU sizes */
  2171. struct {
  2172. uint32_t data_rx_ru_size[OFDMA_NUM_RU_SIZE];
  2173. uint32_t nondata_rx_ru_size[OFDMA_NUM_RU_SIZE];
  2174. uint32_t data_rx_ppdu;
  2175. uint32_t data_users[OFDMA_NUM_USERS];
  2176. } ul_ofdma;
  2177. struct cdp_tso_stats tso_stats;
  2178. struct cdp_cfr_rcc_stats rcc;
  2179. uint64_t tx_ppdu_proc;
  2180. uint64_t ack_ba_comes_twice;
  2181. uint64_t ppdu_drop;
  2182. uint64_t ppdu_wrap_drop;
  2183. struct {
  2184. uint64_t num_bufs_consumed;
  2185. uint64_t num_pool_bufs_replenish;
  2186. uint64_t num_bufs_alloc_success;
  2187. } rx_buffer_pool;
  2188. struct {
  2189. uint64_t num_bufs_refilled;
  2190. uint64_t num_bufs_allocated;
  2191. } rx_refill_buff_pool;
  2192. uint32_t peer_unauth_rx_pkt_drop;
  2193. };
  2194. /* struct cdp_peer_hmwds_ast_add_status - hmwds peer ast add status
  2195. * @vdev_id: vdev id
  2196. * @status: ast add status
  2197. * @peer_mac: peer mac address
  2198. * @ast_mac: ast node mac address
  2199. */
  2200. struct cdp_peer_hmwds_ast_add_status {
  2201. uint32_t vdev_id;
  2202. uint32_t status;
  2203. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  2204. uint8_t ast_mac[QDF_MAC_ADDR_SIZE];
  2205. };
  2206. /*
  2207. * Enumeration of cdp soc parameters
  2208. * @DP_SOC_PARAM_EAPOL_OVER_CONTROL_PORT: For sending EAPOL's over control port
  2209. */
  2210. enum cdp_soc_param_t {
  2211. DP_SOC_PARAM_MSDU_EXCEPTION_DESC,
  2212. DP_SOC_PARAM_CMEM_FSE_SUPPORT,
  2213. DP_SOC_PARAM_MAX_AST_AGEOUT,
  2214. DP_SOC_PARAM_EAPOL_OVER_CONTROL_PORT,
  2215. DP_SOC_PARAM_MAX,
  2216. };
  2217. #ifdef QCA_ENH_V3_STATS_SUPPORT
  2218. /*
  2219. * Enumeration of PDEV Configuration parameter
  2220. */
  2221. enum _dp_param_t {
  2222. DP_PARAM_MSDU_TTL,
  2223. DP_PARAM_TOTAL_Q_SIZE_RANGE0,
  2224. DP_PARAM_TOTAL_Q_SIZE_RANGE1,
  2225. DP_PARAM_TOTAL_Q_SIZE_RANGE2,
  2226. DP_PARAM_TOTAL_Q_SIZE_RANGE3,
  2227. DP_PARAM_VIDEO_DELAY_STATS_FC,
  2228. DP_PARAM_QFLUSHINTERVAL,
  2229. DP_PARAM_TOTAL_Q_SIZE,
  2230. DP_PARAM_MIN_THRESHOLD,
  2231. DP_PARAM_MAX_Q_LIMIT,
  2232. DP_PARAM_MIN_Q_LIMIT,
  2233. DP_PARAM_CONG_CTRL_TIMER_INTV,
  2234. DP_PARAM_STATS_TIMER_INTV,
  2235. DP_PARAM_ROTTING_TIMER_INTV,
  2236. DP_PARAM_LATENCY_PROFILE,
  2237. DP_PARAM_HOSTQ_DUMP,
  2238. DP_PARAM_TIDQ_MAP,
  2239. DP_PARAM_VIDEO_STATS_FC,
  2240. DP_PARAM_STATS_FC,
  2241. DP_PARAM_MAX,
  2242. };
  2243. #endif
  2244. /* Bitmasks for stats that can block */
  2245. #define EXT_TXRX_FW_STATS 0x0001
  2246. #endif