cdp_txrx_cmn_struct.h 85 KB

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