wmi_unified_priv.h 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  1. /*
  2. * Copyright (c) 2013-2016 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
  28. * Module Interface (WMI).
  29. */
  30. #ifndef _WMI_UNIFIED_PRIV_H_
  31. #define _WMI_UNIFIED_PRIV_H_
  32. #include <osdep.h>
  33. #include "a_types.h"
  34. #include "wmi.h"
  35. #include "wmi_unified.h"
  36. #include "wmi_unified_param.h"
  37. #include "qdf_atomic.h"
  38. #define WMI_UNIFIED_MAX_EVENT 0x100
  39. #define WMI_MAX_CMDS 1024
  40. typedef qdf_nbuf_t wmi_buf_t;
  41. #ifdef WMI_INTERFACE_EVENT_LOGGING
  42. #define WMI_EVENT_DEBUG_MAX_ENTRY (1024)
  43. struct wmi_command_debug {
  44. uint32_t command;
  45. uint32_t data[4]; /*16 bytes of WMI cmd excluding TLV and WMI headers */
  46. uint64_t time;
  47. };
  48. struct wmi_event_debug {
  49. uint32_t event;
  50. uint32_t data[4]; /*16 bytes of WMI event data excluding TLV header */
  51. uint64_t time;
  52. };
  53. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  54. #ifdef WLAN_OPEN_SOURCE
  55. struct fwdebug {
  56. struct sk_buff_head fwlog_queue;
  57. struct completion fwlog_completion;
  58. A_BOOL fwlog_open;
  59. };
  60. #endif /* WLAN_OPEN_SOURCE */
  61. struct wmi_ops {
  62. QDF_STATUS (*send_vdev_create_cmd)(wmi_unified_t wmi_handle,
  63. uint8_t macaddr[IEEE80211_ADDR_LEN],
  64. struct vdev_create_params *param);
  65. QDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle,
  66. uint8_t if_id);
  67. QDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi,
  68. uint8_t vdev_id);
  69. QDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi,
  70. uint8_t vdev_id);
  71. QDF_STATUS (*send_vdev_start_cmd)(wmi_unified_t wmi,
  72. struct vdev_start_params *req);
  73. QDF_STATUS (*send_hidden_ssid_vdev_restart_cmd)(wmi_unified_t wmi_handle,
  74. struct hidden_ssid_vdev_restart_params *restart_params);
  75. QDF_STATUS (*send_peer_flush_tids_cmd)(wmi_unified_t wmi,
  76. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  77. struct peer_flush_params *param);
  78. QDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi,
  79. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  80. uint8_t vdev_id);
  81. QDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
  82. uint8_t peer_addr[IEEE80211_ADDR_LEN],
  83. struct peer_set_params *param);
  84. QDF_STATUS (*send_vdev_up_cmd)(wmi_unified_t wmi,
  85. uint8_t bssid[IEEE80211_ADDR_LEN],
  86. struct vdev_up_params *params);
  87. QDF_STATUS (*send_peer_create_cmd)(wmi_unified_t wmi,
  88. struct peer_create_params *param);
  89. QDF_STATUS (*send_green_ap_ps_cmd)(wmi_unified_t wmi_handle,
  90. uint32_t value, uint8_t mac_id);
  91. QDF_STATUS
  92. (*send_pdev_utf_cmd)(wmi_unified_t wmi_handle,
  93. struct pdev_utf_params *param,
  94. uint8_t mac_id);
  95. QDF_STATUS
  96. (*send_pdev_param_cmd)(wmi_unified_t wmi_handle,
  97. struct pdev_params *param,
  98. uint8_t mac_id);
  99. QDF_STATUS (*send_suspend_cmd)(wmi_unified_t wmi_handle,
  100. struct suspend_params *param,
  101. uint8_t mac_id);
  102. QDF_STATUS (*send_resume_cmd)(wmi_unified_t wmi_handle,
  103. uint8_t mac_id);
  104. QDF_STATUS (*send_wow_enable_cmd)(wmi_unified_t wmi_handle,
  105. struct wow_cmd_params *param,
  106. uint8_t mac_id);
  107. QDF_STATUS (*send_set_ap_ps_param_cmd)(wmi_unified_t wmi_handle,
  108. uint8_t *peer_addr,
  109. struct ap_ps_params *param);
  110. QDF_STATUS (*send_set_sta_ps_param_cmd)(wmi_unified_t wmi_handle,
  111. struct sta_ps_params *param);
  112. QDF_STATUS (*send_crash_inject_cmd)(wmi_unified_t wmi_handle,
  113. struct crash_inject *param);
  114. QDF_STATUS
  115. (*send_dbglog_cmd)(wmi_unified_t wmi_handle,
  116. struct dbglog_params *dbglog_param);
  117. QDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle,
  118. struct vdev_set_params *param);
  119. QDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle,
  120. uint8_t macaddr[IEEE80211_ADDR_LEN],
  121. struct stats_request_params *param);
  122. #ifdef WMI_NON_TLV_SUPPORT
  123. QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
  124. WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT);
  125. #else
  126. QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
  127. uint8_t macaddr[IEEE80211_ADDR_LEN],
  128. struct packet_enable_params *param);
  129. #endif
  130. QDF_STATUS (*send_packet_log_disable_cmd)(wmi_unified_t wmi_handle);
  131. QDF_STATUS (*send_beacon_send_cmd)(wmi_unified_t wmi_handle,
  132. struct beacon_params *param);
  133. QDF_STATUS (*send_beacon_tmpl_send_cmd)(wmi_unified_t wmi_handle,
  134. struct beacon_tmpl_params *param);
  135. QDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle,
  136. struct peer_assoc_params *param);
  137. QDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle,
  138. struct scan_start_params *param);
  139. QDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle,
  140. struct scan_stop_params *param);
  141. QDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle,
  142. struct scan_chan_list_params *param);
  143. QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
  144. struct wmi_mgmt_params *param);
  145. QDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle,
  146. uint32_t param_value);
  147. QDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle,
  148. uint32_t vdev_id, uint8_t val);
  149. QDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle);
  150. QDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle,
  151. struct p2p_ps_params *oppps);
  152. QDF_STATUS (*send_set_p2pgo_noa_req_cmd)(wmi_unified_t wmi_handle,
  153. struct p2p_ps_params *noa);
  154. QDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle,
  155. uint8_t vdev_id,
  156. int value);
  157. QDF_STATUS (*send_set_mimops_cmd)(wmi_unified_t wmi_handle,
  158. uint8_t vdev_id, int value);
  159. QDF_STATUS (*send_set_sta_uapsd_auto_trig_cmd)(wmi_unified_t wmi_handle,
  160. struct sta_uapsd_trig_params *param);
  161. QDF_STATUS (*send_ocb_set_utc_time_cmd)(wmi_unified_t wmi_handle,
  162. struct ocb_utc_param *utc);
  163. QDF_STATUS (*send_ocb_get_tsf_timer_cmd)(wmi_unified_t wmi_handle,
  164. uint8_t vdev_id);
  165. QDF_STATUS (*send_ocb_start_timing_advert_cmd)(wmi_unified_t wmi_handle,
  166. struct ocb_timing_advert_param *timing_advert);
  167. QDF_STATUS (*send_ocb_stop_timing_advert_cmd)(wmi_unified_t wmi_handle,
  168. struct ocb_timing_advert_param *timing_advert);
  169. QDF_STATUS (*send_dcc_get_stats_cmd)(wmi_unified_t wmi_handle,
  170. struct dcc_get_stats_param *get_stats_param);
  171. QDF_STATUS (*send_dcc_clear_stats_cmd)(wmi_unified_t wmi_handle,
  172. uint32_t vdev_id, uint32_t dcc_stats_bitmap);
  173. QDF_STATUS (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle,
  174. struct dcc_update_ndl_param *update_ndl_param);
  175. QDF_STATUS (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle,
  176. struct ocb_config_param *config, uint32_t *ch_mhz);
  177. QDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle,
  178. struct wmi_lro_config_cmd_t *wmi_lro_cmd);
  179. QDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle,
  180. struct thermal_cmd_params *thermal_info);
  181. QDF_STATUS (*send_set_mcc_channel_time_quota_cmd)
  182. (wmi_unified_t wmi_handle,
  183. uint32_t adapter_1_chan_freq,
  184. uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
  185. QDF_STATUS (*send_set_mcc_channel_time_latency_cmd)
  186. (wmi_unified_t wmi_handle,
  187. uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
  188. QDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
  189. wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
  190. uint32_t pdev_id);
  191. QDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle,
  192. A_UINT32 vdev_id, uint8_t *p2p_ie);
  193. QDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle,
  194. uint8_t vdev_id,
  195. struct wmi_probe_resp_params *probe_rsp_info,
  196. uint8_t *frm);
  197. QDF_STATUS (*send_setup_install_key_cmd)(wmi_unified_t wmi_handle,
  198. struct set_key_params *key_params);
  199. #ifndef WMI_NON_TLV_SUPPORT
  200. QDF_STATUS (*send_process_update_edca_param_cmd)(wmi_unified_t wmi_handle,
  201. uint8_t vdev_id,
  202. wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC]);
  203. #endif
  204. QDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle,
  205. uint32_t if_id,
  206. struct wmi_gtx_config *gtx_info);
  207. QDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle,
  208. struct sta_params *params);
  209. QDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle,
  210. uint8_t vdev_id, uint32_t max_retries,
  211. uint32_t retry_interval);
  212. #ifndef WMI_NON_TLV_SUPPORT
  213. QDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle,
  214. wmi_bcn_send_from_host_cmd_fixed_param *param);
  215. #endif
  216. QDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle,
  217. struct gateway_update_req_param *req);
  218. QDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle,
  219. struct rssi_monitor_param *req);
  220. QDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle,
  221. struct scan_mac_oui *psetoui);
  222. QDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
  223. struct wifi_passpoint_req_param *req);
  224. #ifndef WMI_NON_TLV_SUPPORT
  225. QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle,
  226. wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
  227. struct roam_offload_scan_params *roam_req);
  228. #endif
  229. QDF_STATUS (*send_roam_scan_offload_rssi_thresh_cmd)(wmi_unified_t wmi_handle,
  230. struct roam_offload_scan_rssi_params *roam_req);
  231. QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle,
  232. struct roam_scan_filter_params *roam_req);
  233. QDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
  234. struct wifi_passpoint_req_param *req);
  235. QDF_STATUS (*send_set_epno_network_list_cmd)(wmi_unified_t wmi_handle,
  236. struct wifi_enhanched_pno_params *req);
  237. QDF_STATUS (*send_extscan_get_capabilities_cmd)(wmi_unified_t wmi_handle,
  238. struct extscan_capabilities_params *pgetcapab);
  239. QDF_STATUS (*send_extscan_get_cached_results_cmd)(wmi_unified_t wmi_handle,
  240. struct extscan_cached_result_params *pcached_results);
  241. QDF_STATUS (*send_extscan_stop_change_monitor_cmd)(wmi_unified_t wmi_handle,
  242. struct extscan_capabilities_reset_params *reset_req);
  243. QDF_STATUS (*send_extscan_start_change_monitor_cmd)(wmi_unified_t wmi_handle,
  244. struct extscan_set_sig_changereq_params *
  245. psigchange);
  246. QDF_STATUS (*send_extscan_stop_hotlist_monitor_cmd)(wmi_unified_t wmi_handle,
  247. struct extscan_bssid_hotlist_reset_params *photlist_reset);
  248. QDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle,
  249. struct extscan_stop_req_params *pstopcmd);
  250. QDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle,
  251. struct wifi_scan_cmd_req_params *pstart);
  252. QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle,
  253. const struct plm_req_params *plm);
  254. QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle,
  255. const struct plm_req_params *plm,
  256. uint32_t *gchannel_list);
  257. QDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle,
  258. uint8_t vdev_id);
  259. QDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  260. #ifdef FEATURE_WLAN_SCAN_PNO
  261. QDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
  262. struct pno_scan_req_params *pno,
  263. uint32_t *gchannel_freq_list);
  264. #endif
  265. QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
  266. struct ipa_offload_control_params *ipa_offload);
  267. QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg,
  268. uint8_t is_add_ts);
  269. QDF_STATUS (*send_process_ll_stats_clear_cmd)
  270. (wmi_unified_t wmi_handle,
  271. const struct ll_stats_clear_params *clear_req,
  272. uint8_t addr[IEEE80211_ADDR_LEN]);
  273. QDF_STATUS (*send_process_ll_stats_set_cmd)
  274. (wmi_unified_t wmi_handle, const struct ll_stats_set_params *set_req);
  275. QDF_STATUS (*send_process_ll_stats_get_cmd)
  276. (wmi_unified_t wmi_handle, const struct ll_stats_get_params *get_req,
  277. uint8_t addr[IEEE80211_ADDR_LEN]);
  278. QDF_STATUS (*send_get_stats_cmd)(wmi_unified_t wmi_handle,
  279. struct pe_stats_req *get_stats_param,
  280. uint8_t addr[IEEE80211_ADDR_LEN]);
  281. QDF_STATUS (*send_snr_request_cmd)(wmi_unified_t wmi_handle);
  282. QDF_STATUS (*send_snr_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  283. QDF_STATUS (*send_link_status_req_cmd)(wmi_unified_t wmi_handle,
  284. struct link_status_params *link_status);
  285. #ifndef WMI_NON_TLV_SUPPORT
  286. QDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle,
  287. wmi_hb_set_enable_cmd_fixed_param *params);
  288. QDF_STATUS (*send_lphb_config_tcp_params_cmd)(wmi_unified_t wmi_handle,
  289. wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
  290. QDF_STATUS (*send_lphb_config_tcp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
  291. wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp);
  292. QDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle,
  293. wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
  294. QDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
  295. wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req);
  296. QDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle,
  297. wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
  298. QDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle,
  299. wmi_mac_addr peer_macaddr);
  300. QDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle,
  301. wmi_ap_ps_egap_param_cmd_fixed_param *egap_params);
  302. #endif
  303. QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle,
  304. uint32_t cmd, uint32_t value1, uint32_t value2);
  305. QDF_STATUS (*send_wow_sta_ra_filter_cmd)(wmi_unified_t wmi_handle,
  306. uint8_t vdev_id, uint8_t default_pattern,
  307. uint16_t rate_limit_interval);
  308. QDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
  309. QDF_STATUS (*send_start_oem_data_cmd)(wmi_unified_t wmi_handle,
  310. uint8_t data_len,
  311. uint8_t *data);
  312. QDF_STATUS
  313. (*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle,
  314. bool dfs_phyerr_filter_offload);
  315. #ifndef WMI_NON_TLV_SUPPORT
  316. QDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle,
  317. WMI_PKTLOG_EVENT pktlog_event,
  318. WMI_CMD_ID cmd_id);
  319. #endif
  320. QDF_STATUS (*send_add_wow_wakeup_event_cmd)(wmi_unified_t wmi_handle,
  321. uint32_t vdev_id,
  322. uint32_t bitmap,
  323. bool enable);
  324. QDF_STATUS (*send_wow_patterns_to_fw_cmd)(wmi_unified_t wmi_handle,
  325. uint8_t vdev_id, uint8_t ptrn_id,
  326. const uint8_t *ptrn, uint8_t ptrn_len,
  327. uint8_t ptrn_offset, const uint8_t *mask,
  328. uint8_t mask_len, bool user,
  329. uint8_t default_patterns);
  330. QDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t ptrn_id,
  331. uint8_t vdev_id);
  332. QDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle);
  333. QDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  334. uint8_t ac);
  335. QDF_STATUS (*send_aggr_qos_cmd)(wmi_unified_t wmi_handle,
  336. struct aggr_add_ts_param *aggr_qos_rsp_msg);
  337. QDF_STATUS (*send_add_ts_cmd)(wmi_unified_t wmi_handle,
  338. struct add_ts_param *msg);
  339. QDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle,
  340. uint8_t vdev_id, bool enable);
  341. QDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle,
  342. uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param,
  343. uint8_t filter_id, bool enable);
  344. QDF_STATUS (*send_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle,
  345. uint8_t vdev_id,
  346. struct qdf_mac_addr multicast_addr,
  347. bool clearList);
  348. QDF_STATUS (*send_gtk_offload_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
  349. struct gtk_offload_params *params,
  350. bool enable_offload,
  351. uint32_t gtk_offload_opcode);
  352. QDF_STATUS (*send_process_gtk_offload_getinfo_cmd)(wmi_unified_t wmi_handle,
  353. uint8_t vdev_id,
  354. uint64_t offload_req_opcode);
  355. QDF_STATUS (*send_process_add_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
  356. struct periodic_tx_pattern *
  357. pAddPeriodicTxPtrnParams,
  358. uint8_t vdev_id);
  359. QDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
  360. uint8_t vdev_id,
  361. uint8_t pattern_id);
  362. QDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle,
  363. struct stats_ext_params *preq);
  364. QDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle,
  365. struct ext_wow_params *params);
  366. QDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle,
  367. struct app_type2_params *appType2Params);
  368. QDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle,
  369. uint32_t timer_val);
  370. QDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle,
  371. struct nan_req_params *nan_req);
  372. QDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle,
  373. struct dhcp_offload_info_params *pDhcpSrvOffloadInfo);
  374. QDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle);
  375. QDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle,
  376. uint32_t reg_dmn, uint16_t regdmn2G,
  377. uint16_t regdmn5G, int8_t ctl2G,
  378. int8_t ctl5G);
  379. QDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle,
  380. struct tdls_channel_switch_params *chan_switch_params);
  381. QDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle,
  382. void *tdls_param, uint8_t tdls_state);
  383. QDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle,
  384. struct tdls_peer_state_params *peerStateParams,
  385. uint32_t *ch_mhz);
  386. QDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle,
  387. struct fw_dump_req_param *mem_dump_req);
  388. QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
  389. struct vdev_ie_info_param *ie_info);
  390. QDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle,
  391. wmi_resource_config *res_cfg,
  392. uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
  393. bool action);
  394. QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
  395. QDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev);
  396. QDF_STATUS (*send_saved_init_cmd)(wmi_unified_t wmi_handle);
  397. QDF_STATUS (*send_set_base_macaddr_indicate_cmd)(wmi_unified_t wmi_handle,
  398. uint8_t *custom_addr);
  399. QDF_STATUS (*send_log_supported_evt_cmd)(wmi_unified_t wmi_handle,
  400. uint8_t *event,
  401. uint32_t len);
  402. QDF_STATUS (*send_enable_specific_fw_logs_cmd)(wmi_unified_t wmi_handle,
  403. struct wmi_wifi_start_log *start_log);
  404. QDF_STATUS (*send_flush_logs_to_fw_cmd)(wmi_unified_t wmi_handle);
  405. QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
  406. struct wmi_pcl_chan_weights *msg);
  407. QDF_STATUS (*send_soc_set_hw_mode_cmd)(wmi_unified_t wmi_handle,
  408. uint32_t hw_mode_index);
  409. QDF_STATUS (*send_soc_set_dual_mac_config_cmd)(wmi_unified_t wmi_handle,
  410. struct wmi_dual_mac_config *msg);
  411. QDF_STATUS (*send_enable_arp_ns_offload_cmd)(wmi_unified_t wmi_handle,
  412. struct host_offload_req_param *param, bool arp_only,
  413. uint8_t vdev_id);
  414. QDF_STATUS (*send_set_led_flashing_cmd)(wmi_unified_t wmi_handle,
  415. struct flashing_req_params *flashing);
  416. QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle,
  417. struct app_type1_params *app_type1_params);
  418. QDF_STATUS (*send_set_ssid_hotlist_cmd)(wmi_unified_t wmi_handle,
  419. struct ssid_hotlist_request_params *request);
  420. QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
  421. uint8_t vdev_id);
  422. QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle,
  423. struct wmi_unit_test_cmd *wmi_utest);
  424. QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle,
  425. struct wmi_roam_invoke_cmd *roaminvoke,
  426. uint32_t ch_hz);
  427. QDF_STATUS (*send_roam_scan_offload_cmd)(wmi_unified_t wmi_handle,
  428. uint32_t command, uint32_t vdev_id);
  429. #ifndef WMI_NON_TLV_SUPPORT
  430. QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle,
  431. wmi_ap_profile *ap_profile_p,
  432. uint32_t vdev_id);
  433. #endif
  434. QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle,
  435. uint32_t scan_period,
  436. uint32_t scan_age,
  437. uint32_t vdev_id);
  438. QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle,
  439. uint8_t chan_count,
  440. uint8_t *chan_list,
  441. uint8_t list_type, uint32_t vdev_id);
  442. QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle,
  443. uint32_t vdev_id,
  444. int32_t rssi_change_thresh,
  445. uint32_t bcn_rssi_weight,
  446. uint32_t hirssi_delay_btw_scans);
  447. QDF_STATUS (*send_get_buf_extscan_hotlist_cmd)(wmi_unified_t wmi_handle,
  448. struct ext_scan_setbssi_hotlist_params *
  449. photlist, int *buf_len);
  450. QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle,
  451. uint32_t param);
  452. QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle,
  453. struct set_atf_params *param);
  454. QDF_STATUS (*send_pdev_fips_cmd)(wmi_unified_t wmi_handle,
  455. struct fips_params *param);
  456. QDF_STATUS (*send_wlan_profile_enable_cmd)(wmi_unified_t wmi_handle,
  457. struct wlan_profile_params *param);
  458. QDF_STATUS (*send_wlan_profile_trigger_cmd)(wmi_unified_t wmi_handle,
  459. struct wlan_profile_params *param);
  460. QDF_STATUS (*send_pdev_set_chan_cmd)(wmi_unified_t wmi_handle,
  461. struct channel_param *param);
  462. QDF_STATUS (*send_set_ht_ie_cmd)(wmi_unified_t wmi_handle,
  463. struct ht_ie_params *param);
  464. QDF_STATUS (*send_set_vht_ie_cmd)(wmi_unified_t wmi_handle,
  465. struct vht_ie_params *param);
  466. QDF_STATUS (*send_wmm_update_cmd)(wmi_unified_t wmi_handle,
  467. struct wmm_update_params *param);
  468. QDF_STATUS (*send_set_ant_switch_tbl_cmd)(wmi_unified_t wmi_handle,
  469. struct ant_switch_tbl_params *param);
  470. QDF_STATUS (*send_set_ratepwr_table_cmd)(wmi_unified_t wmi_handle,
  471. struct ratepwr_table_params *param);
  472. QDF_STATUS (*send_get_ratepwr_table_cmd)(wmi_unified_t wmi_handle);
  473. QDF_STATUS (*send_set_ctl_table_cmd)(wmi_unified_t wmi_handle,
  474. struct ctl_table_params *param);
  475. QDF_STATUS (*send_set_mimogain_table_cmd)(wmi_unified_t wmi_handle,
  476. struct mimogain_table_params *param);
  477. QDF_STATUS (*send_set_ratepwr_chainmsk_cmd)(wmi_unified_t wmi_handle,
  478. struct ratepwr_chainmsk_params *param);
  479. QDF_STATUS (*send_set_macaddr_cmd)(wmi_unified_t wmi_handle,
  480. struct macaddr_params *param);
  481. QDF_STATUS (*send_pdev_scan_start_cmd)(wmi_unified_t wmi_handle);
  482. QDF_STATUS (*send_pdev_scan_end_cmd)(wmi_unified_t wmi_handle);
  483. QDF_STATUS (*send_set_acparams_cmd)(wmi_unified_t wmi_handle,
  484. struct acparams_params *param);
  485. QDF_STATUS (*send_set_vap_dscp_tid_map_cmd)(wmi_unified_t wmi_handle,
  486. struct vap_dscp_tid_map_params *param);
  487. QDF_STATUS (*send_proxy_ast_reserve_cmd)(wmi_unified_t wmi_handle,
  488. struct proxy_ast_reserve_params *param);
  489. QDF_STATUS (*send_pdev_qvit_cmd)(wmi_unified_t wmi_handle,
  490. struct pdev_qvit_params *param);
  491. QDF_STATUS (*send_mcast_group_update_cmd)(wmi_unified_t wmi_handle,
  492. struct mcast_group_update_params *param);
  493. QDF_STATUS (*send_peer_add_wds_entry_cmd)(wmi_unified_t wmi_handle,
  494. struct peer_add_wds_entry_params *param);
  495. QDF_STATUS (*send_peer_del_wds_entry_cmd)(wmi_unified_t wmi_handle,
  496. struct peer_del_wds_entry_params *param);
  497. QDF_STATUS (*send_peer_update_wds_entry_cmd)(wmi_unified_t wmi_handle,
  498. struct peer_update_wds_entry_params *param);
  499. QDF_STATUS (*send_phyerr_enable_cmd)(wmi_unified_t wmi_handle);
  500. QDF_STATUS (*send_phyerr_disable_cmd)(wmi_unified_t wmi_handle);
  501. QDF_STATUS (*send_smart_ant_enable_cmd)(wmi_unified_t wmi_handle,
  502. struct smart_ant_enable_params *param);
  503. QDF_STATUS (*send_smart_ant_set_rx_ant_cmd)(wmi_unified_t wmi_handle,
  504. struct smart_ant_rx_ant_params *param);
  505. QDF_STATUS (*send_smart_ant_set_tx_ant_cmd)(wmi_unified_t wmi_handle,
  506. uint8_t macaddr[IEEE80211_ADDR_LEN],
  507. struct smart_ant_tx_ant_params *param);
  508. QDF_STATUS (*send_smart_ant_set_training_info_cmd)(wmi_unified_t wmi_handle,
  509. uint8_t macaddr[IEEE80211_ADDR_LEN],
  510. struct smart_ant_training_info_params *param);
  511. QDF_STATUS (*send_smart_ant_set_node_config_cmd)(wmi_unified_t wmi_handle,
  512. uint8_t macaddr[IEEE80211_ADDR_LEN],
  513. struct smart_ant_node_config_params *param);
  514. QDF_STATUS (*send_smart_ant_enable_tx_feedback_cmd)(wmi_unified_t wmi_handle,
  515. struct smart_ant_enable_tx_feedback_params *param);
  516. QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
  517. struct vdev_spectral_configure_params *param);
  518. QDF_STATUS (*send_vdev_spectral_enable_cmd)(wmi_unified_t wmi_handle,
  519. struct vdev_spectral_enable_params *param);
  520. QDF_STATUS (*send_bss_chan_info_request_cmd)(wmi_unified_t wmi_handle,
  521. struct bss_chan_info_request_params *param);
  522. QDF_STATUS (*send_thermal_mitigation_param_cmd)(wmi_unified_t wmi_handle,
  523. struct thermal_mitigation_params *param);
  524. QDF_STATUS (*send_vdev_set_neighbour_rx_cmd)(wmi_unified_t wmi_handle,
  525. uint8_t macaddr[IEEE80211_ADDR_LEN],
  526. struct set_neighbour_rx_params *param);
  527. QDF_STATUS (*send_vdev_set_fwtest_param_cmd)(wmi_unified_t wmi_handle,
  528. struct set_fwtest_params *param);
  529. QDF_STATUS (*send_vdev_config_ratemask_cmd)(wmi_unified_t wmi_handle,
  530. struct config_ratemask_params *param);
  531. QDF_STATUS (*send_vdev_install_key_cmd)(wmi_unified_t wmi_handle,
  532. uint8_t macaddr[IEEE80211_ADDR_LEN],
  533. struct vdev_install_key_params *param);
  534. QDF_STATUS (*send_wow_wakeup_cmd)(wmi_unified_t wmi_handle);
  535. QDF_STATUS (*send_wow_add_wakeup_event_cmd)(wmi_unified_t wmi_handle,
  536. struct wow_add_wakeup_params *param);
  537. QDF_STATUS (*send_wow_add_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
  538. struct wow_add_wakeup_pattern_params *param);
  539. QDF_STATUS (*send_wow_remove_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
  540. struct wow_remove_wakeup_pattern_params *param);
  541. QDF_STATUS (*send_pdev_set_regdomain_cmd)(wmi_unified_t wmi_handle,
  542. struct pdev_set_regdomain_params *param);
  543. QDF_STATUS (*send_set_quiet_mode_cmd)(wmi_unified_t wmi_handle,
  544. struct set_quiet_mode_params *param);
  545. QDF_STATUS (*send_set_beacon_filter_cmd)(wmi_unified_t wmi_handle,
  546. struct set_beacon_filter_params *param);
  547. QDF_STATUS (*send_remove_beacon_filter_cmd)(wmi_unified_t wmi_handle,
  548. struct remove_beacon_filter_params *param);
  549. /*
  550. QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
  551. uint8_t macaddr[IEEE80211_ADDR_LEN],
  552. struct mgmt_params *param);
  553. */
  554. QDF_STATUS (*send_addba_clearresponse_cmd)(wmi_unified_t wmi_handle,
  555. uint8_t macaddr[IEEE80211_ADDR_LEN],
  556. struct addba_clearresponse_params *param);
  557. QDF_STATUS (*send_addba_send_cmd)(wmi_unified_t wmi_handle,
  558. uint8_t macaddr[IEEE80211_ADDR_LEN],
  559. struct addba_send_params *param);
  560. QDF_STATUS (*send_delba_send_cmd)(wmi_unified_t wmi_handle,
  561. uint8_t macaddr[IEEE80211_ADDR_LEN],
  562. struct delba_send_params *param);
  563. QDF_STATUS (*send_addba_setresponse_cmd)(wmi_unified_t wmi_handle,
  564. uint8_t macaddr[IEEE80211_ADDR_LEN],
  565. struct addba_setresponse_params *param);
  566. QDF_STATUS (*send_singleamsdu_cmd)(wmi_unified_t wmi_handle,
  567. uint8_t macaddr[IEEE80211_ADDR_LEN],
  568. struct singleamsdu_params *param);
  569. QDF_STATUS (*send_set_qboost_param_cmd)(wmi_unified_t wmi_handle,
  570. uint8_t macaddr[IEEE80211_ADDR_LEN],
  571. struct set_qboost_params *param);
  572. QDF_STATUS (*send_mu_scan_cmd)(wmi_unified_t wmi_handle,
  573. struct mu_scan_params *param);
  574. QDF_STATUS (*send_lteu_config_cmd)(wmi_unified_t wmi_handle,
  575. struct lteu_config_params *param);
  576. QDF_STATUS (*send_set_ps_mode_cmd)(wmi_unified_t wmi_handle,
  577. struct set_ps_mode_params *param);
  578. void (*save_service_bitmap)(wmi_unified_t wmi_handle,
  579. void *evt_buf);
  580. bool (*is_service_enabled)(wmi_unified_t wmi_handle,
  581. uint32_t service_id);
  582. QDF_STATUS (*get_target_cap_from_service_ready)(wmi_unified_t wmi_handle,
  583. void *evt_buf, target_capability_info *ev);
  584. QDF_STATUS (*extract_fw_version)(wmi_unified_t wmi_handle,
  585. void *ev, struct wmi_host_fw_ver *fw_ver);
  586. QDF_STATUS (*extract_fw_abi_version)(wmi_unified_t wmi_handle,
  587. void *ev, struct wmi_host_fw_abi_ver *fw_ver);
  588. QDF_STATUS (*extract_hal_reg_cap)(wmi_unified_t wmi_handle, void *evt_buf,
  589. TARGET_HAL_REG_CAPABILITIES *hal_reg_cap);
  590. host_mem_req * (*extract_host_mem_req)(wmi_unified_t wmi_handle,
  591. void *evt_buf, uint8_t *num_entries);
  592. QDF_STATUS (*init_cmd_send)(wmi_unified_t wmi_handle,
  593. target_resource_config *res_cfg,
  594. uint8_t num_mem_chunks,
  595. struct wmi_host_mem_chunk *mem_chunk);
  596. QDF_STATUS (*save_fw_version)(wmi_unified_t wmi_handle, void *evt_buf);
  597. uint32_t (*ready_extract_init_status)(wmi_unified_t wmi_hdl, void *ev);
  598. QDF_STATUS (*ready_extract_mac_addr)(wmi_unified_t wmi_hdl, void *ev,
  599. uint8_t *macaddr);
  600. QDF_STATUS (*check_and_update_fw_version)(wmi_unified_t wmi_hdl, void *ev);
  601. uint8_t* (*extract_dbglog_data_len)(wmi_unified_t wmi_handle, void *evt_buf,
  602. uint16_t *len);
  603. QDF_STATUS (*send_ext_resource_config)(wmi_unified_t wmi_handle,
  604. wmi_host_ext_resource_config *ext_cfg);
  605. QDF_STATUS (*send_nf_dbr_dbm_info_get_cmd)(wmi_unified_t wmi_handle);
  606. QDF_STATUS (*send_packet_power_info_get_cmd)(wmi_unified_t wmi_handle,
  607. struct packet_power_info_params *param);
  608. QDF_STATUS (*send_gpio_config_cmd)(wmi_unified_t wmi_handle,
  609. struct gpio_config_params *param);
  610. QDF_STATUS (*send_gpio_output_cmd)(wmi_unified_t wmi_handle,
  611. struct gpio_output_params *param);
  612. QDF_STATUS (*send_rtt_meas_req_test_cmd)(wmi_unified_t wmi_handle,
  613. struct rtt_meas_req_test_params *param);
  614. QDF_STATUS (*send_rtt_meas_req_cmd)(wmi_unified_t wmi_handle,
  615. struct rtt_meas_req_params *param);
  616. QDF_STATUS (*send_rtt_keepalive_req_cmd)(wmi_unified_t wmi_handle,
  617. struct rtt_keepalive_req_params *param);
  618. QDF_STATUS (*send_lci_set_cmd)(wmi_unified_t wmi_handle,
  619. struct lci_set_params *param);
  620. QDF_STATUS (*send_lcr_set_cmd)(wmi_unified_t wmi_handle,
  621. struct lcr_set_params *param);
  622. QDF_STATUS (*send_periodic_chan_stats_config_cmd)(wmi_unified_t wmi_handle,
  623. struct periodic_chan_stats_params *param);
  624. QDF_STATUS
  625. (*send_atf_peer_request_cmd)(wmi_unified_t wmi_handle,
  626. struct atf_peer_request_params *param);
  627. QDF_STATUS
  628. (*send_set_atf_grouping_cmd)(wmi_unified_t wmi_handle,
  629. struct atf_grouping_params *param);
  630. QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle,
  631. void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
  632. QDF_STATUS (*extract_dcs_interference_type)(wmi_unified_t wmi_handle,
  633. void *evt_buf, uint32_t *interference_type);
  634. QDF_STATUS (*extract_dcs_cw_int)(wmi_unified_t wmi_handle, void *evt_buf,
  635. wmi_host_ath_dcs_cw_int *cw_int);
  636. QDF_STATUS (*extract_dcs_im_tgt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  637. wmi_host_dcs_im_tgt_stats_t *wlan_stat);
  638. QDF_STATUS (*extract_fips_event_error_status)(wmi_unified_t wmi_handle,
  639. void *evt_buf, uint32_t *err_status);
  640. QDF_STATUS (*extract_fips_event_data)(wmi_unified_t wmi_handle,
  641. void *evt_buf, uint32_t *data_len, uint32_t **data);
  642. QDF_STATUS (*extract_vdev_start_resp)(wmi_unified_t wmi_handle, void *evt_buf,
  643. wmi_host_vdev_start_resp *vdev_rsp);
  644. QDF_STATUS (*extract_tbttoffset_update_params)(void *wmi_hdl, void *evt_buf,
  645. uint32_t *vdev_map, uint32_t **tbttoffset_list);
  646. QDF_STATUS (*extract_mgmt_rx_params)(wmi_unified_t wmi_handle, void *evt_buf,
  647. wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp);
  648. QDF_STATUS (*extract_vdev_stopped_param)(wmi_unified_t wmi_handle,
  649. void *evt_buf, uint32_t *vdev_id);
  650. QDF_STATUS (*extract_vdev_roam_param)(wmi_unified_t wmi_handle, void *evt_buf,
  651. wmi_host_roam_event *param);
  652. QDF_STATUS (*extract_vdev_scan_ev_param)(wmi_unified_t wmi_handle,
  653. void *evt_buf, wmi_host_scan_event *param);
  654. QDF_STATUS (*extract_mu_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
  655. wmi_host_mu_report_event *param);
  656. QDF_STATUS (*extract_pdev_tpc_config_ev_param)(wmi_unified_t wmi_handle,
  657. void *evt_buf, wmi_host_pdev_tpc_config_event *param);
  658. QDF_STATUS (*extract_gpio_input_ev_param)(wmi_unified_t wmi_handle,
  659. void *evt_buf, uint32_t *gpio_num);
  660. QDF_STATUS (*extract_pdev_reserve_ast_ev_param)(wmi_unified_t wmi_handle,
  661. void *evt_buf, uint32_t *result);
  662. QDF_STATUS (*extract_nfcal_power_ev_param)(wmi_unified_t wmi_handle,
  663. void *evt_buf,
  664. wmi_host_pdev_nfcal_power_all_channels_event *param);
  665. QDF_STATUS (*extract_pdev_tpc_ev_param)(wmi_unified_t wmi_handle,
  666. void *evt_buf, wmi_host_pdev_tpc_event *param);
  667. QDF_STATUS (*extract_pdev_generic_buffer_ev_param)(wmi_unified_t wmi_handle,
  668. void *evt_buf, wmi_host_pdev_generic_buffer_event *param);
  669. QDF_STATUS (*extract_mgmt_tx_compl_param)(wmi_unified_t wmi_handle,
  670. void *evt_buf, wmi_host_mgmt_tx_compl_event *param);
  671. QDF_STATUS (*extract_swba_vdev_map)(wmi_unified_t wmi_handle, void *evt_buf,
  672. uint32_t *vdev_map);
  673. QDF_STATUS (*extract_swba_tim_info)(wmi_unified_t wmi_handle, void *evt_buf,
  674. uint32_t idx, wmi_host_tim_info *tim_info);
  675. QDF_STATUS (*extract_swba_noa_info)(wmi_unified_t wmi_handle, void *evt_buf,
  676. uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
  677. QDF_STATUS (*extract_peer_sta_ps_statechange_ev)(wmi_unified_t wmi_handle,
  678. void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
  679. QDF_STATUS (*extract_peer_sta_kickout_ev)(wmi_unified_t wmi_handle,
  680. void *evt_buf, wmi_host_peer_sta_kickout_event *ev);
  681. QDF_STATUS (*extract_peer_ratecode_list_ev)(wmi_unified_t wmi_handle,
  682. void *evt_buf, uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
  683. QDF_STATUS (*extract_comb_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  684. uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
  685. QDF_STATUS (*extract_single_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  686. uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
  687. QDF_STATUS (*extract_composite_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
  688. uint16_t datalen, wmi_host_phyerr_t *phyerr);
  689. QDF_STATUS (*extract_rtt_hdr)(wmi_unified_t wmi_handle, void *evt_buf,
  690. wmi_host_rtt_event_hdr *ev);
  691. QDF_STATUS (*extract_rtt_ev)(wmi_unified_t wmi_handle, void *evt_buf,
  692. wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len);
  693. QDF_STATUS (*extract_rtt_error_report_ev)(wmi_unified_t wmi_handle,
  694. void *evt_buf, wmi_host_rtt_error_report_event *ev);
  695. QDF_STATUS (*extract_all_stats_count)(wmi_unified_t wmi_handle, void *evt_buf,
  696. wmi_host_stats_event *stats_param);
  697. QDF_STATUS (*extract_pdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  698. uint32_t index, wmi_host_pdev_stats *pdev_stats);
  699. QDF_STATUS (*extract_pdev_ext_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  700. uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats);
  701. QDF_STATUS (*extract_vdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  702. uint32_t index, wmi_host_vdev_stats *vdev_stats);
  703. QDF_STATUS (*extract_peer_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  704. uint32_t index, wmi_host_peer_stats *peer_stats);
  705. QDF_STATUS (*extract_bcnflt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  706. uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
  707. QDF_STATUS (*extract_peer_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  708. uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats);
  709. QDF_STATUS (*extract_chan_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  710. uint32_t index, wmi_host_chan_stats *chan_stats);
  711. QDF_STATUS (*extract_thermal_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  712. uint32_t *temp, uint32_t *level);
  713. QDF_STATUS (*extract_thermal_level_stats)(wmi_unified_t wmi_handle,
  714. void *evt_buf, uint8_t idx, uint32_t *levelcount,
  715. uint32_t *dccount);
  716. QDF_STATUS (*extract_profile_ctx)(wmi_unified_t wmi_handle, void *evt_buf,
  717. wmi_host_wlan_profile_ctx_t *profile_ctx);
  718. QDF_STATUS (*extract_profile_data)(wmi_unified_t wmi_handle, void *evt_buf,
  719. wmi_host_wlan_profile_t *profile_data);
  720. QDF_STATUS (*extract_chan_info_event)(wmi_unified_t wmi_handle, void *evt_buf,
  721. wmi_host_chan_info_event *chan_info);
  722. QDF_STATUS (*extract_channel_hopping_event)(wmi_unified_t wmi_handle,
  723. void *evt_buf,
  724. wmi_host_pdev_channel_hopping_event *ch_hopping);
  725. QDF_STATUS (*extract_bss_chan_info_event)(wmi_unified_t wmi_handle,
  726. void *evt_buf,
  727. wmi_host_pdev_bss_chan_info_event *bss_chan_info);
  728. QDF_STATUS (*extract_inst_rssi_stats_event)(wmi_unified_t wmi_handle,
  729. void *evt_buf, wmi_host_inst_stats_resp *inst_rssi_resp);
  730. QDF_STATUS (*extract_tx_data_traffic_ctrl_ev)(wmi_unified_t wmi_handle,
  731. void *evt_buf, wmi_host_tx_data_traffic_ctrl_event *ev);
  732. QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
  733. uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
  734. };
  735. struct target_abi_version {
  736. A_UINT32 abi_version_0;
  737. /** WMI Major and Minor versions */
  738. A_UINT32 abi_version_1;
  739. /** WMI change revision */
  740. A_UINT32 abi_version_ns_0;
  741. /** ABI version namespace first four dwords */
  742. A_UINT32 abi_version_ns_1;
  743. /** ABI version namespace second four dwords */
  744. A_UINT32 abi_version_ns_2;
  745. /** ABI version namespace third four dwords */
  746. A_UINT32 abi_version_ns_3;
  747. /** ABI version namespace fourth four dwords */
  748. };
  749. /**
  750. * struct wmi_init_cmd - Saved wmi INIT command
  751. * @buf: Buffer containing the wmi INIT command
  752. * @buf_len: Length of the buffer
  753. */
  754. struct wmi_cmd_init {
  755. wmi_buf_t buf;
  756. uint32_t buf_len;
  757. };
  758. struct wmi_unified {
  759. void *scn_handle; /* handle to device */
  760. osdev_t osdev; /* handle to use OS-independent services */
  761. qdf_atomic_t pending_cmds;
  762. HTC_ENDPOINT_ID wmi_endpoint_id;
  763. uint16_t max_msg_len;
  764. WMI_EVT_ID event_id[WMI_UNIFIED_MAX_EVENT];
  765. wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
  766. enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
  767. uint32_t max_event_idx;
  768. void *htc_handle;
  769. qdf_spinlock_t eventq_lock;
  770. qdf_nbuf_queue_t event_queue;
  771. struct work_struct rx_event_work;
  772. int wmi_stop_in_progress;
  773. #ifndef WMI_NON_TLV_SUPPORT
  774. struct _wmi_abi_version fw_abi_version;
  775. struct _wmi_abi_version final_abi_vers;
  776. #endif
  777. struct wmi_cmd_init saved_wmi_init_cmd;
  778. uint32_t num_of_diag_events_logs;
  779. uint32_t *events_logs_list;
  780. struct host_offload_req_param arp_info;
  781. #ifdef WLAN_OPEN_SOURCE
  782. struct fwdebug dbglog;
  783. struct dentry *debugfs_phy;
  784. #endif /* WLAN_OPEN_SOURCE */
  785. #ifdef WMI_INTERFACE_EVENT_LOGGING
  786. qdf_spinlock_t wmi_record_lock;
  787. #endif /*WMI_INTERFACE_EVENT_LOGGING */
  788. qdf_atomic_t is_target_suspended;
  789. #ifdef FEATURE_RUNTIME_PM
  790. qdf_atomic_t runtime_pm_inprogress;
  791. #endif
  792. enum wmi_target_type target_type;
  793. struct wmi_rx_ops rx_ops;
  794. struct wmi_ops *ops;
  795. bool use_cookie;
  796. bool wmi_stopinprogress;
  797. qdf_spinlock_t ctx_lock;
  798. #ifdef WMI_TLV_AND_NON_TLV_SUPPORT
  799. /* WMI service bitmap recieved from target */
  800. uint32_t wmi_service_bitmap[wmi_services_max];
  801. uint32_t wmi_events[wmi_events_max];
  802. uint32_t pdev_param[wmi_pdev_param_max];
  803. uint32_t vdev_param[wmi_vdev_param_max];
  804. uint32_t services[wmi_services_max];
  805. #endif
  806. };
  807. #ifdef WMI_NON_TLV_SUPPORT
  808. #define wmi_tlv_attach(x) qdf_print("TLV Unavailable\n")
  809. #else
  810. void wmi_tlv_attach(wmi_unified_t wmi_handle);
  811. #endif
  812. void wmi_non_tlv_attach(wmi_unified_t wmi_handle);
  813. /**
  814. * wmi_align() - provides word aligned parameter
  815. * @param: parameter to be aligned
  816. *
  817. * Return: word aligned parameter
  818. */
  819. static inline uint32_t wmi_align(uint32_t param)
  820. {
  821. return roundup(param, sizeof(uint32_t));
  822. }
  823. #endif