cdp_txrx_cmn_struct.h 100 KB

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