cdp_txrx_cmn_struct.h 71 KB

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