wmi_unified_api.h 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887
  1. /*
  2. * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /*
  27. * This file contains the API definitions for the Unified Wireless Module
  28. * Interface (WMI).
  29. */
  30. #ifndef _WMI_UNIFIED_API_H_
  31. #define _WMI_UNIFIED_API_H_
  32. #include <osdep.h>
  33. #ifdef CONFIG_MCL
  34. #include "wmi.h"
  35. #endif
  36. #include "htc_api.h"
  37. #include "wmi_unified_param.h"
  38. #include "wlan_objmgr_psoc_obj.h"
  39. #include "wlan_mgmt_txrx_utils_api.h"
  40. #ifdef WLAN_PMO_ENABLE
  41. #include "wmi_unified_pmo_api.h"
  42. #endif
  43. #ifdef CONVERGED_P2P_ENABLE
  44. #include "wlan_p2p_public_struct.h"
  45. #endif
  46. #include "wlan_scan_public_structs.h"
  47. #ifdef WLAN_FEATURE_DISA
  48. #include "wlan_disa_public_struct.h"
  49. #endif
  50. #ifdef WLAN_FEATURE_NAN_CONVERGENCE
  51. #include "nan_public_structs.h"
  52. #endif
  53. typedef qdf_nbuf_t wmi_buf_t;
  54. #define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
  55. #define WMI_LOGD(args ...) \
  56. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args)
  57. #define WMI_LOGI(args ...) \
  58. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args)
  59. #define WMI_LOGW(args ...) \
  60. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args)
  61. #define WMI_LOGE(args ...) \
  62. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args)
  63. #define WMI_LOGP(args ...) \
  64. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args)
  65. #define WMI_DEBUG_ALWAYS
  66. #ifdef WMI_DEBUG_ALWAYS
  67. #define WMI_LOGA(args ...) \
  68. QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args)
  69. #else
  70. #define WMI_LOGA(args ...)
  71. #endif
  72. struct wmi_soc;
  73. /**
  74. * struct wmi_ops - service callbacks to upper layer
  75. * @service_ready_cbk: service ready callback
  76. * @service_ready_ext_cbk: service ready ext callback
  77. * @ready_cbk: ready calback
  78. * @wma_process_fw_event_handler_cbk: generic event handler callback
  79. */
  80. struct wmi_rx_ops {
  81. int (*wma_process_fw_event_handler_cbk)(void *ctx,
  82. void *ev, uint8_t rx_ctx);
  83. };
  84. /**
  85. * enum wmi_target_type - type of supported wmi command
  86. * @WMI_TLV_TARGET: tlv based target
  87. * @WMI_NON_TLV_TARGET: non-tlv based target
  88. *
  89. */
  90. enum wmi_target_type {
  91. WMI_TLV_TARGET,
  92. WMI_NON_TLV_TARGET
  93. };
  94. /**
  95. * enum wmi_rx_exec_ctx - wmi rx execution context
  96. * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer
  97. * @WMI_RX_UMAC_CTX: execution context provided by umac layer
  98. *
  99. */
  100. enum wmi_rx_exec_ctx {
  101. WMI_RX_WORK_CTX,
  102. WMI_RX_UMAC_CTX
  103. };
  104. /**
  105. * attach for unified WMI
  106. *
  107. * @param scn_handle : handle to SCN.
  108. * @param target_type : type of supported wmi command
  109. * @param use_cookie : flag to indicate cookie based allocation
  110. * @param ops : handle to wmi ops
  111. * @psoc : objmgr psoc
  112. * @return opaque handle.
  113. */
  114. void *wmi_unified_attach(void *scn_handle,
  115. osdev_t osdev, enum wmi_target_type target_type,
  116. bool use_cookie, struct wmi_rx_ops *ops,
  117. struct wlan_objmgr_psoc *psoc);
  118. /**
  119. * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro
  120. *
  121. * @wmi_handle: wmi handle
  122. * @cmd: mgmt command
  123. * @header: pointer to 802.11 header
  124. * @vdev_id: vdev id
  125. * @chanfreq: channel frequency
  126. *
  127. * Return: none
  128. */
  129. void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
  130. void *header, uint32_t vdev_id, uint32_t chanfreq);
  131. /**
  132. * detach for unified WMI
  133. *
  134. * @param wmi_handle : handle to WMI.
  135. * @return void.
  136. */
  137. void wmi_unified_detach(struct wmi_unified *wmi_handle);
  138. void
  139. wmi_unified_remove_work(struct wmi_unified *wmi_handle);
  140. /**
  141. * generic function to allocate WMI buffer
  142. *
  143. * @param wmi_handle : handle to WMI.
  144. * @param len : length of the buffer
  145. * @return wmi_buf_t.
  146. */
  147. #ifdef MEMORY_DEBUG
  148. #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __FILE__, __LINE__)
  149. wmi_buf_t
  150. wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint16_t len,
  151. uint8_t *file_name, uint32_t line_num);
  152. #else
  153. wmi_buf_t wmi_buf_alloc(wmi_unified_t wmi_handle, uint16_t len);
  154. #endif
  155. /**
  156. * generic function frees WMI net buffer
  157. *
  158. * @param net_buf : Pointer ot net_buf to be freed
  159. */
  160. void wmi_buf_free(wmi_buf_t net_buf);
  161. /**
  162. * generic function to send unified WMI command
  163. *
  164. * @param wmi_handle : handle to WMI.
  165. * @param buf : wmi command buffer
  166. * @param buflen : wmi command buffer length
  167. * @param cmd_id : WMI cmd id
  168. * @return 0 on success and -ve on failure.
  169. */
  170. QDF_STATUS
  171. wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
  172. uint32_t cmd_id);
  173. /**
  174. * wmi_unified_register_event() - WMI event handler
  175. * registration function for converged components
  176. *
  177. * @wmi_handle: handle to WMI.
  178. * @event_id: WMI event ID
  179. * @handler_func: Event handler call back function
  180. *
  181. * @return 0 on success and -ve on failure.
  182. */
  183. int
  184. wmi_unified_register_event(wmi_unified_t wmi_handle,
  185. uint32_t event_id,
  186. wmi_unified_event_handler handler_func);
  187. /**
  188. * wmi_unified_register_event_handler() - WMI event handler
  189. * registration function
  190. *
  191. * @wmi_handle: handle to WMI.
  192. * @event_id: WMI event ID
  193. * @handler_func: Event handler call back function
  194. * @rx_ctx: rx event processing context
  195. *
  196. * @return 0 on success and -ve on failure.
  197. */
  198. int
  199. wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
  200. wmi_conv_event_id event_id,
  201. wmi_unified_event_handler handler_func,
  202. uint8_t rx_ctx);
  203. /**
  204. * WMI event handler unregister function for converged componets
  205. *
  206. * @param wmi_handle : handle to WMI.
  207. * @param event_id : WMI event ID
  208. * @return 0 on success and -ve on failure.
  209. */
  210. int
  211. wmi_unified_unregister_event(wmi_unified_t wmi_handle,
  212. uint32_t event_id);
  213. /**
  214. * WMI event handler unregister function
  215. *
  216. * @param wmi_handle : handle to WMI.
  217. * @param event_id : WMI event ID
  218. * @return 0 on success and -ve on failure.
  219. */
  220. int
  221. wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
  222. wmi_conv_event_id event_id);
  223. /**
  224. * request wmi to connet its htc service.
  225. * @param wmi_handle : handle to WMI.
  226. * @param htc_handle : handle to HTC.
  227. * @return void
  228. */
  229. QDF_STATUS
  230. wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
  231. void *htc_handle);
  232. /*
  233. * WMI API to verify the host has enough credits to suspend
  234. * @param wmi_handle : handle to WMI.
  235. */
  236. int wmi_is_suspend_ready(wmi_unified_t wmi_handle);
  237. /**
  238. * WMI API to get updated host_credits
  239. * @param wmi_handle : handle to WMI.
  240. */
  241. int wmi_get_host_credits(wmi_unified_t wmi_handle);
  242. /**
  243. * WMI API to get WMI Pending Commands in the HTC queue
  244. * @param wmi_handle : handle to WMI.
  245. */
  246. int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
  247. /**
  248. * WMI API to set target suspend state
  249. * @param wmi_handle : handle to WMI.
  250. * @param val : suspend state boolean
  251. */
  252. void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
  253. /**
  254. * WMI API to set bus suspend state
  255. * @param wmi_handle: handle to WMI.
  256. * @param val: suspend state boolean
  257. */
  258. void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val);
  259. /**
  260. * WMI API to set crash injection state
  261. * @param wmi_handle: handle to WMI.
  262. * @param val: crash injection state boolean
  263. */
  264. void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
  265. /**
  266. * WMI API to set target assert
  267. * @param wmi_handle: handle to WMI.
  268. * @param val: target assert config value.
  269. *
  270. * Return: none.
  271. */
  272. void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val);
  273. /**
  274. * generic function to block unified WMI command
  275. * @param wmi_handle : handle to WMI.
  276. * @return 0 on success and -ve on failure.
  277. */
  278. int
  279. wmi_stop(wmi_unified_t wmi_handle);
  280. /**
  281. * API to flush all the previous packets associated with the wmi endpoint
  282. *
  283. * @param wmi_handle : handle to WMI.
  284. */
  285. void
  286. wmi_flush_endpoint(wmi_unified_t wmi_handle);
  287. /**
  288. * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
  289. * By default pdev_id conversion is not done in WMI.
  290. * This API can be used enable conversion in WMI.
  291. * @param wmi_handle : handle to WMI
  292. * Return none
  293. */
  294. void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle);
  295. /**
  296. * API to handle wmi rx event after UMAC has taken care of execution
  297. * context
  298. *
  299. * @param wmi_handle : handle to WMI.
  300. * @param evt_buf : wmi event buffer
  301. */
  302. void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
  303. #ifdef FEATURE_RUNTIME_PM
  304. void
  305. wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val);
  306. bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle);
  307. #else
  308. static inline void
  309. wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val)
  310. {
  311. return;
  312. }
  313. static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
  314. {
  315. return false;
  316. }
  317. #endif
  318. void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle);
  319. void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx);
  320. /**
  321. * UMAC Callback to process fw event.
  322. * @param wmi_handle : handle to WMI.
  323. * @param evt_buf : wmi event buffer
  324. */
  325. void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
  326. uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
  327. QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
  328. uint8_t macaddr[IEEE80211_ADDR_LEN],
  329. struct vdev_create_params *param);
  330. QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
  331. uint8_t if_id);
  332. QDF_STATUS wmi_unified_vdev_restart_send(void *wmi_hdl,
  333. uint8_t macaddr[IEEE80211_ADDR_LEN],
  334. struct vdev_start_params *param);
  335. QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
  336. uint8_t vdev_id);
  337. QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
  338. uint8_t bssid[IEEE80211_ADDR_LEN],
  339. struct vdev_up_params *params);
  340. QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl,
  341. uint8_t vdev_id);
  342. QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
  343. struct vdev_start_params *req);
  344. QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
  345. struct hidden_ssid_vdev_restart_params *restart_params);
  346. QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
  347. struct vdev_set_params *param);
  348. QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
  349. uint8_t
  350. peer_addr[IEEE80211_ADDR_LEN],
  351. uint8_t vdev_id);
  352. QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
  353. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  354. struct peer_flush_params *param);
  355. QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
  356. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  357. struct peer_set_params *param);
  358. QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
  359. struct peer_create_params *param);
  360. QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
  361. uint8_t macaddr[IEEE80211_ADDR_LEN],
  362. struct stats_request_params *param);
  363. QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
  364. uint32_t value, uint8_t mac_id);
  365. #ifdef FEATURE_WLAN_D0WOW
  366. QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
  367. uint8_t mac_id);
  368. QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
  369. uint8_t mac_id);
  370. #endif
  371. QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
  372. struct wow_cmd_params *param,
  373. uint8_t mac_id);
  374. QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl);
  375. QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
  376. struct wow_add_wakeup_params *param);
  377. QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
  378. struct wow_add_wakeup_pattern_params *param);
  379. QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
  380. struct wow_remove_wakeup_pattern_params *param);
  381. #ifndef CONFIG_MCL
  382. QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
  383. WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id);
  384. #else
  385. QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
  386. uint8_t macaddr[IEEE80211_ADDR_LEN],
  387. struct packet_enable_params *param);
  388. #endif
  389. QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id);
  390. QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
  391. struct suspend_params *param,
  392. uint8_t mac_id);
  393. QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
  394. uint8_t mac_id);
  395. QDF_STATUS
  396. wmi_unified_pdev_param_send(void *wmi_hdl,
  397. struct pdev_params *param,
  398. uint8_t mac_id);
  399. QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
  400. struct beacon_tmpl_params *param);
  401. QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
  402. struct beacon_params *param);
  403. QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
  404. struct peer_assoc_params *param);
  405. QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
  406. struct sta_ps_params *param);
  407. QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
  408. uint8_t macaddr[IEEE80211_ADDR_LEN],
  409. struct ap_ps_params *param);
  410. QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
  411. struct scan_req_params *param);
  412. QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
  413. struct scan_cancel_param *param);
  414. QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
  415. struct scan_chan_list_params *param);
  416. QDF_STATUS wmi_crash_inject(void *wmi_hdl,
  417. struct crash_inject *param);
  418. QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
  419. struct pdev_utf_params *param,
  420. uint8_t mac_id);
  421. QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl,
  422. struct dbglog_params *param);
  423. QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
  424. struct wmi_mgmt_params *param);
  425. QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
  426. struct wmi_offchan_data_tx_params *param);
  427. QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
  428. uint32_t param_value);
  429. QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
  430. uint32_t vdev_id, uint8_t val);
  431. QDF_STATUS
  432. wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
  433. struct sta_uapsd_trig_params *param);
  434. QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl);
  435. QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
  436. struct p2p_ps_params *oppps);
  437. QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
  438. struct p2p_ps_params *noa);
  439. #ifdef CONVERGED_P2P_ENABLE
  440. QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
  441. struct p2p_lo_start *param);
  442. QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
  443. #endif
  444. QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
  445. int value);
  446. QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value);
  447. QDF_STATUS wmi_unified_ocb_set_utc_time(void *wmi_hdl,
  448. struct ocb_utc_param *utc);
  449. QDF_STATUS wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
  450. struct ocb_timing_advert_param *timing_advert);
  451. QDF_STATUS wmi_unified_ocb_stop_timing_advert(void *wmi_hdl,
  452. struct ocb_timing_advert_param *timing_advert);
  453. QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
  454. struct ocb_config_param *config, uint32_t *ch_mhz);
  455. QDF_STATUS wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
  456. uint8_t vdev_id);
  457. QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
  458. struct wmi_lro_config_cmd_t *wmi_lro_cmd);
  459. QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
  460. struct thermal_cmd_params *thermal_info);
  461. QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
  462. struct wmi_peer_rate_report_params *rate_report_params);
  463. QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd
  464. (void *wmi_hdl,
  465. uint32_t adapter_1_chan_freq,
  466. uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
  467. QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd
  468. (void *wmi_hdl,
  469. uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
  470. QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
  471. void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
  472. uint32_t pdev_id);
  473. #ifdef CONFIG_MCL
  474. QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
  475. wmi_bcn_send_from_host_cmd_fixed_param *param);
  476. #endif
  477. QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
  478. uint8_t vdev_id, uint32_t max_retries,
  479. uint32_t retry_interval);
  480. QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
  481. struct sta_params *params);
  482. QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
  483. struct wmi_gtx_config *gtx_info);
  484. QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
  485. uint8_t vdev_id,
  486. struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
  487. QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
  488. uint8_t vdev_id,
  489. struct wmi_probe_resp_params *probe_rsp_info);
  490. QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
  491. struct set_key_params *key_params);
  492. #ifdef WLAN_FEATURE_DISA
  493. /**
  494. * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
  495. * @wmi_hdl: wmi handle
  496. * @params: encrypt/decrypt params
  497. *
  498. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  499. */
  500. QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
  501. struct disa_encrypt_decrypt_req_params *params);
  502. /**
  503. * wmi_extract_encrypt_decrypt_resp_params() -
  504. * extract encrypt decrypt resp params from event buffer
  505. * @wmi_handle: wmi handle
  506. * @evt_buf: pointer to event buffer
  507. * @resp: encrypt decrypt resp params
  508. *
  509. * Return: QDF_STATUS_SUCCESS for success or error code
  510. */
  511. QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
  512. uint8_t *evt_buf,
  513. struct disa_encrypt_decrypt_resp_params *resp);
  514. #endif
  515. QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
  516. A_UINT32 vdev_id, uint8_t *p2p_ie);
  517. QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
  518. struct gateway_update_req_param *req);
  519. QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
  520. struct rssi_monitor_param *req);
  521. QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
  522. struct scan_mac_oui *psetoui);
  523. QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
  524. struct wifi_passpoint_req_param *req);
  525. QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
  526. struct wifi_passpoint_req_param *req);
  527. #ifdef CONFIG_MCL
  528. QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
  529. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  530. struct roam_offload_scan_params *roam_req);
  531. #endif
  532. /**
  533. * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters
  534. * @wmi_hdl: wmi handle
  535. * @params: Parameters to be configured
  536. *
  537. * Pass the MAWC(Motion Aided wireless connectivity) related roaming
  538. * parameters from the host to the target
  539. *
  540. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  541. */
  542. QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl,
  543. struct wmi_mawc_roam_params *params);
  544. QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
  545. struct roam_offload_scan_rssi_params *roam_req);
  546. QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
  547. struct roam_scan_filter_params *roam_req);
  548. QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
  549. struct wifi_enhanched_pno_params *req);
  550. QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
  551. struct ipa_offload_control_params *ipa_offload);
  552. QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
  553. struct extscan_capabilities_params *pgetcapab);
  554. QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
  555. struct extscan_cached_result_params *pcached_results);
  556. QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
  557. struct extscan_capabilities_reset_params *reset_req);
  558. QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
  559. struct extscan_set_sig_changereq_params *
  560. psigchange);
  561. QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
  562. struct extscan_bssid_hotlist_reset_params *photlist_reset);
  563. QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl,
  564. struct extscan_stop_req_params *pstopcmd);
  565. QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl,
  566. struct wifi_scan_cmd_req_params *pstart);
  567. QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
  568. const struct plm_req_params *plm);
  569. QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
  570. const struct plm_req_params *plm,
  571. uint32_t *gchannel_list);
  572. QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
  573. #ifdef FEATURE_WLAN_SCAN_PNO
  574. QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
  575. struct pno_scan_req_params *pno);
  576. #endif
  577. QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
  578. struct nlo_mawc_params *params);
  579. QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
  580. uint8_t is_add_ts);
  581. QDF_STATUS wmi_unified_process_ll_stats_clear_cmd
  582. (void *wmi_hdl, const struct ll_stats_clear_params *clear_req,
  583. uint8_t addr[IEEE80211_ADDR_LEN]);
  584. QDF_STATUS wmi_unified_process_ll_stats_set_cmd
  585. (void *wmi_hdl, const struct ll_stats_set_params *set_req);
  586. QDF_STATUS wmi_unified_process_ll_stats_get_cmd
  587. (void *wmi_hdl, const struct ll_stats_get_params *get_req,
  588. uint8_t addr[IEEE80211_ADDR_LEN]);
  589. /**
  590. * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
  591. * @wmi_hdl: wma handle
  592. * @vdev_id: vdev id
  593. *
  594. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  595. */
  596. QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
  597. uint8_t vdev_id);
  598. QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl);
  599. QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id);
  600. QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
  601. struct link_status_params *link_status);
  602. #ifdef CONFIG_MCL
  603. QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
  604. wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
  605. QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
  606. wmi_mac_addr peer_macaddr);
  607. QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
  608. wmi_ap_ps_egap_param_cmd_fixed_param *egap_params);
  609. #endif
  610. QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
  611. uint32_t cmd, uint32_t value1, uint32_t value2);
  612. QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
  613. uint32_t cookie, uint32_t time);
  614. QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id);
  615. /**
  616. * wmi_unified_set_latency_config_cmd()
  617. * @wmi_handle: wmi handle
  618. * @param: WLM parameters
  619. *
  620. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  621. */
  622. QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
  623. struct wlm_latency_level_param *param);
  624. QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id);
  625. #ifdef WLAN_FEATURE_CIF_CFR
  626. /**
  627. * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings
  628. * @wmi_handle: wmi handle
  629. * @data_len: len of dma cfg req
  630. * @data: dma cfg req
  631. *
  632. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  633. */
  634. QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
  635. wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
  636. #endif
  637. /**
  638. * wmi_unified_dbr_ring_cfg: Configure direct buffer rx rings
  639. * @wmi_hdl: WMI handle
  640. * @cfg: pointer to direct buffer rx config request
  641. *
  642. * Return: QDF status of operation
  643. */
  644. QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
  645. struct direct_buf_rx_cfg_req *cfg);
  646. QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
  647. uint32_t data_len,
  648. uint8_t *data);
  649. QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
  650. bool dfs_phyerr_filter_offload);
  651. #ifdef CONFIG_MCL
  652. QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
  653. WMI_PKTLOG_EVENT pktlog_event,
  654. uint32_t cmd_id,
  655. uint8_t user_triggered);
  656. #endif
  657. QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
  658. uint8_t vdev_id);
  659. QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl);
  660. QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
  661. uint8_t ac);
  662. QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
  663. struct aggr_add_ts_param *aggr_qos_rsp_msg);
  664. QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
  665. struct add_ts_param *msg);
  666. QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
  667. struct periodic_tx_pattern *
  668. pAddPeriodicTxPtrnParams,
  669. uint8_t vdev_id);
  670. QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
  671. uint8_t vdev_id,
  672. uint8_t pattern_id);
  673. QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
  674. struct stats_ext_params *preq);
  675. QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
  676. struct ext_wow_params *params);
  677. QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
  678. struct app_type2_params *appType2Params);
  679. QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
  680. uint32_t timer_val);
  681. QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
  682. struct nan_req_params *nan_req);
  683. QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
  684. struct dhcp_offload_info_params *params);
  685. QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl);
  686. QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
  687. uint32_t reg_dmn, uint16_t regdmn2G,
  688. uint16_t regdmn5G, uint8_t ctl2G,
  689. uint8_t ctl5G);
  690. QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
  691. struct tdls_channel_switch_params *chan_switch_params);
  692. QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
  693. void *tdls_param, uint8_t tdls_state);
  694. QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
  695. struct tdls_peer_state_params *peerStateParams,
  696. uint32_t *ch_mhz);
  697. QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
  698. struct fw_dump_req_param *mem_dump_req);
  699. QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
  700. struct vdev_ie_info_param *ie_info);
  701. QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
  702. struct ocb_utc_param *utc);
  703. QDF_STATUS wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,
  704. struct dcc_get_stats_param *get_stats_param);
  705. QDF_STATUS wmi_unified_dcc_clear_stats(void *wmi_hdl,
  706. uint32_t vdev_id, uint32_t dcc_stats_bitmap);
  707. QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
  708. struct dcc_update_ndl_param *update_ndl_param);
  709. QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
  710. void *evt_buf);
  711. QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
  712. uint8_t *custom_addr);
  713. QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
  714. uint8_t *event,
  715. uint32_t len);
  716. QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
  717. struct wmi_wifi_start_log *start_log);
  718. QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl);
  719. QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
  720. struct wmi_pcl_chan_weights *msg);
  721. QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
  722. uint32_t hw_mode_index);
  723. QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
  724. struct wmi_dual_mac_config *msg);
  725. QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
  726. struct flashing_req_params *flashing);
  727. QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
  728. struct app_type1_params *app_type1_params);
  729. QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
  730. struct ssid_hotlist_request_params *request);
  731. QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
  732. uint8_t vdev_id);
  733. QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
  734. struct wmi_unit_test_cmd *wmi_utest);
  735. QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
  736. struct wmi_roam_invoke_cmd *roaminvoke,
  737. uint32_t ch_hz);
  738. QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
  739. uint32_t command, uint32_t vdev_id);
  740. #ifdef CONFIG_MCL
  741. QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
  742. struct ap_profile_params *ap_profile);
  743. #endif
  744. QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
  745. uint32_t scan_period,
  746. uint32_t scan_age,
  747. uint32_t vdev_id);
  748. QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
  749. uint8_t chan_count,
  750. uint32_t *chan_list,
  751. uint8_t list_type, uint32_t vdev_id);
  752. QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
  753. uint32_t vdev_id,
  754. int32_t rssi_change_thresh,
  755. uint32_t bcn_rssi_weight,
  756. uint32_t hirssi_delay_btw_scans);
  757. /**
  758. * wmi_unified_set_per_roam_config() - set PER roam config in FW
  759. * @wmi_hdl: wmi handle
  760. * @req_buf: per roam config request buffer
  761. *
  762. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  763. */
  764. QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
  765. struct wmi_per_roam_config_req *req_buf);
  766. QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
  767. struct ext_scan_setbssi_hotlist_params *
  768. photlist, int *buf_len);
  769. /**
  770. * wmi_unified_set_active_bpf_mode_cmd() - config active BPF mode in FW
  771. * @wmi_hdl: the WMI handle
  772. * @vdev_id: the Id of the vdev to apply the configuration to
  773. * @ucast_mode: the active BPF mode to configure for unicast packets
  774. * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast
  775. * packets
  776. */
  777. QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl,
  778. uint8_t vdev_id,
  779. enum wmi_host_active_bpf_mode ucast_mode,
  780. enum wmi_host_active_bpf_mode mcast_bcast_mode);
  781. QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
  782. uint8_t macaddr[IEEE80211_ADDR_LEN],
  783. struct stats_request_params *param);
  784. QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
  785. uint32_t param);
  786. QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
  787. struct set_bwf_params *param);
  788. QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value);
  789. QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value);
  790. QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl,
  791. uint32_t value);
  792. QDF_STATUS wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl,
  793. uint32_t value);
  794. QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
  795. struct btcoex_cfg_params *param);
  796. QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
  797. struct btcoex_cfg_params *param);
  798. QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
  799. coex_ver_cfg_t *param);
  800. QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
  801. struct coex_config_params *param);
  802. QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
  803. struct set_atf_params *param);
  804. QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
  805. struct fips_params *param);
  806. QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
  807. struct wlan_profile_params *param);
  808. QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
  809. struct wlan_profile_params *param);
  810. QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
  811. struct channel_param *param);
  812. QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
  813. struct ht_ie_params *param);
  814. QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
  815. struct vht_ie_params *param);
  816. QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
  817. struct wmm_update_params *param);
  818. QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
  819. struct ant_switch_tbl_params *param);
  820. QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
  821. struct ratepwr_table_params *param);
  822. QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl);
  823. QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
  824. struct ctl_table_params *param);
  825. QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
  826. struct mimogain_table_params *param);
  827. QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
  828. struct ratepwr_chainmsk_params *param);
  829. QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
  830. struct macaddr_params *param);
  831. QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl);
  832. QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl);
  833. QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
  834. struct acparams_params *param);
  835. QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
  836. struct vap_dscp_tid_map_params *param);
  837. QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
  838. struct proxy_ast_reserve_params *param);
  839. QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
  840. struct pdev_qvit_params *param);
  841. QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
  842. struct mcast_group_update_params *param);
  843. QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
  844. struct peer_add_wds_entry_params *param);
  845. QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
  846. struct peer_del_wds_entry_params *param);
  847. /**
  848. * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
  849. * @param wmi_hdl : handle to WMI.
  850. * @param param : pointer to hold bridge mac addr param
  851. *
  852. * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  853. */
  854. QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
  855. struct set_bridge_mac_addr_params *param);
  856. QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
  857. struct peer_update_wds_entry_params *param);
  858. QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
  859. QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
  860. QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl);
  861. QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
  862. struct smart_ant_enable_params *param);
  863. QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
  864. struct smart_ant_rx_ant_params *param);
  865. QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
  866. uint8_t macaddr[IEEE80211_ADDR_LEN],
  867. struct smart_ant_tx_ant_params *param);
  868. QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
  869. uint8_t macaddr[IEEE80211_ADDR_LEN],
  870. struct smart_ant_training_info_params *param);
  871. QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
  872. uint8_t macaddr[IEEE80211_ADDR_LEN],
  873. struct smart_ant_node_config_params *param);
  874. QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
  875. struct smart_ant_enable_tx_feedback_params *param);
  876. QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
  877. struct vdev_spectral_configure_params *param);
  878. QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
  879. struct vdev_spectral_enable_params *param);
  880. QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
  881. struct bss_chan_info_request_params *param);
  882. QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
  883. struct thermal_mitigation_params *param);
  884. QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
  885. uint8_t macaddr[IEEE80211_ADDR_LEN],
  886. struct set_neighbour_rx_params *param);
  887. QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
  888. struct set_fwtest_params *param);
  889. QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
  890. struct config_ratemask_params *param);
  891. /**
  892. * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
  893. * size command
  894. * @param wmi_hdl : handle to WMI.
  895. * @param param : pointer to hold custom aggr size param
  896. *
  897. * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  898. */
  899. QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
  900. struct set_custom_aggr_size_params *param);
  901. /**
  902. * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
  903. * @param wmi_hdl : handle to WMI.
  904. * @param param : pointer to hold set qdepth thresh param
  905. *
  906. * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  907. */
  908. QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
  909. struct set_qdepth_thresh_params *param);
  910. QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
  911. struct pdev_set_regdomain_params *param);
  912. QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
  913. struct set_quiet_mode_params *param);
  914. QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
  915. struct set_beacon_filter_params *param);
  916. QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
  917. struct remove_beacon_filter_params *param);
  918. QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
  919. uint8_t macaddr[IEEE80211_ADDR_LEN],
  920. struct addba_clearresponse_params *param);
  921. QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
  922. uint8_t macaddr[IEEE80211_ADDR_LEN],
  923. struct addba_send_params *param);
  924. QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
  925. uint8_t macaddr[IEEE80211_ADDR_LEN],
  926. struct delba_send_params *param);
  927. QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
  928. uint8_t macaddr[IEEE80211_ADDR_LEN],
  929. struct addba_setresponse_params *param);
  930. QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
  931. uint8_t macaddr[IEEE80211_ADDR_LEN],
  932. struct singleamsdu_params *param);
  933. QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
  934. uint8_t macaddr[IEEE80211_ADDR_LEN],
  935. struct set_qboost_params *param);
  936. QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
  937. struct mu_scan_params *param);
  938. QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
  939. struct lteu_config_params *param);
  940. QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
  941. struct set_ps_mode_params *param);
  942. QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
  943. struct wmi_init_cmd_param *param);
  944. bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id);
  945. /**
  946. * wmi_save_service_bitmap() - save service bitmap
  947. * @wmi_handle: wmi handle
  948. * @param evt_buf: pointer to event buffer
  949. *
  950. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
  951. */
  952. QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
  953. void *bitmap_buf);
  954. /**
  955. * wmi_save_ext_service_bitmap() - save extended service bitmap
  956. * @wmi_handle: wmi handle
  957. * @param evt_buf: pointer to event buffer
  958. *
  959. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
  960. */
  961. QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
  962. void *bitmap_buf);
  963. QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf);
  964. QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
  965. void *evt_buf,
  966. struct wlan_psoc_target_capability_info *ev);
  967. QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
  968. struct wlan_psoc_hal_reg_capability *hal_reg_cap);
  969. host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
  970. void *evt_buf, uint8_t *num_entries);
  971. uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev);
  972. QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
  973. void *ev, uint8_t *macaddr);
  974. wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
  975. uint8_t *num_mac_addr);
  976. /**
  977. * wmi_extract_ready_params() - Extract data from ready event apart from
  978. * status, macaddr and version.
  979. * @wmi_handle: Pointer to WMI handle.
  980. * @evt_buf: Pointer to Ready event buffer.
  981. * @ev_param: Pointer to host defined struct to copy the data from event.
  982. *
  983. * Return: QDF_STATUS_SUCCESS on success.
  984. */
  985. QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
  986. void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
  987. QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
  988. void *ev, struct wmi_host_fw_ver *fw_ver);
  989. QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
  990. void *ev, struct wmi_host_fw_abi_ver *fw_ver);
  991. QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev);
  992. uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl,
  993. void *evt_b, uint32_t *len);
  994. QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
  995. wmi_host_ext_resource_config *ext_cfg);
  996. QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl);
  997. QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
  998. struct packet_power_info_params *param);
  999. QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
  1000. struct gpio_config_params *param);
  1001. QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
  1002. struct gpio_output_params *param);
  1003. QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
  1004. struct rtt_meas_req_test_params *param);
  1005. QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
  1006. struct rtt_meas_req_params *param);
  1007. QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
  1008. struct rtt_keepalive_req_params *param);
  1009. QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
  1010. struct lci_set_params *param);
  1011. QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
  1012. struct lcr_set_params *param);
  1013. QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
  1014. struct periodic_chan_stats_params *param);
  1015. QDF_STATUS
  1016. wmi_send_atf_peer_request_cmd(void *wmi_hdl,
  1017. struct atf_peer_request_params *param);
  1018. QDF_STATUS
  1019. wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
  1020. struct atf_grouping_params *param);
  1021. /* Extract APIs */
  1022. QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl,
  1023. void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
  1024. QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
  1025. void *evt_buf, struct wmi_host_dcs_interference_param *param);
  1026. QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
  1027. wmi_host_ath_dcs_cw_int *cw_int);
  1028. QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
  1029. wmi_host_dcs_im_tgt_stats_t *wlan_stat);
  1030. QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
  1031. struct wmi_host_fips_event_param *param);
  1032. QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
  1033. wmi_host_vdev_start_resp *vdev_rsp);
  1034. /**
  1035. * wmi_extract_vdev_delete_resp - api to extract vdev delete
  1036. * response event params
  1037. * @wmi_handle: wma handle
  1038. * @evt_buf: pointer to event buffer
  1039. * @delele_rsp: pointer to hold delete response from firmware
  1040. *
  1041. * Return: QDF_STATUS_SUCCESS for successful event parse
  1042. * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
  1043. */
  1044. QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
  1045. struct wmi_host_vdev_delete_resp *delele_rsp);
  1046. QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
  1047. uint8_t idx, struct tbttoffset_params *tbtt_param);
  1048. QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
  1049. void *evt_buf, uint8_t idx,
  1050. struct tbttoffset_params *tbtt_param);
  1051. QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
  1052. uint32_t *num_vdevs);
  1053. QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
  1054. uint32_t *num_vdevs);
  1055. QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
  1056. struct mgmt_rx_event_params *hdr, uint8_t **bufp);
  1057. QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
  1058. uint32_t *vdev_id);
  1059. QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
  1060. wmi_host_roam_event *ev);
  1061. QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
  1062. struct scan_event *param);
  1063. #ifdef CONVERGED_TDLS_ENABLE
  1064. /**
  1065. * wmi_extract_vdev_tdls_ev_param - extract vdev tdls param from event
  1066. * @wmi_handle: wmi handle
  1067. * @param evt_buf: pointer to event buffer
  1068. * @param param: Pointer to hold vdev tdls param
  1069. *
  1070. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1071. */
  1072. QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
  1073. struct tdls_event_info *param);
  1074. #endif
  1075. QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
  1076. wmi_host_mu_report_event *param);
  1077. QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
  1078. uint8_t idx, wmi_host_mu_db_entry *param);
  1079. QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
  1080. wmi_host_peer_txmu_cnt_event *param);
  1081. QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
  1082. void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
  1083. QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
  1084. void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
  1085. QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
  1086. wmi_host_pdev_tpc_config_event *param);
  1087. QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
  1088. void *evt_buf, uint32_t *gpio_num);
  1089. QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
  1090. void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
  1091. QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
  1092. wmi_host_pdev_nfcal_power_all_channels_event *param);
  1093. QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
  1094. wmi_host_pdev_tpc_event *param);
  1095. QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
  1096. void *evt_buf,
  1097. wmi_host_pdev_generic_buffer_event *param);
  1098. QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
  1099. wmi_host_mgmt_tx_compl_event *param);
  1100. QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
  1101. struct wmi_host_offchan_data_tx_compl_event *param);
  1102. QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
  1103. void *evt_buf,
  1104. struct pdev_csa_switch_count_status *param);
  1105. QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
  1106. uint32_t *num_vdevs);
  1107. QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
  1108. uint32_t idx, wmi_host_tim_info *tim_info);
  1109. QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
  1110. uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
  1111. #ifdef CONVERGED_P2P_ENABLE
  1112. QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl,
  1113. void *evt_buf, struct p2p_lo_event *param);
  1114. QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl,
  1115. void *evt_buf, struct p2p_noa_info *param);
  1116. #endif
  1117. QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl,
  1118. void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
  1119. QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
  1120. wmi_host_peer_sta_kickout_event *ev);
  1121. QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
  1122. uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
  1123. QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
  1124. uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
  1125. QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
  1126. wmi_host_rtt_event_hdr *ev);
  1127. QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
  1128. wmi_host_rtt_meas_event *ev, uint8_t *hdump,
  1129. uint16_t hdump_len);
  1130. QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
  1131. wmi_host_rtt_error_report_event *ev);
  1132. QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
  1133. uint32_t index, wmi_host_chan_stats *chan_stats);
  1134. QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
  1135. uint32_t *temp, uint32_t *level, uint32_t *pdev_id);
  1136. QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
  1137. uint8_t idx, uint32_t *levelcount, uint32_t *dccount);
  1138. QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
  1139. uint16_t datalen, uint16_t *buf_offset,
  1140. wmi_host_phyerr_t *phyerr);
  1141. QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
  1142. uint16_t datalen, uint16_t *buf_offset,
  1143. wmi_host_phyerr_t *phyerr);
  1144. QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
  1145. uint16_t datalen, wmi_host_phyerr_t *phyerr);
  1146. QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
  1147. wmi_host_wlan_profile_ctx_t *profile_ctx);
  1148. QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
  1149. wmi_host_wlan_profile_t *profile_data);
  1150. QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
  1151. wmi_host_chan_info_event *chan_info);
  1152. QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
  1153. wmi_host_pdev_channel_hopping_event *ch_hopping);
  1154. QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
  1155. wmi_host_stats_event *stats_param);
  1156. QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
  1157. uint32_t index,
  1158. wmi_host_pdev_stats *pdev_stats);
  1159. QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
  1160. wmi_unit_test_event *unit_test, uint32_t maxspace);
  1161. QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
  1162. uint32_t index,
  1163. wmi_host_pdev_ext_stats *pdev_ext_stats);
  1164. QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
  1165. uint32_t index,
  1166. wmi_host_peer_extd_stats *peer_extd_stats);
  1167. QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
  1168. wmi_host_pdev_bss_chan_info_event *bss_chan_info);
  1169. QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
  1170. wmi_host_inst_stats_resp *inst_rssi_resp);
  1171. QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
  1172. uint32_t index, wmi_host_peer_stats *peer_stats);
  1173. QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
  1174. wmi_host_tx_data_traffic_ctrl_event *ev);
  1175. QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
  1176. wmi_host_atf_peer_stats_event *ev);
  1177. QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf,
  1178. uint8_t idx, wmi_host_atf_peer_stats_info *atf_token_info);
  1179. QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
  1180. uint32_t index, wmi_host_vdev_stats *vdev_stats);
  1181. QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
  1182. uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
  1183. QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
  1184. uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
  1185. QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
  1186. struct wmi_power_dbg_params *param);
  1187. QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
  1188. struct multiple_vdev_restart_params *param);
  1189. QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
  1190. struct sar_limit_cmd_params *params);
  1191. QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
  1192. struct wmi_adaptive_dwelltime_params *
  1193. wmi_param);
  1194. QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
  1195. struct set_fwtest_params *wmi_fwtest);
  1196. QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
  1197. struct rx_reorder_queue_setup_params *param);
  1198. QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
  1199. struct rx_reorder_queue_remove_params *param);
  1200. QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
  1201. struct wlan_psoc_host_service_ext_param *param);
  1202. QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
  1203. void *wmi_hdl,
  1204. uint8_t *evt_buf, uint8_t hw_mode_idx,
  1205. struct wlan_psoc_host_hw_mode_caps *param);
  1206. QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
  1207. void *wmi_hdl,
  1208. uint8_t *evt_buf,
  1209. uint8_t hw_mode_id,
  1210. uint8_t phy_id,
  1211. struct wlan_psoc_host_mac_phy_caps *param);
  1212. QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
  1213. void *wmi_hdl,
  1214. uint8_t *evt_buf, uint8_t phy_idx,
  1215. struct wlan_psoc_host_hal_reg_capabilities_ext *param);
  1216. /**
  1217. * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx
  1218. * capability received through
  1219. * extended service ready event
  1220. * @wmi_hdl: WMI handle
  1221. * @evt_buf: Event buffer
  1222. * @idx: Index of the module for which capability is received
  1223. * @param: Pointer to direct buffer rx ring cap struct
  1224. *
  1225. * Return: QDF status of operation
  1226. */
  1227. QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
  1228. void *wmi_hdl,
  1229. uint8_t *evt_buf, uint8_t idx,
  1230. struct wlan_psoc_host_dbr_ring_caps *param);
  1231. /**
  1232. * wmi_extract_dbr_buf_release_fixed : Extract direct buffer rx fixed param
  1233. * from buffer release event
  1234. * @wmi_hdl: WMI handle
  1235. * @evt_buf: Event buffer
  1236. * @param: Pointer to direct buffer rx response struct
  1237. *
  1238. * Return: QDF status of operation
  1239. */
  1240. QDF_STATUS wmi_extract_dbr_buf_release_fixed(
  1241. void *wmi_hdl,
  1242. uint8_t *evt_buf,
  1243. struct direct_buf_rx_rsp *param);
  1244. /**
  1245. * wmi_extract_dbr_buf_release_entry: Extract direct buffer rx buffer tlv
  1246. *
  1247. * @wmi_hdl: WMI handle
  1248. * @evt_buf: Event buffer
  1249. * @idx: Index of the module for which capability is received
  1250. * @param: Pointer to direct buffer rx entry
  1251. *
  1252. * Return: QDF status of operation
  1253. */
  1254. QDF_STATUS wmi_extract_dbr_buf_release_entry(
  1255. void *wmi_hdl,
  1256. uint8_t *evt_buf, uint8_t idx,
  1257. struct direct_buf_rx_entry *param);
  1258. QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
  1259. uint8_t *evt_buf,
  1260. struct wmi_host_pdev_utf_event *param);
  1261. QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
  1262. uint8_t *evt_buf,
  1263. struct wmi_host_pdev_qvit_event *param);
  1264. QDF_STATUS wmi_extract_peer_delete_response_event(void *wmi_hdl,
  1265. uint8_t *evt_buf,
  1266. struct wmi_host_peer_delete_response_event *param);
  1267. QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
  1268. struct wlan_psoc_host_chainmask_table *chainmask_table);
  1269. /**
  1270. * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload
  1271. * @wmi_handle: wmi handle
  1272. * @pdev_id: pdev id
  1273. *
  1274. * Return: QDF_STATUS
  1275. */
  1276. QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
  1277. uint32_t pdev_id);
  1278. /**
  1279. * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload
  1280. * @wmi_handle: wmi handle
  1281. * @pdev_id: pdev id
  1282. *
  1283. * Return: QDF_STATUS
  1284. */
  1285. QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
  1286. uint32_t pdev_id);
  1287. QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
  1288. struct set_country *param);
  1289. /*
  1290. * wmi_unified_set_del_pmkid_cache() - set delete PMKID
  1291. * @wmi_hdl: wma handle
  1292. * @pmksa: pointer to pmk cache entry
  1293. *
  1294. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1295. */
  1296. QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
  1297. struct wmi_unified_pmk_cache *pmksa);
  1298. #if defined(WLAN_FEATURE_FILS_SK)
  1299. /*
  1300. * wmi_unified_roam_send_hlp_cmd() -send HLP command info
  1301. * @wmi_hdl: wma handle
  1302. * @req_buf: Pointer to HLP params
  1303. *
  1304. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1305. */
  1306. QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
  1307. struct hlp_params *req_buf);
  1308. #endif
  1309. /**
  1310. * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value
  1311. * @wmi_hdl: wma handle
  1312. * @get_rcpi_param: rcpi params
  1313. *
  1314. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  1315. */
  1316. QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
  1317. struct rcpi_req *get_rcpi_param);
  1318. /**
  1319. * wmi_extract_rcpi_response_event - api to extract RCPI event params
  1320. * @wmi_handle: wma handle
  1321. * @evt_buf: pointer to event buffer
  1322. * @res: pointer to hold rcpi response from firmware
  1323. *
  1324. * Return: QDF_STATUS_SUCCESS for successful event parse
  1325. * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
  1326. */
  1327. QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
  1328. struct rcpi_res *res);
  1329. #ifdef WMI_INTERFACE_EVENT_LOGGING
  1330. void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
  1331. qdf_abstract_print *print, void *print_priv);
  1332. void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
  1333. qdf_abstract_print *print, void *print_priv);
  1334. void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
  1335. qdf_abstract_print *print, void *print_priv);
  1336. void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
  1337. qdf_abstract_print *print, void *print_priv);
  1338. void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
  1339. qdf_abstract_print *print, void *print_priv);
  1340. void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
  1341. qdf_abstract_print *print, void *print_priv);
  1342. void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
  1343. qdf_abstract_print *print, void *print_priv);
  1344. #endif /* WMI_INTERFACE_EVENT_LOGGING */
  1345. QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
  1346. struct wmi_dbs_scan_sel_params *wmi_param);
  1347. QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
  1348. struct wmi_limit_off_chan_param *wmi_param);
  1349. QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
  1350. struct set_arp_stats *req_buf);
  1351. QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
  1352. struct get_arp_stats *req_buf);
  1353. /**
  1354. * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
  1355. * @wmi_hdl: wmi handle
  1356. * @bcn_ctrl_param: pointer to bcn_offload_control param
  1357. *
  1358. * Return: QDF_STATUS_SUCCESS for success or error code
  1359. */
  1360. QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
  1361. struct bcn_offload_control *bcn_ctrl_param);
  1362. /**
  1363. * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
  1364. * wds entries from FW
  1365. * @wmi_handle: wmi handle
  1366. *
  1367. * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
  1368. *
  1369. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  1370. */
  1371. QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl);
  1372. /**
  1373. * wmi_extract_wds_entry - api to extract wds entry
  1374. * @wmi_handle: wma handle
  1375. * @evt_buf: pointer to event buffer
  1376. * @wds_entry: wds entry
  1377. * @idx: index to point wds entry in event buffer
  1378. *
  1379. * Return: QDF_STATUS_SUCCESS for successful event parse
  1380. * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
  1381. */
  1382. QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
  1383. struct wdsentry *wds_entry, u_int32_t idx);
  1384. #ifdef WLAN_FEATURE_NAN_CONVERGENCE
  1385. /**
  1386. * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW
  1387. * @wmi_hdl: wma handle
  1388. * @req: pointer to request buffer
  1389. *
  1390. * Return: status of operation
  1391. */
  1392. QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
  1393. struct nan_datapath_initiator_req *req);
  1394. /**
  1395. * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW
  1396. * @wmi_hdl: wma handle
  1397. * @req: pointer to request buffer
  1398. *
  1399. * Return: status of operation
  1400. */
  1401. QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
  1402. struct nan_datapath_responder_req *req);
  1403. /**
  1404. * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW
  1405. * @wmi_hdl: wma handle
  1406. * @req: pointer to request buffer
  1407. *
  1408. * Return: status of operation
  1409. */
  1410. QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
  1411. struct nan_datapath_end_req *req);
  1412. /**
  1413. * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer
  1414. * @wmi_hdl: wma handle
  1415. * @data: event buffer
  1416. * @rsp: buffer to populate
  1417. *
  1418. * Return: status of operation
  1419. */
  1420. QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
  1421. uint8_t *data, struct nan_datapath_initiator_rsp **rsp);
  1422. /**
  1423. * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer
  1424. * @wmi_hdl: wma handle
  1425. * @data: event buffer
  1426. * @ind: buffer to populate
  1427. *
  1428. * Return: status of operation
  1429. */
  1430. QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
  1431. struct nan_datapath_indication_event **ind);
  1432. /**
  1433. * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer
  1434. * @wmi_hdl: wma handle
  1435. * @data: event buffer
  1436. * @ev: buffer to populate
  1437. *
  1438. * Return: status of operation
  1439. */
  1440. QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
  1441. struct nan_datapath_confirm_event **ev);
  1442. /**
  1443. * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer
  1444. * @wmi_hdl: wma handle
  1445. * @data: event buffer
  1446. * @rsp: buffer to populate
  1447. *
  1448. * Return: status of operation
  1449. */
  1450. QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
  1451. uint8_t *data, struct nan_datapath_responder_rsp **rsp);
  1452. /**
  1453. * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer
  1454. * @wmi_hdl: wma handle
  1455. * @data: event buffer
  1456. * @rsp: buffer to populate
  1457. *
  1458. * Return: status of operation
  1459. */
  1460. QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
  1461. struct nan_datapath_end_rsp_event **rsp);
  1462. /**
  1463. * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer
  1464. * @wmi_hdl: wma handle
  1465. * @data: event buffer
  1466. * @ind: buffer to populate
  1467. *
  1468. * Return: status of operation
  1469. */
  1470. QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
  1471. struct nan_datapath_end_indication_event **ind);
  1472. #endif
  1473. #endif /* _WMI_UNIFIED_API_H_ */