wmi_unified_priv.h 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590
  1. /*
  2. * Copyright (c) 2013-2019 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. * This file contains the API definitions for the Unified Wireless
  20. * Module Interface (WMI).
  21. */
  22. #ifndef _WMI_UNIFIED_PRIV_H_
  23. #define _WMI_UNIFIED_PRIV_H_
  24. #include <osdep.h>
  25. #include "wmi_unified_api.h"
  26. #include "wmi_unified_param.h"
  27. #include "wlan_scan_ucfg_api.h"
  28. #include "qdf_atomic.h"
  29. #include <wbuff.h>
  30. #ifdef WLAN_FW_OFFLOAD
  31. #include "wlan_fwol_public_structs.h"
  32. #endif
  33. #ifdef DFS_COMPONENT_ENABLE
  34. #include <wlan_dfs_public_struct.h>
  35. #endif
  36. #include <qdf_threads.h>
  37. #ifdef WLAN_SUPPORT_GREEN_AP
  38. #include "wlan_green_ap_api.h"
  39. #endif
  40. #ifdef WLAN_FEATURE_NAN
  41. #include "nan_public_structs.h"
  42. #endif
  43. #ifdef WLAN_SUPPORT_TWT
  44. #include "wmi_unified_twt_param.h"
  45. #endif
  46. #ifdef WMI_SMART_ANT_SUPPORT
  47. #include "wmi_unified_smart_ant_param.h"
  48. #endif
  49. #ifdef WMI_DBR_SUPPORT
  50. #include "wmi_unified_dbr_param.h"
  51. #endif
  52. #ifdef WMI_ATF_SUPPORT
  53. #include "wmi_unified_atf_param.h"
  54. #endif
  55. #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP
  56. #include <wlan_interop_issues_ap_public_structs.h>
  57. #endif
  58. #define WMI_UNIFIED_MAX_EVENT 0x100
  59. #ifdef WMI_EXT_DBG
  60. #define WMI_EXT_DBG_DIR "WMI_EXT_DBG"
  61. #define WMI_EXT_DBG_FILE "wmi_log"
  62. #define WMI_EXT_DBG_FILE_PERM (QDF_FILE_USR_READ | \
  63. QDF_FILE_GRP_READ | \
  64. QDF_FILE_OTH_READ)
  65. #define WMI_EXT_DBG_QUEUE_SIZE 1024
  66. #define WMI_EXT_DBG_DUMP_ROW_SIZE 16
  67. #define WMI_EXT_DBG_DUMP_GROUP_SIZE 1
  68. /**
  69. * enum WMI_MSG_TYPE - WMI message types
  70. * @ WMI_MSG_TYPE_CMD - Message is of type WMI command
  71. * @ WMI_MSG_TYPE_EVENT - Message is of type WMI event
  72. */
  73. enum WMI_MSG_TYPE {
  74. WMI_MSG_TYPE_CMD = 0,
  75. WMI_MSG_TYPE_EVENT,
  76. };
  77. /**
  78. * struct wmi_ext_dbg_msg - WMI command/event msg details
  79. * @ node - qdf list node of wmi messages
  80. * @ len - command/event message length
  81. * @ ts - Time of WMI command/event handling
  82. * @ WMI_MSG_TYPE - message type
  83. * @ bug - command/event buffer
  84. */
  85. struct wmi_ext_dbg_msg {
  86. qdf_list_node_t node;
  87. uint32_t len;
  88. uint64_t ts;
  89. enum WMI_MSG_TYPE type;
  90. uint8_t buf[0];
  91. };
  92. #endif /*WMI_EXT_DBG */
  93. #ifdef WMI_INTERFACE_EVENT_LOGGING
  94. #ifndef WMI_EVENT_DEBUG_MAX_ENTRY
  95. #define WMI_EVENT_DEBUG_MAX_ENTRY (1024)
  96. #endif
  97. #define WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH (16)
  98. /* wmi_mgmt commands */
  99. #ifndef WMI_MGMT_EVENT_DEBUG_MAX_ENTRY
  100. #define WMI_MGMT_EVENT_DEBUG_MAX_ENTRY (256)
  101. #endif
  102. /* wmi diag rx events max buffer */
  103. #ifndef WMI_DIAG_RX_EVENT_DEBUG_MAX_ENTRY
  104. #define WMI_DIAG_RX_EVENT_DEBUG_MAX_ENTRY (256)
  105. #endif
  106. #define wmi_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_WMI, ## params)
  107. #define wmi_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_WMI, ## params)
  108. #define wmi_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_WMI, ## params)
  109. #define wmi_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_WMI, ## params)
  110. #define wmi_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_WMI, ## params)
  111. #define wmi_nofl_alert(params...) \
  112. QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_WMI, ## params)
  113. #define wmi_nofl_err(params...) \
  114. QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_WMI, ## params)
  115. #define wmi_nofl_warn(params...) \
  116. QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_WMI, ## params)
  117. #define wmi_nofl_info(params...) \
  118. QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_WMI, ## params)
  119. #define wmi_nofl_debug(params...) \
  120. QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_WMI, ## params)
  121. #define wmi_alert_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_WMI, params)
  122. #define wmi_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_WMI, params)
  123. #define wmi_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_WMI, params)
  124. #define wmi_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_WMI, params)
  125. #define wmi_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_WMI, params)
  126. /**
  127. * struct wmi_command_debug - WMI command log buffer data type
  128. * @ command - Store WMI Command id
  129. * @ data - Stores WMI command data
  130. * @ time - Time of WMI command handling
  131. */
  132. struct wmi_command_debug {
  133. uint32_t command;
  134. /*16 bytes of WMI cmd excluding TLV and WMI headers */
  135. uint32_t data[WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH/sizeof(uint32_t)];
  136. uint64_t time;
  137. };
  138. /**
  139. * struct wmi_event_debug - WMI event log buffer data type
  140. * @ command - Store WMI Event id
  141. * @ data - Stores WMI Event data
  142. * @ time - Time of WMI Event handling
  143. */
  144. struct wmi_event_debug {
  145. uint32_t event;
  146. /*16 bytes of WMI event data excluding TLV header */
  147. uint32_t data[WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH/sizeof(uint32_t)];
  148. uint64_t time;
  149. };
  150. /**
  151. * struct wmi_command_header - Type for accessing frame data
  152. * @ type - 802.11 Frame type
  153. * @ subType - 802.11 Frame subtype
  154. * @ protVer - 802.11 Version
  155. */
  156. struct wmi_command_header {
  157. #ifndef ANI_LITTLE_BIT_ENDIAN
  158. uint32_t sub_type:4;
  159. uint32_t type:2;
  160. uint32_t prot_ver:2;
  161. #else
  162. uint32_t prot_ver:2;
  163. uint32_t type:2;
  164. uint32_t sub_type:4;
  165. #endif
  166. };
  167. /**
  168. * struct wmi_log_buf_t - WMI log buffer information type
  169. * @buf - Refernce to WMI log buffer
  170. * @ length - length of buffer
  171. * @ buf_tail_idx - Tail index of buffer
  172. * @ p_buf_tail_idx - refernce to buffer tail index. It is added to accommodate
  173. * unified design since MCL uses global variable for buffer tail index
  174. * @ size - the size of the buffer in number of entries
  175. */
  176. struct wmi_log_buf_t {
  177. void *buf;
  178. uint32_t length;
  179. uint32_t buf_tail_idx;
  180. uint32_t *p_buf_tail_idx;
  181. uint32_t size;
  182. };
  183. /**
  184. * struct wmi_debug_log_info - Meta data to hold information of all buffers
  185. * used for WMI logging
  186. * @wmi_command_log_buf_info - Buffer info for WMI Command log
  187. * @wmi_command_tx_cmp_log_buf_info - Buffer info for WMI Command Tx completion
  188. * log
  189. * @wmi_event_log_buf_info - Buffer info for WMI Event log
  190. * @wmi_rx_event_log_buf_info - Buffer info for WMI event received log
  191. * @wmi_mgmt_command_log_buf_info - Buffer info for WMI Management Command log
  192. * @wmi_mgmt_command_tx_cmp_log_buf_info - Buffer info for WMI Management
  193. * Command Tx completion log
  194. * @wmi_mgmt_event_log_buf_info - Buffer info for WMI Management event log
  195. * @wmi_diag_event_log_buf_info - Buffer info for WMI diag event log
  196. * @wmi_record_lock - Lock WMI recording
  197. * @wmi_logging_enable - Enable/Disable state for WMI logging
  198. * @wmi_id_to_name - Function refernce to API to convert Command id to
  199. * string name
  200. * @wmi_log_debugfs_dir - refernce to debugfs directory
  201. */
  202. struct wmi_debug_log_info {
  203. struct wmi_log_buf_t wmi_command_log_buf_info;
  204. struct wmi_log_buf_t wmi_command_tx_cmp_log_buf_info;
  205. struct wmi_log_buf_t wmi_event_log_buf_info;
  206. struct wmi_log_buf_t wmi_rx_event_log_buf_info;
  207. struct wmi_log_buf_t wmi_mgmt_command_log_buf_info;
  208. struct wmi_log_buf_t wmi_mgmt_command_tx_cmp_log_buf_info;
  209. struct wmi_log_buf_t wmi_mgmt_event_log_buf_info;
  210. struct wmi_log_buf_t wmi_diag_event_log_buf_info;
  211. qdf_spinlock_t wmi_record_lock;
  212. bool wmi_logging_enable;
  213. struct dentry *wmi_log_debugfs_dir;
  214. };
  215. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  216. #ifdef WLAN_OPEN_SOURCE
  217. struct fwdebug {
  218. struct sk_buff_head fwlog_queue;
  219. struct completion fwlog_completion;
  220. A_BOOL fwlog_open;
  221. };
  222. #endif /* WLAN_OPEN_SOURCE */
  223. /**
  224. * struct wmi_wq_dbg_info - WMI WQ debug info
  225. * @ wd_msg_type_id - wmi event id
  226. * @ wmi_wq - WMI workqueue struct
  227. * @ task - WMI workqueue task struct
  228. */
  229. struct wmi_wq_dbg_info {
  230. uint32_t wd_msg_type_id;
  231. qdf_workqueue_t *wmi_wq;
  232. qdf_thread_t *task;
  233. };
  234. struct wmi_ops {
  235. QDF_STATUS (*send_vdev_create_cmd)(wmi_unified_t wmi_handle,
  236. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  237. struct vdev_create_params *param);
  238. QDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle,
  239. uint8_t if_id);
  240. QDF_STATUS (*send_vdev_nss_chain_params_cmd)(wmi_unified_t wmi_handle,
  241. uint8_t vdev_id,
  242. struct vdev_nss_chains *user_cfg);
  243. QDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi,
  244. uint8_t vdev_id);
  245. QDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi,
  246. uint8_t vdev_id);
  247. QDF_STATUS (*send_vdev_start_cmd)(wmi_unified_t wmi,
  248. struct vdev_start_params *req);
  249. QDF_STATUS (*send_vdev_set_nac_rssi_cmd)(wmi_unified_t wmi,
  250. struct vdev_scan_nac_rssi_params *req);
  251. QDF_STATUS (*send_peer_flush_tids_cmd)(wmi_unified_t wmi,
  252. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  253. struct peer_flush_params *param);
  254. QDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi,
  255. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  256. uint8_t vdev_id);
  257. QDF_STATUS (*send_peer_delete_all_cmd)(
  258. wmi_unified_t wmi,
  259. struct peer_delete_all_params *param);
  260. QDF_STATUS
  261. (*send_peer_unmap_conf_cmd)(wmi_unified_t wmi,
  262. uint8_t vdev_id,
  263. uint32_t peer_id_cnt,
  264. uint16_t *peer_id_list);
  265. QDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
  266. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  267. struct peer_set_params *param);
  268. QDF_STATUS (*send_vdev_up_cmd)(wmi_unified_t wmi,
  269. uint8_t bssid[QDF_MAC_ADDR_SIZE],
  270. struct vdev_up_params *params);
  271. QDF_STATUS (*send_peer_create_cmd)(wmi_unified_t wmi,
  272. struct peer_create_params *param);
  273. #ifdef WLAN_SUPPORT_GREEN_AP
  274. QDF_STATUS (*send_green_ap_ps_cmd)(wmi_unified_t wmi_handle,
  275. uint32_t value, uint8_t pdev_id);
  276. QDF_STATUS (*extract_green_ap_egap_status_info)(
  277. uint8_t *evt_buf,
  278. struct wlan_green_ap_egap_status_info *egap_status_info_params);
  279. #endif
  280. QDF_STATUS
  281. (*send_pdev_utf_cmd)(wmi_unified_t wmi_handle,
  282. struct pdev_utf_params *param,
  283. uint8_t mac_id);
  284. QDF_STATUS
  285. (*send_pdev_param_cmd)(wmi_unified_t wmi_handle,
  286. struct pdev_params *param,
  287. uint8_t mac_id);
  288. QDF_STATUS
  289. (*send_pdev_set_hw_mode_cmd)(wmi_unified_t wmi_handle,
  290. uint32_t hw_mode_index);
  291. QDF_STATUS (*send_suspend_cmd)(wmi_unified_t wmi_handle,
  292. struct suspend_params *param,
  293. uint8_t mac_id);
  294. QDF_STATUS (*send_resume_cmd)(wmi_unified_t wmi_handle,
  295. uint8_t mac_id);
  296. #ifdef FEATURE_WLAN_D0WOW
  297. QDF_STATUS (*send_d0wow_enable_cmd)(wmi_unified_t wmi_handle,
  298. uint8_t mac_id);
  299. QDF_STATUS (*send_d0wow_disable_cmd)(wmi_unified_t wmi_handle,
  300. uint8_t mac_id);
  301. #endif
  302. #ifdef FEATURE_BLACKLIST_MGR
  303. QDF_STATUS
  304. (*send_reject_ap_list_cmd)(struct wmi_unified *wmi_handle,
  305. struct reject_ap_params *reject_params);
  306. #endif
  307. QDF_STATUS (*send_wow_enable_cmd)(wmi_unified_t wmi_handle,
  308. struct wow_cmd_params *param,
  309. uint8_t mac_id);
  310. QDF_STATUS (*send_set_ap_ps_param_cmd)(wmi_unified_t wmi_handle,
  311. uint8_t *peer_addr,
  312. struct ap_ps_params *param);
  313. QDF_STATUS (*send_set_sta_ps_param_cmd)(wmi_unified_t wmi_handle,
  314. struct sta_ps_params *param);
  315. QDF_STATUS (*send_crash_inject_cmd)(wmi_unified_t wmi_handle,
  316. struct crash_inject *param);
  317. QDF_STATUS
  318. (*send_dbglog_cmd)(wmi_unified_t wmi_handle,
  319. struct dbglog_params *dbglog_param);
  320. QDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle,
  321. struct vdev_set_params *param);
  322. QDF_STATUS (*send_vdev_sifs_trigger_cmd)(wmi_unified_t wmi_handle,
  323. struct sifs_trigger_param *param);
  324. QDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle,
  325. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  326. struct stats_request_params *param);
  327. QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
  328. WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id);
  329. QDF_STATUS (*send_packet_log_disable_cmd)(wmi_unified_t wmi_handle,
  330. uint8_t mac_id);
  331. QDF_STATUS (*send_fd_tmpl_cmd)(wmi_unified_t wmi_handle,
  332. struct fils_discovery_tmpl_params *param);
  333. QDF_STATUS (*send_beacon_send_cmd)(wmi_unified_t wmi_handle,
  334. struct beacon_params *param);
  335. QDF_STATUS (*send_beacon_tmpl_send_cmd)(wmi_unified_t wmi_handle,
  336. struct beacon_tmpl_params *param);
  337. QDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle,
  338. struct peer_assoc_params *param);
  339. QDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle,
  340. struct scan_req_params *param);
  341. QDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle,
  342. struct scan_cancel_param *param);
  343. QDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle,
  344. struct scan_chan_list_params *param);
  345. QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
  346. struct wmi_mgmt_params *param);
  347. QDF_STATUS (*send_offchan_data_tx_cmd)(wmi_unified_t wmi_handle,
  348. struct wmi_offchan_data_tx_params *param);
  349. QDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle,
  350. uint32_t param_value);
  351. QDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle,
  352. uint32_t vdev_id, uint8_t val);
  353. QDF_STATUS (*send_idle_roam_monitor_cmd)(wmi_unified_t wmi_handle,
  354. uint8_t val);
  355. QDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle);
  356. #ifdef CONVERGED_P2P_ENABLE
  357. QDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle,
  358. struct p2p_ps_params *oppps);
  359. QDF_STATUS (*send_set_p2pgo_noa_req_cmd)(wmi_unified_t wmi_handle,
  360. struct p2p_ps_params *noa);
  361. #ifdef FEATURE_P2P_LISTEN_OFFLOAD
  362. QDF_STATUS (*send_p2p_lo_start_cmd)(wmi_unified_t wmi_handle,
  363. struct p2p_lo_start *param);
  364. QDF_STATUS (*send_p2p_lo_stop_cmd)(wmi_unified_t wmi_handle,
  365. uint8_t vdev_id);
  366. #endif /* FEATURE_P2P_LISTEN_OFFLOAD */
  367. #endif /* CONVERGED_P2P_ENABLE */
  368. QDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle,
  369. uint8_t vdev_id,
  370. int value);
  371. QDF_STATUS (*send_set_mimops_cmd)(wmi_unified_t wmi_handle,
  372. uint8_t vdev_id, int value);
  373. QDF_STATUS (*send_set_sta_uapsd_auto_trig_cmd)(wmi_unified_t wmi_handle,
  374. struct sta_uapsd_trig_params *param);
  375. #ifdef WLAN_FEATURE_DSRC
  376. QDF_STATUS (*send_ocb_set_utc_time_cmd)(wmi_unified_t wmi_handle,
  377. struct ocb_utc_param *utc);
  378. QDF_STATUS (*send_ocb_get_tsf_timer_cmd)(wmi_unified_t wmi_handle,
  379. uint8_t vdev_id);
  380. QDF_STATUS (*send_ocb_start_timing_advert_cmd)(wmi_unified_t wmi_handle,
  381. struct ocb_timing_advert_param *timing_advert);
  382. QDF_STATUS (*send_ocb_stop_timing_advert_cmd)(wmi_unified_t wmi_handle,
  383. struct ocb_timing_advert_param *timing_advert);
  384. QDF_STATUS (*send_dcc_get_stats_cmd)(wmi_unified_t wmi_handle,
  385. struct ocb_dcc_get_stats_param *get_stats_param);
  386. QDF_STATUS (*send_dcc_clear_stats_cmd)(wmi_unified_t wmi_handle,
  387. uint32_t vdev_id, uint32_t dcc_stats_bitmap);
  388. QDF_STATUS (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle,
  389. struct ocb_dcc_update_ndl_param *update_ndl_param);
  390. QDF_STATUS (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle,
  391. struct ocb_config *config);
  392. QDF_STATUS (*extract_ocb_chan_config_resp)(wmi_unified_t wmi_hdl,
  393. void *evt_buf,
  394. uint32_t *status);
  395. QDF_STATUS (*extract_ocb_tsf_timer)(wmi_unified_t wmi_hdl,
  396. void *evt_buf,
  397. struct ocb_get_tsf_timer_response *resp);
  398. QDF_STATUS (*extract_dcc_update_ndl_resp)(wmi_unified_t wmi_hdl,
  399. void *evt_buf, struct ocb_dcc_update_ndl_response *resp);
  400. QDF_STATUS (*extract_dcc_stats)(wmi_unified_t wmi_hdl,
  401. void *evt_buf,
  402. struct ocb_dcc_get_stats_response **response);
  403. #endif /* WLAN_FEATURE_DSRC */
  404. QDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle,
  405. struct wmi_lro_config_cmd_t *wmi_lro_cmd);
  406. QDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle,
  407. struct thermal_cmd_params *thermal_info);
  408. QDF_STATUS (*send_peer_rate_report_cmd)(wmi_unified_t wmi_handle,
  409. struct wmi_peer_rate_report_params *rate_report_params);
  410. #ifdef WMI_CONCURRENCY_SUPPORT
  411. QDF_STATUS (*send_set_mcc_channel_time_quota_cmd)
  412. (wmi_unified_t wmi_handle,
  413. uint32_t adapter_1_chan_freq,
  414. uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
  415. QDF_STATUS (*send_set_mcc_channel_time_latency_cmd)
  416. (wmi_unified_t wmi_handle,
  417. uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
  418. QDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
  419. wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
  420. uint32_t pdev_id);
  421. #endif /* WMI_CONCURRENCY_SUPPORT */
  422. QDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle,
  423. uint32_t vdev_id, uint8_t *p2p_ie);
  424. QDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle,
  425. uint8_t vdev_id,
  426. struct wmi_probe_resp_params *probe_rsp_info);
  427. QDF_STATUS (*send_setup_install_key_cmd)(wmi_unified_t wmi_handle,
  428. struct set_key_params *key_params);
  429. QDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
  430. struct wifi_passpoint_req_param *req);
  431. #ifdef WMI_ROAM_SUPPORT
  432. #ifdef FEATURE_LFR_SUBNET_DETECTION
  433. QDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle,
  434. struct gateway_update_req_param *req);
  435. #endif /* FEATURE_LFR_SUBNET_DETECTION */
  436. #ifdef FEATURE_RSSI_MONITOR
  437. QDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle,
  438. struct rssi_monitor_param *req);
  439. #endif /* FEATURE_RSSI_MONITOR */
  440. QDF_STATUS (*send_roam_scan_offload_rssi_thresh_cmd)(wmi_unified_t wmi_handle,
  441. struct roam_offload_scan_rssi_params *roam_req);
  442. QDF_STATUS (*send_roam_mawc_params_cmd)(wmi_unified_t wmi_handle,
  443. struct wmi_mawc_roam_params *params);
  444. QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle,
  445. struct roam_scan_filter_params *roam_req);
  446. QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle,
  447. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  448. struct roam_offload_scan_params *roam_req);
  449. QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle,
  450. struct ap_profile_params *ap_profile);
  451. QDF_STATUS (*send_roam_scan_offload_cmd)(wmi_unified_t wmi_handle,
  452. uint32_t command, uint32_t vdev_id);
  453. QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle,
  454. struct roam_scan_period_params *params);
  455. QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle,
  456. uint8_t chan_count,
  457. uint32_t *chan_list,
  458. uint8_t list_type, uint32_t vdev_id);
  459. QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle,
  460. uint32_t vdev_id,
  461. int32_t rssi_change_thresh,
  462. uint32_t bcn_rssi_weight,
  463. uint32_t hirssi_delay_btw_scans);
  464. QDF_STATUS (*send_per_roam_config_cmd)(wmi_unified_t wmi_handle,
  465. struct wmi_per_roam_config_req *req_buf);
  466. QDF_STATUS (*send_offload_11k_cmd)(wmi_unified_t wmi_handle,
  467. struct wmi_11k_offload_params *params);
  468. QDF_STATUS (*send_invoke_neighbor_report_cmd)(wmi_unified_t wmi_handle,
  469. struct wmi_invoke_neighbor_report_params *params);
  470. QDF_STATUS (*send_roam_bss_load_config)(wmi_unified_t wmi_handle,
  471. struct wmi_bss_load_config *params);
  472. QDF_STATUS (*send_disconnect_roam_params)(
  473. wmi_unified_t wmi_handle,
  474. struct wmi_disconnect_roam_params *req);
  475. QDF_STATUS (*send_idle_roam_params)(wmi_unified_t wmi_handle,
  476. struct wmi_idle_roam_params *req);
  477. QDF_STATUS (*send_roam_preauth_status)(wmi_unified_t wmi_handle,
  478. struct wmi_roam_auth_status_params *params);
  479. QDF_STATUS (*send_btm_config)(wmi_unified_t wmi_handle,
  480. struct wmi_btm_config *params);
  481. QDF_STATUS (*send_limit_off_chan_cmd)(wmi_unified_t wmi_handle,
  482. struct wmi_limit_off_chan_param *limit_off_chan_param);
  483. #ifdef WLAN_FEATURE_FILS_SK
  484. QDF_STATUS (*send_roam_scan_hlp_cmd) (wmi_unified_t wmi_handle,
  485. struct hlp_params *params);
  486. #endif /* WLAN_FEATURE_FILS_SK */
  487. #ifdef FEATURE_WLAN_ESE
  488. QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle,
  489. const struct plm_req_params *plm);
  490. QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle,
  491. const struct plm_req_params *plm);
  492. #endif /* FEATURE_WLAN_ESE */
  493. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  494. QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg,
  495. uint8_t is_add_ts);
  496. QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
  497. uint8_t vdev_id);
  498. QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle,
  499. struct wmi_roam_invoke_cmd *roaminvoke,
  500. uint32_t ch_hz);
  501. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  502. #endif /* WMI_ROAM_SUPPORT */
  503. QDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle,
  504. struct scan_mac_oui *psetoui);
  505. QDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
  506. struct wifi_passpoint_req_param *req);
  507. QDF_STATUS (*send_set_epno_network_list_cmd)(wmi_unified_t wmi_handle,
  508. struct wifi_enhanced_pno_params *req);
  509. QDF_STATUS (*send_extscan_get_capabilities_cmd)(wmi_unified_t wmi_handle,
  510. struct extscan_capabilities_params *pgetcapab);
  511. QDF_STATUS (*send_extscan_get_cached_results_cmd)(wmi_unified_t wmi_handle,
  512. struct extscan_cached_result_params *pcached_results);
  513. QDF_STATUS (*send_extscan_stop_change_monitor_cmd)(wmi_unified_t wmi_handle,
  514. struct extscan_capabilities_reset_params *reset_req);
  515. QDF_STATUS (*send_extscan_start_change_monitor_cmd)(wmi_unified_t wmi_handle,
  516. struct extscan_set_sig_changereq_params *
  517. psigchange);
  518. QDF_STATUS (*send_extscan_stop_hotlist_monitor_cmd)(wmi_unified_t wmi_handle,
  519. struct extscan_bssid_hotlist_reset_params *photlist_reset);
  520. QDF_STATUS (*send_extscan_start_hotlist_monitor_cmd)(wmi_unified_t wmi_handle,
  521. struct extscan_bssid_hotlist_set_params *params);
  522. QDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle,
  523. struct extscan_stop_req_params *pstopcmd);
  524. QDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle,
  525. struct wifi_scan_cmd_req_params *pstart);
  526. QDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle,
  527. uint8_t vdev_id);
  528. QDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  529. QDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
  530. struct pno_scan_req_params *pno);
  531. QDF_STATUS (*send_nlo_mawc_cmd)(wmi_unified_t wmi_handle,
  532. struct nlo_mawc_params *params);
  533. #ifdef IPA_OFFLOAD
  534. QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
  535. struct ipa_uc_offload_control_params *ipa_offload);
  536. #endif
  537. #ifdef WLAN_FEATURE_LINK_LAYER_STATS
  538. QDF_STATUS (*send_process_ll_stats_clear_cmd)(wmi_unified_t wmi_handle,
  539. const struct ll_stats_clear_params *clear_req);
  540. QDF_STATUS (*send_process_ll_stats_set_cmd)(wmi_unified_t wmi_handle,
  541. const struct ll_stats_set_params *set_req);
  542. QDF_STATUS (*send_process_ll_stats_get_cmd)(wmi_unified_t wmi_handle,
  543. const struct ll_stats_get_params *get_req);
  544. #endif
  545. QDF_STATUS (*send_congestion_cmd)(wmi_unified_t wmi_handle,
  546. uint8_t vdev_id);
  547. QDF_STATUS (*send_snr_request_cmd)(wmi_unified_t wmi_handle);
  548. QDF_STATUS (*send_snr_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  549. QDF_STATUS (*send_link_status_req_cmd)(wmi_unified_t wmi_handle,
  550. struct link_status_params *link_status);
  551. #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
  552. QDF_STATUS (*send_add_wow_wakeup_event_cmd)(wmi_unified_t wmi_handle,
  553. uint32_t vdev_id,
  554. uint32_t *bitmap,
  555. bool enable);
  556. QDF_STATUS (*send_wow_patterns_to_fw_cmd)(wmi_unified_t wmi_handle,
  557. uint8_t vdev_id, uint8_t ptrn_id,
  558. const uint8_t *ptrn, uint8_t ptrn_len,
  559. uint8_t ptrn_offset, const uint8_t *mask,
  560. uint8_t mask_len, bool user,
  561. uint8_t default_patterns);
  562. QDF_STATUS (*send_enable_arp_ns_offload_cmd)(wmi_unified_t wmi_handle,
  563. struct pmo_arp_offload_params *arp_offload_req,
  564. struct pmo_ns_offload_params *ns_offload_req,
  565. uint8_t vdev_id);
  566. QDF_STATUS (*send_conf_hw_filter_cmd)(wmi_unified_t wmi,
  567. struct pmo_hw_filter_params *req);
  568. QDF_STATUS (*send_enable_enhance_multicast_offload_cmd)(
  569. wmi_unified_t wmi_handle,
  570. uint8_t vdev_id, bool action);
  571. QDF_STATUS (*send_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle,
  572. uint8_t vdev_id,
  573. struct qdf_mac_addr multicast_addr,
  574. bool clearList);
  575. QDF_STATUS (*send_multiple_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle,
  576. uint8_t vdev_id,
  577. struct pmo_mcast_filter_params *filter_param);
  578. QDF_STATUS (*send_gtk_offload_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  579. struct pmo_gtk_req *params,
  580. bool enable_offload,
  581. uint32_t gtk_offload_opcode);
  582. QDF_STATUS (*send_process_gtk_offload_getinfo_cmd)(wmi_unified_t wmi_handle,
  583. uint8_t vdev_id,
  584. uint64_t offload_req_opcode);
  585. QDF_STATUS (*send_wow_sta_ra_filter_cmd)(wmi_unified_t wmi_handle,
  586. uint8_t vdev_id, uint8_t default_pattern,
  587. uint16_t rate_limit_interval);
  588. QDF_STATUS (*send_action_frame_patterns_cmd)(wmi_unified_t wmi_handle,
  589. struct pmo_action_wakeup_set_params *action_params);
  590. QDF_STATUS (*extract_gtk_rsp_event)(wmi_unified_t wmi_handle,
  591. void *evt_buf,
  592. struct pmo_gtk_rsp_params *gtk_rsp_param, uint32_t len);
  593. QDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle,
  594. uint8_t ptrn_id,
  595. uint8_t vdev_id);
  596. QDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle);
  597. QDF_STATUS (*send_wow_timer_pattern_cmd)(wmi_unified_t wmi_handle,
  598. uint8_t vdev_id, uint32_t cookie, uint32_t time);
  599. #ifdef FEATURE_WLAN_LPHB
  600. QDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle,
  601. wmi_hb_set_enable_cmd_fixed_param *params);
  602. QDF_STATUS (*send_lphb_config_tcp_params_cmd)(wmi_unified_t wmi_handle,
  603. wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
  604. QDF_STATUS (*send_lphb_config_tcp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
  605. wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp);
  606. QDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle,
  607. wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
  608. QDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
  609. wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req);
  610. #endif /* FEATURE_WLAN_LPHB */
  611. #ifdef WLAN_FEATURE_PACKET_FILTERING
  612. QDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle,
  613. uint8_t vdev_id, bool enable);
  614. QDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle,
  615. uint8_t vdev_id, struct pmo_rcv_pkt_fltr_cfg *rcv_filter_param,
  616. uint8_t filter_id, bool enable);
  617. #endif
  618. #endif /* end of WLAN_POWER_MANAGEMENT_OFFLOAD */
  619. #ifdef WLAN_WMI_BCN
  620. QDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle,
  621. wmi_bcn_send_from_host_cmd_fixed_param * param);
  622. #endif
  623. #if !defined(REMOVE_PKT_LOG) && defined(FEATURE_PKTLOG)
  624. QDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle,
  625. WMI_PKTLOG_EVENT pktlog_event,
  626. WMI_CMD_ID cmd_id, uint8_t user_triggered);
  627. #endif
  628. #ifdef WLAN_SUPPORT_GREEN_AP
  629. QDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle,
  630. struct wlan_green_ap_egap_params *egap_params);
  631. #endif
  632. #ifdef WLAN_FEATURE_CIF_CFR
  633. QDF_STATUS (*send_oem_dma_cfg_cmd)(wmi_unified_t wmi_handle,
  634. wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
  635. #endif
  636. QDF_STATUS (*send_start_oem_data_cmd)(wmi_unified_t wmi_handle,
  637. uint32_t data_len,
  638. uint8_t *data);
  639. #ifdef FEATURE_OEM_DATA
  640. QDF_STATUS (*send_start_oemv2_data_cmd)(wmi_unified_t wmi_handle,
  641. struct oem_data *params);
  642. #endif
  643. QDF_STATUS
  644. (*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle,
  645. bool dfs_phyerr_filter_offload);
  646. QDF_STATUS (*send_bss_color_change_enable_cmd)(wmi_unified_t wmi_handle,
  647. uint32_t vdev_id,
  648. bool enable);
  649. QDF_STATUS (*send_obss_color_collision_cfg_cmd)(wmi_unified_t wmi_handle,
  650. struct wmi_obss_color_collision_cfg_param *cfg);
  651. QDF_STATUS (*extract_obss_color_collision_info)(uint8_t *evt_buf,
  652. struct wmi_obss_color_collision_info *info);
  653. QDF_STATUS (*send_peer_based_pktlog_cmd)(wmi_unified_t wmi_handle,
  654. uint8_t *macaddr,
  655. uint8_t mac_id,
  656. uint8_t enb_dsb);
  657. #ifdef WMI_STA_SUPPORT
  658. QDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  659. uint8_t ac);
  660. QDF_STATUS (*send_aggr_qos_cmd)(wmi_unified_t wmi_handle,
  661. struct aggr_add_ts_param *aggr_qos_rsp_msg);
  662. QDF_STATUS (*send_add_ts_cmd)(wmi_unified_t wmi_handle,
  663. struct add_ts_param *msg);
  664. QDF_STATUS (*send_process_add_periodic_tx_ptrn_cmd)(
  665. wmi_unified_t wmi_handle,
  666. struct periodic_tx_pattern *pattern,
  667. uint8_t vdev_id);
  668. QDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
  669. uint8_t vdev_id,
  670. uint8_t pattern_id);
  671. QDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle,
  672. uint32_t timer_val);
  673. #ifdef WLAN_FEATURE_NAN
  674. QDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle,
  675. struct nan_msg_params *nan_req);
  676. QDF_STATUS (*send_nan_disable_req_cmd)(wmi_unified_t wmi_handle,
  677. struct nan_disable_req *nan_msg);
  678. QDF_STATUS (*extract_nan_event_rsp)(wmi_unified_t wmi_handle, void *evt_buf,
  679. struct nan_event_params *evt_params,
  680. uint8_t **msg_buf);
  681. #endif
  682. QDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle);
  683. QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
  684. struct vdev_ie_info_param *ie_info);
  685. QDF_STATUS (*send_set_base_macaddr_indicate_cmd)(wmi_unified_t wmi_handle,
  686. uint8_t *custom_addr);
  687. QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
  688. struct wmi_pcl_chan_weights *msg);
  689. #ifdef WLAN_POLICY_MGR_ENABLE
  690. QDF_STATUS (*send_pdev_set_dual_mac_config_cmd)(wmi_unified_t wmi_handle,
  691. struct policy_mgr_dual_mac_config *msg);
  692. #endif
  693. QDF_STATUS (*send_set_led_flashing_cmd)(wmi_unified_t wmi_handle,
  694. struct flashing_req_params *flashing);
  695. QDF_STATUS (*send_set_arp_stats_req_cmd)(wmi_unified_t wmi_handle,
  696. struct set_arp_stats *req_buf);
  697. QDF_STATUS (*send_get_arp_stats_req_cmd)(wmi_unified_t wmi_handle,
  698. struct get_arp_stats *req_buf);
  699. QDF_STATUS (*send_set_del_pmkid_cache_cmd) (wmi_unified_t wmi_handle,
  700. struct wmi_unified_pmk_cache *req_buf);
  701. QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle,
  702. struct wmi_adaptive_dwelltime_params *dwelltime_params);
  703. QDF_STATUS (*send_dbs_scan_sel_params_cmd)(wmi_unified_t wmi_handle,
  704. struct wmi_dbs_scan_sel_params *dbs_scan_params);
  705. QDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle,
  706. uint32_t if_id,
  707. struct wmi_gtx_config *gtx_info);
  708. QDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle,
  709. struct sta_keep_alive_params *params);
  710. QDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle,
  711. uint8_t vdev_id, uint32_t max_retries,
  712. uint32_t retry_interval);
  713. QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle,
  714. uint32_t cmd, uint32_t value1, uint32_t value2);
  715. QDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle,
  716. uint8_t vdev_id);
  717. QDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle,
  718. wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
  719. QDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle,
  720. wmi_mac_addr peer_macaddr);
  721. QDF_STATUS (*send_wlm_latency_level_cmd)(wmi_unified_t wmi_handle,
  722. struct wlm_latency_level_param *param);
  723. QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle,
  724. struct sar_limit_cmd_params *params);
  725. QDF_STATUS (*get_sar_limit_cmd)(wmi_unified_t wmi_handle);
  726. QDF_STATUS (*extract_sar_limit_event)(wmi_unified_t wmi_handle,
  727. uint8_t *evt_buf,
  728. struct sar_limit_event *event);
  729. QDF_STATUS (*extract_sar2_result_event)(void *handle,
  730. uint8_t *event,
  731. uint32_t len);
  732. #ifdef FEATURE_WLAN_TDLS
  733. QDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle,
  734. struct tdls_channel_switch_params *chan_switch_params);
  735. QDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle,
  736. struct tdls_info *tdls_param,
  737. enum wmi_tdls_state tdls_state);
  738. QDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle,
  739. struct tdls_peer_update_state *peer_state,
  740. uint32_t *ch_mhz);
  741. QDF_STATUS (*extract_vdev_tdls_ev_param)(wmi_unified_t wmi_handle,
  742. void *evt_buf, struct tdls_event_info *param);
  743. #endif /* FEATURE_WLAN_TDLS */
  744. #endif /* WMI_STA_SUPPORT */
  745. QDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle,
  746. struct stats_ext_params *preq);
  747. #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
  748. QDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle,
  749. struct ext_wow_params *params);
  750. QDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle,
  751. struct app_type2_params *appType2Params);
  752. QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle,
  753. struct app_type1_params *app_type1_params);
  754. #endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
  755. QDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle,
  756. struct dhcp_offload_info_params *params);
  757. QDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle,
  758. uint32_t reg_dmn, uint16_t regdmn2G,
  759. uint16_t regdmn5G, uint8_t ctl2G,
  760. uint8_t ctl5G);
  761. QDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle,
  762. struct fw_dump_req_param *mem_dump_req);
  763. QDF_STATUS (*send_cfg_action_frm_tb_ppdu_cmd)(wmi_unified_t wmi_handle,
  764. struct cfg_action_frm_tb_ppdu_param *cfg_info);
  765. QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
  766. QDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev);
  767. QDF_STATUS (*send_log_supported_evt_cmd)(wmi_unified_t wmi_handle,
  768. uint8_t *event,
  769. uint32_t len);
  770. QDF_STATUS (*send_enable_specific_fw_logs_cmd)(wmi_unified_t wmi_handle,
  771. struct wmi_wifi_start_log *start_log);
  772. QDF_STATUS (*send_flush_logs_to_fw_cmd)(wmi_unified_t wmi_handle);
  773. QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle,
  774. struct wmi_unit_test_cmd *wmi_utest);
  775. #ifdef FEATURE_WLAN_APF
  776. QDF_STATUS
  777. (*send_set_active_apf_mode_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  778. enum wmi_host_active_apf_mode ucast_mode,
  779. enum wmi_host_active_apf_mode mcast_bcast_mode);
  780. QDF_STATUS (*send_apf_enable_cmd)(wmi_unified_t wmi_handle, uint32_t vdev_id,
  781. bool enable);
  782. QDF_STATUS (*send_apf_write_work_memory_cmd)(wmi_unified_t wmi_handle,
  783. struct wmi_apf_write_memory_params *apf_write_params);
  784. QDF_STATUS (*send_apf_read_work_memory_cmd)(wmi_unified_t wmi_handle,
  785. struct wmi_apf_read_memory_params *apf_read_params);
  786. QDF_STATUS (*extract_apf_read_memory_resp_event)(wmi_unified_t wmi_handle,
  787. void *evt_buf,
  788. struct wmi_apf_read_memory_resp_event_params *resp);
  789. #endif /* FEATURE_WLAN_APF */
  790. QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle,
  791. uint32_t param);
  792. #ifdef WMI_ATF_SUPPORT
  793. QDF_STATUS (*send_set_bwf_cmd)(wmi_unified_t wmi_handle,
  794. struct set_bwf_params *param);
  795. #endif
  796. QDF_STATUS (*send_pdev_fips_cmd)(wmi_unified_t wmi_handle,
  797. struct fips_params *param);
  798. QDF_STATUS (*send_wlan_profile_enable_cmd)(wmi_unified_t wmi_handle,
  799. struct wlan_profile_params *param);
  800. #ifdef WLAN_FEATURE_DISA
  801. QDF_STATUS
  802. (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle,
  803. struct disa_encrypt_decrypt_req_params
  804. *params);
  805. #endif
  806. QDF_STATUS (*send_wlan_profile_trigger_cmd)(wmi_unified_t wmi_handle,
  807. struct wlan_profile_params *param);
  808. QDF_STATUS (*send_pdev_set_chan_cmd)(wmi_unified_t wmi_handle,
  809. struct channel_param *param);
  810. QDF_STATUS (*send_set_ht_ie_cmd)(wmi_unified_t wmi_handle,
  811. struct ht_ie_params *param);
  812. QDF_STATUS (*send_set_vht_ie_cmd)(wmi_unified_t wmi_handle,
  813. struct vht_ie_params *param);
  814. QDF_STATUS (*send_wmm_update_cmd)(wmi_unified_t wmi_handle,
  815. struct wmm_update_params *param);
  816. QDF_STATUS (*send_process_update_edca_param_cmd)(wmi_unified_t wmi_handle,
  817. uint8_t vdev_id, bool mu_edca_param,
  818. struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
  819. QDF_STATUS (*send_set_ratepwr_table_cmd)(wmi_unified_t wmi_handle,
  820. struct ratepwr_table_params *param);
  821. QDF_STATUS (*send_get_ratepwr_table_cmd)(wmi_unified_t wmi_handle);
  822. QDF_STATUS (*send_set_ctl_table_cmd)(wmi_unified_t wmi_handle,
  823. struct ctl_table_params *param);
  824. QDF_STATUS (*send_set_mimogain_table_cmd)(wmi_unified_t wmi_handle,
  825. struct mimogain_table_params *param);
  826. QDF_STATUS (*send_set_ratepwr_chainmsk_cmd)(wmi_unified_t wmi_handle,
  827. struct ratepwr_chainmsk_params *param);
  828. QDF_STATUS (*send_set_macaddr_cmd)(wmi_unified_t wmi_handle,
  829. struct macaddr_params *param);
  830. QDF_STATUS (*send_pdev_scan_start_cmd)(wmi_unified_t wmi_handle);
  831. QDF_STATUS (*send_pdev_scan_end_cmd)(wmi_unified_t wmi_handle);
  832. QDF_STATUS (*send_set_acparams_cmd)(wmi_unified_t wmi_handle,
  833. struct acparams_params *param);
  834. QDF_STATUS (*send_set_vap_dscp_tid_map_cmd)(wmi_unified_t wmi_handle,
  835. struct vap_dscp_tid_map_params *param);
  836. QDF_STATUS (*send_proxy_ast_reserve_cmd)(wmi_unified_t wmi_handle,
  837. struct proxy_ast_reserve_params *param);
  838. QDF_STATUS (*send_pdev_qvit_cmd)(wmi_unified_t wmi_handle,
  839. struct pdev_qvit_params *param);
  840. QDF_STATUS (*send_mcast_group_update_cmd)(wmi_unified_t wmi_handle,
  841. struct mcast_group_update_params *param);
  842. QDF_STATUS (*send_peer_add_wds_entry_cmd)(wmi_unified_t wmi_handle,
  843. struct peer_add_wds_entry_params *param);
  844. QDF_STATUS (*send_peer_del_wds_entry_cmd)(wmi_unified_t wmi_handle,
  845. struct peer_del_wds_entry_params *param);
  846. QDF_STATUS (*send_set_bridge_mac_addr_cmd)(wmi_unified_t wmi_handle,
  847. struct set_bridge_mac_addr_params *param);
  848. QDF_STATUS (*send_peer_update_wds_entry_cmd)(wmi_unified_t wmi_handle,
  849. struct peer_update_wds_entry_params *param);
  850. QDF_STATUS (*send_phyerr_enable_cmd)(wmi_unified_t wmi_handle);
  851. QDF_STATUS (*send_phyerr_disable_cmd)(wmi_unified_t wmi_handle);
  852. #ifdef WMI_SMART_ANT_SUPPORT
  853. QDF_STATUS (*send_set_ant_switch_tbl_cmd)(wmi_unified_t wmi_handle,
  854. struct ant_switch_tbl_params *param);
  855. QDF_STATUS (*send_smart_ant_enable_cmd)(wmi_unified_t wmi_handle,
  856. struct smart_ant_enable_params *param);
  857. QDF_STATUS (*send_smart_ant_set_rx_ant_cmd)(wmi_unified_t wmi_handle,
  858. struct smart_ant_rx_ant_params *param);
  859. QDF_STATUS (*send_smart_ant_set_tx_ant_cmd)(wmi_unified_t wmi_handle,
  860. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  861. struct smart_ant_tx_ant_params *param);
  862. QDF_STATUS (*send_smart_ant_set_training_info_cmd)(wmi_unified_t wmi_handle,
  863. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  864. struct smart_ant_training_info_params *param);
  865. QDF_STATUS (*send_smart_ant_set_node_config_cmd)(wmi_unified_t wmi_handle,
  866. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  867. struct smart_ant_node_config_params *param);
  868. #endif
  869. QDF_STATUS (*send_smart_ant_enable_tx_feedback_cmd)(wmi_unified_t wmi_handle,
  870. struct smart_ant_enable_tx_feedback_params *param);
  871. QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
  872. struct vdev_spectral_configure_params *param);
  873. QDF_STATUS (*send_vdev_spectral_enable_cmd)(wmi_unified_t wmi_handle,
  874. struct vdev_spectral_enable_params *param);
  875. QDF_STATUS (*send_bss_chan_info_request_cmd)(wmi_unified_t wmi_handle,
  876. struct bss_chan_info_request_params *param);
  877. QDF_STATUS (*send_thermal_mitigation_param_cmd)(wmi_unified_t wmi_handle,
  878. struct thermal_mitigation_params *param);
  879. QDF_STATUS (*send_vdev_set_neighbour_rx_cmd)(wmi_unified_t wmi_handle,
  880. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  881. struct set_neighbour_rx_params *param);
  882. QDF_STATUS (*send_vdev_set_fwtest_param_cmd)(wmi_unified_t wmi_handle,
  883. struct set_fwtest_params *param);
  884. QDF_STATUS (*send_vdev_config_ratemask_cmd)(wmi_unified_t wmi_handle,
  885. struct config_ratemask_params *param);
  886. QDF_STATUS (*send_vdev_set_custom_aggr_size_cmd)(wmi_unified_t wmi_handle,
  887. struct set_custom_aggr_size_params *param);
  888. QDF_STATUS (*send_vdev_set_qdepth_thresh_cmd)(wmi_unified_t wmi_handle,
  889. struct set_qdepth_thresh_params *param);
  890. QDF_STATUS (*send_peer_chan_width_switch_cmd)(wmi_unified_t wmi_handle,
  891. struct peer_chan_width_switch_params *param);
  892. QDF_STATUS (*send_wow_wakeup_cmd)(wmi_unified_t wmi_handle);
  893. QDF_STATUS (*send_wow_add_wakeup_event_cmd)(wmi_unified_t wmi_handle,
  894. struct wow_add_wakeup_params *param);
  895. QDF_STATUS (*send_wow_add_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
  896. struct wow_add_wakeup_pattern_params *param);
  897. QDF_STATUS (*send_wow_remove_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
  898. struct wow_remove_wakeup_pattern_params *param);
  899. QDF_STATUS (*send_pdev_set_regdomain_cmd)(wmi_unified_t wmi_handle,
  900. struct pdev_set_regdomain_params *param);
  901. QDF_STATUS (*send_set_quiet_mode_cmd)(wmi_unified_t wmi_handle,
  902. struct set_quiet_mode_params *param);
  903. QDF_STATUS (*send_set_bcn_offload_quiet_mode_cmd)(wmi_unified_t wmi_handle,
  904. struct set_bcn_offload_quiet_mode_params *param);
  905. QDF_STATUS (*send_set_beacon_filter_cmd)(wmi_unified_t wmi_handle,
  906. struct set_beacon_filter_params *param);
  907. QDF_STATUS (*send_remove_beacon_filter_cmd)(wmi_unified_t wmi_handle,
  908. struct remove_beacon_filter_params *param);
  909. /*
  910. QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
  911. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  912. struct mgmt_params *param);
  913. */
  914. QDF_STATUS (*send_addba_clearresponse_cmd)(wmi_unified_t wmi_handle,
  915. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  916. struct addba_clearresponse_params *param);
  917. QDF_STATUS (*send_addba_send_cmd)(wmi_unified_t wmi_handle,
  918. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  919. struct addba_send_params *param);
  920. QDF_STATUS (*send_delba_send_cmd)(wmi_unified_t wmi_handle,
  921. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  922. struct delba_send_params *param);
  923. QDF_STATUS (*send_addba_setresponse_cmd)(wmi_unified_t wmi_handle,
  924. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  925. struct addba_setresponse_params *param);
  926. QDF_STATUS (*send_singleamsdu_cmd)(wmi_unified_t wmi_handle,
  927. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  928. struct singleamsdu_params *param);
  929. QDF_STATUS (*send_set_qboost_param_cmd)(wmi_unified_t wmi_handle,
  930. uint8_t macaddr[QDF_MAC_ADDR_SIZE],
  931. struct set_qboost_params *param);
  932. QDF_STATUS (*send_mu_scan_cmd)(wmi_unified_t wmi_handle,
  933. struct mu_scan_params *param);
  934. QDF_STATUS (*send_lteu_config_cmd)(wmi_unified_t wmi_handle,
  935. struct lteu_config_params *param);
  936. QDF_STATUS (*send_set_ps_mode_cmd)(wmi_unified_t wmi_handle,
  937. struct set_ps_mode_params *param);
  938. QDF_STATUS (*save_service_bitmap)(wmi_unified_t wmi_handle,
  939. void *evt_buf, void *bitmap_buf);
  940. QDF_STATUS (*save_ext_service_bitmap)(wmi_unified_t wmi_handle,
  941. void *evt_buf, void *bitmap_buf);
  942. bool (*is_service_enabled)(wmi_unified_t wmi_handle,
  943. uint32_t service_id);
  944. QDF_STATUS (*get_target_cap_from_service_ready)(wmi_unified_t wmi_handle,
  945. void *evt_buf, struct wlan_psoc_target_capability_info *ev);
  946. QDF_STATUS (*extract_fw_version)(wmi_unified_t wmi_handle,
  947. void *ev, struct wmi_host_fw_ver *fw_ver);
  948. QDF_STATUS (*extract_fw_abi_version)(wmi_unified_t wmi_handle,
  949. void *ev, struct wmi_host_fw_abi_ver *fw_ver);
  950. QDF_STATUS (*extract_hal_reg_cap)(wmi_unified_t wmi_handle, void *evt_buf,
  951. struct wlan_psoc_hal_reg_capability *hal_reg_cap);
  952. host_mem_req * (*extract_host_mem_req)(wmi_unified_t wmi_handle,
  953. void *evt_buf, uint8_t *num_entries);
  954. QDF_STATUS (*init_cmd_send)(wmi_unified_t wmi_handle,
  955. struct wmi_init_cmd_param *param);
  956. QDF_STATUS (*save_fw_version)(wmi_unified_t wmi_handle, void *evt_buf);
  957. uint32_t (*ready_extract_init_status)(wmi_unified_t wmi_hdl, void *ev);
  958. QDF_STATUS (*ready_extract_mac_addr)(wmi_unified_t wmi_hdl, void *ev,
  959. uint8_t *macaddr);
  960. wmi_host_mac_addr * (*ready_extract_mac_addr_list)(wmi_unified_t wmi_hdl,
  961. void *ev, uint8_t *num_mac_addr);
  962. QDF_STATUS (*extract_ready_event_params)(wmi_unified_t wmi_handle,
  963. void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
  964. QDF_STATUS (*check_and_update_fw_version)(wmi_unified_t wmi_hdl, void *ev);
  965. uint8_t* (*extract_dbglog_data_len)(wmi_unified_t wmi_handle, void *evt_buf,
  966. uint32_t *len);
  967. QDF_STATUS (*send_ext_resource_config)(wmi_unified_t wmi_handle,
  968. wmi_host_ext_resource_config *ext_cfg);
  969. QDF_STATUS (*send_nf_dbr_dbm_info_get_cmd)(wmi_unified_t wmi_handle,
  970. uint8_t mac_id);
  971. QDF_STATUS (*send_packet_power_info_get_cmd)(wmi_unified_t wmi_handle,
  972. struct packet_power_info_params *param);
  973. QDF_STATUS (*send_gpio_config_cmd)(wmi_unified_t wmi_handle,
  974. struct gpio_config_params *param);
  975. QDF_STATUS (*send_gpio_output_cmd)(wmi_unified_t wmi_handle,
  976. struct gpio_output_params *param);
  977. QDF_STATUS (*send_rtt_meas_req_test_cmd)(wmi_unified_t wmi_handle,
  978. struct rtt_meas_req_test_params *param);
  979. QDF_STATUS (*send_rtt_meas_req_cmd)(wmi_unified_t wmi_handle,
  980. struct rtt_meas_req_params *param);
  981. QDF_STATUS (*send_rtt_keepalive_req_cmd)(wmi_unified_t wmi_handle,
  982. struct rtt_keepalive_req_params *param);
  983. QDF_STATUS (*send_lci_set_cmd)(wmi_unified_t wmi_handle,
  984. struct lci_set_params *param);
  985. QDF_STATUS (*send_lcr_set_cmd)(wmi_unified_t wmi_handle,
  986. struct lcr_set_params *param);
  987. QDF_STATUS (*send_periodic_chan_stats_config_cmd)(wmi_unified_t wmi_handle,
  988. struct periodic_chan_stats_params *param);
  989. #ifdef WLAN_ATF_ENABLE
  990. QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle,
  991. struct set_atf_params *param);
  992. QDF_STATUS
  993. (*send_atf_peer_request_cmd)(wmi_unified_t wmi_handle,
  994. struct atf_peer_request_params *param);
  995. QDF_STATUS
  996. (*send_set_atf_grouping_cmd)(wmi_unified_t wmi_handle,
  997. struct atf_grouping_params *param);
  998. QDF_STATUS
  999. (*send_set_atf_group_ac_cmd)(wmi_unified_t wmi_handle,
  1000. struct atf_group_ac_params *param);
  1001. QDF_STATUS (*extract_atf_peer_stats_ev)(wmi_unified_t wmi_handle,
  1002. void *evt_buf,
  1003. wmi_host_atf_peer_stats_event *ev);
  1004. QDF_STATUS (*extract_atf_token_info_ev)(wmi_unified_t wmi_handle,
  1005. void *evt_buf, uint8_t idx,
  1006. wmi_host_atf_peer_stats_info *atf_info);
  1007. #endif
  1008. QDF_STATUS (*send_get_user_position_cmd)(wmi_unified_t wmi_handle,
  1009. uint32_t value);
  1010. QDF_STATUS
  1011. (*send_reset_peer_mumimo_tx_count_cmd)(wmi_unified_t wmi_handle,
  1012. uint32_t value);
  1013. QDF_STATUS (*send_get_peer_mumimo_tx_count_cmd)(wmi_unified_t wmi_handle,
  1014. uint32_t value);
  1015. QDF_STATUS
  1016. (*send_pdev_caldata_version_check_cmd)(wmi_unified_t wmi_handle,
  1017. uint32_t value);
  1018. QDF_STATUS
  1019. (*send_btcoex_wlan_priority_cmd)(wmi_unified_t wmi_handle,
  1020. struct btcoex_cfg_params *param);
  1021. QDF_STATUS
  1022. (*send_start_11d_scan_cmd)(wmi_unified_t wmi_handle,
  1023. struct reg_start_11d_scan_req *param);
  1024. QDF_STATUS
  1025. (*send_stop_11d_scan_cmd)(wmi_unified_t wmi_handle,
  1026. struct reg_stop_11d_scan_req *param);
  1027. QDF_STATUS
  1028. (*send_btcoex_duty_cycle_cmd)(wmi_unified_t wmi_handle,
  1029. struct btcoex_cfg_params *param);
  1030. QDF_STATUS
  1031. (*send_coex_ver_cfg_cmd)(wmi_unified_t wmi_handle, coex_ver_cfg_t *param);
  1032. QDF_STATUS
  1033. (*send_coex_config_cmd)(wmi_unified_t wmi_handle,
  1034. struct coex_config_params *param);
  1035. QDF_STATUS (*send_bcn_offload_control_cmd)(wmi_unified_t wmi_handle,
  1036. struct bcn_offload_control *bcn_ctrl_param);
  1037. #ifdef OL_ATH_SMART_LOGGING
  1038. QDF_STATUS
  1039. (*send_smart_logging_enable_cmd)(wmi_unified_t wmi_handle, uint32_t param);
  1040. QDF_STATUS
  1041. (*send_smart_logging_fatal_cmd)(wmi_unified_t wmi_handle,
  1042. struct wmi_debug_fatal_events *param);
  1043. #endif /* OL_ATH_SMART_LOGGING */
  1044. QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle,
  1045. void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
  1046. QDF_STATUS (*extract_dcs_interference_type)(wmi_unified_t wmi_handle,
  1047. void *evt_buf, struct wmi_host_dcs_interference_param *param);
  1048. QDF_STATUS (*extract_dcs_cw_int)(wmi_unified_t wmi_handle, void *evt_buf,
  1049. wmi_host_ath_dcs_cw_int *cw_int);
  1050. QDF_STATUS (*extract_dcs_im_tgt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1051. wmi_host_dcs_im_tgt_stats_t *wlan_stat);
  1052. QDF_STATUS (*extract_fips_event_data)(wmi_unified_t wmi_handle,
  1053. void *evt_buf, struct wmi_host_fips_event_param *param);
  1054. #ifdef WLAN_FEATURE_DISA
  1055. QDF_STATUS
  1056. (*extract_encrypt_decrypt_resp_event)(wmi_unified_t wmi_handle,
  1057. void *evt_buf,
  1058. struct disa_encrypt_decrypt_resp_params
  1059. *resp);
  1060. #endif
  1061. QDF_STATUS (*extract_vdev_start_resp)(wmi_unified_t wmi_handle, void *evt_buf,
  1062. wmi_host_vdev_start_resp *vdev_rsp);
  1063. QDF_STATUS (*extract_vdev_delete_resp)(wmi_unified_t wmi_handle, void *evt_buf,
  1064. struct wmi_host_vdev_delete_resp *delete_rsp);
  1065. QDF_STATUS (*extract_tbttoffset_update_params)(wmi_unified_t wmi_hdl,
  1066. void *evt_buf, uint8_t idx,
  1067. struct tbttoffset_params *tbtt_param);
  1068. QDF_STATUS (*extract_ext_tbttoffset_update_params)(wmi_unified_t wmi_hdl,
  1069. void *evt_buf, uint8_t idx,
  1070. struct tbttoffset_params *tbtt_param);
  1071. QDF_STATUS (*extract_tbttoffset_num_vdevs)(wmi_unified_t wmi_hdl, void *evt_buf,
  1072. uint32_t *num_vdevs);
  1073. QDF_STATUS (*extract_ext_tbttoffset_num_vdevs)(wmi_unified_t wmi_hdl,
  1074. void *evt_buf,
  1075. uint32_t *num_vdevs);
  1076. QDF_STATUS (*extract_mgmt_rx_params)(wmi_unified_t wmi_handle, void *evt_buf,
  1077. struct mgmt_rx_event_params *hdr, uint8_t **bufp);
  1078. QDF_STATUS (*extract_vdev_stopped_param)(wmi_unified_t wmi_handle,
  1079. void *evt_buf, uint32_t *vdev_id);
  1080. QDF_STATUS (*extract_vdev_roam_param)(wmi_unified_t wmi_handle, void *evt_buf,
  1081. wmi_host_roam_event *param);
  1082. QDF_STATUS (*extract_vdev_scan_ev_param)(wmi_unified_t wmi_handle,
  1083. void *evt_buf, struct scan_event *param);
  1084. QDF_STATUS (*extract_mu_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
  1085. wmi_host_mu_report_event *param);
  1086. QDF_STATUS (*extract_mu_db_entry)(wmi_unified_t wmi_hdl, void *evt_buf,
  1087. uint8_t idx, wmi_host_mu_db_entry *param);
  1088. QDF_STATUS (*extract_mumimo_tx_count_ev_param)(wmi_unified_t wmi_handle,
  1089. void *evt_buf, wmi_host_peer_txmu_cnt_event *param);
  1090. QDF_STATUS (*extract_peer_gid_userpos_list_ev_param)(wmi_unified_t wmi_handle,
  1091. void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
  1092. QDF_STATUS
  1093. (*extract_esp_estimation_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
  1094. struct esp_estimation_event *param);
  1095. QDF_STATUS (*extract_pdev_caldata_version_check_ev_param)(
  1096. wmi_unified_t wmi_handle,
  1097. void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
  1098. QDF_STATUS (*extract_pdev_tpc_config_ev_param)(wmi_unified_t wmi_handle,
  1099. void *evt_buf, wmi_host_pdev_tpc_config_event *param);
  1100. QDF_STATUS (*extract_gpio_input_ev_param)(wmi_unified_t wmi_handle,
  1101. void *evt_buf, uint32_t *gpio_num);
  1102. QDF_STATUS (*extract_pdev_reserve_ast_ev_param)(wmi_unified_t wmi_handle,
  1103. void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
  1104. QDF_STATUS (*extract_nfcal_power_ev_param)(wmi_unified_t wmi_handle,
  1105. void *evt_buf,
  1106. wmi_host_pdev_nfcal_power_all_channels_event *param);
  1107. QDF_STATUS (*extract_pdev_tpc_ev_param)(wmi_unified_t wmi_handle,
  1108. void *evt_buf, wmi_host_pdev_tpc_event *param);
  1109. QDF_STATUS (*extract_pdev_generic_buffer_ev_param)(wmi_unified_t wmi_handle,
  1110. void *evt_buf, wmi_host_pdev_generic_buffer_event *param);
  1111. QDF_STATUS (*extract_mgmt_tx_compl_param)(wmi_unified_t wmi_handle,
  1112. void *evt_buf, wmi_host_mgmt_tx_compl_event *param);
  1113. QDF_STATUS (*extract_offchan_data_tx_compl_param)(wmi_unified_t wmi_handle,
  1114. void *evt_buf,
  1115. struct wmi_host_offchan_data_tx_compl_event *param);
  1116. QDF_STATUS (*extract_pdev_csa_switch_count_status)(wmi_unified_t wmi_handle,
  1117. void *evt_buf, struct pdev_csa_switch_count_status *param);
  1118. QDF_STATUS (*extract_swba_num_vdevs)(wmi_unified_t wmi_handle, void *evt_buf,
  1119. uint32_t *num_vdevs);
  1120. QDF_STATUS (*extract_swba_tim_info)(wmi_unified_t wmi_handle, void *evt_buf,
  1121. uint32_t idx, wmi_host_tim_info *tim_info);
  1122. QDF_STATUS (*extract_swba_noa_info)(wmi_unified_t wmi_handle, void *evt_buf,
  1123. uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
  1124. QDF_STATUS (*extract_swba_quiet_info)(wmi_unified_t wmi_handle, void *evt_buf,
  1125. uint32_t idx,
  1126. wmi_host_quiet_info *quiet_info);
  1127. #ifdef CONVERGED_P2P_ENABLE
  1128. #ifdef FEATURE_P2P_LISTEN_OFFLOAD
  1129. QDF_STATUS (*extract_p2p_lo_stop_ev_param)(wmi_unified_t wmi_handle,
  1130. void *evt_buf, struct p2p_lo_event *param);
  1131. #endif
  1132. QDF_STATUS (*extract_p2p_noa_ev_param)(wmi_unified_t wmi_handle,
  1133. void *evt_buf, struct p2p_noa_info *param);
  1134. QDF_STATUS (*set_mac_addr_rx_filter)(wmi_unified_t wmi_handle,
  1135. struct p2p_set_mac_filter *param);
  1136. QDF_STATUS
  1137. (*extract_mac_addr_rx_filter_evt_param)(wmi_unified_t wmi_handle,
  1138. void *evt_buf,
  1139. struct p2p_set_mac_filter_evt *param);
  1140. #endif
  1141. #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP
  1142. QDF_STATUS
  1143. (*extract_interop_issues_ap_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
  1144. struct wlan_interop_issues_ap_event *param);
  1145. QDF_STATUS
  1146. (*send_set_rap_ps_cmd)(wmi_unified_t wmi_handle,
  1147. struct wlan_interop_issues_ap_info *interop_issues_ap);
  1148. #endif
  1149. QDF_STATUS (*extract_peer_sta_ps_statechange_ev)(wmi_unified_t wmi_handle,
  1150. void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
  1151. QDF_STATUS (*extract_peer_sta_kickout_ev)(wmi_unified_t wmi_handle,
  1152. void *evt_buf, wmi_host_peer_sta_kickout_event *ev);
  1153. QDF_STATUS (*extract_peer_ratecode_list_ev)(wmi_unified_t wmi_handle,
  1154. void *evt_buf, uint8_t *peer_mac,
  1155. uint32_t *pdev_id,
  1156. wmi_sa_rate_cap *rate_cap);
  1157. QDF_STATUS (*extract_comb_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  1158. uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
  1159. QDF_STATUS (*extract_single_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  1160. uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
  1161. QDF_STATUS (*extract_composite_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  1162. uint16_t datalen, wmi_host_phyerr_t *phyerr);
  1163. QDF_STATUS (*extract_rtt_hdr)(wmi_unified_t wmi_handle, void *evt_buf,
  1164. wmi_host_rtt_event_hdr *ev);
  1165. QDF_STATUS (*extract_rtt_ev)(wmi_unified_t wmi_handle, void *evt_buf,
  1166. wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len);
  1167. QDF_STATUS (*extract_rtt_error_report_ev)(wmi_unified_t wmi_handle,
  1168. void *evt_buf, wmi_host_rtt_error_report_event *ev);
  1169. QDF_STATUS (*extract_all_stats_count)(wmi_unified_t wmi_handle, void *evt_buf,
  1170. wmi_host_stats_event *stats_param);
  1171. QDF_STATUS (*extract_pdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1172. uint32_t index, wmi_host_pdev_stats *pdev_stats);
  1173. QDF_STATUS (*extract_unit_test)(wmi_unified_t wmi_handle, void *evt_buf,
  1174. wmi_unit_test_event *unit_test, uint32_t maxspace);
  1175. QDF_STATUS (*extract_pdev_ext_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1176. uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats);
  1177. QDF_STATUS (*extract_vdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1178. uint32_t index, wmi_host_vdev_stats *vdev_stats);
  1179. QDF_STATUS (*extract_per_chain_rssi_stats)(wmi_unified_t wmi_handle,
  1180. void *evt_buf, uint32_t index,
  1181. struct wmi_host_per_chain_rssi_stats *rssi_stats);
  1182. QDF_STATUS (*extract_peer_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1183. uint32_t index, wmi_host_peer_stats *peer_stats);
  1184. QDF_STATUS (*extract_bcnflt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1185. uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
  1186. QDF_STATUS (*extract_peer_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1187. uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats);
  1188. QDF_STATUS (*extract_peer_retry_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1189. uint32_t index,
  1190. struct wmi_host_peer_retry_stats *peer_retry_stats);
  1191. QDF_STATUS (*extract_peer_adv_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1192. struct wmi_host_peer_adv_stats
  1193. *peer_adv_stats);
  1194. QDF_STATUS (*extract_chan_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1195. uint32_t index, wmi_host_chan_stats *chan_stats);
  1196. #ifdef WLAN_FEATURE_MIB_STATS
  1197. QDF_STATUS (*extract_mib_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1198. struct mib_stats_metrics *mib_stats);
  1199. #endif
  1200. QDF_STATUS (*extract_thermal_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1201. uint32_t *temp, uint32_t *level, uint32_t *pdev_id);
  1202. QDF_STATUS (*extract_thermal_level_stats)(wmi_unified_t wmi_handle,
  1203. void *evt_buf, uint8_t idx, uint32_t *levelcount,
  1204. uint32_t *dccount);
  1205. QDF_STATUS (*extract_profile_ctx)(wmi_unified_t wmi_handle, void *evt_buf,
  1206. wmi_host_wlan_profile_ctx_t *profile_ctx);
  1207. QDF_STATUS (*extract_profile_data)(wmi_unified_t wmi_handle, void *evt_buf,
  1208. uint8_t idx,
  1209. wmi_host_wlan_profile_t *profile_data);
  1210. QDF_STATUS (*extract_chan_info_event)(wmi_unified_t wmi_handle, void *evt_buf,
  1211. wmi_host_chan_info_event *chan_info);
  1212. QDF_STATUS (*extract_channel_hopping_event)(wmi_unified_t wmi_handle,
  1213. void *evt_buf,
  1214. wmi_host_pdev_channel_hopping_event *ch_hopping);
  1215. QDF_STATUS (*extract_bss_chan_info_event)(wmi_unified_t wmi_handle,
  1216. void *evt_buf,
  1217. wmi_host_pdev_bss_chan_info_event *bss_chan_info);
  1218. QDF_STATUS (*extract_inst_rssi_stats_event)(wmi_unified_t wmi_handle,
  1219. void *evt_buf, wmi_host_inst_stats_resp *inst_rssi_resp);
  1220. QDF_STATUS (*extract_tx_data_traffic_ctrl_ev)(wmi_unified_t wmi_handle,
  1221. void *evt_buf, wmi_host_tx_data_traffic_ctrl_event *ev);
  1222. QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1223. uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
  1224. QDF_STATUS (*extract_vdev_nac_rssi_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1225. struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats);
  1226. QDF_STATUS (*extract_bcn_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1227. uint32_t index, wmi_host_bcn_stats *bcn_stats);
  1228. #ifdef OL_ATH_SMART_LOGGING
  1229. QDF_STATUS (*extract_smartlog_event)(wmi_unified_t wmi_handle, void *evt_buf,
  1230. struct wmi_debug_fatal_events *event);
  1231. #endif /* OL_ATH_SMART_LOGGING */
  1232. QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle,
  1233. struct wmi_power_dbg_params *param);
  1234. QDF_STATUS (*send_multiple_vdev_restart_req_cmd)(wmi_unified_t wmi_handle,
  1235. struct multiple_vdev_restart_params *param);
  1236. #ifdef QCA_SUPPORT_AGILE_DFS
  1237. QDF_STATUS
  1238. (*send_adfs_ocac_abort_cmd)(wmi_unified_t wmi_handle,
  1239. struct vdev_adfs_abort_params *param);
  1240. QDF_STATUS (*send_adfs_ch_cfg_cmd)(wmi_unified_t wmi_handle,
  1241. struct vdev_adfs_ch_cfg_params *param);
  1242. #endif
  1243. QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle,
  1244. struct set_fwtest_params *wmi_fwtest);
  1245. #ifdef WLAN_FEATURE_ACTION_OUI
  1246. QDF_STATUS (*send_action_oui_cmd)(wmi_unified_t wmi_handle,
  1247. struct action_oui_request *req);
  1248. #endif /* WLAN_FEATURE_ACTION_OUI */
  1249. QDF_STATUS (*send_peer_rx_reorder_queue_setup_cmd)(wmi_unified_t wmi_handle,
  1250. struct rx_reorder_queue_setup_params *param);
  1251. QDF_STATUS (*send_peer_rx_reorder_queue_remove_cmd)(wmi_unified_t wmi_handle,
  1252. struct rx_reorder_queue_remove_params *param);
  1253. QDF_STATUS (*extract_service_ready_ext)(
  1254. wmi_unified_t wmi_handle,
  1255. uint8_t *evt_buf,
  1256. struct wlan_psoc_host_service_ext_param *param);
  1257. QDF_STATUS (*extract_service_ready_ext2)(
  1258. wmi_unified_t wmi_handle,
  1259. uint8_t *evt_buf,
  1260. struct wlan_psoc_host_service_ext2_param *param);
  1261. QDF_STATUS (*extract_hw_mode_cap_service_ready_ext)(
  1262. wmi_unified_t wmi_handle,
  1263. uint8_t *evt_buf, uint8_t hw_mode_idx,
  1264. struct wlan_psoc_host_hw_mode_caps *param);
  1265. QDF_STATUS (*extract_mac_phy_cap_service_ready_ext)(
  1266. wmi_unified_t wmi_handle,
  1267. uint8_t *evt_buf,
  1268. uint8_t hw_mode_id,
  1269. uint8_t phy_id,
  1270. struct wlan_psoc_host_mac_phy_caps *param);
  1271. QDF_STATUS (*extract_reg_cap_service_ready_ext)(
  1272. wmi_unified_t wmi_handle,
  1273. uint8_t *evt_buf, uint8_t phy_idx,
  1274. struct wlan_psoc_host_hal_reg_capabilities_ext *param);
  1275. QDF_STATUS (*extract_dbr_ring_cap_service_ready_ext)(
  1276. wmi_unified_t wmi_handle,
  1277. uint8_t *evt_buf, uint8_t idx,
  1278. struct wlan_psoc_host_dbr_ring_caps *param);
  1279. QDF_STATUS (*extract_dbr_ring_cap_service_ready_ext2)(
  1280. wmi_unified_t wmi_handle,
  1281. uint8_t *evt_buf, uint8_t idx,
  1282. struct wlan_psoc_host_dbr_ring_caps *param);
  1283. QDF_STATUS (*extract_scaling_params_service_ready_ext)(
  1284. wmi_unified_t wmi_handle,
  1285. uint8_t *evt_buf, uint8_t idx,
  1286. struct wlan_psoc_host_spectral_scaling_params *param);
  1287. QDF_STATUS (*extract_sar_cap_service_ready_ext)(
  1288. wmi_unified_t wmi_handle,
  1289. uint8_t *evt_buf,
  1290. struct wlan_psoc_host_service_ext_param *ext_param);
  1291. #ifdef WMI_DBR_SUPPORT
  1292. QDF_STATUS (*send_dbr_cfg_cmd)(wmi_unified_t wmi_handle,
  1293. struct direct_buf_rx_cfg_req *cfg);
  1294. QDF_STATUS (*extract_dbr_buf_release_fixed)(
  1295. wmi_unified_t wmi_handle,
  1296. uint8_t *evt_buf,
  1297. struct direct_buf_rx_rsp *param);
  1298. QDF_STATUS (*extract_dbr_buf_release_entry)(
  1299. wmi_unified_t wmi_handle,
  1300. uint8_t *evt_buf, uint8_t idx,
  1301. struct direct_buf_rx_entry *param);
  1302. QDF_STATUS (*extract_dbr_buf_metadata)(
  1303. wmi_unified_t wmi_handle,
  1304. uint8_t *evt_buf, uint8_t idx,
  1305. struct direct_buf_rx_metadata *param);
  1306. #endif
  1307. QDF_STATUS (*extract_pdev_utf_event)(wmi_unified_t wmi_hdl,
  1308. uint8_t *evt_buf,
  1309. struct wmi_host_pdev_utf_event *param);
  1310. QDF_STATUS (*extract_pdev_qvit_event)(wmi_unified_t wmi_hdl,
  1311. uint8_t *evt_buf,
  1312. struct wmi_host_pdev_qvit_event *param);
  1313. uint16_t (*wmi_set_htc_tx_tag)(wmi_unified_t wmi_handle,
  1314. wmi_buf_t buf, uint32_t cmd_id);
  1315. QDF_STATUS (*extract_peer_delete_response_event)(
  1316. wmi_unified_t wmi_handle,
  1317. void *evt_buf,
  1318. struct wmi_host_peer_delete_response_event *param);
  1319. QDF_STATUS (*extract_vdev_peer_delete_all_resp)(
  1320. wmi_unified_t wmi_handle,
  1321. void *evt_buf,
  1322. struct wmi_host_vdev_peer_delete_all_response_event
  1323. *peer_delete_all_rsp);
  1324. QDF_STATUS (*extract_vdev_peer_delete_all_response_event)(
  1325. wmi_unified_t wmi_handle,
  1326. void *evt_buf,
  1327. struct wmi_host_vdev_peer_delete_all_response_event *param);
  1328. bool (*is_management_record)(uint32_t cmd_id);
  1329. bool (*is_diag_event)(uint32_t event_id);
  1330. uint8_t *(*wmi_id_to_name)(uint32_t cmd_id);
  1331. QDF_STATUS (*send_dfs_phyerr_offload_en_cmd)(wmi_unified_t wmi_handle,
  1332. uint32_t pdev_id);
  1333. QDF_STATUS (*send_dfs_phyerr_offload_dis_cmd)(wmi_unified_t wmi_handle,
  1334. uint32_t pdev_id);
  1335. QDF_STATUS (*extract_reg_chan_list_update_event)(wmi_unified_t wmi_handle,
  1336. uint8_t *evt_buf,
  1337. struct cur_regulatory_info
  1338. *reg_info,
  1339. uint32_t len);
  1340. QDF_STATUS (*extract_reg_11d_new_country_event)(wmi_unified_t wmi_handle,
  1341. uint8_t *evt_buf,
  1342. struct reg_11d_new_country *reg_11d_country,
  1343. uint32_t len);
  1344. QDF_STATUS (*extract_reg_ch_avoid_event)(wmi_unified_t wmi_handle,
  1345. uint8_t *evt_buf,
  1346. struct ch_avoid_ind_type *ch_avoid_event,
  1347. uint32_t len);
  1348. #ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
  1349. QDF_STATUS (*extract_num_rf_characterization_entries)(wmi_unified_t wmi_hdl,
  1350. uint8_t *evt_buf,
  1351. uint32_t *num_rf_characterization_entries);
  1352. QDF_STATUS (*extract_rf_characterization_entries)(wmi_unified_t wmi_handle,
  1353. uint8_t *evt_buf,
  1354. uint32_t num_rf_characterization_entries,
  1355. struct wmi_host_rf_characterization_event_param *rf_characterization_entries);
  1356. #endif
  1357. QDF_STATUS (*extract_chainmask_tables)(wmi_unified_t wmi_handle,
  1358. uint8_t *evt_buf,
  1359. struct wlan_psoc_host_chainmask_table *chainmask_table);
  1360. QDF_STATUS (*send_get_rcpi_cmd)(wmi_unified_t wmi_handle,
  1361. struct rcpi_req *get_rcpi_param);
  1362. QDF_STATUS (*extract_rcpi_response_event)(wmi_unified_t wmi_handle,
  1363. void *evt_buf,
  1364. struct rcpi_res *res);
  1365. QDF_STATUS (*extract_dfs_cac_complete_event)(wmi_unified_t wmi_handle,
  1366. uint8_t *evt_buf,
  1367. uint32_t *vdev_id,
  1368. uint32_t len);
  1369. QDF_STATUS
  1370. (*extract_dfs_ocac_complete_event)(wmi_unified_t wmi_handle,
  1371. uint8_t *evt_buf,
  1372. struct vdev_adfs_complete_status *oca_stats);
  1373. QDF_STATUS (*extract_dfs_radar_detection_event)(wmi_unified_t wmi_handle,
  1374. uint8_t *evt_buf,
  1375. struct radar_found_info *radar_found,
  1376. uint32_t len);
  1377. QDF_STATUS (*extract_wlan_radar_event_info)(wmi_unified_t wmi_handle,
  1378. uint8_t *evt_buf,
  1379. struct radar_event_info *wlan_radar_event,
  1380. uint32_t len);
  1381. QDF_STATUS (*send_set_country_cmd)(wmi_unified_t wmi_handle,
  1382. struct set_country *param);
  1383. uint32_t (*convert_pdev_id_host_to_target)(wmi_unified_t wmi_handle,
  1384. uint32_t pdev_id);
  1385. uint32_t (*convert_pdev_id_target_to_host)(wmi_unified_t wmi_handle,
  1386. uint32_t pdev_id);
  1387. /*
  1388. * For MCL, convert_pdev_id_host_to_target returns legacy pdev id value.
  1389. * But in converged firmware, WMI_SET_CURRENT_COUNTRY_CMDID expects target
  1390. * mapping of pdev_id to give only one WMI_REG_CHAN_LIST_CC_EVENTID.
  1391. * wmi_pdev_id_conversion_enable cannot be used since it overwrites
  1392. * convert_pdev_id_host_to_target which effects legacy cases.
  1393. * Below two commands: convert_host_pdev_id_to_target and
  1394. * convert_target_pdev_id_to_host should be used for any WMI
  1395. * command/event where FW expects target/host mapping of pdev_id respectively.
  1396. */
  1397. uint32_t (*convert_host_pdev_id_to_target)(wmi_unified_t wmi_handle,
  1398. uint32_t pdev_id);
  1399. uint32_t (*convert_target_pdev_id_to_host)(wmi_unified_t wmi_handle,
  1400. uint32_t pdev_id);
  1401. QDF_STATUS (*send_user_country_code_cmd)(wmi_unified_t wmi_handle,
  1402. uint8_t pdev_id, struct cc_regdmn_s *rd);
  1403. QDF_STATUS (*send_wds_entry_list_cmd)(wmi_unified_t wmi_handle);
  1404. QDF_STATUS (*extract_wds_entry)(wmi_unified_t wmi_handle,
  1405. uint8_t *evt_buf,
  1406. struct wdsentry *wds_entry,
  1407. u_int32_t idx);
  1408. #ifdef WLAN_FEATURE_NAN
  1409. QDF_STATUS (*send_ndp_initiator_req_cmd)(wmi_unified_t wmi_handle,
  1410. struct nan_datapath_initiator_req *req);
  1411. QDF_STATUS (*send_ndp_responder_req_cmd)(wmi_unified_t wmi_handle,
  1412. struct nan_datapath_responder_req *req);
  1413. QDF_STATUS (*send_ndp_end_req_cmd)(wmi_unified_t wmi_handle,
  1414. struct nan_datapath_end_req *req);
  1415. QDF_STATUS (*send_terminate_all_ndps_req_cmd)(wmi_unified_t wmi_handle,
  1416. uint32_t vdev_id);
  1417. QDF_STATUS (*extract_ndp_initiator_rsp)(wmi_unified_t wmi_handle,
  1418. uint8_t *data, struct nan_datapath_initiator_rsp *rsp);
  1419. QDF_STATUS (*extract_ndp_ind)(wmi_unified_t wmi_handle,
  1420. uint8_t *data, struct nan_datapath_indication_event *ind);
  1421. QDF_STATUS (*extract_ndp_confirm)(wmi_unified_t wmi_handle,
  1422. uint8_t *data, struct nan_datapath_confirm_event *ev);
  1423. QDF_STATUS (*extract_ndp_responder_rsp)(wmi_unified_t wmi_handle,
  1424. uint8_t *data, struct nan_datapath_responder_rsp *rsp);
  1425. QDF_STATUS (*extract_ndp_end_rsp)(wmi_unified_t wmi_handle,
  1426. uint8_t *data, struct nan_datapath_end_rsp_event *rsp);
  1427. QDF_STATUS (*extract_ndp_end_ind)(wmi_unified_t wmi_handle,
  1428. uint8_t *data, struct nan_datapath_end_indication_event **ind);
  1429. QDF_STATUS (*extract_ndp_sch_update)(wmi_unified_t wmi_handle,
  1430. uint8_t *data, struct nan_datapath_sch_update_event *ind);
  1431. QDF_STATUS (*extract_ndp_host_event)(wmi_unified_t wmi_handle, uint8_t *data,
  1432. struct nan_datapath_host_event *evt);
  1433. #endif /* WLAN_FEATURE_NAN */
  1434. QDF_STATUS (*send_obss_detection_cfg_cmd)(wmi_unified_t wmi_handle,
  1435. struct wmi_obss_detection_cfg_param *obss_cfg_param);
  1436. QDF_STATUS (*extract_obss_detection_info)(uint8_t *evt_buf,
  1437. struct wmi_obss_detect_info *info);
  1438. #if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
  1439. QDF_STATUS (*send_vdev_fils_enable_cmd)(wmi_unified_t wmi_handle,
  1440. struct config_fils_params *param);
  1441. #endif
  1442. #ifdef WLAN_SUPPORT_FILS
  1443. QDF_STATUS (*extract_swfda_vdev_id)(wmi_unified_t wmi_handle, void *evt_buf,
  1444. uint32_t *vdev_id);
  1445. QDF_STATUS (*send_fils_discovery_send_cmd)(wmi_unified_t wmi_handle,
  1446. struct fd_params *param);
  1447. #endif /* WLAN_SUPPORT_FILS */
  1448. QDF_STATUS
  1449. (*send_roam_scan_stats_cmd)(wmi_unified_t wmi_handle,
  1450. struct wmi_roam_scan_stats_req *params);
  1451. QDF_STATUS
  1452. (*extract_roam_scan_stats_res_evt)(wmi_unified_t wmi_handle,
  1453. void *evt_buf,
  1454. uint32_t *vdev_id,
  1455. struct wmi_roam_scan_stats_res **res_param);
  1456. QDF_STATUS
  1457. (*extract_offload_bcn_tx_status_evt)(wmi_unified_t wmi_handle,
  1458. void *evt_buf, uint32_t *vdev_id,
  1459. uint32_t *tx_status);
  1460. void (*wmi_pdev_id_conversion_enable)(wmi_unified_t wmi_handle,
  1461. uint32_t *pdev_map, uint8_t size);
  1462. void (*send_time_stamp_sync_cmd)(wmi_unified_t wmi_handle);
  1463. void (*wmi_free_allocated_event)(uint32_t cmd_event_id,
  1464. void **wmi_cmd_struct_ptr);
  1465. int (*wmi_check_and_pad_event)(void *os_handle, void *param_struc_ptr,
  1466. uint32_t param_buf_len,
  1467. uint32_t wmi_cmd_event_id,
  1468. void **wmi_cmd_struct_ptr);
  1469. int (*wmi_check_command_params)(void *os_handle, void *param_struc_ptr,
  1470. uint32_t param_buf_len,
  1471. uint32_t wmi_cmd_event_id);
  1472. #ifdef WLAN_SUPPORT_TWT
  1473. QDF_STATUS (*send_twt_enable_cmd)(wmi_unified_t wmi_handle,
  1474. struct wmi_twt_enable_param *params);
  1475. QDF_STATUS (*send_twt_disable_cmd)(wmi_unified_t wmi_handle,
  1476. struct wmi_twt_disable_param *params);
  1477. QDF_STATUS (*send_twt_add_dialog_cmd)(wmi_unified_t wmi_handle,
  1478. struct wmi_twt_add_dialog_param *params);
  1479. QDF_STATUS (*send_twt_del_dialog_cmd)(wmi_unified_t wmi_handle,
  1480. struct wmi_twt_del_dialog_param *params);
  1481. QDF_STATUS (*send_twt_pause_dialog_cmd)(wmi_unified_t wmi_handle,
  1482. struct wmi_twt_pause_dialog_cmd_param *params);
  1483. QDF_STATUS (*send_twt_resume_dialog_cmd)(wmi_unified_t wmi_handle,
  1484. struct wmi_twt_resume_dialog_cmd_param *params);
  1485. QDF_STATUS (*extract_twt_enable_comp_event)(wmi_unified_t wmi_handle,
  1486. uint8_t *evt_buf,
  1487. struct wmi_twt_enable_complete_event_param *params);
  1488. QDF_STATUS (*extract_twt_disable_comp_event)(wmi_unified_t wmi_handle,
  1489. uint8_t *evt_buf,
  1490. struct wmi_twt_disable_complete_event *params);
  1491. QDF_STATUS (*extract_twt_add_dialog_comp_event)(wmi_unified_t wmi_handle,
  1492. uint8_t *evt_buf,
  1493. struct wmi_twt_add_dialog_complete_event_param *params);
  1494. QDF_STATUS (*extract_twt_del_dialog_comp_event)(wmi_unified_t wmi_handle,
  1495. uint8_t *evt_buf,
  1496. struct wmi_twt_del_dialog_complete_event_param *params);
  1497. QDF_STATUS (*extract_twt_pause_dialog_comp_event)(wmi_unified_t wmi_handle,
  1498. uint8_t *evt_buf,
  1499. struct wmi_twt_pause_dialog_complete_event_param *params);
  1500. QDF_STATUS (*extract_twt_resume_dialog_comp_event)(wmi_unified_t wmi_handle,
  1501. uint8_t *evt_buf,
  1502. struct wmi_twt_resume_dialog_complete_event_param *params);
  1503. #endif
  1504. #ifdef QCA_SUPPORT_CP_STATS
  1505. QDF_STATUS (*extract_cca_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  1506. struct wmi_host_congestion_stats *stats);
  1507. #endif /* QCA_SUPPORT_CP_STATS */
  1508. #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
  1509. QDF_STATUS (*send_dfs_average_radar_params_cmd)(
  1510. wmi_unified_t wmi_handle,
  1511. struct dfs_radar_found_params *params);
  1512. QDF_STATUS (*extract_dfs_status_from_fw)(wmi_unified_t wmi_handle,
  1513. void *evt_buf,
  1514. uint32_t *dfs_status_check);
  1515. #endif
  1516. QDF_STATUS
  1517. (*extract_cfr_peer_tx_event_param)(wmi_unified_t wmi_handle, void *evt_buf,
  1518. wmi_cfr_peer_tx_event_param * peer_tx_event);
  1519. #ifdef OBSS_PD
  1520. QDF_STATUS (*send_obss_spatial_reuse_set)(wmi_unified_t wmi_handle,
  1521. struct wmi_host_obss_spatial_reuse_set_param
  1522. *obss_spatial_reuse_param);
  1523. QDF_STATUS (*send_obss_spatial_reuse_set_def_thresh)(wmi_unified_t wmi_handle,
  1524. struct wmi_host_obss_spatial_reuse_set_def_thresh
  1525. *obss_spatial_reuse_param);
  1526. #endif
  1527. QDF_STATUS
  1528. (*extract_ctl_failsafe_check_ev_param)(
  1529. wmi_unified_t wmi_handle,
  1530. void *evt_buf,
  1531. struct wmi_host_pdev_ctl_failsafe_event *param);
  1532. QDF_STATUS (*send_peer_del_all_wds_entries_cmd)(wmi_unified_t wmi_handle,
  1533. struct peer_del_all_wds_entries_params *param);
  1534. #ifdef WLAN_CFR_ENABLE
  1535. QDF_STATUS (*send_peer_cfr_capture_cmd)(wmi_unified_t wmi_handle,
  1536. struct peer_cfr_params *param);
  1537. #endif
  1538. #ifdef WMI_AP_SUPPORT
  1539. QDF_STATUS (*send_vdev_pcp_tid_map_cmd)(wmi_unified_t wmi_handle,
  1540. struct vap_pcp_tid_map_params *param);
  1541. QDF_STATUS (*send_vdev_tidmap_prec_cmd)(wmi_unified_t wmi_handle,
  1542. struct vap_tidmap_prec_params *param);
  1543. QDF_STATUS (*send_peer_ft_roam_cmd)(wmi_unified_t wmi_handle,
  1544. uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
  1545. uint8_t vdev_id);
  1546. #endif
  1547. QDF_STATUS (*send_mws_coex_status_req_cmd)(wmi_unified_t wmi_handle,
  1548. uint32_t vdev_id, uint32_t cmd_id);
  1549. #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
  1550. QDF_STATUS (*set_rx_pkt_type_routing_tag_cmd)(
  1551. wmi_unified_t wmi_hdl, struct wmi_rx_pkt_protocol_routing_info *param);
  1552. #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
  1553. #ifdef WIFI_POS_CONVERGED
  1554. QDF_STATUS (*extract_oem_response_param)
  1555. (wmi_unified_t wmi_hdl, void *resp_buf,
  1556. struct wmi_oem_response_param *oem_resp_param);
  1557. #endif /* WIFI_POS_CONVERGED */
  1558. QDF_STATUS (*extract_hw_mode_resp_event)(wmi_unified_t wmi_handle,
  1559. void *evt_buf, uint32_t *cmd_status);
  1560. QDF_STATUS (*send_set_roam_trigger_cmd)(wmi_unified_t wmi_handle,
  1561. uint32_t vdev_id,
  1562. uint32_t trigger_bitmap);
  1563. #ifdef WLAN_FEATURE_ELNA
  1564. QDF_STATUS (*send_set_elna_bypass_cmd)(wmi_unified_t wmi_handle,
  1565. struct set_elna_bypass_request *req);
  1566. QDF_STATUS (*send_get_elna_bypass_cmd)(wmi_unified_t wmi_handle,
  1567. struct get_elna_bypass_request *req);
  1568. QDF_STATUS (*extract_get_elna_bypass_resp)(wmi_unified_t wmi_handle,
  1569. void *resp_buf,
  1570. struct get_elna_bypass_response *resp);
  1571. #endif /* WLAN_FEATURE_ELNA */
  1572. #ifdef FEATURE_ANI_LEVEL_REQUEST
  1573. QDF_STATUS (*send_ani_level_cmd)(wmi_unified_t wmi_handle, uint32_t *freqs,
  1574. uint8_t num_freqs);
  1575. QDF_STATUS (*extract_ani_level)(uint8_t *evt_buf,
  1576. struct wmi_host_ani_level_event **info,
  1577. uint32_t *num_freqs);
  1578. #endif /* FEATURE_ANI_LEVEL_REQUEST */
  1579. };
  1580. /* Forward declartion for psoc*/
  1581. struct wlan_objmgr_psoc;
  1582. /**
  1583. * struct wmi_init_cmd - Saved wmi INIT command
  1584. * @buf: Buffer containing the wmi INIT command
  1585. * @buf_len: Length of the buffer
  1586. */
  1587. struct wmi_cmd_init {
  1588. wmi_buf_t buf;
  1589. uint32_t buf_len;
  1590. };
  1591. /**
  1592. * @abi_version_0: WMI Major and Minor versions
  1593. * @abi_version_1: WMI change revision
  1594. * @abi_version_ns_0: ABI version namespace first four dwords
  1595. * @abi_version_ns_1: ABI version namespace second four dwords
  1596. * @abi_version_ns_2: ABI version namespace third four dwords
  1597. * @abi_version_ns_3: ABI version namespace fourth four dwords
  1598. */
  1599. struct wmi_host_abi_version {
  1600. uint32_t abi_version_0;
  1601. uint32_t abi_version_1;
  1602. uint32_t abi_version_ns_0;
  1603. uint32_t abi_version_ns_1;
  1604. uint32_t abi_version_ns_2;
  1605. uint32_t abi_version_ns_3;
  1606. };
  1607. #define NUM_DEBUG_INFOS 9
  1608. struct wmi_unified {
  1609. void *scn_handle; /* handle to device */
  1610. osdev_t osdev; /* handle to use OS-independent services */
  1611. struct wbuff_mod_handle *wbuff_handle; /* handle to wbuff */
  1612. qdf_atomic_t pending_cmds;
  1613. HTC_ENDPOINT_ID wmi_endpoint_id;
  1614. uint16_t max_msg_len;
  1615. uint32_t *event_id;
  1616. wmi_unified_event_handler *event_handler;
  1617. enum wmi_rx_exec_ctx *ctx;
  1618. HTC_HANDLE htc_handle;
  1619. qdf_spinlock_t eventq_lock;
  1620. qdf_nbuf_queue_t event_queue;
  1621. qdf_work_t rx_event_work;
  1622. qdf_workqueue_t *wmi_rx_work_queue;
  1623. int wmi_stop_in_progress;
  1624. struct wmi_host_abi_version fw_abi_version;
  1625. struct wmi_host_abi_version final_abi_vers;
  1626. uint32_t num_of_diag_events_logs;
  1627. uint32_t *events_logs_list;
  1628. #ifdef WLAN_OPEN_SOURCE
  1629. struct fwdebug dbglog;
  1630. struct dentry *debugfs_phy;
  1631. #endif /* WLAN_OPEN_SOURCE */
  1632. #ifdef WMI_INTERFACE_EVENT_LOGGING
  1633. struct wmi_debug_log_info log_info;
  1634. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  1635. qdf_atomic_t is_target_suspended;
  1636. #ifdef FEATURE_RUNTIME_PM
  1637. qdf_atomic_t runtime_pm_inprogress;
  1638. #endif
  1639. qdf_atomic_t is_wow_bus_suspended;
  1640. bool tag_crash_inject;
  1641. bool tgt_force_assert_enable;
  1642. enum wmi_target_type target_type;
  1643. struct wmi_ops *ops;
  1644. bool use_cookie;
  1645. bool wmi_stopinprogress;
  1646. uint32_t *wmi_events;
  1647. uint32_t *services;
  1648. struct wmi_soc *soc;
  1649. uint16_t wmi_max_cmds;
  1650. struct dentry *debugfs_de[NUM_DEBUG_INFOS];
  1651. qdf_atomic_t critical_events_in_flight;
  1652. #ifdef WMI_EXT_DBG
  1653. int wmi_ext_dbg_msg_queue_size;
  1654. qdf_list_t wmi_ext_dbg_msg_queue;
  1655. qdf_spinlock_t wmi_ext_dbg_msg_queue_lock;
  1656. qdf_dentry_t wmi_ext_dbg_dentry;
  1657. #endif /*WMI_EXT_DBG*/
  1658. uint32_t *cmd_pdev_id_map;
  1659. uint32_t *evt_pdev_id_map;
  1660. qdf_atomic_t num_stats_over_qmi;
  1661. };
  1662. #define WMI_MAX_RADIOS 3
  1663. struct wmi_soc {
  1664. struct wlan_objmgr_psoc *wmi_psoc;
  1665. void *scn_handle; /* handle to device */
  1666. qdf_atomic_t num_pdevs;
  1667. enum wmi_target_type target_type;
  1668. bool is_async_ep;
  1669. HTC_HANDLE htc_handle;
  1670. uint32_t event_id[WMI_UNIFIED_MAX_EVENT];
  1671. wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
  1672. uint32_t max_event_idx;
  1673. enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
  1674. qdf_spinlock_t ctx_lock;
  1675. struct wmi_unified *wmi_pdev[WMI_MAX_RADIOS];
  1676. HTC_ENDPOINT_ID wmi_endpoint_id[WMI_MAX_RADIOS];
  1677. uint16_t max_msg_len[WMI_MAX_RADIOS];
  1678. struct wmi_ops *ops;
  1679. const uint32_t *svc_ids;
  1680. uint32_t wmi_events[wmi_events_max];
  1681. /* WMI service bitmap received from target */
  1682. uint32_t *wmi_service_bitmap;
  1683. uint32_t *wmi_ext_service_bitmap;
  1684. uint32_t services[wmi_services_max];
  1685. uint16_t wmi_max_cmds;
  1686. uint32_t soc_idx;
  1687. uint32_t cmd_pdev_id_map[WMI_MAX_RADIOS];
  1688. uint32_t evt_pdev_id_map[WMI_MAX_RADIOS];
  1689. bool is_pdev_is_map_enable;
  1690. #ifdef WMI_INTERFACE_EVENT_LOGGING
  1691. uint32_t buf_offset_command;
  1692. uint32_t buf_offset_event;
  1693. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  1694. };
  1695. /**
  1696. * struct wmi_process_fw_event_params - fw event parameters
  1697. * @wmi_handle: wmi handle
  1698. * @evt_buf: event buffer
  1699. */
  1700. struct wmi_process_fw_event_params {
  1701. void *wmi_handle;
  1702. void *evt_buf;
  1703. };
  1704. /**
  1705. * wmi_mtrace() - Wrappper function for qdf_mtrace api
  1706. * @message_id: 32-Bit Wmi message ID
  1707. * @vdev_id: Vdev ID
  1708. * @data: Actual message contents
  1709. *
  1710. * This function converts the 32-bit WMI message ID in 15-bit message ID
  1711. * format for qdf_mtrace as in qdf_mtrace message there are only 15
  1712. * bits reserved for message ID.
  1713. * out of these 15-bits, 8-bits (From MSB) specifies the WMI_GRP_ID
  1714. * and remaining 7-bits specifies the actual WMI command. With this
  1715. * notation there can be maximum 256 groups and each group can have
  1716. * max 128 commands can be supported.
  1717. *
  1718. * Return: None
  1719. */
  1720. void wmi_mtrace(uint32_t message_id, uint16_t vdev_id, uint32_t data);
  1721. void wmi_unified_register_module(enum wmi_target_type target_type,
  1722. void (*wmi_attach)(wmi_unified_t wmi_handle));
  1723. void wmi_tlv_init(void);
  1724. void wmi_non_tlv_init(void);
  1725. #ifdef WMI_NON_TLV_SUPPORT
  1726. /* ONLY_NON_TLV_TARGET:TLV attach dummy function definition for case when
  1727. * driver supports only NON-TLV target (WIN mainline) */
  1728. #define wmi_tlv_attach(x) qdf_print("TLV Unavailable")
  1729. #else
  1730. void wmi_tlv_attach(wmi_unified_t wmi_handle);
  1731. #endif
  1732. void wmi_non_tlv_attach(wmi_unified_t wmi_handle);
  1733. #ifdef FEATURE_WLAN_EXTSCAN
  1734. void wmi_extscan_attach_tlv(struct wmi_unified *wmi_handle);
  1735. #else
  1736. static inline void wmi_extscan_attach_tlv(struct wmi_unified *wmi_handle)
  1737. {
  1738. }
  1739. #endif
  1740. #ifdef WMI_SMART_ANT_SUPPORT
  1741. void wmi_smart_ant_attach_tlv(struct wmi_unified *wmi_handle);
  1742. #else
  1743. static inline void wmi_smart_ant_attach_tlv(struct wmi_unified *wmi_handle)
  1744. {
  1745. }
  1746. #endif
  1747. #ifdef WMI_DBR_SUPPORT
  1748. void wmi_dbr_attach_tlv(struct wmi_unified *wmi_handle);
  1749. #else
  1750. static inline void wmi_dbr_attach_tlv(struct wmi_unified *wmi_handle)
  1751. {
  1752. }
  1753. #endif
  1754. #ifdef WMI_ATF_SUPPORT
  1755. void wmi_atf_attach_tlv(struct wmi_unified *wmi_handle);
  1756. #else
  1757. static inline void wmi_atf_attach_tlv(struct wmi_unified *wmi_handle)
  1758. {
  1759. }
  1760. #endif
  1761. #ifdef WMI_AP_SUPPORT
  1762. void wmi_ap_attach_tlv(struct wmi_unified *wmi_handle);
  1763. #else
  1764. static inline void wmi_ap_attach_tlv(struct wmi_unified *wmi_handle)
  1765. {
  1766. }
  1767. #endif
  1768. #ifdef WLAN_FEATURE_DSRC
  1769. void wmi_ocb_attach_tlv(wmi_unified_t wmi_handle);
  1770. #else
  1771. static inline void wmi_ocb_attach_tlv(wmi_unified_t wmi_handle)
  1772. {
  1773. }
  1774. #endif
  1775. #ifdef WLAN_FEATURE_NAN
  1776. void wmi_nan_attach_tlv(wmi_unified_t wmi_handle);
  1777. #else
  1778. static inline void wmi_nan_attach_tlv(wmi_unified_t wmi_handle)
  1779. {
  1780. }
  1781. #endif
  1782. #ifdef FEATURE_P2P_LISTEN_OFFLOAD
  1783. void wmi_p2p_listen_offload_attach_tlv(wmi_unified_t wmi_handle);
  1784. #else
  1785. static inline
  1786. void wmi_p2p_listen_offload_attach_tlv(wmi_unified_t wmi_handle)
  1787. {
  1788. }
  1789. #endif
  1790. #ifdef CONVERGED_P2P_ENABLE
  1791. void wmi_p2p_attach_tlv(wmi_unified_t wmi_handle);
  1792. #else
  1793. static inline void wmi_p2p_attach_tlv(struct wmi_unified *wmi_handle)
  1794. {
  1795. }
  1796. #endif
  1797. #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP
  1798. void wmi_interop_issues_ap_attach_tlv(wmi_unified_t wmi_handle);
  1799. #else
  1800. static inline void
  1801. wmi_interop_issues_ap_attach_tlv(struct wmi_unified *wmi_handle)
  1802. {
  1803. }
  1804. #endif
  1805. #ifdef FEATURE_LFR_SUBNET_DETECTION
  1806. void wmi_lfr_subnet_detection_attach_tlv(wmi_unified_t wmi_handle);
  1807. #else
  1808. static inline
  1809. void wmi_lfr_subnet_detection_attach_tlv(struct wmi_unified *wmi_handle)
  1810. {
  1811. }
  1812. #endif
  1813. #ifdef FEATURE_RSSI_MONITOR
  1814. void wmi_rssi_monitor_attach_tlv(wmi_unified_t wmi_handle);
  1815. #else
  1816. static inline
  1817. void wmi_rssi_monitor_attach_tlv(struct wmi_unified *wmi_handle)
  1818. {
  1819. }
  1820. #endif
  1821. #ifdef FEATURE_WLAN_ESE
  1822. void wmi_ese_attach_tlv(wmi_unified_t wmi_handle);
  1823. #else
  1824. static inline void wmi_ese_attach_tlv(struct wmi_unified *wmi_handle)
  1825. {
  1826. }
  1827. #endif
  1828. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  1829. void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle);
  1830. #else
  1831. static inline
  1832. void wmi_roam_offload_attach_tlv(struct wmi_unified *wmi_handle)
  1833. {
  1834. }
  1835. #endif
  1836. #ifdef WLAN_FEATURE_FILS_SK
  1837. void wmi_fils_sk_attach_tlv(wmi_unified_t wmi_handle);
  1838. #else
  1839. static inline void wmi_fils_sk_attach_tlv(struct wmi_unified *wmi_handle)
  1840. {
  1841. }
  1842. #endif
  1843. #ifdef WMI_ROAM_SUPPORT
  1844. void wmi_roam_attach_tlv(struct wmi_unified *wmi_handle);
  1845. #else
  1846. static inline void wmi_roam_attach_tlv(struct wmi_unified *wmi_handle)
  1847. {
  1848. }
  1849. #endif
  1850. #ifdef WMI_CONCURRENCY_SUPPORT
  1851. void wmi_concurrency_attach_tlv(struct wmi_unified *wmi_handle);
  1852. #else
  1853. static inline void wmi_concurrency_attach_tlv(struct wmi_unified *wmi_handle)
  1854. {
  1855. }
  1856. #endif
  1857. #ifdef FEATURE_WLAN_D0WOW
  1858. void wmi_d0wow_attach_tlv(struct wmi_unified *wmi_handle);
  1859. #else
  1860. static inline void wmi_d0wow_attach_tlv(struct wmi_unified *wmi_handle)
  1861. {
  1862. }
  1863. #endif
  1864. #ifdef FEATURE_WLAN_RA_FILTERING
  1865. void wmi_ra_filtering_attach_tlv(struct wmi_unified *wmi_handle);
  1866. #else
  1867. static inline
  1868. void wmi_ra_filtering_attach_tlv(struct wmi_unified *wmi_handle)
  1869. {
  1870. }
  1871. #endif
  1872. #ifdef FEATURE_WLAN_LPHB
  1873. void wmi_lphb_attach_tlv(struct wmi_unified *wmi_handle);
  1874. #else
  1875. static inline void wmi_lphb_attach_tlv(struct wmi_unified *wmi_handle)
  1876. {
  1877. }
  1878. #endif
  1879. #ifdef WLAN_FEATURE_PACKET_FILTERING
  1880. void wmi_packet_filtering_attach_tlv(struct wmi_unified *wmi_handle);
  1881. #else
  1882. static inline
  1883. void wmi_packet_filtering_attach_tlv(struct wmi_unified *wmi_handle)
  1884. {
  1885. }
  1886. #endif
  1887. #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
  1888. void wmi_extwow_attach_tlv(struct wmi_unified *wmi_handle);
  1889. #else
  1890. static inline void wmi_extwow_attach_tlv(struct wmi_unified *wmi_handle)
  1891. {
  1892. }
  1893. #endif
  1894. #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
  1895. void wmi_pmo_attach_tlv(struct wmi_unified *wmi_handle);
  1896. #else
  1897. static inline void wmi_pmo_attach_tlv(struct wmi_unified *wmi_handle)
  1898. {
  1899. }
  1900. #endif
  1901. #ifdef FEATURE_WLAN_TDLS
  1902. void wmi_tdls_attach_tlv(struct wmi_unified *wmi_handle);
  1903. #else
  1904. static inline void wmi_tdls_attach_tlv(struct wmi_unified *wmi_handle)
  1905. {
  1906. }
  1907. #endif
  1908. #ifdef WLAN_POLICY_MGR_ENABLE
  1909. void wmi_policy_mgr_attach_tlv(struct wmi_unified *wmi_handle);
  1910. #else
  1911. static inline
  1912. void wmi_policy_mgr_attach_tlv(struct wmi_unified *wmi_handle)
  1913. {
  1914. }
  1915. #endif
  1916. #ifdef FEATURE_BLACKLIST_MGR
  1917. void wmi_blacklist_mgr_attach_tlv(struct wmi_unified *wmi_handle);
  1918. #else
  1919. static inline
  1920. void wmi_blacklist_mgr_attach_tlv(struct wmi_unified *wmi_handle)
  1921. {
  1922. }
  1923. #endif
  1924. #ifdef WMI_STA_SUPPORT
  1925. void wmi_sta_attach_tlv(struct wmi_unified *wmi_handle);
  1926. #else
  1927. static inline void wmi_sta_attach_tlv(struct wmi_unified *wmi_handle)
  1928. {
  1929. }
  1930. #endif
  1931. #ifdef WLAN_WMI_BCN
  1932. void wmi_bcn_attach_tlv(wmi_unified_t wmi_handle);
  1933. #else
  1934. static inline void wmi_bcn_attach_tlv(wmi_unified_t wmi_handle)
  1935. {
  1936. }
  1937. #endif
  1938. /**
  1939. * wmi_fwol_attach_tlv() - attach fw offload tlv handlers
  1940. * @wmi_handle: wmi handle
  1941. *
  1942. * Return: void
  1943. */
  1944. #ifdef WLAN_FW_OFFLOAD
  1945. void wmi_fwol_attach_tlv(wmi_unified_t wmi_handle);
  1946. #else
  1947. static inline void wmi_fwol_attach_tlv(wmi_unified_t wmi_handle)
  1948. {
  1949. }
  1950. #endif
  1951. /**
  1952. * wmi_align() - provides word aligned parameter
  1953. * @param: parameter to be aligned
  1954. *
  1955. * Return: word aligned parameter
  1956. */
  1957. static inline uint32_t wmi_align(uint32_t param)
  1958. {
  1959. return roundup(param, sizeof(uint32_t));
  1960. }
  1961. /**
  1962. * wmi_vdev_map_to_vdev_id() - Provides vdev id corresponding to idx
  1963. * from vdev map
  1964. * @vdev_map: Bitmask containing information of active vdev ids
  1965. * @idx: Index referring to the i'th bit set from LSB in vdev map
  1966. *
  1967. * This API returns the vdev id for the i'th bit set from LSB in vdev map.
  1968. * Index runs through 1 from maximum number of vdevs set in the vdev map
  1969. *
  1970. * Return: vdev id of the vdev object
  1971. */
  1972. static inline uint32_t wmi_vdev_map_to_vdev_id(uint32_t vdev_map,
  1973. uint32_t idx)
  1974. {
  1975. uint32_t vdev_count = 0, vdev_set = 0, vdev_id = WLAN_INVALID_VDEV_ID;
  1976. while (vdev_map) {
  1977. vdev_set += (vdev_map & 0x1);
  1978. if (vdev_set == (idx+1)) {
  1979. vdev_id = vdev_count;
  1980. break;
  1981. }
  1982. vdev_map >>= 1;
  1983. vdev_count++;
  1984. }
  1985. return vdev_id;
  1986. }
  1987. /**
  1988. * wmi_vdev_map_to_num_vdevs() - Provides number of vdevs active based on the
  1989. * vdev map received from FW
  1990. * @vdev_map: Bitmask containing information of active vdev ids
  1991. *
  1992. * Return: Number of vdevs set in the vdev bit mask
  1993. */
  1994. static inline uint32_t wmi_vdev_map_to_num_vdevs(uint32_t vdev_map)
  1995. {
  1996. uint32_t num_vdevs = 0;
  1997. while (vdev_map) {
  1998. num_vdevs += (vdev_map & 0x1);
  1999. vdev_map >>= 1;
  2000. }
  2001. return num_vdevs;
  2002. }
  2003. #ifdef WMI_EXT_DBG
  2004. /**
  2005. * wmi_ext_dbg_msg_get() - Allocate memory for wmi debug msg
  2006. *
  2007. * @buflen: Length of WMI message buffer
  2008. *
  2009. * Return: Allocated msg buffer else NULL on failure.
  2010. */
  2011. static inline struct wmi_ext_dbg_msg *wmi_ext_dbg_msg_get(uint32_t buflen)
  2012. {
  2013. return qdf_mem_malloc(sizeof(struct wmi_ext_dbg_msg) + buflen);
  2014. }
  2015. /**
  2016. * wmi_ext_dbg_msg_put() - Free wmi debug msg buffer
  2017. *
  2018. * @msg: wmi message buffer to be freed
  2019. *
  2020. * Return: none
  2021. */
  2022. static inline void wmi_ext_dbg_msg_put(struct wmi_ext_dbg_msg *msg)
  2023. {
  2024. qdf_mem_free(msg);
  2025. }
  2026. #else
  2027. static inline QDF_STATUS wmi_ext_dbg_msg_cmd_record(struct wmi_unified
  2028. *wmi_handle,
  2029. uint8_t *buf, uint32_t len)
  2030. {
  2031. return QDF_STATUS_SUCCESS;
  2032. }
  2033. static inline QDF_STATUS wmi_ext_dbg_msg_event_record(struct wmi_unified
  2034. *wmi_handle,
  2035. uint8_t *buf,
  2036. uint32_t len)
  2037. {
  2038. return QDF_STATUS_SUCCESS;
  2039. }
  2040. static inline QDF_STATUS wmi_ext_dbgfs_init(struct wmi_unified *wmi_handle)
  2041. {
  2042. return QDF_STATUS_SUCCESS;
  2043. }
  2044. static inline QDF_STATUS wmi_ext_dbgfs_deinit(struct wmi_unified *wmi_handle)
  2045. {
  2046. return QDF_STATUS_SUCCESS;
  2047. }
  2048. #endif /*WMI_EXT_DBG */
  2049. #endif