cdp_txrx_cmn_struct.h 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836
  1. /*
  2. * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2022 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_cmn_struct.h
  21. * @brief Define the host data path converged API functions
  22. * called by the host control SW and the OS interface module
  23. */
  24. #ifndef _CDP_TXRX_CMN_STRUCT_H_
  25. #define _CDP_TXRX_CMN_STRUCT_H_
  26. /**
  27. * For WIN legacy header compilation
  28. * Temporary add dummy definitions
  29. * should be removed properly WIN legacy code handle
  30. */
  31. #include "htc_api.h"
  32. #include "qdf_types.h"
  33. #include "qdf_nbuf.h"
  34. #include "qdf_atomic.h"
  35. #ifdef DP_MOB_DEFS
  36. #include <cdp_txrx_mob_def.h>
  37. #endif
  38. #include <cdp_txrx_handle.h>
  39. #include <cdp_txrx_stats_struct.h>
  40. #ifdef WLAN_RX_PKT_CAPTURE_ENH
  41. #include "cdp_txrx_extd_struct.h"
  42. #endif
  43. #ifdef WLAN_MAX_CLIENTS_ALLOWED
  44. #define OL_TXRX_NUM_LOCAL_PEER_IDS (WLAN_MAX_CLIENTS_ALLOWED + 1 + 1 + 1)
  45. #endif
  46. #ifndef OL_TXRX_NUM_LOCAL_PEER_IDS
  47. /*
  48. * Each AP will occupy one ID, so it will occupy two IDs for AP-AP mode.
  49. * Clients will be assigned max 32 IDs.
  50. * STA(associated)/P2P DEV(self-PEER) will get one ID.
  51. */
  52. #define OL_TXRX_NUM_LOCAL_PEER_IDS (32 + 1 + 1 + 1)
  53. #endif
  54. #define CDP_BA_256_BIT_MAP_SIZE_DWORDS 8
  55. #define CDP_BA_64_BIT_MAP_SIZE_DWORDS 2
  56. #define CDP_RSSI_CHAIN_LEN 8
  57. #define OL_TXRX_INVALID_PDEV_ID 0xff
  58. #define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff
  59. #define CDP_INVALID_VDEV_ID 0xff
  60. /* Max vdev_stats_id(48) is as per the max vdevs supported by HW */
  61. #define CDP_MAX_VDEV_STATS_ID 0x30
  62. /* Invalid vdev_stats_id */
  63. #define CDP_INVALID_VDEV_STATS_ID 0xFF
  64. /* Options for Dump Statistics */
  65. #define CDP_HDD_STATS 0
  66. #define CDP_TXRX_PATH_STATS 1
  67. #define CDP_TXRX_HIST_STATS 2
  68. #define CDP_TXRX_TSO_STATS 3
  69. #define CDP_HDD_NETIF_OPER_HISTORY 4
  70. #define CDP_DUMP_TX_FLOW_POOL_INFO 5
  71. #define CDP_TXRX_DESC_STATS 6
  72. #define CDP_HIF_STATS 7
  73. #define CDP_LRO_STATS 8
  74. #define CDP_NAPI_STATS 9
  75. #define CDP_WLAN_RX_BUF_DEBUG_STATS 10
  76. #define CDP_RX_RING_STATS 11
  77. #define CDP_DP_NAPI_STATS 12
  78. #define CDP_DP_RX_THREAD_STATS 13
  79. #define CDP_SCHEDULER_STATS 21
  80. #define CDP_TX_QUEUE_STATS 22
  81. #define CDP_BUNDLE_STATS 23
  82. #define CDP_CREDIT_STATS 24
  83. #define CDP_DISCONNECT_STATS 25
  84. #define CDP_DP_RX_FISA_STATS 26
  85. #define CDP_DP_SWLM_STATS 27
  86. #define CDP_DP_TX_HW_LATENCY_STATS 28
  87. #define WME_AC_TO_TID(_ac) ( \
  88. ((_ac) == WME_AC_VO) ? 6 : \
  89. ((_ac) == WME_AC_VI) ? 5 : \
  90. ((_ac) == WME_AC_BK) ? 1 : \
  91. 0)
  92. #define TID_TO_WME_AC(_tid) ( \
  93. (((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \
  94. (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \
  95. (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \
  96. WME_AC_VO)
  97. #define CDP_MU_MAX_USERS 37
  98. #define CDP_MU_MAX_USER_INDEX (CDP_MU_MAX_USERS - 1)
  99. #define CDP_INVALID_PEER 0xffff
  100. #define CDP_INVALID_TID 31
  101. #define CDP_INVALID_TX_ENCAP_TYPE 6
  102. #define CDP_INVALID_SEC_TYPE 12
  103. #define CDP_DATA_TID_MAX 8
  104. #define CDP_DATA_NON_QOS_TID 16
  105. #define CDP_NUM_SA_BW 4
  106. #define CDP_PERCENT_MACRO 100
  107. #define CDP_NUM_KB_IN_MB 1000
  108. /*
  109. * advance rx monitor filter
  110. * */
  111. #define MON_FILTER_PASS 0x0001
  112. #define MON_FILTER_OTHER 0x0002
  113. #define MON_FILTER_ALL 0x0003
  114. #define FILTER_MGMT_ALL 0xFFFF
  115. #define FILTER_MGMT_ASSOC_REQ 0x0001
  116. #define FILTER_MGMT_ASSOC_RES 0x0002
  117. #define FILTER_MGMT_REASSOC_REQ 0x0004
  118. #define FILTER_MGMT_REASSOC_RES 0x0008
  119. #define FILTER_MGMT_PROBE_REQ 0x0010
  120. #define FILTER_MGMT_PROBE_RES 0x0020
  121. #define FILTER_MGMT_TIM_ADVT 0x0040
  122. #define FILTER_MGMT_RESERVED_7 0x0080
  123. #define FILTER_MGMT_BEACON 0x0100
  124. #define FILTER_MGMT_ATIM 0x0200
  125. #define FILTER_MGMT_DISASSOC 0x0400
  126. #define FILTER_MGMT_AUTH 0x0800
  127. #define FILTER_MGMT_DEAUTH 0x1000
  128. #define FILTER_MGMT_ACTION 0x2000
  129. #define FILTER_MGMT_ACT_NO_ACK 0x4000
  130. #define FILTER_MGMT_RESERVED_15 0x8000
  131. #define FILTER_CTRL_ALL 0xFFFF
  132. #define FILTER_CTRL_RESERVED_1 0x0001
  133. #define FILTER_CTRL_RESERVED_2 0x0002
  134. #define FILTER_CTRL_TRIGGER 0x0004
  135. #define FILTER_CTRL_RESERVED_4 0x0008
  136. #define FILTER_CTRL_BF_REP_POLL 0x0010
  137. #define FILTER_CTRL_VHT_NDP 0x0020
  138. #define FILTER_CTRL_FRAME_EXT 0x0040
  139. #define FILTER_CTRL_CTRLWRAP 0x0080
  140. #define FILTER_CTRL_BA_REQ 0x0100
  141. #define FILTER_CTRL_BA 0x0200
  142. #define FILTER_CTRL_PSPOLL 0x0400
  143. #define FILTER_CTRL_RTS 0x0800
  144. #define FILTER_CTRL_CTS 0x1000
  145. #define FILTER_CTRL_ACK 0x2000
  146. #define FILTER_CTRL_CFEND 0x4000
  147. #define FILTER_CTRL_CFEND_CFACK 0x8000
  148. #define FILTER_DATA_ALL 0xFFFF
  149. #define FILTER_DATA_MCAST 0x4000
  150. #define FILTER_DATA_UCAST 0x8000
  151. #define FILTER_DATA_DATA 0x0001
  152. #define FILTER_DATA_NULL 0x0008
  153. /*
  154. * Multiply rate by 2 to avoid float point
  155. * and get rate in units of 500kbps
  156. */
  157. #define CDP_11B_RATE_0MCS (11 * 2)
  158. #define CDP_11B_RATE_1MCS (5.5 * 2)
  159. #define CDP_11B_RATE_2MCS (2 * 2)
  160. #define CDP_11B_RATE_3MCS (1 * 2)
  161. #define CDP_11B_RATE_4MCS (11 * 2)
  162. #define CDP_11B_RATE_5MCS (5.5 * 2)
  163. #define CDP_11B_RATE_6MCS (2 * 2)
  164. #define CDP_11A_RATE_0MCS (48 * 2)
  165. #define CDP_11A_RATE_1MCS (24 * 2)
  166. #define CDP_11A_RATE_2MCS (12 * 2)
  167. #define CDP_11A_RATE_3MCS (6 * 2)
  168. #define CDP_11A_RATE_4MCS (54 * 2)
  169. #define CDP_11A_RATE_5MCS (36 * 2)
  170. #define CDP_11A_RATE_6MCS (18 * 2)
  171. #define CDP_11A_RATE_7MCS (9 * 2)
  172. #define CDP_LEGACY_MCS0 0
  173. #define CDP_LEGACY_MCS1 1
  174. #define CDP_LEGACY_MCS2 2
  175. #define CDP_LEGACY_MCS3 3
  176. #define CDP_LEGACY_MCS4 4
  177. #define CDP_LEGACY_MCS5 5
  178. #define CDP_LEGACY_MCS6 6
  179. #define CDP_LEGACY_MCS7 7
  180. QDF_DECLARE_EWMA(tx_lag, 1024, 8)
  181. struct cdp_stats_cookie;
  182. /*
  183. * DP configuration parameters
  184. */
  185. enum cdp_cfg_param_type {
  186. CDP_CFG_MAX_PEER_ID,
  187. CDP_CFG_CCE_DISABLE,
  188. CDP_CFG_NUM_PARAMS
  189. };
  190. /*
  191. * PPDU TYPE from FW -
  192. * @CDP_PPDU_STATS_PPDU_TYPE_SU: single user type
  193. * @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO: multi user mu-mimo
  194. * @CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA: multi user ofdma
  195. * @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA: multi user mu-mimo ofdma
  196. * @CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG: ul trigger ppdu
  197. * @CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN: burst beacon
  198. * @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP: bsr respond
  199. * @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG: bsr trigger
  200. * @CDP_PPDU_STATS_PPDU_TYPE_UL_RESP: ul response
  201. * @CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN
  202. */
  203. enum CDP_PPDU_STATS_PPDU_TYPE {
  204. CDP_PPDU_STATS_PPDU_TYPE_SU = 0,
  205. CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO = 1,
  206. CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA = 2,
  207. CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA = 4,
  208. CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG = 5,
  209. CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN = 6,
  210. CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP = 7,
  211. CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG = 8,
  212. CDP_PPDU_STATS_PPDU_TYPE_UL_RESP = 9,
  213. CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN = 0x1F,
  214. };
  215. /*
  216. * htt_dbg_stats_type -
  217. * bit positions for each stats type within a stats type bitmask
  218. * The bitmask contains 24 bits.
  219. */
  220. enum htt_cmn_dbg_stats_type {
  221. HTT_DBG_CMN_STATS_WAL_PDEV_TXRX = 0, /* bit 0 -> 0x1 */
  222. HTT_DBG_CMN_STATS_RX_REORDER = 1, /* bit 1 -> 0x2 */
  223. HTT_DBG_CMN_STATS_RX_RATE_INFO = 2, /* bit 2 -> 0x4 */
  224. HTT_DBG_CMN_STATS_TX_PPDU_LOG = 3, /* bit 3 -> 0x8 */
  225. HTT_DBG_CMN_STATS_TX_RATE_INFO = 4, /* bit 4 -> 0x10 */
  226. HTT_DBG_CMN_STATS_TIDQ = 5, /* bit 5 -> 0x20 */
  227. HTT_DBG_CMN_STATS_TXBF_INFO = 6, /* bit 6 -> 0x40 */
  228. HTT_DBG_CMN_STATS_SND_INFO = 7, /* bit 7 -> 0x80 */
  229. HTT_DBG_CMN_STATS_ERROR_INFO = 8, /* bit 8 -> 0x100 */
  230. HTT_DBG_CMN_STATS_TX_SELFGEN_INFO = 9, /* bit 9 -> 0x200 */
  231. HTT_DBG_CMN_STATS_TX_MU_INFO = 10, /* bit 10 -> 0x400 */
  232. HTT_DBG_CMN_STATS_SIFS_RESP_INFO = 11, /* bit 11 -> 0x800 */
  233. HTT_DBG_CMN_STATS_RESET_INFO = 12, /* bit 12 -> 0x1000 */
  234. HTT_DBG_CMN_STATS_MAC_WDOG_INFO = 13, /* bit 13 -> 0x2000 */
  235. HTT_DBG_CMN_STATS_TX_DESC_INFO = 14, /* bit 14 -> 0x4000 */
  236. HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO = 15, /* bit 15 -> 0x8000 */
  237. HTT_DBG_CMN_STATS_TX_PFSCHED_INFO = 16, /* bit 16 -> 0x10000 */
  238. HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO = 17, /* bit 17 -> 0x20000 */
  239. /* bits 18-23 currently reserved */
  240. /* keep this last */
  241. HTT_DBG_CMN_NUM_STATS,
  242. HTT_DBG_CMN_NUM_STATS_INVALID = 31, /* bit 31 -> 0x80000000 */
  243. };
  244. /*
  245. * cdp_host_txrx_stats: Different types of host stats
  246. * @TXRX_HOST_STATS_INVALID: Invalid option
  247. * @TXRX_RX_RATE_STATS: Rx rate info
  248. * @TXRX_TX_RATE_STATS: Tx rate info
  249. * @TXRX_TX_HOST_STATS: Print Tx stats
  250. * @TXRX_RX_HOST_STATS: Print host Rx stats
  251. * @TXRX_CLEAR_STATS: clear all host stats
  252. * @TXRX_SRNG_PTR_STATS: Print SRNG pointer stats
  253. * @TXRX_RX_MON_STATS: Print monitor mode stats
  254. * @TXRX_REO_QUEUE_STATS: Print Per peer REO Queue Stats
  255. * @TXRX_SOC_CFG_PARAMS: Print soc cfg params info
  256. * @TXRX_PDEV_CFG_PARAMS: Print pdev cfg params info
  257. * @TXRX_NAPI_STATS: Print NAPI scheduling statistics
  258. * @TXRX_SOC_INTERRUPT_STATS: Print soc interrupt stats
  259. * @TXRX_HAL_REG_WRITE_STATS: Hal Reg Write stats
  260. */
  261. enum cdp_host_txrx_stats {
  262. TXRX_HOST_STATS_INVALID = -1,
  263. TXRX_CLEAR_STATS = 0,
  264. TXRX_RX_RATE_STATS = 1,
  265. TXRX_TX_RATE_STATS = 2,
  266. TXRX_TX_HOST_STATS = 3,
  267. TXRX_RX_HOST_STATS = 4,
  268. TXRX_AST_STATS = 5,
  269. TXRX_SRNG_PTR_STATS = 6,
  270. TXRX_RX_MON_STATS = 7,
  271. TXRX_REO_QUEUE_STATS = 8,
  272. TXRX_SOC_CFG_PARAMS = 9,
  273. TXRX_PDEV_CFG_PARAMS = 10,
  274. TXRX_NAPI_STATS = 11,
  275. TXRX_SOC_INTERRUPT_STATS = 12,
  276. TXRX_SOC_FSE_STATS = 13,
  277. TXRX_HAL_REG_WRITE_STATS = 14,
  278. TXRX_SOC_REO_HW_DESC_DUMP = 15,
  279. TXRX_SOC_WBM_IDLE_HPTP_DUMP = 16,
  280. TXRX_HOST_STATS_MAX,
  281. };
  282. /*
  283. * cdp_ppdu_ftype: PPDU Frame Type
  284. * @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame
  285. * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames
  286. * @CDP_PPDU_FTYPE_BAR: SU or MU BAR frames
  287. */
  288. enum cdp_ppdu_ftype {
  289. CDP_PPDU_FTYPE_CTRL,
  290. CDP_PPDU_FTYPE_DATA,
  291. CDP_PPDU_FTYPE_BAR,
  292. CDP_PPDU_FTYPE_MAX
  293. };
  294. /**
  295. * @brief General specification of the tx frame contents
  296. *
  297. * @details
  298. * for efficiency, the HTT packet type values correspond
  299. * to the bit positions of the WAL packet type values, so the
  300. * translation is a simple shift operation.
  301. */
  302. enum htt_cmn_pkt_type {
  303. htt_cmn_pkt_type_raw = 0,
  304. htt_cmn_pkt_type_native_wifi = 1,
  305. htt_cmn_pkt_type_ethernet = 2,
  306. htt_cmn_pkt_type_mgmt = 3,
  307. htt_cmn_pkt_type_eth2 = 4,
  308. /* keep this last */
  309. htt_cmn_pkt_num_types
  310. };
  311. /**
  312. * @General description of HTT received packets status
  313. * It is similar to htt_rx_status enum
  314. * but is added as a cdp enum can be freely used in OL_IF layer
  315. */
  316. enum htt_cmn_rx_status {
  317. htt_cmn_rx_status_unknown = 0x0,
  318. htt_cmn_rx_status_ok,
  319. htt_cmn_rx_status_err_fcs,
  320. htt_cmn_rx_status_err_dup,
  321. htt_cmn_rx_status_err_replay,
  322. htt_cmn_rx_status_inv_peer,
  323. htt_cmn_rx_status_ctrl_mgmt_null = 0x08,
  324. htt_cmn_rx_status_tkip_mic_err = 0x09,
  325. htt_cmn_rx_status_decrypt_err = 0x0A,
  326. htt_cmn_rx_status_mpdu_length_err = 0x0B,
  327. htt_cmn_rx_status_err_misc = 0xFF
  328. };
  329. enum cdp_host_reo_dest_ring {
  330. cdp_host_reo_dest_ring_unknown = 0,
  331. cdp_host_reo_dest_ring_1 = 1,
  332. cdp_host_reo_dest_ring_2 = 2,
  333. cdp_host_reo_dest_ring_3 = 3,
  334. cdp_host_reo_dest_ring_4 = 4,
  335. };
  336. enum htt_cmn_t2h_en_stats_type {
  337. /* keep this alwyas first */
  338. HTT_CMN_T2H_EN_STATS_TYPE_START = 0,
  339. /** ppdu_common_stats is the payload */
  340. HTT_CMN_T2H_EN_STATS_TYPE_COMMON = 1,
  341. /** ppdu_sant_stats is the payload */
  342. HTT_CMN_T2H_EN_STATS_TYPE_SANT = 2,
  343. /** ppdu_common_stats_v2 is the payload */
  344. HTT_CMN_T2H_EN_STATS_TYPE_COMMON_V2 = 3,
  345. /* Keep this last */
  346. HTT_CMN_T2H_EN_STATS_TYPE_END = 0x1f,
  347. };
  348. enum htt_cmn_t2h_en_stats_status {
  349. /* Keep this first always */
  350. HTT_CMN_T2H_EN_STATS_STATUS_PARTIAL = 0,
  351. HTT_CMN_T2H_EN_STATS_STATUS_PRESENT = 1,
  352. HTT_CMN_T2H_EN_STATS_STATUS_ERROR = 2,
  353. HTT_CMN_T2H_EN_STATS_STATUS_INVALID = 3,
  354. /* keep this always last */
  355. HTT_CMN_T2H_EN_STATS_STATUS_SERIES_DONE = 7,
  356. };
  357. /**
  358. * enum cdp_peer_type - Peer type
  359. * @CDP_INVALID_PEER_TYPE: invalid peer type
  360. * @CDP_LINK_PEER_TYPE: legacy peer or link peer for MLO connection
  361. * @CDP_MLD_PEER_TYPE: MLD peer for MLO connection
  362. */
  363. enum cdp_peer_type {
  364. CDP_INVALID_PEER_TYPE,
  365. CDP_LINK_PEER_TYPE,
  366. CDP_MLD_PEER_TYPE,
  367. };
  368. /**
  369. * struct cdp_peer_setup_info: MLO connection info for cdp_peer_setup()
  370. * @mld_peer_mac: mld peer mac address pointer
  371. * @is_first_link: set true for first MLO link peer
  372. * @is_primary_link: set true for MLO primary link peer
  373. * @primary_umac_id: primary umac_id
  374. */
  375. struct cdp_peer_setup_info {
  376. uint8_t *mld_peer_mac;
  377. uint8_t is_first_link:1,
  378. is_primary_link:1;
  379. uint8_t primary_umac_id;
  380. };
  381. /**
  382. * struct ol_txrx_peer_state - Peer state information
  383. */
  384. enum ol_txrx_peer_state {
  385. OL_TXRX_PEER_STATE_INVALID,
  386. OL_TXRX_PEER_STATE_DISC, /* initial state */
  387. OL_TXRX_PEER_STATE_CONN, /* authentication in progress */
  388. OL_TXRX_PEER_STATE_AUTH, /* authentication successful */
  389. };
  390. /**
  391. * struct ol_txrx_ast_type - AST entry type information
  392. */
  393. enum cdp_txrx_ast_entry_type {
  394. CDP_TXRX_AST_TYPE_NONE, /* static ast entry for connected peer */
  395. CDP_TXRX_AST_TYPE_STATIC, /* static ast entry for connected peer */
  396. CDP_TXRX_AST_TYPE_SELF, /* static ast entry for self peer (STA mode) */
  397. CDP_TXRX_AST_TYPE_WDS, /* WDS peer ast entry type*/
  398. CDP_TXRX_AST_TYPE_WDS_HM, /* HM WDS entry */
  399. CDP_TXRX_AST_TYPE_STA_BSS, /* BSS entry(STA mode) */
  400. CDP_TXRX_AST_TYPE_DA, /* AST entry based on Destination address */
  401. CDP_TXRX_AST_TYPE_WDS_HM_SEC, /* HM WDS entry for secondary radio */
  402. CDP_TXRX_AST_TYPE_MAX
  403. };
  404. /*
  405. * cdp_ast_free_status: status passed to callback function before freeing ast
  406. * @CDP_TXRX_AST_DELETED - AST is deleted from FW and delete response received
  407. * @CDP_TXRX_AST_DELETE_IN_PROGRESS - AST delete command sent to FW and host
  408. * is waiting for FW response
  409. */
  410. enum cdp_ast_free_status {
  411. CDP_TXRX_AST_DELETED,
  412. CDP_TXRX_AST_DELETE_IN_PROGRESS,
  413. };
  414. /**
  415. * txrx_ast_free_cb - callback registered for ast free
  416. * @ctrl_soc: control path soc context
  417. * @cdp_soc: DP soc context
  418. * @cookie: cookie
  419. * @cdp_ast_free_status: ast free status
  420. */
  421. typedef void (*txrx_ast_free_cb)(struct cdp_ctrl_objmgr_psoc *ctrl_soc,
  422. struct cdp_soc *cdp_soc,
  423. void *cookie,
  424. enum cdp_ast_free_status);
  425. /**
  426. * struct cdp_ast_entry_info - AST entry information
  427. * @peer_mac_addr: mac address of peer on which AST entry is added
  428. * @type: ast entry type
  429. * @vdev_id: vdev_id
  430. * @pdev_id: pdev_id
  431. * @peer_id: peer_id
  432. *
  433. * This structure holds the ast entry information
  434. *
  435. */
  436. struct cdp_ast_entry_info {
  437. uint8_t peer_mac_addr[QDF_MAC_ADDR_SIZE];
  438. enum cdp_txrx_ast_entry_type type;
  439. uint8_t vdev_id;
  440. uint8_t pdev_id;
  441. uint16_t peer_id;
  442. };
  443. #define MIC_SEQ_CTR_SIZE 6
  444. enum cdp_rx_frame_type {
  445. cdp_rx_frame_type_802_11,
  446. cdp_rx_frame_type_802_3,
  447. };
  448. /**
  449. * struct cdp_rx_mic_err_info - rx mic error information
  450. * @frame_type: frame type - 0 - 802.11 frame
  451. * - 1 - 802.3 frame
  452. * @data: 802.11 frame
  453. * @ta_mac_addr: transmitter mac address
  454. * @da_mac_addr: destination mac address
  455. * @tsc: sequence number
  456. * @key_id: Key ID
  457. * @multicast: flag for multicast
  458. * @vdev_id: vdev ID
  459. *
  460. * This structure holds rx mic error information
  461. *
  462. */
  463. struct cdp_rx_mic_err_info {
  464. uint8_t frame_type;
  465. uint8_t *data;
  466. struct qdf_mac_addr ta_mac_addr;
  467. struct qdf_mac_addr da_mac_addr;
  468. uint8_t tsc[MIC_SEQ_CTR_SIZE];
  469. uint8_t key_id;
  470. bool multicast;
  471. uint16_t vdev_id;
  472. };
  473. #ifdef WLAN_SUPPORT_SCS
  474. /* SCS Procedure data structures
  475. */
  476. #define IEEE80211_SCS_MAX_SIZE 10
  477. #define IEEE80211_IPV4_LEN 4
  478. #define IEEE80211_IPV6_LEN 16
  479. struct cdp_tclas_tuple_ipv4 {
  480. u_int8_t version;
  481. uint8_t src_ip[IEEE80211_IPV4_LEN];
  482. uint8_t dst_ip[IEEE80211_IPV4_LEN];
  483. u_int16_t src_port;
  484. u_int16_t dst_port;
  485. u_int8_t dscp;
  486. u_int8_t protocol;
  487. u_int8_t reserved;
  488. } __packed;
  489. struct cdp_tclas_tuple_ipv6 {
  490. u_int8_t version;
  491. u_int8_t src_ip[IEEE80211_IPV6_LEN];
  492. u_int8_t dst_ip[IEEE80211_IPV6_LEN];
  493. u_int16_t src_port;
  494. u_int16_t dst_port;
  495. u_int8_t type4_dscp;
  496. u_int8_t next_header;
  497. u_int8_t flow_label[3];
  498. } __packed;
  499. struct cdp_tclas_tuple_ipsec {
  500. u_int8_t protocol_number;
  501. u_int8_t protocol_instance;
  502. u_int8_t filter_len;
  503. u_int8_t *filter_mask;
  504. u_int8_t *filter_val;
  505. } __packed;
  506. struct cdp_tclas_tuple {
  507. uint8_t type;
  508. uint8_t mask;
  509. union {
  510. union {
  511. struct cdp_tclas_tuple_ipv4 v4;
  512. struct cdp_tclas_tuple_ipv6 v6;
  513. } type4;
  514. struct cdp_tclas_tuple_ipsec ips;
  515. } tclas;
  516. } __packed;
  517. /**
  518. * struct cdp_scs_params - SCS parameters
  519. * obtained from handshake
  520. * @scsid - SCS ID
  521. * @access_priority - User Access Priority
  522. * containing tid value.
  523. * @tclas_elements - Number of TCLAS elements
  524. * @tclas - TCLAS tuple parameters
  525. * @tclas_processing - TCLAS processing value
  526. */
  527. struct cdp_scs_params {
  528. uint8_t scsid;
  529. uint8_t access_priority;
  530. uint8_t tclas_elements;
  531. struct cdp_tclas_tuple tclas[IEEE80211_SCS_MAX_SIZE];
  532. uint8_t tclas_process;
  533. };
  534. #endif
  535. #ifdef WLAN_SUPPORT_MSCS
  536. /**
  537. * struct cdp_mscs_params - MSCS parameters obtained
  538. * from handshake
  539. * @user_pri_bitmap - User priority bitmap
  540. * @user_pri_limit - User priority limit
  541. * @classifier_type - TCLAS Classifier type
  542. * @classifier_mask - TCLAS Classifier mask
  543. */
  544. struct cdp_mscs_params {
  545. uint8_t user_pri_bitmap;
  546. uint8_t user_pri_limit;
  547. uint8_t classifier_type;
  548. uint8_t classifier_mask;
  549. };
  550. #endif
  551. /**
  552. * struct cdp_sec_type - security type information
  553. */
  554. enum cdp_sec_type {
  555. cdp_sec_type_none,
  556. cdp_sec_type_wep128,
  557. cdp_sec_type_wep104,
  558. cdp_sec_type_wep40,
  559. cdp_sec_type_tkip,
  560. cdp_sec_type_tkip_nomic,
  561. cdp_sec_type_aes_ccmp,
  562. cdp_sec_type_wapi,
  563. cdp_sec_type_aes_ccmp_256,
  564. cdp_sec_type_aes_gcmp,
  565. cdp_sec_type_aes_gcmp_256,
  566. /* keep this last! */
  567. cdp_num_sec_types
  568. };
  569. /**
  570. * struct cdp_tx_exception_metadata - Exception path parameters
  571. * @peer_id: Peer id of the peer
  572. * @tid: Transmit Identifier
  573. * @tx_encap_type: Transmit encap type (i.e. Raw, Native Wi-Fi, Ethernet)
  574. * @sec_type: sec_type to be passed to HAL
  575. * @is_tx_sniffer: Indicates if the packet has to be sniffed
  576. * @ppdu_cookie: 16-bit ppdu cookie that has to be replayed back in completions
  577. *
  578. * This structure holds the parameters needed in the exception path of tx
  579. *
  580. */
  581. struct cdp_tx_exception_metadata {
  582. uint16_t peer_id;
  583. uint8_t tid;
  584. uint16_t tx_encap_type;
  585. enum cdp_sec_type sec_type;
  586. uint8_t is_tx_sniffer :1,
  587. is_intrabss_fwd :1;
  588. uint16_t ppdu_cookie;
  589. #ifdef QCA_SUPPORT_WDS_EXTENDED
  590. uint8_t is_wds_extended;
  591. #endif
  592. };
  593. /**
  594. * wlan_op_mode - Virtual device operation mode
  595. * @wlan_op_mode_unknown: Unknown mode
  596. * @wlan_op_mode_ap: AP mode
  597. * @wlan_op_mode_ibss: IBSS mode
  598. * @wlan_op_mode_sta: STA (client) mode
  599. * @wlan_op_mode_monitor: Monitor mode
  600. * @wlan_op_mode_ocb: OCB mode
  601. * @wlan_op_mode_ndi: NDI mode
  602. */
  603. enum wlan_op_mode {
  604. wlan_op_mode_unknown,
  605. wlan_op_mode_ap,
  606. wlan_op_mode_ibss,
  607. wlan_op_mode_sta,
  608. wlan_op_mode_monitor,
  609. wlan_op_mode_ocb,
  610. wlan_op_mode_ndi,
  611. };
  612. /**
  613. * enum wlan_op_subtype - Virtual device subtype
  614. * @wlan_op_subtype_none: Subtype not applicable
  615. * @wlan_op_subtype_p2p_device: P2P device
  616. * @wlan_op_subtye_p2p_cli: P2P Client
  617. * @wlan_op_subtype_p2p_go: P2P GO
  618. *
  619. * This enum lists the subtypes of a particular virtual
  620. * device.
  621. */
  622. enum wlan_op_subtype {
  623. wlan_op_subtype_none,
  624. wlan_op_subtype_p2p_device,
  625. wlan_op_subtype_p2p_cli,
  626. wlan_op_subtype_p2p_go,
  627. };
  628. /**
  629. * struct cdp_vdev_info - Vdev information
  630. * @vdev_mac_addr: mac address of the vdev
  631. * @vdev_id: ID of the vdev
  632. * @vdev_stats_id: Stats ID of the vdev
  633. * @op_mode: Operation mode of the vdev
  634. * @subtype: subtype of the vdev
  635. * @mld_mac_addr: MLD mac addr of the current vdev.
  636. */
  637. struct cdp_vdev_info {
  638. uint8_t *vdev_mac_addr;
  639. uint8_t vdev_id;
  640. uint8_t vdev_stats_id;
  641. enum wlan_op_mode op_mode;
  642. enum wlan_op_subtype subtype;
  643. #ifdef WLAN_FEATURE_11BE_MLO
  644. uint8_t *mld_mac_addr;
  645. #endif
  646. };
  647. typedef struct cdp_soc_t *ol_txrx_soc_handle;
  648. /**
  649. * ol_txrx_vdev_delete_cb - callback registered during vdev
  650. * detach
  651. */
  652. typedef void (*ol_txrx_vdev_delete_cb)(void *context);
  653. /**
  654. * ol_txrx_peer_unmap_sync_cb - callback registered during peer detach sync
  655. */
  656. typedef QDF_STATUS(*ol_txrx_peer_unmap_sync_cb)(uint8_t vdev_id,
  657. uint32_t peer_id_cnt,
  658. uint16_t *peer_id_list);
  659. /**
  660. * ol_txrx_pkt_direction - Packet Direction
  661. * @rx_direction: rx path packet
  662. * @tx_direction: tx path packet
  663. */
  664. enum txrx_direction {
  665. rx_direction = 1,
  666. tx_direction = 0,
  667. };
  668. /**
  669. * cdp_capabilities- DP capabilities
  670. */
  671. enum cdp_capabilities {
  672. CDP_CFG_DP_TSO,
  673. CDP_CFG_DP_LRO,
  674. CDP_CFG_DP_SG,
  675. CDP_CFG_DP_GRO,
  676. CDP_CFG_DP_OL_TX_CSUM,
  677. CDP_CFG_DP_OL_RX_CSUM,
  678. CDP_CFG_DP_RAWMODE,
  679. CDP_CFG_DP_PEER_FLOW_CTRL,
  680. };
  681. /**
  682. * ol_txrx_nbuf_classify - Packet classification object
  683. * @peer_id: unique peer identifier from fw
  684. * @tid: traffic identifier(could be overridden)
  685. * @pkt_tid: traffic identifier(cannot be overridden)
  686. * @pkt_tos: ip header tos value
  687. * @pkt_dscp: ip header dscp value
  688. * @tos: index value in map
  689. * @dscp: DSCP_TID map index
  690. * @is_mcast: multicast pkt check
  691. * @is_eap: eapol pkt check
  692. * @is_arp: arp pkt check
  693. * @is_tcp: tcp pkt check
  694. * @is_dhcp: dhcp pkt check
  695. * @is_igmp: igmp pkt check
  696. * @is_ipv4: ip version 4 pkt check
  697. * @is_ipv6: ip version 6 pkt check
  698. */
  699. struct ol_txrx_nbuf_classify {
  700. uint16_t peer_id;
  701. uint8_t tid;
  702. uint8_t pkt_tid;
  703. uint8_t pkt_tos;
  704. uint8_t pkt_dscp;
  705. uint8_t tos;
  706. uint8_t dscp;
  707. uint8_t is_mcast;
  708. uint8_t is_eap;
  709. uint8_t is_arp;
  710. uint8_t is_tcp;
  711. uint8_t is_dhcp;
  712. uint8_t is_igmp;
  713. uint8_t is_ipv4;
  714. uint8_t is_ipv6;
  715. };
  716. /**
  717. * ol_osif_vdev_handle - paque handle for OS shim virtual device
  718. * object
  719. */
  720. struct ol_osif_vdev_t;
  721. typedef struct ol_osif_vdev_t *ol_osif_vdev_handle;
  722. #ifdef QCA_SUPPORT_WDS_EXTENDED
  723. struct ol_osif_peer_t;
  724. typedef struct ol_osif_peer_t *ol_osif_peer_handle;
  725. #endif
  726. /**
  727. * connectivity_stats_pkt_status - data pkt type
  728. * @PKT_TYPE_REQ: Request packet
  729. * @PKT_TYPE_RSP: Response packet
  730. * @PKT_TYPE_TX_DROPPED: TX packet dropped
  731. * @PKT_TYPE_RX_DROPPED: RX packet dropped
  732. * @PKT_TYPE_RX_DELIVERED: RX packet delivered
  733. * @PKT_TYPE_RX_REFUSED: RX packet refused
  734. * @PKT_TYPE_TX_HOST_FW_SENT: TX packet FW sent
  735. * @PKT_TYPE_TX_ACK_CNT:TC packet acked
  736. * @PKT_TYPE_NONE: Invalid packet
  737. */
  738. enum connectivity_stats_pkt_status {
  739. PKT_TYPE_REQ,
  740. PKT_TYPE_RSP,
  741. PKT_TYPE_TX_DROPPED,
  742. PKT_TYPE_RX_DROPPED,
  743. PKT_TYPE_RX_DELIVERED,
  744. PKT_TYPE_RX_REFUSED,
  745. PKT_TYPE_TX_HOST_FW_SENT,
  746. PKT_TYPE_TX_ACK_CNT,
  747. PKT_TYPE_NONE,
  748. };
  749. /**
  750. * ol_txrx_mgmt_tx_cb - tx management delivery notification
  751. * callback function
  752. */
  753. typedef void
  754. (*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error);
  755. /**
  756. * ol_txrx_data_tx_cb - Function registered with the data path
  757. * that is called when tx frames marked as "no free" are
  758. * done being transmitted
  759. */
  760. typedef void
  761. (*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error);
  762. /**
  763. * ol_txrx_tx_fp - top-level transmit function
  764. * @soc - dp soc handle
  765. * @vdev_id - handle to the virtual device object
  766. * @msdu_list - list of network buffers
  767. */
  768. typedef qdf_nbuf_t (*ol_txrx_tx_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
  769. qdf_nbuf_t msdu_list);
  770. /**
  771. * ol_txrx_tx_exc_fp - top-level transmit function on exception path
  772. * @soc - dp soc handle
  773. * @vdev_id - handle to the virtual device object
  774. * @msdu_list - list of network buffers
  775. * @tx_exc_metadata - structure that holds parameters to exception path
  776. */
  777. typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
  778. qdf_nbuf_t msdu_list,
  779. struct cdp_tx_exception_metadata
  780. *tx_exc_metadata);
  781. /**
  782. * ol_txrx_completion_fp - top-level transmit function
  783. * for tx completion
  784. * @skb: skb data
  785. * @osif_dev: the virtual device's OS shim object
  786. * @flag: flag
  787. */
  788. typedef void (*ol_txrx_completion_fp)(qdf_nbuf_t skb,
  789. void *osif_dev, uint16_t flag);
  790. /**
  791. * ol_txrx_classify_critical_pkt_fp - classification cb for critical frames
  792. * @osif_dev: the virtual device's OS shim object
  793. * @skb: skb data
  794. */
  795. typedef void (*ol_txrx_classify_critical_pkt_fp)(void *osif_dev,
  796. qdf_nbuf_t skb);
  797. /**
  798. * ol_txrx_tx_flow_control_fp - tx flow control notification
  799. * function from txrx to OS shim
  800. * @osif_dev - the virtual device's OS shim object
  801. * @tx_resume - tx os q should be resumed or not
  802. */
  803. typedef void (*ol_txrx_tx_flow_control_fp)(void *osif_dev,
  804. bool tx_resume);
  805. /**
  806. * ol_txrx_tx_flow_control_is_pause_fp - is tx paused by flow control
  807. * function from txrx to OS shim
  808. * @osif_dev - the virtual device's OS shim object
  809. *
  810. * Return: true if tx is paused by flow control
  811. */
  812. typedef bool (*ol_txrx_tx_flow_control_is_pause_fp)(void *osif_dev);
  813. /**
  814. * ol_txrx_rx_fp - receive function to hand batches of data
  815. * frames from txrx to OS shim
  816. * @data_vdev - handle to the OSIF virtual device object
  817. * @msdu_list - list of network buffers
  818. */
  819. typedef QDF_STATUS(*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdu_list);
  820. typedef QDF_STATUS(*ol_txrx_fisa_rx_fp)(void *soc,
  821. void *dp_vdev,
  822. qdf_nbuf_t msdu_list);
  823. typedef QDF_STATUS(*ol_txrx_fisa_flush_fp)(void *soc, int ring_num);
  824. /**
  825. * ol_txrx_rx_flush_fp - receive function to hand batches of data
  826. * frames from txrx to OS shim
  827. * @osif_dev: handle to the OSIF virtual device object
  828. * @vdev_id: vdev_if of the packets to be flushed
  829. */
  830. typedef QDF_STATUS(*ol_txrx_rx_flush_fp)(void *osif_dev, uint8_t vdev_id);
  831. /**
  832. * ol_txrx_rx_gro_flush_ind - function to send GRO flush indication to stack
  833. * for a given RX Context Id.
  834. * @osif_dev - handle to the OSIF virtual device object
  835. * @rx_ctx_id - Rx context Id for which gro flush should happen
  836. */
  837. typedef QDF_STATUS(*ol_txrx_rx_gro_flush_ind_fp)(void *osif_dev,
  838. int rx_ctx_id);
  839. /**
  840. * ol_txrx_stats_rx_fp - receive function to hand batches of data
  841. * frames from txrx to OS shim
  842. * @skb: skb data
  843. * @osif_dev: the virtual device's OS shim object
  844. * @action: data packet type
  845. * @pkt_type: packet data type
  846. */
  847. typedef void (*ol_txrx_stats_rx_fp)(struct sk_buff *skb,
  848. void *osif_dev, enum connectivity_stats_pkt_status action,
  849. uint8_t *pkt_type);
  850. /**
  851. * ol_txrx_get_key_fp - function to gey key based on keyix and peer
  852. * mac address
  853. * @osif_dev - the virtual device's OS shim object
  854. * @key_buf - pointer to store key
  855. * @mac_addr - pointer to mac address
  856. * @keyix - key id
  857. */
  858. typedef QDF_STATUS(*ol_txrx_get_key_fp)(void *osif_dev, uint8_t *key_buf, uint8_t *mac_addr, uint8_t keyix);
  859. /**
  860. * ol_txrx_rsim_rx_decap_fp - raw mode simulation function to decap the
  861. * packets in receive path.
  862. * @osif_dev - the virtual device's OS shim object
  863. * @list_head - poniter to head of receive packet queue to decap
  864. * @list_tail - poniter to tail of receive packet queue to decap
  865. * @peer_mac - mac address of peer handler
  866. */
  867. typedef QDF_STATUS(*ol_txrx_rsim_rx_decap_fp)(void *osif_dev,
  868. qdf_nbuf_t *list_head,
  869. qdf_nbuf_t *list_tail);
  870. /* ol_txrx_rx_fp - external tx free function to read per packet stats and
  871. * free tx buffer externally
  872. * @netbuf - tx network buffer
  873. */
  874. typedef void (*ol_txrx_tx_free_ext_fp)(qdf_nbuf_t netbuf);
  875. /**
  876. * ol_txrx_rx_check_wai_fp - OSIF WAPI receive function
  877. */
  878. typedef bool (*ol_txrx_rx_check_wai_fp)(ol_osif_vdev_handle vdev,
  879. qdf_nbuf_t mpdu_head,
  880. qdf_nbuf_t mpdu_tail);
  881. /**
  882. * ol_txrx_rx_mon_fp - OSIF monitor mode receive function for single
  883. * MPDU (802.11 format)
  884. */
  885. typedef void (*ol_txrx_rx_mon_fp)(ol_osif_vdev_handle vdev,
  886. qdf_nbuf_t mpdu,
  887. void *rx_status);
  888. /**
  889. * ol_txrx_proxy_arp_fp - proxy arp function pointer
  890. */
  891. typedef int (*ol_txrx_proxy_arp_fp)(ol_osif_vdev_handle vdev,
  892. qdf_nbuf_t netbuf);
  893. /*
  894. * ol_txrx_mcast_me_fp - function pointer for multicast enhancement
  895. */
  896. typedef int (*ol_txrx_mcast_me_fp)(ol_osif_vdev_handle vdev,
  897. qdf_nbuf_t netbuf);
  898. /**
  899. * ol_txrx_stats_callback - statistics notify callback
  900. */
  901. typedef void (*ol_txrx_stats_callback)(void *ctxt,
  902. enum htt_cmn_dbg_stats_type type,
  903. uint8_t *buf, int bytes);
  904. /**
  905. * ol_txrx_pktdump_cb - callback for packet dump feature
  906. */
  907. typedef void (*ol_txrx_pktdump_cb)(ol_txrx_soc_handle soc,
  908. uint8_t pdev_id,
  909. uint8_t vdev_id,
  910. qdf_nbuf_t netbuf,
  911. uint8_t status,
  912. uint8_t type);
  913. /**
  914. * ol_txrx_get_tsf_time - callback to get tsf time
  915. */
  916. typedef QDF_STATUS(*ol_txrx_get_tsf_time)(void *osif_dev, uint64_t input_time,
  917. uint64_t *tsf_time);
  918. /**
  919. * ol_txrx_ops - (pointers to) the functions used for tx and rx
  920. * data xfer
  921. *
  922. * There are two portions of these txrx operations.
  923. * The rx portion is filled in by OSIF SW before calling
  924. * ol_txrx_osif_vdev_register; inside the ol_txrx_osif_vdev_register
  925. * the txrx SW stores a copy of these rx function pointers, to use
  926. * as it delivers rx data frames to the OSIF SW.
  927. * The tx portion is filled in by the txrx SW inside
  928. * ol_txrx_osif_vdev_register; when the function call returns,
  929. * the OSIF SW stores a copy of these tx functions to use as it
  930. * delivers tx data frames to the txrx SW.
  931. *
  932. * @tx.std - the tx function pointer for standard data
  933. * frames This function pointer is set by the txrx SW
  934. * perform host-side transmit operations based on
  935. * whether a HL or LL host/target interface is in use.
  936. * @tx.flow_control_cb - the transmit flow control
  937. * function that is registered by the
  938. * OSIF which is called from txrx to
  939. * indicate whether the transmit OS
  940. * queues should be paused/resumed
  941. * @rx.rx - the OS shim rx function to deliver rx data
  942. * frames to. This can have different values for
  943. * different virtual devices, e.g. so one virtual
  944. * device's OS shim directly hands rx frames to the OS,
  945. * but another virtual device's OS shim filters out P2P
  946. * messages before sending the rx frames to the OS. The
  947. * netbufs delivered to the osif_rx function are in the
  948. * format specified by the OS to use for tx and rx
  949. * frames (either 802.3 or native WiFi). In case RX Threads are enabled, pkts
  950. * are given to the thread, instead of the stack via this pointer.
  951. * @rx.rx_eapol - This rx function pointer used to receive only eapol frames
  952. * @rx.stack - function to give packets to the stack. Differs from @rx.rx.
  953. * In case RX Threads are enabled, this pointer holds the callback to give
  954. * packets to the stack.
  955. * @rx.rx_gro_flush - GRO flush indication to stack for a given RX CTX ID
  956. * @rx.wai_check - the tx function pointer for WAPI frames
  957. * @rx.mon - the OS shim rx monitor function to deliver
  958. * monitor data to Though in practice, it is probable
  959. * that the same function will be used for delivering
  960. * rx monitor data for all virtual devices, in theory
  961. * each different virtual device can have a different
  962. * OS shim function for accepting rx monitor data. The
  963. * netbufs delivered to the osif_rx_mon function are in
  964. * 802.11 format. Each netbuf holds a 802.11 MPDU, not
  965. * an 802.11 MSDU. Depending on compile-time
  966. * configuration, each netbuf may also have a
  967. * monitor-mode encapsulation header such as a radiotap
  968. * header added before the MPDU contents.
  969. * @rx.std - the OS shim rx function to deliver rx data
  970. * @proxy_arp - proxy arp function pointer - specified by
  971. * OS shim, stored by txrx
  972. * @get_key - function pointer to get key of the peer with
  973. * specific key index
  974. */
  975. struct ol_txrx_ops {
  976. /* tx function pointers - specified by txrx, stored by OS shim */
  977. struct {
  978. ol_txrx_tx_fp tx;
  979. ol_txrx_tx_exc_fp tx_exception;
  980. ol_txrx_tx_free_ext_fp tx_free_ext;
  981. ol_txrx_completion_fp tx_comp;
  982. ol_txrx_classify_critical_pkt_fp tx_classify_critical_pkt_cb;
  983. } tx;
  984. /* rx function pointers - specified by OS shim, stored by txrx */
  985. struct {
  986. ol_txrx_rx_fp rx;
  987. #ifdef QCA_SUPPORT_EAPOL_OVER_CONTROL_PORT
  988. ol_txrx_rx_fp rx_eapol;
  989. #endif
  990. ol_txrx_rx_fp rx_stack;
  991. ol_txrx_rx_flush_fp rx_flush;
  992. ol_txrx_rx_gro_flush_ind_fp rx_gro_flush;
  993. ol_txrx_rx_check_wai_fp wai_check;
  994. ol_txrx_rx_mon_fp mon;
  995. ol_txrx_stats_rx_fp stats_rx;
  996. ol_txrx_rsim_rx_decap_fp rsim_rx_decap;
  997. ol_txrx_fisa_rx_fp osif_fisa_rx;
  998. ol_txrx_fisa_flush_fp osif_fisa_flush;
  999. } rx;
  1000. /* proxy arp function pointer - specified by OS shim, stored by txrx */
  1001. ol_txrx_proxy_arp_fp proxy_arp;
  1002. ol_txrx_mcast_me_fp me_convert;
  1003. ol_txrx_get_key_fp get_key;
  1004. ol_txrx_get_tsf_time get_tsf_time;
  1005. };
  1006. /**
  1007. * ol_txrx_stats_req - specifications of the requested
  1008. * statistics
  1009. */
  1010. struct ol_txrx_stats_req {
  1011. uint32_t stats_type_upload_mask; /* which stats to upload */
  1012. uint32_t stats_type_reset_mask; /* which stats to reset */
  1013. /* stats will be printed if either print element is set */
  1014. struct {
  1015. int verbose; /* verbose stats printout */
  1016. int concise; /* concise stats printout (takes precedence) */
  1017. } print; /* print uploaded stats */
  1018. /* stats notify callback will be invoked if fp is non-NULL */
  1019. struct {
  1020. ol_txrx_stats_callback fp;
  1021. void *ctxt;
  1022. } callback;
  1023. /* stats will be copied into the specified buffer if buf is non-NULL */
  1024. struct {
  1025. uint8_t *buf;
  1026. int byte_limit; /* don't copy more than this */
  1027. } copy;
  1028. /*
  1029. * If blocking is true, the caller will take the specified semaphore
  1030. * to wait for the stats to be uploaded, and the driver will release
  1031. * the semaphore when the stats are done being uploaded.
  1032. */
  1033. struct {
  1034. int blocking;
  1035. /*Note: this needs to change to some qdf_* type */
  1036. qdf_semaphore_t *sem_ptr;
  1037. } wait;
  1038. };
  1039. /* DP soc struct definition */
  1040. struct cdp_soc_t {
  1041. struct cdp_ops *ops;
  1042. struct ol_if_ops *ol_ops;
  1043. };
  1044. /*
  1045. * cdp_peer_param_type: different types of parameters
  1046. * to set values in peer
  1047. * @CDP_CONFIG_NAWDS: Enable nawds mode
  1048. * @CDP_CONFIG_NAC: Enable nac
  1049. * @CDP_CONFIG_ISOLATION : Enable isolation
  1050. * @CDP_CONFIG_IN_TWT : In TWT session or not
  1051. */
  1052. enum cdp_peer_param_type {
  1053. CDP_CONFIG_NAWDS,
  1054. CDP_CONFIG_NAC,
  1055. CDP_CONFIG_ISOLATION,
  1056. CDP_CONFIG_IN_TWT,
  1057. };
  1058. /*
  1059. * cdp_pdev_param_type: different types of parameters
  1060. * to set values in pdev
  1061. * @CDP_CONFIG_DEBUG_SNIFFER: Enable debug sniffer feature
  1062. * @CDP_CONFIG_BPR_ENABLE: Enable bcast probe feature
  1063. * @CDP_CONFIG_PRIMARY_RADIO: Configure radio as primary
  1064. * @CDP_CONFIG_ENABLE_PERPKT_TXSTATS: Enable per packet statistics
  1065. * @CDP_CONFIG_IGMPMLD_OVERRIDE: Override IGMP/MLD
  1066. * @CDP_CONFIG_IGMPMLD_TID: Configurable TID value when igmmld_override is set
  1067. * @CDP_CONFIG_ARP_DBG_CONF: Enable ARP debug
  1068. * @CDP_CONFIG_CAPTURE_LATENCY: Capture time latency
  1069. * @CDP_INGRESS_STATS: Accumulate ingress statistics
  1070. * @CDP_OSIF_DROP: Accumulate drops in OSIF layer
  1071. * @CDP_CONFIG_ENH_RX_CAPTURE: Enable enhanced RX capture
  1072. * @CDP_CONFIG_ENH_TX_CAPTURE: Enable enhanced TX capture
  1073. * @CDP_CONFIG_HMMC_TID_OVERRIDE: Enable hmmc tid override
  1074. * @CDP_CONFIG_HMMC_TID_VALUE: set hmmc tid value
  1075. * @CDP_CONFIG_TX_CAPTURE: set tx capture
  1076. * @CDP_CHAN_NOISE_FLOOR: set channel noise floor
  1077. * @CDP_CONFIG_VOW: set/get vow config
  1078. * @CDP_TIDQ_OVERRIDE: set/get tid queue override
  1079. * @CDP_TIDMAP_PRTY: set/get tid map prty
  1080. * @CDP_TX_PENDING: get tx pending
  1081. * @CDP_FILTER_NEIGH_PEERS: filter neighbour peers
  1082. * @CDP_FILTER_UCAST_DATA: filter unicast data
  1083. * @CDP_FILTER_MCAST_DATA: filter multicast data
  1084. * @CDP_FILTER_NO_DATA: filter no data
  1085. * @CDP_MONITOR_CHANNEL: monitor channel
  1086. * @CDP_MONITOR_FREQUENCY: monitor frequency
  1087. * @CDP_CONFIG_BSS_COLOR: configure bss color
  1088. * @CDP_SET_ATF_STATS_ENABLE: set ATF stats flag
  1089. * @CDP_CONFIG_SPECIAL_VAP: Configure Special vap
  1090. * @CDP_RESET_SCAN_SPCL_VAP_STATS_ENABLE: Enable scan spcl vap stats reset
  1091. * @CDP_ISOLATION: set isolation flag
  1092. * @CDP_CONFIG_UNDECODED_METADATA_CAPTURE_ENABLE: Undecoded metadata capture
  1093. */
  1094. enum cdp_pdev_param_type {
  1095. CDP_CONFIG_DEBUG_SNIFFER,
  1096. CDP_CONFIG_BPR_ENABLE,
  1097. CDP_CONFIG_PRIMARY_RADIO,
  1098. CDP_CONFIG_ENABLE_PERPKT_TXSTATS,
  1099. CDP_CONFIG_IGMPMLD_OVERRIDE,
  1100. CDP_CONFIG_IGMPMLD_TID,
  1101. CDP_CONFIG_ARP_DBG_CONF,
  1102. CDP_CONFIG_CAPTURE_LATENCY,
  1103. CDP_INGRESS_STATS,
  1104. CDP_OSIF_DROP,
  1105. CDP_CONFIG_ENH_RX_CAPTURE,
  1106. CDP_CONFIG_ENH_TX_CAPTURE,
  1107. CDP_CONFIG_HMMC_TID_OVERRIDE,
  1108. CDP_CONFIG_HMMC_TID_VALUE,
  1109. CDP_CONFIG_TX_CAPTURE,
  1110. CDP_CHAN_NOISE_FLOOR,
  1111. CDP_CONFIG_VOW,
  1112. CDP_TIDQ_OVERRIDE,
  1113. CDP_TIDMAP_PRTY,
  1114. CDP_TX_PENDING,
  1115. CDP_FILTER_NEIGH_PEERS,
  1116. CDP_FILTER_UCAST_DATA,
  1117. CDP_FILTER_MCAST_DATA,
  1118. CDP_FILTER_NO_DATA,
  1119. CDP_MONITOR_CHANNEL,
  1120. CDP_MONITOR_FREQUENCY,
  1121. CDP_CONFIG_BSS_COLOR,
  1122. CDP_SET_ATF_STATS_ENABLE,
  1123. CDP_CONFIG_SPECIAL_VAP,
  1124. CDP_RESET_SCAN_SPCL_VAP_STATS_ENABLE,
  1125. CDP_CONFIG_ENHANCED_STATS_ENABLE,
  1126. CDP_ISOLATION,
  1127. CDP_CONFIG_UNDECODED_METADATA_CAPTURE_ENABLE,
  1128. };
  1129. /*
  1130. * cdp_config_param_type: union of different types of parameters
  1131. * to set values into dp handles.
  1132. *
  1133. * @cdp_peer_param_nawds: Enable nawds mode
  1134. * @cdp_peer_param_isolation: Enable isolation
  1135. * @cdp_peer_param_in_twt: in TWT session or not
  1136. * @cdp_peer_param_nac: Enable nac
  1137. *
  1138. * @cdp_vdev_param_nawds: set nawds enable/disable
  1139. * @cdp_vdev_param_mcast_en: enable/disable multicast enhancement
  1140. * @cdp_vdev_param_wds: wds sta
  1141. * @cdp_vdev_param_mec: MEC enable flags
  1142. * @cdp_vdev_param_proxysta: proxy sta
  1143. * @cdp_vdev_param_tdls_flags: tdls link flags
  1144. * @cdp_vdev_param_ap_brdg_en: set ap_bridging enable/disable
  1145. * @cdp_vdev_param_cipher_en: set cipher type based on security
  1146. * @cdp_vdev_param_qwrap_isolation: qwrap isolation mode
  1147. * @cdp_vdev_param_tx_encap: tx encap type
  1148. * @cdp_vdev_param_rx_decap: rx decap type
  1149. * @cdp_vdev_param_mesh_rx_filter: set mesh rx filter
  1150. * @cdp_vdev_param_tidmap_prty: set tid vdev prty
  1151. * @cdp_vdev_param_tidmap_tbl_id: set tidmap table id
  1152. * @cdp_vdev_param_mesh_mode: set mesh mode
  1153. * @cdp_vdev_param_safe_mode: set safe mode
  1154. * @cdp_vdev_param_drop_unenc: set drop unencrypted flag
  1155. * @cdp_vdev_param_hlos_tid_override: set hlos tid override
  1156. * @cdp_vdev_param_peer_authorize: set peer authorize
  1157. * @cdp_vdev_param_peer_tid_latency_enable: set peer tid latency enable flag
  1158. * @cdp_vdev_param_mesh_tid: config tatency tid on vdev
  1159. * @cdp_vdev_param_dscp_tid_map_id: set dscp to tid map id
  1160. * @cdp_vdev_param_mcast_vdev: set mcast vdev params
  1161. *
  1162. * @cdp_pdev_param_dbg_snf: Enable debug sniffer feature
  1163. * @cdp_pdev_param_bpr_enable: Enable bcast probe feature
  1164. * @cdp_pdev_param_primary_radio: Configure radio as primary
  1165. * @cdp_pdev_param_en_perpkt_txstats: Enable per packet statistics
  1166. * @cdp_pdev_param_igmpmld_override: Override IGMP/MLD
  1167. * @cdp_pdev_param_igmpmld_tid: TID value when igmmld_override is set
  1168. * @cdp_pdev_param_arp_dbg_conf: Enable ARP debug
  1169. * @cdp_pdev_param_cptr_latcy: Capture time latency
  1170. * @cdp_pdev_param_ingrs_stats: Accumulate ingress statistics
  1171. * @cdp_pdev_param_osif_drop: Accumulate drops in OSIF layer
  1172. * @cdp_pdev_param_en_rx_cap: Enable enhanced RX capture
  1173. * @cdp_pdev_param_en_tx_cap: Enable enhanced TX capture
  1174. * @cdp_pdev_param_hmmc_tid_ovrd: Enable hmmc tid override
  1175. * @cdp_pdev_param_hmmc_tid: set hmmc tid value
  1176. * @cdp_pdev_param_tx_capture: set tx capture
  1177. * @cdp_pdev_param_chn_noise_flr: set channel noise floor
  1178. * @cdp_pdev_param_cfg_vow: set/get vow config
  1179. * @cdp_pdev_param_tidq_override: set/get tid queue override
  1180. * @cdp_pdev_param_mon_freq: set monitor frequency
  1181. * @cdp_pdev_param_bss_color: configure bss color
  1182. * @cdp_pdev_param_tidmap_prty: set/get tid map prty
  1183. * @cdp_pdev_param_tx_pending: get tx pending
  1184. * @cdp_pdev_param_fltr_neigh_peers: filter neighbour peers
  1185. * @cdp_pdev_param_fltr_ucast: filter unicast data
  1186. * @cdp_pdev_param_fltr_mcast: filter multicast data
  1187. * @cdp_pdev_param_fltr_none: filter no data
  1188. * @cdp_pdev_param_monitor_chan: monitor channel
  1189. * @cdp_pdev_param_atf_stats_enable: ATF stats enable
  1190. * @cdp_pdev_param_config_special_vap: Configure Special vap
  1191. * @cdp_pdev_param_isolation : set isolation mode
  1192. *
  1193. * @cdp_psoc_param_en_rate_stats: set rate stats enable/disable
  1194. * @cdp_psoc_param_en_nss_cfg: set nss cfg
  1195. * @cdp_ipa_enabled : set ipa mode
  1196. * @cdp_psoc_param_vdev_stats_hw_offload: Configure HW vdev stats offload
  1197. * @cdp_pdev_param_undecoded_metadata_enable: Undecoded metadata capture enable
  1198. */
  1199. typedef union cdp_config_param_t {
  1200. /* peer params */
  1201. bool cdp_peer_param_nawds;
  1202. bool cdp_peer_param_isolation;
  1203. uint8_t cdp_peer_param_nac;
  1204. bool cdp_peer_param_in_twt;
  1205. /* vdev params */
  1206. bool cdp_vdev_param_wds;
  1207. bool cdp_vdev_param_mec;
  1208. bool cdp_vdev_param_nawds;
  1209. bool cdp_vdev_param_proxysta;
  1210. bool cdp_vdev_param_tdls_flags;
  1211. bool cdp_vdev_param_ap_brdg_en;
  1212. bool cdp_vdev_param_qwrap_isolation;
  1213. bool cdp_vdev_param_update_multipass;
  1214. uint8_t cdp_vdev_param_da_war;
  1215. uint8_t cdp_vdev_param_mcast_en;
  1216. uint8_t cdp_vdev_param_igmp_mcast_en;
  1217. uint8_t cdp_vdev_param_tidmap_prty;
  1218. uint8_t cdp_vdev_param_tidmap_tbl_id;
  1219. uint32_t cdp_vdev_param_aging_tmr;
  1220. uint32_t cdp_vdev_param_cipher_en;
  1221. uint32_t cdp_vdev_param_tx_encap;
  1222. uint32_t cdp_vdev_param_rx_decap;
  1223. uint32_t cdp_vdev_param_mesh_rx_filter;
  1224. uint32_t cdp_vdev_param_mesh_mode;
  1225. uint32_t cdp_vdev_param_safe_mode;
  1226. uint32_t cdp_vdev_param_drop_unenc;
  1227. uint8_t cdp_vdev_param_hlos_tid_override;
  1228. bool cdp_vdev_param_wds_ext;
  1229. uint8_t cdp_vdev_param_peer_authorize;
  1230. uint8_t cdp_vdev_param_peer_tid_latency_enable;
  1231. uint8_t cdp_vdev_param_mesh_tid;
  1232. uint8_t cdp_vdev_param_dscp_tid_map_id;
  1233. bool cdp_vdev_param_mcast_vdev;
  1234. /* pdev params */
  1235. bool cdp_pdev_param_cptr_latcy;
  1236. bool cdp_pdev_param_hmmc_tid_ovrd;
  1237. bool cdp_pdev_param_fltr_neigh_peers;
  1238. bool cdp_pdev_param_cfg_vow;
  1239. bool cdp_pdev_param_fltr_mcast;
  1240. bool cdp_pdev_param_fltr_none;
  1241. bool cdp_pdev_param_fltr_ucast;
  1242. uint8_t cdp_pdev_param_primary_radio;
  1243. uint8_t cdp_pdev_param_en_rx_cap;
  1244. uint8_t cdp_pdev_param_en_tx_cap;
  1245. uint8_t cdp_pdev_param_tx_capture;
  1246. uint8_t cdp_pdev_param_hmmc_tid;
  1247. uint8_t cdp_pdev_param_tidmap_prty;
  1248. uint8_t cdp_pdev_param_igmpmld_override;
  1249. uint8_t cdp_pdev_param_igmpmld_tid;
  1250. uint8_t cdp_pdev_param_arp_dbg_conf;
  1251. uint8_t cdp_pdev_param_tidq_override;
  1252. uint8_t cdp_pdev_param_bss_color;
  1253. uint16_t cdp_pdev_param_chn_noise_flr;
  1254. qdf_freq_t cdp_pdev_param_mon_freq;
  1255. int cdp_pdev_param_dbg_snf;
  1256. int cdp_pdev_param_bpr_enable;
  1257. int cdp_pdev_param_monitor_chan;
  1258. uint32_t cdp_pdev_param_ingrs_stats;
  1259. uint32_t cdp_pdev_param_osif_drop;
  1260. uint32_t cdp_pdev_param_en_perpkt_txstats;
  1261. uint32_t cdp_pdev_param_tx_pending;
  1262. bool cdp_pdev_param_atf_stats_enable;
  1263. bool cdp_pdev_param_config_special_vap;
  1264. bool cdp_pdev_param_reset_scan_spcl_vap_stats_enable;
  1265. bool cdp_pdev_param_enhanced_stats_enable;
  1266. bool cdp_pdev_param_isolation;
  1267. /* psoc params */
  1268. bool cdp_psoc_param_en_rate_stats;
  1269. int cdp_psoc_param_en_nss_cfg;
  1270. int cdp_psoc_param_preferred_hw_mode;
  1271. bool cdp_psoc_param_pext_stats;
  1272. bool cdp_skip_bar_update;
  1273. bool cdp_ipa_enabled;
  1274. bool cdp_psoc_param_vdev_stats_hw_offload;
  1275. bool cdp_pdev_param_undecoded_metadata_enable;
  1276. bool cdp_sawf_enabled;
  1277. bool cdp_drop_3addr_mcast;
  1278. } cdp_config_param_type;
  1279. /**
  1280. * cdp_rx_enh_capture_mode - Rx enhanced capture modes
  1281. * @CDP_RX_ENH_CAPTURE_DISABLED: Disable Rx enhance capture
  1282. * @CDP_RX_ENH_CAPTURE_MPDU: Enable capture of 128 bytes of each MPDU
  1283. * @CDP_RX_ENH_CAPTURE_MPDU_MSDU: Enable capture of 128 bytes of each MSDU
  1284. */
  1285. enum cdp_rx_enh_capture_mode {
  1286. CDP_RX_ENH_CAPTURE_DISABLED = 0,
  1287. CDP_RX_ENH_CAPTURE_MPDU,
  1288. CDP_RX_ENH_CAPTURE_MPDU_MSDU,
  1289. };
  1290. /**
  1291. * cdp_rx_enh_capture_peer - Rx enhanced capture peer filtering
  1292. * @CDP_RX_ENH_CAPTURE_PEER_DISABLED: Disable Rx ENH capture peer filtering
  1293. * @CDP_RX_ENH_CAPTURE_PEER_ENABLED: Enable Rx ENH capture peer filtering
  1294. */
  1295. enum cdp_rx_enh_capture_peer {
  1296. CDP_RX_ENH_CAPTURE_PEER_DISABLED = 0,
  1297. CDP_RX_ENH_CAPTURE_PEER_ENABLED,
  1298. };
  1299. /**
  1300. * cdp_tx_enh_capture_mode - Tx enhanced capture modes
  1301. * @CDP_TX_ENH_CAPTURE_DISABLED: Disable Tx enhance capture for all peers
  1302. * @CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS: Enable tx capture for all peers
  1303. * @CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER: Enable/disable per peer as necessary
  1304. */
  1305. enum cdp_tx_enh_capture_mode {
  1306. CDP_TX_ENH_CAPTURE_DISABLED = 0,
  1307. CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS,
  1308. CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER,
  1309. CDP_TX_ENH_CAPTURE_MAX,
  1310. };
  1311. /*
  1312. * enum cdp_pdev_bpr_param - different types of parameters
  1313. * to set value in pdev
  1314. * @CDP_BPR_DISABLE: Set bpr to disable state
  1315. * @CDP_BPR_ENABLE: set bpr to enable state
  1316. *
  1317. * Enum indicating bpr state to enable/disable.
  1318. */
  1319. enum cdp_pdev_bpr_param {
  1320. CDP_BPR_DISABLE,
  1321. CDP_BPR_ENABLE,
  1322. };
  1323. /*
  1324. * cdp_vdev_param_type: different types of parameters
  1325. * to set values in vdev
  1326. * @CDP_ENABLE_NAWDS: set nawds enable/disable
  1327. * @CDP_ENABLE_MCAST_EN: enable/disable multicast enhancement
  1328. * @CDP_ENABLE_WDS: wds sta
  1329. * @CDP_ENABLE_MEC: MEC enable flags
  1330. * @CDP_ENABLE_PROXYSTA: proxy sta
  1331. * @CDP_UPDATE_TDLS_FLAGS: tdls link flags
  1332. * @CDP_ENABLE_AP_BRIDGE: set ap_bridging enable/disable
  1333. * @CDP_ENABLE_CIPHER : set cipher type based on security
  1334. * @CDP_ENABLE_QWRAP_ISOLATION: qwrap isolation mode
  1335. * @CDP_TX_ENCAP_TYPE: tx encap type
  1336. * @CDP_RX_DECAP_TYPE: rx decap type
  1337. * @CDP_MESH_RX_FILTER: set mesh rx filter
  1338. * @CDP_TID_VDEV_PRTY: set tid vdev prty
  1339. * @CDP_TIDMAP_TBL_ID: set tidmap table id
  1340. * @CDP_MESH_MODE: set mesh mode
  1341. * @CDP_SAFEMODE: set safe mode
  1342. * @CDP_DROP_UNENC: set drop unencrypted flag
  1343. * @CDP_ENABLE_IGMP_MCAST_EN: enable/disable igmp multicast enhancement
  1344. * @CDP_ENABLE_HLOS_TID_OVERRIDE: set hlos tid override flag
  1345. * @CDP_CFG_WDS_EXT: enable/disable wds ext feature
  1346. * @CDP_ENABLE_PEER_AUTHORIZE: enable peer authorize flag
  1347. * @CDP_ENABLE_PEER_TID_LATENCY: set peer tid latency enable flag
  1348. * @CDP_SET_VAP_MESH_TID : Set latency tid in vap
  1349. * @CDP_UPDATE_DSCP_TO_TID_MAP: Set DSCP to TID map id
  1350. * @CDP_SET_MCAST_VDEV : Set primary mcast vdev
  1351. */
  1352. enum cdp_vdev_param_type {
  1353. CDP_ENABLE_NAWDS,
  1354. CDP_ENABLE_MCAST_EN,
  1355. CDP_ENABLE_WDS,
  1356. CDP_ENABLE_MEC,
  1357. CDP_ENABLE_DA_WAR,
  1358. CDP_ENABLE_PROXYSTA,
  1359. CDP_UPDATE_TDLS_FLAGS,
  1360. CDP_CFG_WDS_AGING_TIMER,
  1361. CDP_ENABLE_AP_BRIDGE,
  1362. CDP_ENABLE_CIPHER,
  1363. CDP_ENABLE_QWRAP_ISOLATION,
  1364. CDP_UPDATE_MULTIPASS,
  1365. CDP_TX_ENCAP_TYPE,
  1366. CDP_RX_DECAP_TYPE,
  1367. CDP_MESH_RX_FILTER,
  1368. CDP_TID_VDEV_PRTY,
  1369. CDP_TIDMAP_TBL_ID,
  1370. #ifdef MESH_MODE_SUPPORT
  1371. CDP_MESH_MODE,
  1372. #endif
  1373. CDP_SAFEMODE,
  1374. CDP_DROP_UNENC,
  1375. CDP_ENABLE_IGMP_MCAST_EN,
  1376. CDP_ENABLE_HLOS_TID_OVERRIDE,
  1377. #ifdef QCA_SUPPORT_WDS_EXTENDED
  1378. CDP_CFG_WDS_EXT,
  1379. #endif /* QCA_SUPPORT_WDS_EXTENDED */
  1380. CDP_ENABLE_PEER_AUTHORIZE,
  1381. #ifdef WLAN_SUPPORT_MESH_LATENCY
  1382. CDP_ENABLE_PEER_TID_LATENCY,
  1383. CDP_SET_VAP_MESH_TID,
  1384. #endif
  1385. #ifdef WLAN_VENDOR_SPECIFIC_BAR_UPDATE
  1386. CDP_SKIP_BAR_UPDATE_AP,
  1387. #endif
  1388. CDP_UPDATE_DSCP_TO_TID_MAP,
  1389. CDP_SET_MCAST_VDEV,
  1390. CDP_DROP_3ADDR_MCAST,
  1391. };
  1392. /*
  1393. * cdp_psoc_param_type: different types of parameters
  1394. * to set values in psoc
  1395. * @CDP_ENABLE_RATE_STATS: set rate stats enable/disable
  1396. * @CDP_SET_NSS_CFG: set nss cfg
  1397. * @CDP_SET_PREFERRED_HW_MODE: set preferred hw mode
  1398. * @CDP_CFG_PEER_EXT_STATS: Peer extended stats mode.
  1399. * @CDP_IPA_ENABLE : set IPA enable mode.
  1400. * @CDP_CFG_VDEV_STATS_HW_OFFLOAD: HW Vdev stats config
  1401. */
  1402. enum cdp_psoc_param_type {
  1403. CDP_ENABLE_RATE_STATS,
  1404. CDP_SET_NSS_CFG,
  1405. CDP_SET_PREFERRED_HW_MODE,
  1406. CDP_CFG_PEER_EXT_STATS,
  1407. CDP_IPA_ENABLE,
  1408. CDP_CFG_VDEV_STATS_HW_OFFLOAD,
  1409. CDP_SAWF_ENABLE,
  1410. };
  1411. #define TXRX_FW_STATS_TXSTATS 1
  1412. #define TXRX_FW_STATS_RXSTATS 2
  1413. #define TXRX_FW_STATS_RX_RATE_INFO 3
  1414. #define TXRX_FW_STATS_PHYSTATS 4
  1415. #define TXRX_FW_STATS_PHYSTATS_CONCISE 5
  1416. #define TXRX_FW_STATS_TX_RATE_INFO 6
  1417. #define TXRX_FW_STATS_TID_STATE 7
  1418. #define TXRX_FW_STATS_HOST_STATS 8
  1419. #define TXRX_FW_STATS_CLEAR_HOST_STATS 9
  1420. #define TXRX_FW_STATS_CE_STATS 10
  1421. #define TXRX_FW_STATS_VOW_UMAC_COUNTER 11
  1422. #define TXRX_FW_STATS_ME_STATS 12
  1423. #define TXRX_FW_STATS_TXBF_INFO 13
  1424. #define TXRX_FW_STATS_SND_INFO 14
  1425. #define TXRX_FW_STATS_ERROR_INFO 15
  1426. #define TXRX_FW_STATS_TX_SELFGEN_INFO 16
  1427. #define TXRX_FW_STATS_TX_MU_INFO 17
  1428. #define TXRX_FW_SIFS_RESP_INFO 18
  1429. #define TXRX_FW_RESET_STATS 19
  1430. #define TXRX_FW_MAC_WDOG_STATS 20
  1431. #define TXRX_FW_MAC_DESC_STATS 21
  1432. #define TXRX_FW_MAC_FETCH_MGR_STATS 22
  1433. #define TXRX_FW_MAC_PREFETCH_MGR_STATS 23
  1434. #define TXRX_FW_STATS_DURATION_INFO 24
  1435. #define TXRX_FW_STATS_DURATION_INFO_RESET 25
  1436. #define TXRX_FW_HALPHY_STATS 26
  1437. #define TXRX_FW_COEX_STATS 27
  1438. #define PER_RADIO_FW_STATS_REQUEST 0
  1439. #define PER_VDEV_FW_STATS_REQUEST 1
  1440. /**
  1441. * enum data_stall_log_event_indicator - Module triggering data stall
  1442. * @DATA_STALL_LOG_INDICATOR_UNUSED: Unused
  1443. * @DATA_STALL_LOG_INDICATOR_HOST_DRIVER: Host driver indicates data stall
  1444. * @DATA_STALL_LOG_INDICATOR_FIRMWARE: FW indicates data stall
  1445. * @DATA_STALL_LOG_INDICATOR_FRAMEWORK: Framework indicates data stall
  1446. *
  1447. * Enum indicating the module that indicates data stall event
  1448. */
  1449. enum data_stall_log_event_indicator {
  1450. DATA_STALL_LOG_INDICATOR_UNUSED,
  1451. DATA_STALL_LOG_INDICATOR_HOST_DRIVER,
  1452. DATA_STALL_LOG_INDICATOR_FIRMWARE,
  1453. DATA_STALL_LOG_INDICATOR_FRAMEWORK,
  1454. };
  1455. /**
  1456. * enum data_stall_log_event_type - data stall event type
  1457. * @DATA_STALL_LOG_NONE
  1458. * @DATA_STALL_LOG_FW_VDEV_PAUSE
  1459. * @DATA_STALL_LOG_HWSCHED_CMD_FILTER
  1460. * @DATA_STALL_LOG_HWSCHED_CMD_FLUSH
  1461. * @DATA_STALL_LOG_FW_RX_REFILL_FAILED
  1462. * @DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR
  1463. * @DATA_STALL_LOG_FW_WDOG_ERRORS
  1464. * @DATA_STALL_LOG_BB_WDOG_ERROR
  1465. * @DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR
  1466. * @DATA_STALL_LOG_HOST_STA_TX_TIMEOUT
  1467. * @DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT
  1468. * @DATA_STALL_LOG_NUD_FAILURE
  1469. *
  1470. * Enum indicating data stall event type
  1471. */
  1472. enum data_stall_log_event_type {
  1473. DATA_STALL_LOG_NONE,
  1474. DATA_STALL_LOG_FW_VDEV_PAUSE,
  1475. DATA_STALL_LOG_HWSCHED_CMD_FILTER,
  1476. DATA_STALL_LOG_HWSCHED_CMD_FLUSH,
  1477. DATA_STALL_LOG_FW_RX_REFILL_FAILED,
  1478. DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR,
  1479. DATA_STALL_LOG_FW_WDOG_ERRORS,
  1480. DATA_STALL_LOG_BB_WDOG_ERROR,
  1481. DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR,
  1482. /* Stall events triggered by host/framework start from 0x100 onwards. */
  1483. DATA_STALL_LOG_HOST_STA_TX_TIMEOUT = 0x100,
  1484. DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT,
  1485. DATA_STALL_LOG_NUD_FAILURE,
  1486. };
  1487. /**
  1488. * enum data_stall_log_recovery_type - data stall recovery type
  1489. * @DATA_STALL_LOG_RECOVERY_NONE,
  1490. * @DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT,
  1491. * @DATA_STALL_LOG_RECOVERY_TRIGGER_PDR
  1492. *
  1493. * Enum indicating data stall recovery type
  1494. */
  1495. enum data_stall_log_recovery_type {
  1496. DATA_STALL_LOG_RECOVERY_NONE = 0,
  1497. DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT,
  1498. DATA_STALL_LOG_RECOVERY_TRIGGER_PDR,
  1499. };
  1500. /**
  1501. * struct data_stall_event_info - data stall info
  1502. * @indicator: Module triggering data stall
  1503. * @data_stall_type: data stall event type
  1504. * @vdev_id_bitmap: vdev_id_bitmap
  1505. * @pdev_id: pdev id
  1506. * @recovery_type: data stall recovery type
  1507. */
  1508. struct data_stall_event_info {
  1509. uint32_t indicator;
  1510. uint32_t data_stall_type;
  1511. uint32_t vdev_id_bitmap;
  1512. uint32_t pdev_id;
  1513. uint32_t recovery_type;
  1514. };
  1515. typedef void (*data_stall_detect_cb)(struct data_stall_event_info *);
  1516. /*
  1517. * enum cdp_stats - options for host and firmware
  1518. * statistics
  1519. * @CDP_TXRX_STATS_1: HTT Pdev tx stats
  1520. * @CDP_TXRX_STATS_2: HTT Pdev rx stats
  1521. * @CDP_TXRX_STATS_3: HTT Pdev Tx HW Queue stats
  1522. * @CDP_TXRX_STATS_4: HTT Pdev Tx HW Sched stats
  1523. * @CDP_TXRX_STATS_5: HTT Pdev error stats
  1524. * @CDP_TXRX_STATS_6: HTT TQM stats
  1525. * @CDP_TXRX_STATS_7: HTT TQM CMDQ stats
  1526. * @CDP_TXRX_STATS_8: HTT Tx_de_cmn thread stats
  1527. * @CDP_TXRX_STATS_9: HTT Pdev Tx rate stats
  1528. * @CDP_TXRX_STATS_10: HTT Pdev Rx rate stats
  1529. * @CDP_TXRX_STATS_11: HTT Peer stats
  1530. * @CDP_TXRX_STATS_12: HTT Tx Self Gen Info
  1531. * @CDP_TXRX_STATS_13: HTT Tx MU HWQ stats
  1532. * @CDP_TXRX_STATS_14: HTT Ring interface info stats
  1533. * @CDP_TXRX_STATS_15: HTT SRNG info stats
  1534. * @CDP_TXRX_STATS_16: HTT SFM info stats
  1535. * @CDP_TXRX_STATS_17: HTT Pdev tx mu mimo sched info
  1536. * @CDP_TXRX_STATS_18: HTT Peer list details
  1537. * @CDP_TXRX_STATS_19: Reserved
  1538. * @CDP_TXRX_STATS_20: Reset Host stats
  1539. * @CDP_TXRX_STATS_21: Host Rx rate stats
  1540. * @CDP_TXRX_STATS_22: Host Tx rate stats
  1541. * @CDP_TXRX_STATS_23: Host Tx stats
  1542. * @CDP_TXRX_STATS_24: Host Rx stats
  1543. * @CDP_TXRX_STATS_25: Host Ast stats
  1544. * @CDP_TXRX_STATS_26: Host Head/Tail Pointer stats
  1545. * @CDP_TXRX_STATS_27: Host Monitor mode stats
  1546. * @CDP_TXRX_STATS_28: Host Peer entry stats
  1547. * @CDP_TXRX_STATS_29: Host Soc config params info
  1548. * @CDP_TXRX_STATS_30: Host Pdev config params info
  1549. * @CDP_TXRX_STATS_31: Host DP Interrupt Stats
  1550. */
  1551. enum cdp_stats {
  1552. CDP_TXRX_STATS_0 = 0,
  1553. CDP_TXRX_STATS_1,
  1554. CDP_TXRX_STATS_2,
  1555. CDP_TXRX_STATS_3,
  1556. CDP_TXRX_STATS_4,
  1557. CDP_TXRX_STATS_5,
  1558. CDP_TXRX_STATS_6,
  1559. CDP_TXRX_STATS_7,
  1560. CDP_TXRX_STATS_8,
  1561. CDP_TXRX_STATS_9,
  1562. CDP_TXRX_STATS_10,
  1563. CDP_TXRX_STATS_11,
  1564. CDP_TXRX_STATS_12,
  1565. CDP_TXRX_STATS_13,
  1566. CDP_TXRX_STATS_14,
  1567. CDP_TXRX_STATS_15,
  1568. CDP_TXRX_STATS_16,
  1569. CDP_TXRX_STATS_17,
  1570. CDP_TXRX_STATS_18,
  1571. CDP_TXRX_STATS_19,
  1572. CDP_TXRX_STATS_20,
  1573. CDP_TXRX_STATS_21,
  1574. CDP_TXRX_STATS_22,
  1575. CDP_TXRX_STATS_23,
  1576. CDP_TXRX_STATS_24,
  1577. CDP_TXRX_STATS_25,
  1578. CDP_TXRX_STATS_26,
  1579. CDP_TXRX_STATS_27,
  1580. CDP_TXRX_STATS_28,
  1581. CDP_TXRX_STATS_29,
  1582. CDP_TXRX_STATS_30,
  1583. CDP_TXRX_STATS_31,
  1584. CDP_TXRX_STATS_HTT_MAX = 256,
  1585. CDP_TXRX_MAX_STATS = 265,
  1586. };
  1587. /*
  1588. * Different Stat update types sent to OL_IF
  1589. * @UPDATE_PEER_STATS: update peer stats
  1590. * @UPDATE_VDEV_STATS: update vdev stats
  1591. * @UPDATE_PDE_STATS: Update pdev stats
  1592. */
  1593. enum cdp_stat_update_type {
  1594. UPDATE_PEER_STATS = 0,
  1595. UPDATE_VDEV_STATS = 1,
  1596. UPDATE_PDEV_STATS = 2,
  1597. };
  1598. /*
  1599. * struct cdp_tx_sojourn_stats - Tx sojourn stats
  1600. * @ppdu_seq_id: ppdu_seq_id from tx completion
  1601. * @avg_sojourn_msdu: average sojourn msdu time
  1602. * @sum_sojourn_msdu: sum sojourn msdu time
  1603. * @num_msdu: number of msdus per ppdu
  1604. * @cookie: cookie to be used by upper layer
  1605. */
  1606. struct cdp_tx_sojourn_stats {
  1607. uint32_t ppdu_seq_id;
  1608. qdf_ewma_tx_lag avg_sojourn_msdu[CDP_DATA_TID_MAX];
  1609. uint32_t sum_sojourn_msdu[CDP_DATA_TID_MAX];
  1610. uint32_t num_msdus[CDP_DATA_TID_MAX];
  1611. struct cdp_stats_cookie *cookie;
  1612. };
  1613. /**
  1614. * struct cdp_delayed_tx_completion_ppdu_user - Delayed Tx PPDU completion
  1615. * per-user information
  1616. * @frame_ctrl: frame control field in 802.11 header
  1617. * @qos_ctrl: QoS control field in 802.11 header
  1618. * @mpdu_tried: number of mpdus tried
  1619. * @ltf_size: ltf_size
  1620. * @stbc: stbc
  1621. * @he_re: he_re (range extension)
  1622. * @txbf: txbf
  1623. * @bw: Transmission bandwidth
  1624. * <enum 2 transmit_bw_20_MHz>
  1625. * <enum 3 transmit_bw_40_MHz>
  1626. * <enum 4 transmit_bw_80_MHz>
  1627. * <enum 5 transmit_bw_160_MHz>
  1628. * @nss: NSS 1,2, ...8
  1629. * @mcs: MCS index
  1630. * @preamble: preamble
  1631. * @gi: guard interval 800/400/1600/3200 ns
  1632. * @dcm: dcm
  1633. * @ldpc: ldpc
  1634. * @ru_start: RU start index
  1635. * @ru_tones: RU tones length
  1636. * @is_mcast: MCAST or UCAST
  1637. * @user_pos: user position
  1638. * @mu_group_id: mu group id
  1639. * @ppdu_start_timestamp: 64 bits ppdu start timestamp
  1640. * @ppdu_end_timestamp: 64 bits ppdu end timestamp
  1641. */
  1642. struct cdp_delayed_tx_completion_ppdu_user {
  1643. uint32_t frame_ctrl:16,
  1644. qos_ctrl:16;
  1645. uint32_t mpdu_tried_ucast:16,
  1646. mpdu_tried_mcast:16;
  1647. uint32_t ltf_size:2,
  1648. stbc:1,
  1649. he_re:1,
  1650. txbf:4,
  1651. bw:4,
  1652. nss:4,
  1653. mcs:4,
  1654. preamble:4,
  1655. gi:4,
  1656. dcm:1,
  1657. ldpc:1,
  1658. delayed_ba:1;
  1659. uint16_t ru_start;
  1660. uint16_t ru_tones;
  1661. bool is_mcast;
  1662. uint32_t user_pos;
  1663. uint32_t mu_group_id;
  1664. uint64_t ppdu_start_timestamp;
  1665. uint64_t ppdu_end_timestamp;
  1666. };
  1667. /**
  1668. * struct cdp_tx_completion_ppdu_user - Tx PPDU completion per-user information
  1669. * @completion_status: completion status - OK/Filter/Abort/Timeout
  1670. * @tid: TID number
  1671. * @peer_id: Peer ID
  1672. * @ba_size: Block-Ack size
  1673. * @frame_ctrl: frame control field in 802.11 header
  1674. * @qos_ctrl: QoS control field in 802.11 header
  1675. * @mpdu_tried: number of mpdus tried
  1676. * @mpdu_success: number of mpdus successfully transmitted
  1677. * @long_retries: long retries
  1678. * @short_retries: short retries
  1679. * @is_ampdu: mpdu aggregate or non-aggregate?
  1680. * @success_bytes: bytes successfully transmitted
  1681. * @retry_bytes: bytes retried
  1682. * @retry_mpdus: mpdus retried
  1683. * @failed_msdus: MSDUs failed transmission
  1684. * @duration: user duration in ppdu
  1685. * @ltf_size: ltf_size
  1686. * @stbc: stbc
  1687. * @he_re: he_re (range extension)
  1688. * @txbf: txbf
  1689. * @bw: Transmission bandwidth
  1690. * <enum 2 transmit_bw_20_MHz>
  1691. * <enum 3 transmit_bw_40_MHz>
  1692. * <enum 4 transmit_bw_80_MHz>
  1693. * <enum 5 transmit_bw_160_MHz>
  1694. * @nss: NSS 1,2, ...8
  1695. * @mcs: MCS index
  1696. * @preamble: preamble
  1697. * @gi: guard interval 800/400/1600/3200 ns
  1698. * @dcm: dcm
  1699. * @ldpc: ldpc
  1700. * @delayed_ba: delayed ba bit
  1701. * @ack_ba_tlv: ack ba recv tlv bit
  1702. * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/
  1703. * @pream_punct: Preamble Punctured PPDU
  1704. * UL_BSR_TRIG/UNKNOWN
  1705. * @is_seq_num_valid:
  1706. * 1 - stats tlv has valid sequence number
  1707. * 0 - payload has valid sequence number
  1708. * @ba_seq_no: Block Ack sequence number
  1709. * @ba_bitmap: Block Ack bitmap
  1710. * @start_seqa: Sequence number of first MPDU
  1711. * @enq_bitmap: Enqueue MPDU bitmap
  1712. * @ru_start: RU start index
  1713. * @ru_tones: RU tones length
  1714. * @is_mcast: MCAST or UCAST
  1715. * @tx_rate: Transmission Rate
  1716. * @user_pos: user position
  1717. * @mu_group_id: mu group id
  1718. * @rix: rate index
  1719. * @cookie: cookie to used by upper layer
  1720. * @is_ppdu_cookie_valid : Indicates that ppdu_cookie is valid
  1721. * @ppdu_cookie: 16-bit ppdu_cookie
  1722. * @sa_is_training: smart antenna training packets indication
  1723. * @rssi_chain: rssi chain per bandwidth
  1724. * @usr_ack_rssi: overall per user ack rssi
  1725. * @sa_tx_antenna: antenna in which packet is transmitted
  1726. * @sa_max_rates: smart antenna tx feedback info max rates
  1727. * @sa_goodput: smart antenna tx feedback info goodput
  1728. * @current_rate_per: Moving average per
  1729. * @last_enq_seq: last equeue sequence number
  1730. * @is_bss_peer: is bss peer check
  1731. * @mpdu_q: queue of mpdu in a ppdu
  1732. * @mpdus: MPDU list based on enqueue sequence bitmap
  1733. * @pending_retries: pending MPDUs (retries)
  1734. * @tlv_bitmap: per user tlv bitmap
  1735. * @skip: tx capture skip flag
  1736. * @mon_procd: to indicate user processed in ppdu of the sched cmd
  1737. * @debug_copied: flag to indicate bar frame copied
  1738. * @peer_last_delayed_ba: flag to indicate peer last delayed ba
  1739. * @phy_tx_time_us: Phy TX duration for the User
  1740. * @mpdu_bytes: accumulated bytes per mpdu for mem limit feature
  1741. * @punc_mode: puncutured mode to indicate punctured bw
  1742. * @punc_pattern_bitmap: bitmap indicating punctured pattern
  1743. */
  1744. struct cdp_tx_completion_ppdu_user {
  1745. uint32_t completion_status:8,
  1746. tid:8,
  1747. peer_id:16;
  1748. uint8_t mac_addr[6];
  1749. uint16_t ba_size;
  1750. uint32_t frame_ctrl:16,
  1751. qos_ctrl:16;
  1752. uint32_t mpdu_tried_ucast:16,
  1753. mpdu_tried_mcast:16;
  1754. uint16_t mpdu_success:16;
  1755. uint16_t mpdu_failed:16;
  1756. uint32_t long_retries:4,
  1757. short_retries:4,
  1758. tx_ratecode:16,
  1759. is_ampdu:1,
  1760. ppdu_type:5,
  1761. pream_punct:1,
  1762. is_seq_num_valid:1;
  1763. uint32_t success_bytes;
  1764. uint32_t retry_bytes;
  1765. uint32_t failed_bytes;
  1766. uint32_t success_msdus:16,
  1767. retry_msdus:16;
  1768. uint32_t retry_mpdus;
  1769. uint32_t failed_msdus:16,
  1770. duration:16;
  1771. uint32_t ltf_size:2,
  1772. stbc:1,
  1773. he_re:1,
  1774. txbf:4,
  1775. bw:4,
  1776. nss:4,
  1777. mcs:4,
  1778. preamble:4,
  1779. gi:4,
  1780. dcm:1,
  1781. ldpc:1,
  1782. delayed_ba:1,
  1783. ack_ba_tlv:1;
  1784. uint32_t ba_seq_no;
  1785. uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
  1786. uint32_t start_seq;
  1787. uint32_t enq_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
  1788. uint32_t failed_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
  1789. uint32_t num_mpdu:9,
  1790. num_msdu:16;
  1791. uint32_t tx_duration;
  1792. uint16_t ru_start;
  1793. uint16_t ru_tones;
  1794. bool is_mcast;
  1795. uint32_t tx_rate;
  1796. uint32_t tx_ratekbps;
  1797. /*ack rssi for separate chains*/
  1798. uint32_t ack_rssi[CDP_RSSI_CHAIN_LEN];
  1799. bool ack_rssi_valid;
  1800. uint32_t usr_ack_rssi;
  1801. uint32_t user_pos;
  1802. uint32_t mu_group_id;
  1803. uint32_t rix;
  1804. uint8_t is_ppdu_cookie_valid;
  1805. uint16_t ppdu_cookie;
  1806. uint8_t sa_is_training;
  1807. uint32_t rssi_chain[CDP_RSSI_CHAIN_LEN];
  1808. uint32_t sa_tx_antenna;
  1809. /*Max rates for BW: 20MHZ, 40MHZ and 80MHZ and 160MHZ
  1810. * |---------------------------------------|
  1811. * | 16 bits | 16 bits | 16 bits | 16 bits |
  1812. * | BW-1 | BW-2 | BW-3 | BW-4 |
  1813. * | /\ \ |
  1814. * | / \ \ |
  1815. * | / \ \ |
  1816. * | / \ \ |
  1817. * | / \ \ |
  1818. * | / \ \ |
  1819. * |/ \ \ |
  1820. * |[11|8] [5|8] \ |
  1821. * | BW1 PADDED \ |
  1822. * |---------------------------------------|
  1823. */
  1824. uint16_t sa_max_rates[CDP_NUM_SA_BW];
  1825. uint32_t sa_goodput;
  1826. /* below field is used to calculate goodput in non-training period
  1827. * Note: As host is exposing goodput and hence current_rate_per is
  1828. * of no use. It is just for Host computation.
  1829. */
  1830. uint32_t current_rate_per;
  1831. uint32_t last_enq_seq;
  1832. uint8_t is_bss_peer;
  1833. qdf_nbuf_queue_t mpdu_q;
  1834. qdf_nbuf_t *mpdus;
  1835. uint32_t pending_retries;
  1836. uint32_t tlv_bitmap;
  1837. bool skip;
  1838. bool mon_procd;
  1839. bool debug_copied;
  1840. bool peer_last_delayed_ba;
  1841. uint16_t phy_tx_time_us;
  1842. uint32_t mpdu_bytes;
  1843. uint8_t punc_mode;
  1844. uint16_t punc_pattern_bitmap;
  1845. };
  1846. /**
  1847. * struct cdp_tx_indication_mpdu_info - Tx MPDU completion information
  1848. * @ppdu_id: PPDU id
  1849. * @duration: user duration in ppdu
  1850. * @frame_type: frame type MGMT/CTRL/DATA/BAR
  1851. * @frame_ctrl: frame control field in 802.11 header
  1852. * @qos_ctrl: QoS control field in 802.11 header
  1853. * @tid: TID number
  1854. * @num_msdu: number of msdu in MPDU
  1855. * @seq_no: Sequence number of first MPDU
  1856. * @ltf_size: ltf_size
  1857. * @stbc: stbc
  1858. * @he_re: he_re (range extension)
  1859. * @txbf: txbf
  1860. * @bw: Transmission bandwidth
  1861. * <enum 2 transmit_bw_20_MHz>
  1862. * <enum 3 transmit_bw_40_MHz>
  1863. * <enum 4 transmit_bw_80_MHz>
  1864. * <enum 5 transmit_bw_160_MHz>
  1865. * @nss: NSS 1,2, ...8
  1866. * @mcs: MCS index
  1867. * @preamble: preamble
  1868. * @gi: guard interval 800/400/1600/3200 ns
  1869. * @resp_type: response type
  1870. * @mprot_type: medium protection type
  1871. * @rts_success: rts success
  1872. * @rts failure: rts failure
  1873. * @channel: frequency
  1874. * @channel_num: channel number
  1875. * @ack_rssi: ack rssi
  1876. * @ldpc: ldpc
  1877. * @tx_rate: Transmission Rate
  1878. * @mac_address: peer mac address
  1879. * @bss_mac_address: bss mac address
  1880. * @ppdu_start_timestamp: TSF at PPDU start
  1881. * @ppdu_end_timestamp: TSF at PPDU end
  1882. * @ba_start_seq: Block Ack sequence number
  1883. * @ba_bitmap: Block Ack bitmap
  1884. * @ppdu_cookie: 16-bit ppdu_cookie
  1885. * @long_retries: long retries
  1886. * @short_retries: short retries
  1887. * @completion_status: completion status - OK/Filter/Abort/Timeout
  1888. * @usr_idx: user index
  1889. */
  1890. struct cdp_tx_indication_mpdu_info {
  1891. uint32_t ppdu_id;
  1892. uint32_t tx_duration;
  1893. uint16_t frame_type;
  1894. uint16_t frame_ctrl;
  1895. uint16_t qos_ctrl;
  1896. uint8_t tid;
  1897. uint32_t num_msdu;
  1898. uint32_t seq_no;
  1899. uint32_t ltf_size:2,
  1900. he_re:1,
  1901. txbf:4,
  1902. bw:4,
  1903. nss:4,
  1904. mcs:4,
  1905. preamble:4,
  1906. gi:4;
  1907. uint32_t channel;
  1908. uint8_t channel_num;
  1909. uint32_t ack_rssi;
  1910. uint32_t ldpc;
  1911. uint32_t tx_rate;
  1912. uint8_t mac_address[QDF_MAC_ADDR_SIZE];
  1913. uint8_t bss_mac_address[QDF_MAC_ADDR_SIZE];
  1914. uint64_t ppdu_start_timestamp;
  1915. uint64_t ppdu_end_timestamp;
  1916. uint32_t ba_start_seq;
  1917. uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
  1918. uint16_t ppdu_cookie;
  1919. uint16_t long_retries:4,
  1920. short_retries:4,
  1921. completion_status:8;
  1922. uint16_t resp_type:4,
  1923. mprot_type:3,
  1924. rts_success:1,
  1925. rts_failure:1;
  1926. uint8_t usr_idx;
  1927. };
  1928. /**
  1929. * struct cdp_tx_indication_info - Tx capture information
  1930. * @radiotap_done: Flag to say radiotap already done or not
  1931. * 0 - radiotap not updated
  1932. * 1 - radiotap header updated
  1933. * @mpdu_info: Tx MPDU completion information
  1934. * @mpdu_nbuf: reconstructed mpdu packet
  1935. * @ppdu_desc: tx completion ppdu
  1936. */
  1937. struct cdp_tx_indication_info {
  1938. bool radiotap_done;
  1939. struct cdp_tx_indication_mpdu_info mpdu_info;
  1940. qdf_nbuf_t mpdu_nbuf;
  1941. struct cdp_tx_completion_ppdu *ppdu_desc;
  1942. };
  1943. /**
  1944. * struct cdp_tx_mgmt_comp_info - Tx mgmt comp info
  1945. * @ppdu_id: ppdu_id
  1946. * @is_sgen_pkt: payload recevied from wmi or htt path
  1947. * @retries_count: retries count
  1948. * @tx_tsf: 64 bit timestamp
  1949. */
  1950. struct cdp_tx_mgmt_comp_info {
  1951. uint32_t ppdu_id;
  1952. bool is_sgen_pkt;
  1953. uint16_t retries_count;
  1954. uint64_t tx_tsf;
  1955. };
  1956. /**
  1957. * struct cdp_tx_completion_ppdu - Tx PPDU completion information
  1958. * @completion_status: completion status - OK/Filter/Abort/Timeout
  1959. * @ppdu_id: PPDU Id
  1960. * @ppdu_seq_id: ppdu sequence id for sojourn stats
  1961. * @vdev_id: VAP Id
  1962. * @bar_num_users: BA response user count, based on completion common TLV
  1963. * @num_users: Number of users
  1964. * @max_users: Number of users from USR_INFO TLV
  1965. * @drop_reason: drop reason from flush status
  1966. * @is_flush: is_flush is set based on flush tlv
  1967. * @flow_type: tx flow type from flush status
  1968. * @queue_type: queue type from flush status
  1969. * @num_mpdu: Number of MPDUs in PPDU
  1970. * @num_msdu: Number of MSDUs in PPDU
  1971. * @frame_type: frame SU or MU
  1972. * @htt_frame_type: frame type from htt
  1973. * @frame_ctrl: frame control of 80211 header
  1974. * @channel: Channel informartion
  1975. * @resp_type: response type
  1976. * @mprot_type: medium protection type
  1977. * @rts_success: rts success
  1978. * @rts failure: rts failure
  1979. * @phymode: phy mode
  1980. * @ack_rssi: RSSI value of last ack packet (units=dB above noise floor)
  1981. * @tx_duration: PPDU airtime
  1982. * @ppdu_start_timestamp: TSF at PPDU start
  1983. * @ppdu_end_timestamp: TSF at PPDU end
  1984. * @ack_timestamp: TSF at the reception of ACK
  1985. * @delayed_ba: Delayed ba flag
  1986. * @beam_change: beam change bit in ppdu for he-information
  1987. * @bss_color: 6 bit value for full bss color
  1988. * @doppler: value for doppler (will be 0 most of the times)
  1989. * @spatial_reuse: value for spatial reuse used in radiotap HE header
  1990. * @usr_nss_sum: Sum of user nss
  1991. * @usr_ru_tones_sum: Sum of user ru_tones
  1992. * @bar_ppdu_id: BAR ppdu_id
  1993. * @bar_tx_duration: BAR tx duration
  1994. * @bar_ppdu_start_timestamp: BAR start timestamp
  1995. * @bar_ppdu_end_timestamp: BAR end timestamp
  1996. * @tlv_bitmap: tlv_bitmap for the PPDU
  1997. * @sched_cmdid: schedule command id
  1998. * @phy_ppdu_tx_time_us: Phy per PPDU TX duration
  1999. * @ppdu_bytes: accumulated bytes per ppdu for mem limit feature
  2000. * @user: per-User stats (array of per-user structures)
  2001. */
  2002. struct cdp_tx_completion_ppdu {
  2003. uint32_t ppdu_id;
  2004. uint32_t ppdu_seq_id;
  2005. uint16_t vdev_id;
  2006. uint16_t bar_num_users;
  2007. uint32_t num_users;
  2008. uint8_t max_users;
  2009. uint8_t last_usr_index;
  2010. uint32_t drop_reason;
  2011. uint32_t is_flush:1,
  2012. flow_type:8,
  2013. queue_type:8;
  2014. uint32_t num_mpdu:9,
  2015. num_msdu:16;
  2016. uint16_t frame_type;
  2017. uint16_t htt_frame_type;
  2018. uint16_t frame_ctrl;
  2019. uint16_t channel;
  2020. uint16_t resp_type:4,
  2021. mprot_type:3,
  2022. rts_success:1,
  2023. rts_failure:1;
  2024. uint16_t phy_mode;
  2025. uint32_t ack_rssi;
  2026. uint32_t tx_duration;
  2027. uint64_t ppdu_start_timestamp;
  2028. uint64_t ppdu_end_timestamp;
  2029. uint64_t ack_timestamp;
  2030. bool delayed_ba;
  2031. uint8_t beam_change;
  2032. uint8_t bss_color;
  2033. uint8_t doppler;
  2034. uint8_t spatial_reuse;
  2035. uint8_t usr_nss_sum;
  2036. uint32_t usr_ru_tones_sum;
  2037. uint32_t bar_ppdu_id;
  2038. uint32_t bar_tx_duration;
  2039. uint64_t bar_ppdu_start_timestamp;
  2040. uint64_t bar_ppdu_end_timestamp;
  2041. uint32_t tlv_bitmap;
  2042. uint16_t sched_cmdid;
  2043. uint16_t phy_ppdu_tx_time_us;
  2044. uint32_t ppdu_bytes;
  2045. struct cdp_tx_completion_ppdu_user user[];
  2046. };
  2047. /**
  2048. * struct cdp_dev_stats - Network device stats structure
  2049. * @tx_packets: Tx total packets transmitted
  2050. * @tx_errors : Tx error due to FW tx failure, Ring failure DMA etc
  2051. * @tx_dropped: Tx dropped is same as tx errors as above
  2052. * @rx_packets: Rx total packets transmitted
  2053. * @rx_errors : Rx erros
  2054. * @rx_dropped: Rx dropped stats
  2055. * @tx_bytes : Tx total bytes transmitted
  2056. * @rx_bytes : Rx total bytes transmitted
  2057. */
  2058. struct cdp_dev_stats {
  2059. uint32_t tx_packets;
  2060. uint32_t tx_errors;
  2061. uint32_t tx_dropped;
  2062. uint32_t rx_packets;
  2063. uint32_t rx_errors;
  2064. uint32_t rx_dropped;
  2065. uint64_t tx_bytes;
  2066. uint64_t rx_bytes;
  2067. };
  2068. /**
  2069. * struct cdp_rate_stats - Tx/Rx Rate statistics
  2070. * @bw: Indicates the BW of the upcoming transmission -
  2071. * <enum 2 transmit_bw_20_MHz>
  2072. * <enum 3 transmit_bw_40_MHz>
  2073. * <enum 4 transmit_bw_80_MHz>
  2074. * <enum 5 transmit_bw_160_MHz>
  2075. * @pkt_type: Transmit Packet Type
  2076. * @stbc: When set, STBC transmission rate was used
  2077. * @ldpc: When set, use LDPC transmission rates
  2078. * @sgi: <enum 0 0_8_us_sgi > Legacy normal GI
  2079. * <enum 1 0_4_us_sgi > Legacy short GI
  2080. * <enum 2 1_6_us_sgi > HE related GI
  2081. * <enum 3 3_2_us_sgi > HE
  2082. * @mcs: Transmit MCS Rate
  2083. * @ofdma: Set when the transmission was an OFDMA transmission
  2084. * @tones_in_ru: The number of tones in the RU used.
  2085. * @tsf: Lower 32 bits of the TSF (timestamp when ppdu transmission finished)
  2086. * @peer_id: Peer ID of the flow or MPDU queue
  2087. * @tid: TID of the flow or MPDU queue
  2088. */
  2089. struct cdp_rate_stats {
  2090. uint32_t rate_stats_info_valid:1,
  2091. bw:2,
  2092. pkt_type:4,
  2093. stbc:1,
  2094. ldpc:1,
  2095. sgi:2,
  2096. mcs:4,
  2097. ofdma:1,
  2098. tones_in_ru:12,
  2099. resvd0:4;
  2100. uint32_t tsf;
  2101. uint16_t peer_id;
  2102. uint8_t tid;
  2103. };
  2104. /**
  2105. * struct cdp_tx_completion_msdu - Tx MSDU completion descriptor
  2106. * @ppdu_id: PPDU to which this MSDU belongs
  2107. * @transmit_cnt: Number of times this frame has been transmitted
  2108. * @ack_frame_rssi: RSSI of the received ACK or BA frame
  2109. * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU
  2110. * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU
  2111. * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU
  2112. * @extd: Extended structure containing rate statistics
  2113. */
  2114. struct cdp_tx_completion_msdu {
  2115. uint32_t ppdu_id;
  2116. uint8_t transmit_cnt;
  2117. uint32_t ack_frame_rssi:8,
  2118. resvd0:1,
  2119. first_msdu:1,
  2120. last_msdu:1,
  2121. msdu_part_of_amsdu:1,
  2122. resvd1:20;
  2123. struct cdp_rate_stats extd;
  2124. };
  2125. /**
  2126. * struct cdp_rx_stats_ppdu_user -- per user RX stats
  2127. * @peer_id: Peer ID
  2128. * @vdev_id: VAP ID
  2129. * @is_ampdu: mpdu aggregate or non-aggregate?
  2130. * @mu_ul_info_valid: MU UL info valid
  2131. * @ofdma_ru_start_index: RU index number(0-73)
  2132. * @ofdma_ru_width: size of RU in units of 1(26tone)RU
  2133. * @nss: NSS 1,2, ...8
  2134. * @mcs: MCS index
  2135. * @user_index: user ID in multi-user case
  2136. * @is_bss_peer - is bss peer check
  2137. * @ast_index: ast index in multi-user case
  2138. * @tid: TID number
  2139. * @num_msdu: Number of MSDUs in PPDU
  2140. * @udp_msdu_count: Number of UDP MSDUs in PPDU
  2141. * @tcp_msdu_count: Number of TCP MSDUs in PPDU
  2142. * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU
  2143. * @frame_control: frame control field
  2144. * @frame_control_info_valid: frame_control valid
  2145. * @qos_control: qos control field
  2146. * @qos_control_info_valid: qos_control valid
  2147. * @data_sequence_control_info_valid: data_sequence_control_info valid
  2148. * @first_data_seq_ctrl: Sequence control field of first data frame
  2149. * @preamble: preamble
  2150. * @ht_flag: ht flag
  2151. * @vht_flag: vht flag
  2152. * @he_re: he_re (range extension)
  2153. * @mac_addr: Peer MAC Address
  2154. * @mpdu_cnt_fcs_ok: Number of MPDUs in PPDU with fcs ok
  2155. * @mpdu_cnt_fcs_err: Number of MPDUs in PPDU with fcs err
  2156. * @mpdu_fcs_ok_bitmap - MPDU with fcs ok bitmap
  2157. * @retries - number of retries
  2158. * @rx_ratekpbs - rx rate in kbps
  2159. * @rix - rate index
  2160. * @mpdu_retries - retries of mpdu in rx
  2161. */
  2162. struct cdp_rx_stats_ppdu_user {
  2163. uint16_t peer_id;
  2164. uint8_t vdev_id;
  2165. bool is_ampdu;
  2166. uint32_t mu_ul_info_valid:1,
  2167. ofdma_ru_start_index:7,
  2168. ofdma_ru_width:7,
  2169. nss:4,
  2170. mcs:4;
  2171. /* user id */
  2172. uint8_t user_index;
  2173. uint8_t is_bss_peer;
  2174. uint32_t ast_index;
  2175. uint32_t tid;
  2176. uint32_t num_msdu;
  2177. uint16_t tcp_msdu_count;
  2178. uint16_t udp_msdu_count;
  2179. uint16_t other_msdu_count;
  2180. uint16_t frame_control;
  2181. uint8_t frame_control_info_valid;
  2182. uint16_t qos_control;
  2183. uint8_t qos_control_info_valid;
  2184. uint8_t data_sequence_control_info_valid;
  2185. uint16_t first_data_seq_ctrl;
  2186. uint32_t preamble_type;
  2187. uint16_t ht_flags;
  2188. uint16_t vht_flags;
  2189. uint16_t he_flags;
  2190. uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
  2191. uint32_t mpdu_cnt_fcs_ok;
  2192. uint32_t mpdu_cnt_fcs_err;
  2193. uint32_t mpdu_fcs_ok_bitmap[QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS];
  2194. uint32_t mpdu_ok_byte_count;
  2195. uint32_t mpdu_err_byte_count;
  2196. uint32_t retries;
  2197. uint32_t rx_ratekbps;
  2198. uint32_t rix;
  2199. uint32_t mpdu_retries;
  2200. };
  2201. /**
  2202. * struct cdp_rx_indication_ppdu - Rx PPDU indication structure
  2203. * @ppdu_id: PPDU Id
  2204. * @is_ampdu: mpdu aggregate or non-aggregate?
  2205. * @num_mpdu: Number of MPDUs in PPDU
  2206. * @reserved: Reserved bits for future use
  2207. * @num_msdu: Number of MSDUs in PPDU
  2208. * @udp_msdu_count: Number of UDP MSDUs in PPDU
  2209. * @tcp_msdu_count: Number of TCP MSDUs in PPDU
  2210. * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU
  2211. * @duration: PPDU duration
  2212. * @tid: TID number
  2213. * @peer_id: Peer ID
  2214. * @vdev_id: VAP ID
  2215. * @mac_addr: Peer MAC Address
  2216. * @first_data_seq_ctrl: Sequence control field of first data frame
  2217. * @ltf_size: ltf_size
  2218. * @stbc: When set, STBC rate was used
  2219. * @he_re: he_re (range extension)
  2220. * @bw: Bandwidth
  2221. * <enum 0 bw_20_MHz>
  2222. * <enum 1 bw_40_MHz>
  2223. * <enum 2 bw_80_MHz>
  2224. * <enum 3 bw_160_MHz>
  2225. * @nss: NSS 1,2, ...8
  2226. * @mcs: MCS index
  2227. * @preamble: preamble
  2228. * @gi: <enum 0 0_8_us_sgi > Legacy normal GI
  2229. * <enum 1 0_4_us_sgi > Legacy short GI
  2230. * <enum 2 1_6_us_sgi > HE related GI
  2231. * <enum 3 3_2_us_sgi > HE
  2232. * @dcm: dcm
  2233. * @ldpc: ldpc
  2234. * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/
  2235. * UL_BSR_TRIG/UNKNOWN
  2236. * @rssi: RSSI value (units = dB above noise floor)
  2237. * @timestamp: TSF at the reception of PPDU
  2238. * @length: PPDU length
  2239. * @channel: Channel informartion
  2240. * @lsig_A: L-SIG in 802.11 PHY header
  2241. * @frame_ctrl: frame control field
  2242. * @rix: rate index
  2243. * @rssi_chain: rssi chain per nss per bw
  2244. * @cookie: cookie to used by upper layer
  2245. * @user: per user stats in MU-user case
  2246. * @nf: noise floor
  2247. * @per_chain_rssi: rssi per antenna
  2248. * @punc_bw: punctured bw
  2249. * @phyrx_abort: rx aborted undecoded frame indication
  2250. * @phyrx_abort_reason: abort reason defined in phyrx_abort_request_info
  2251. * @l_sig_length: L SIG A length
  2252. * @l_sig_a_parity: L SIG A parity
  2253. * @l_sig_a_pkt_type: L SIG A info pkt type
  2254. * @l_sig_a_implicit_sounding: L SIG A info captured implicit sounding
  2255. * @ht_length: num of bytes in PSDU
  2256. * @ht_smoothing: Indicate ht_smoothing
  2257. * @ht_not_sounding: Indicate ht not sounding
  2258. * @ht_aggregation: Indicate ht aggregation
  2259. * @ht_stbc: Indicate ht stbc
  2260. * @ht_crc: Indicate ht crc
  2261. * @vht_crc: Indicate vht crc
  2262. * @vht_no_txop_ps: Indicate TXOP power save mode
  2263. * @bss_color_id: Indicate BSS color ID
  2264. * @beam_change: Indicates whether spatial mapping is changed
  2265. * @dl_ul_flag: Differentiates between DL and UL transmission
  2266. * @transmit_mcs: Indicates the data MCS
  2267. * @ldpc_extra_sym: LDPC extra symbol
  2268. * @special_reuse: Spatial reuse
  2269. * @ltf_sym: Indictaes HE NSTS
  2270. * @txbf: Indicates whether beamforming is applied
  2271. * @pe_disambiguity: packet extension disambiguity
  2272. * @pre_fec_pad: packet extension a factor
  2273. * @dopplar: Doppler support
  2274. * @txop_duration: Indicates the remaining time in the current TXOP
  2275. * @sig_b_mcs: MCS of HE-SIG-B
  2276. * @sig_b_dcm: DCM of HE-SIG-B
  2277. * @sig_b_sym: Number of symbols of HE-SIG-B
  2278. * @sig_b_comp: Compression mode of HE-SIG-B
  2279. * @he_crc: CRC for HE-SIG contents
  2280. * @usr_nss_sum: Sum of user nss
  2281. * @usr_ru_tones_sum: Sum of user ru_tones
  2282. */
  2283. struct cdp_rx_indication_ppdu {
  2284. uint32_t ppdu_id;
  2285. uint16_t is_ampdu:1,
  2286. num_mpdu:9,
  2287. reserved:6;
  2288. uint32_t num_msdu;
  2289. uint32_t num_bytes;
  2290. uint16_t udp_msdu_count;
  2291. uint16_t tcp_msdu_count;
  2292. uint16_t other_msdu_count;
  2293. uint16_t duration;
  2294. uint32_t tid:8,
  2295. peer_id:16;
  2296. uint8_t vdev_id;
  2297. uint8_t mac_addr[6];
  2298. uint16_t first_data_seq_ctrl;
  2299. union {
  2300. uint32_t rate_info;
  2301. struct {
  2302. uint32_t ltf_size:2,
  2303. stbc:1,
  2304. he_re:1,
  2305. bw:4,
  2306. nss:4,
  2307. mcs:4,
  2308. preamble:4,
  2309. gi:4,
  2310. dcm:1,
  2311. ldpc:1,
  2312. ppdu_type:5;
  2313. };
  2314. } u;
  2315. uint32_t rix;
  2316. uint32_t lsig_a;
  2317. uint32_t rssi;
  2318. uint64_t timestamp;
  2319. uint32_t length;
  2320. uint8_t channel;
  2321. uint8_t beamformed;
  2322. uint32_t rx_ratekbps;
  2323. uint32_t ppdu_rx_rate;
  2324. uint32_t retries;
  2325. uint32_t rx_byte_count;
  2326. uint16_t rx_ratecode;
  2327. uint8_t fcs_error_mpdus;
  2328. uint16_t frame_ctrl;
  2329. int8_t rssi_chain[SS_COUNT][MAX_BW];
  2330. struct cdp_rx_su_evm_info evm_info;
  2331. uint32_t rx_antenna;
  2332. uint8_t num_users;
  2333. struct cdp_rx_stats_ppdu_user user[CDP_MU_MAX_USERS];
  2334. uint32_t nf;
  2335. uint8_t per_chain_rssi[MAX_CHAIN];
  2336. uint8_t is_mcast_bcast;
  2337. #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
  2338. struct cdp_rx_ppdu_cfr_info cfr_info;
  2339. #endif
  2340. uint8_t punc_bw;
  2341. #ifdef QCA_UNDECODED_METADATA_SUPPORT
  2342. bool phyrx_abort;
  2343. uint8_t phyrx_abort_reason;
  2344. uint32_t l_sig_length:12,
  2345. l_sig_a_parity:1,
  2346. l_sig_a_pkt_type:4,
  2347. l_sig_a_implicit_sounding:1,
  2348. vht_crc:8,
  2349. group_id:6;
  2350. uint32_t ht_length:16,
  2351. ht_smoothing:1,
  2352. ht_not_sounding:1,
  2353. ht_aggregation:1,
  2354. ht_stbc:2,
  2355. ht_crc:8,
  2356. vht_no_txop_ps:1;
  2357. uint32_t bss_color_id:6,
  2358. beam_change:1,
  2359. dl_ul_flag:1,
  2360. transmit_mcs:4,
  2361. ldpc_extra_sym:1,
  2362. special_reuse:4,
  2363. ltf_sym:3,
  2364. txbf:1,
  2365. pe_disambiguity:1,
  2366. pre_fec_pad:4,
  2367. dopplar:1;
  2368. uint32_t txop_duration:7,
  2369. sig_b_mcs:3,
  2370. sig_b_dcm:1,
  2371. sig_b_sym:4,
  2372. sig_b_comp:1,
  2373. he_crc:4;
  2374. #endif
  2375. uint8_t usr_nss_sum;
  2376. uint32_t usr_ru_tones_sum;
  2377. };
  2378. /**
  2379. * struct cdp_rx_indication_msdu - Rx MSDU info
  2380. * @ppdu_id: PPDU to which the MSDU belongs
  2381. * @msdu_len: Length of MSDU in bytes
  2382. * @ack_frame_rssi: RSSI of the received ACK or BA frame
  2383. * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU
  2384. * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU
  2385. * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU
  2386. * @extd: Extended structure containing rate statistics
  2387. */
  2388. struct cdp_rx_indication_msdu {
  2389. uint32_t ppdu_id;
  2390. uint16_t msdu_len;
  2391. uint32_t ack_frame_rssi:8,
  2392. resvd0:1,
  2393. first_msdu:1,
  2394. last_msdu:1,
  2395. msdu_part_of_amsdu:1,
  2396. msdu_part_of_ampdu:1,
  2397. resvd1:19;
  2398. struct cdp_rate_stats extd;
  2399. };
  2400. /**
  2401. * struct cdp_config_params - Propagate configuration parameters to datapath
  2402. * @tso_enable: Enable/Disable TSO
  2403. * @lro_enable: Enable/Disable LRO
  2404. * @gro_enable: Enable/Disable GRO
  2405. * @flow_steering_enable: Enable/Disable Rx Hash based flow steering
  2406. * @p2p_tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload for P2P
  2407. * @nan_tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload for NAN
  2408. * @tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload
  2409. * @legacy_mode_checksumoffload_disable: Disable TCP/UDP Checksum Offload for
  2410. * legacy modes.
  2411. * @napi_enable: Enable/Disable Napi
  2412. * @ipa_enable: Flag indicating if IPA is enabled or not
  2413. * @tx_flow_stop_queue_threshold: Value to Pause tx queues
  2414. * @tx_flow_start_queue_offset: Available Tx descriptors to unpause
  2415. * tx queue
  2416. * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
  2417. * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
  2418. * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
  2419. */
  2420. struct cdp_config_params {
  2421. unsigned int tso_enable:1;
  2422. unsigned int lro_enable:1;
  2423. unsigned int gro_enable:1;
  2424. unsigned int flow_steering_enable:1;
  2425. unsigned int p2p_tcp_udp_checksumoffload:1;
  2426. unsigned int nan_tcp_udp_checksumoffload:1;
  2427. unsigned int tcp_udp_checksumoffload:1;
  2428. unsigned int legacy_mode_checksumoffload_disable:1;
  2429. unsigned int napi_enable:1;
  2430. unsigned int ipa_enable:1;
  2431. /* Set when QCA_LL_TX_FLOW_CONTROL_V2 is enabled */
  2432. uint8_t tx_flow_stop_queue_threshold;
  2433. uint8_t tx_flow_start_queue_offset;
  2434. uint32_t tx_comp_loop_pkt_limit;
  2435. uint32_t rx_reap_loop_pkt_limit;
  2436. uint32_t rx_hp_oos_update_limit;
  2437. };
  2438. /**
  2439. * cdp_txrx_stats_req: stats request wrapper
  2440. * used to pass request information to cdp layer
  2441. * @stats: type of stats requested
  2442. * @param0: opaque argument 0 to be passed to htt
  2443. * @param1: opaque argument 1 to be passed to htt
  2444. * @param2: opaque argument 2 to be passed to htt
  2445. * @param3: opaque argument 3 to be passed to htt
  2446. * @mac id: mac_id
  2447. */
  2448. struct cdp_txrx_stats_req {
  2449. enum cdp_stats stats;
  2450. uint32_t param0;
  2451. uint32_t param1;
  2452. uint32_t param2;
  2453. uint32_t param3;
  2454. uint32_t cookie_val;
  2455. uint8_t mac_id;
  2456. char *peer_addr;
  2457. };
  2458. /**
  2459. * struct cdp_monitor_filter - monitor filter info
  2460. * @mode: set filter mode
  2461. * @fp_mgmt: set Filter Pass MGMT Configuration
  2462. * @fp_ctrl: set Filter Pass CTRL Configuration
  2463. * @fp_data: set Filter Pass DATA Configuration
  2464. * @mo_mgmt: set Monitor Other MGMT Configuration
  2465. * @mo_ctrl: set Monitor Other CTRL Configuration
  2466. * @mo_data: set Monitor other DATA Configuration
  2467. *
  2468. */
  2469. struct cdp_monitor_filter {
  2470. uint16_t mode;
  2471. uint16_t fp_mgmt;
  2472. uint16_t fp_ctrl;
  2473. uint16_t fp_data;
  2474. uint16_t mo_mgmt;
  2475. uint16_t mo_ctrl;
  2476. uint16_t mo_data;
  2477. };
  2478. /**
  2479. * enum cdp_dp_cfg - CDP ENUMs to get to DP configation
  2480. * @cfg_dp_enable_data_stall: context passed to be used by consumer
  2481. * @cfg_dp_enable_p2p_ip_tcp_udp_checksum_offload: get P2P checksum config
  2482. * @cfg_dp_enable_nan_ip_tcp_udp_checksum_offload: get NAN TX checksum config
  2483. * @cfg_dp_enable_ip_tcp_udp_checksum_offload: get TX checksum config for others
  2484. * @cfg_dp_tso_enable: get TSO enable config
  2485. * @cfg_dp_lro_enable: get LRO enable config
  2486. * @cfg_dp_gro_enable: get GRO enable config
  2487. * @cfg_dp_tc_based_dyn_gro_enable: get TC based dynamic gro enable config
  2488. * @cfg_dp_tc_ingress_prio: priority value to be checked for tc filters
  2489. * @cfg_dp_tx_flow_start_queue_offset: get DP TX flow start queue offset
  2490. * @cfg_dp_tx_flow_stop_queue_threshold: get DP TX flow stop queue threshold
  2491. * @cfg_dp_ipa_uc_tx_buf_size: get IPA TX buf size config
  2492. * @cfg_dp_ipa_uc_tx_partition_base: get IPA UC TX partition base config
  2493. * @cfg_dp_ipa_uc_rx_ind_ring_count: get IPA rx indication ring count config
  2494. * @cfg_dp_enable_flow_steering: get flow steerint enable config
  2495. * @cfg_dp_reorder_offload_supported: get reorder offload support config
  2496. * @cfg_dp_ce_classify_enable: get CE classify enable config
  2497. * @cfg_dp_disable_intra_bss_fwd: get intra bss fwd config
  2498. * @cfg_dp_pktlog_buffer_size: get packet log buffer size config
  2499. * @cfg_dp_wow_check_rx_pending: get wow rx pending frame check config
  2500. */
  2501. enum cdp_dp_cfg {
  2502. cfg_dp_enable_data_stall,
  2503. cfg_dp_enable_p2p_ip_tcp_udp_checksum_offload,
  2504. cfg_dp_enable_nan_ip_tcp_udp_checksum_offload,
  2505. cfg_dp_enable_ip_tcp_udp_checksum_offload,
  2506. /* Disable checksum offload for legacy modes */
  2507. cfg_dp_disable_legacy_mode_csum_offload,
  2508. cfg_dp_tso_enable,
  2509. cfg_dp_lro_enable,
  2510. cfg_dp_gro_enable,
  2511. cfg_dp_tc_based_dyn_gro_enable,
  2512. cfg_dp_tc_ingress_prio,
  2513. cfg_dp_sg_enable,
  2514. cfg_dp_tx_flow_start_queue_offset,
  2515. cfg_dp_tx_flow_stop_queue_threshold,
  2516. cfg_dp_ipa_uc_tx_buf_size,
  2517. cfg_dp_ipa_uc_tx_partition_base,
  2518. cfg_dp_ipa_uc_rx_ind_ring_count,
  2519. cfg_dp_enable_flow_steering,
  2520. cfg_dp_reorder_offload_supported,
  2521. cfg_dp_ce_classify_enable,
  2522. cfg_dp_disable_intra_bss_fwd,
  2523. cfg_dp_pktlog_buffer_size,
  2524. cfg_dp_wow_check_rx_pending,
  2525. };
  2526. /**
  2527. * struct cdp_peer_cookie - cookie used when creating peer
  2528. * @ctx: context passed to be used by consumer
  2529. * @mac_addr: MAC address of peer
  2530. * @peer_id: peer id
  2531. * @pdev_id: pdev_id
  2532. * @cookie: cookie to be used by consumer
  2533. */
  2534. struct cdp_peer_cookie {
  2535. struct cdp_stats_cookie *ctx;
  2536. uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
  2537. uint8_t peer_id;
  2538. uint8_t pdev_id;
  2539. uint8_t cookie;
  2540. };
  2541. #ifdef WLAN_SUPPORT_RX_FISA
  2542. struct cdp_flow_stats {
  2543. uint32_t aggr_count;
  2544. uint32_t curr_aggr_count;
  2545. uint32_t flush_count;
  2546. uint32_t bytes_aggregated;
  2547. };
  2548. #else
  2549. /**
  2550. * cdp_flow_stats - Per-Flow (5-tuple) statistics
  2551. * @msdu_count: number of rx msdus matching this flow
  2552. * @mon_msdu_count: number of msdus matching this flow in mon path
  2553. *
  2554. * HW also includes msdu_byte_count and timestamp, which
  2555. * are not currently tracked in SW.
  2556. */
  2557. struct cdp_flow_stats {
  2558. uint32_t msdu_count;
  2559. #ifdef QCA_TEST_MON_PF_TAGS_STATS
  2560. uint32_t mon_msdu_count;
  2561. #endif
  2562. };
  2563. #endif
  2564. /**
  2565. * cdp_flow_fst_operation - RX FST operations allowed
  2566. */
  2567. enum cdp_flow_fst_operation {
  2568. CDP_FLOW_FST_ENTRY_ADD,
  2569. CDP_FLOW_FST_ENTRY_DEL,
  2570. CDP_FLOW_FST_RX_BYPASS_ENABLE,
  2571. CDP_FLOW_FST_RX_BYPASS_DISABLE
  2572. };
  2573. /**
  2574. * cdp_flow_protocol_type - RX FST supported protocol types, mapped to HW spec
  2575. */
  2576. enum cdp_flow_protocol_type {
  2577. CDP_FLOW_PROTOCOL_TYPE_TCP = 6,
  2578. CDP_FLOW_PROTOCOL_TYPE_UDP = 17,
  2579. };
  2580. /**
  2581. * cdp_rx_flow_tuple_info - RX flow tuple info used for addition/deletion
  2582. * @dest_ip_127_96: destination IP address bit fields 96-127
  2583. * @dest_ip_95_64: destination IP address bit fields 64-95
  2584. * @dest_ip_63_32: destination IP address bit fields 32-63
  2585. * @dest_ip_31_0: destination IP address bit fields 0-31
  2586. * @src_ip_127_96: source IP address bit fields 96-127
  2587. * @src_ip_95_64: source IP address bit fields 64-95
  2588. * @src_ip_63_32: source IP address bit fields 32-63
  2589. * @src_ip_31_0: source IP address bit fields 0-31
  2590. * @dest_port: destination port of flow
  2591. * @src_port: source port of flow
  2592. * @l4_protocol: protocol type in flow (TCP/UDP)
  2593. */
  2594. struct cdp_rx_flow_tuple_info {
  2595. #ifdef WLAN_SUPPORT_RX_FISA
  2596. uint8_t tuple_populated;
  2597. uint8_t is_exception;
  2598. #endif
  2599. uint32_t dest_ip_127_96;
  2600. uint32_t dest_ip_95_64;
  2601. uint32_t dest_ip_63_32;
  2602. uint32_t dest_ip_31_0;
  2603. uint32_t src_ip_127_96;
  2604. uint32_t src_ip_95_64;
  2605. uint32_t src_ip_63_32;
  2606. uint32_t src_ip_31_0;
  2607. uint16_t dest_port;
  2608. uint16_t src_port;
  2609. uint16_t l4_protocol;
  2610. };
  2611. /**
  2612. * cdp_rx_flow_info - RX flow info used for addition/deletion
  2613. * @is_addr_ipv4: indicates whether given IP address is IPv4/IPv6
  2614. * @op_code: add/delete/enable/disable operation requested
  2615. * @flow_tupe_info: structure containing tuple info
  2616. * @fse_metadata: metadata to be set in RX flow
  2617. */
  2618. struct cdp_rx_flow_info {
  2619. bool is_addr_ipv4;
  2620. enum cdp_flow_fst_operation op_code;
  2621. struct cdp_rx_flow_tuple_info flow_tuple_info;
  2622. uint16_t fse_metadata;
  2623. };
  2624. #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS
  2625. /**
  2626. * cdp_scan_spcl_vap_stats - Special vap statistics info
  2627. * @rx_ok_pkts: rx fcs ok pkts count
  2628. * @rx_ok_bytes: rx fcs ok bytes count
  2629. * @rx_err_pkts: rx fcs err pkts count
  2630. * @rx_err_bytes: rx fcs err bytes count
  2631. * @rx_mgmt_pkts: rx mgmt pkts count
  2632. * @rx_ctrl_pkts: rx ctrl pkts count
  2633. * @rx_data_pkts: rx data pkts count
  2634. */
  2635. struct cdp_scan_spcl_vap_stats {
  2636. uint64_t rx_ok_pkts;
  2637. uint64_t rx_ok_bytes;
  2638. uint64_t rx_err_pkts;
  2639. uint64_t rx_err_bytes;
  2640. uint64_t rx_mgmt_pkts;
  2641. uint64_t rx_ctrl_pkts;
  2642. uint64_t rx_data_pkts;
  2643. };
  2644. #endif
  2645. /**
  2646. * cdp_soc_attach_params
  2647. *
  2648. * @hif_handle: Opaque HIF handle
  2649. * @htc_handle: Opaque HTC handle
  2650. * @qdf_osdev: QDF device
  2651. * @ol_ops: Offload Operations
  2652. * @device_id: Device ID
  2653. * @ml_context: DP ML object conext
  2654. * @mlo_chip_id: MLO chip id, for legacy SOCs chip_id need to 0
  2655. * @mlo_enabled: MLO enable bit
  2656. */
  2657. struct cdp_soc_attach_params {
  2658. struct hif_opaque_softc *hif_handle;
  2659. HTC_HANDLE htc_handle;
  2660. qdf_device_t qdf_osdev;
  2661. struct ol_if_ops *ol_ops;
  2662. uint16_t device_id;
  2663. struct cdp_mlo_ctxt *ml_context;
  2664. uint8_t mlo_chip_id;
  2665. uint8_t mlo_enabled;
  2666. };
  2667. /*
  2668. * cdp_pdev_attach_params
  2669. *
  2670. * @htc_handle: HTC handle for host-target interface
  2671. * @qdf_osdev: QDF OS device
  2672. * @pdev_id: PDEV ID
  2673. * @mlo_link_id: ML link id
  2674. */
  2675. struct cdp_pdev_attach_params {
  2676. HTC_HANDLE htc_handle;
  2677. qdf_device_t qdf_osdev;
  2678. uint8_t pdev_id;
  2679. uint32_t mlo_link_id;
  2680. };
  2681. #endif