cdp_txrx_cmn_struct.h 86 KB

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