cdp_txrx_cmn_struct.h 85 KB

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