blob: 26d81ef91a318a3e7d827fb846c3d82f148dd5dc [file] [log] [blame]
Govind Singhd475ea92016-03-06 19:55:02 +05301/*
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/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/*
Govind Singh3ddda1f2016-03-09 11:34:12 +053029 * This file contains the API definitions for the Unified Wireless
30 * Module Interface (WMI).
Govind Singhd475ea92016-03-06 19:55:02 +053031 */
32#ifndef _WMI_UNIFIED_PRIV_H_
33#define _WMI_UNIFIED_PRIV_H_
34#include <osdep.h>
35#include "a_types.h"
36#include "wmi.h"
37#include "wmi_unified.h"
38#include "cdf_atomic.h"
39
40#define WMI_UNIFIED_MAX_EVENT 0x100
41#define WMI_MAX_CMDS 1024
42
43typedef cdf_nbuf_t wmi_buf_t;
44
45#ifdef WMI_INTERFACE_EVENT_LOGGING
46
47#define WMI_EVENT_DEBUG_MAX_ENTRY (1024)
48
49struct wmi_command_debug {
50 uint32_t command;
Govind Singh4ec6ff92016-03-09 12:03:29 +053051 uint32_t data[4]; /*16 bytes of WMI cmd excluding TLV and WMI headers */
Govind Singhd475ea92016-03-06 19:55:02 +053052 uint64_t time;
53};
54
55struct wmi_event_debug {
56 uint32_t event;
Govind Singh4ec6ff92016-03-09 12:03:29 +053057 uint32_t data[4]; /*16 bytes of WMI event data excluding TLV header */
Govind Singhd475ea92016-03-06 19:55:02 +053058 uint64_t time;
59};
60
61#endif /*WMI_INTERFACE_EVENT_LOGGING */
62
63#ifdef WLAN_OPEN_SOURCE
64struct fwdebug {
65 struct sk_buff_head fwlog_queue;
66 struct completion fwlog_completion;
67 A_BOOL fwlog_open;
68};
69#endif /* WLAN_OPEN_SOURCE */
70
Govind Singh3ddda1f2016-03-09 11:34:12 +053071struct wmi_ops {
Govind Singhae855362016-03-07 14:24:22 +053072CDF_STATUS (*send_vdev_create_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +053073 uint8_t macaddr[IEEE80211_ADDR_LEN],
74 struct vdev_create_params *param);
75
Govind Singhae855362016-03-07 14:24:22 +053076CDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +053077 uint8_t if_id);
78
Govind Singhae855362016-03-07 14:24:22 +053079CDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +053080 uint8_t vdev_id);
81
Govind Singhae855362016-03-07 14:24:22 +053082CDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +053083 uint8_t vdev_id);
84
Govind Singhae855362016-03-07 14:24:22 +053085CDF_STATUS (*send_peer_flush_tids_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +053086 uint8_t peer_addr[IEEE80211_ADDR_LEN],
87 struct peer_flush_params *param);
88
Govind Singhae855362016-03-07 14:24:22 +053089CDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +053090 uint8_t peer_addr[IEEE80211_ADDR_LEN],
91 uint8_t vdev_id);
92
Govind Singhae855362016-03-07 14:24:22 +053093CDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +053094 uint8_t peer_addr[IEEE80211_ADDR_LEN],
95 struct peer_set_params *param);
96
Govind Singhae855362016-03-07 14:24:22 +053097CDF_STATUS (*send_vdev_up_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +053098 uint8_t bssid[IEEE80211_ADDR_LEN],
99 struct vdev_up_params *params);
100
Govind Singhae855362016-03-07 14:24:22 +0530101CDF_STATUS (*send_peer_create_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530102 struct peer_create_params *param);
103
Govind Singhae855362016-03-07 14:24:22 +0530104CDF_STATUS (*send_green_ap_ps_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530105 uint32_t value, uint8_t mac_id);
106
Govind Singhae855362016-03-07 14:24:22 +0530107CDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530108(*send_pdev_utf_cmd)(wmi_unified_t wmi_handle,
109 struct pdev_utf_params *param,
110 uint8_t mac_id);
111
Govind Singhae855362016-03-07 14:24:22 +0530112CDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530113(*send_pdev_param_cmd)(wmi_unified_t wmi_handle,
114 struct pdev_params *param,
115 uint8_t mac_id);
116
Govind Singhae855362016-03-07 14:24:22 +0530117CDF_STATUS (*send_suspend_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530118 struct suspend_params *param,
119 uint8_t mac_id);
120
Govind Singhae855362016-03-07 14:24:22 +0530121CDF_STATUS (*send_resume_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530122 uint8_t mac_id);
123
Govind Singhae855362016-03-07 14:24:22 +0530124CDF_STATUS (*send_wow_enable_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530125 struct wow_cmd_params *param,
126 uint8_t mac_id);
127
Govind Singhae855362016-03-07 14:24:22 +0530128CDF_STATUS (*send_set_ap_ps_param_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530129 uint8_t *peer_addr,
130 struct ap_ps_params *param);
131
Govind Singhae855362016-03-07 14:24:22 +0530132CDF_STATUS (*send_set_sta_ps_param_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530133 struct sta_ps_params *param);
134
Govind Singhae855362016-03-07 14:24:22 +0530135CDF_STATUS (*send_crash_inject_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530136 struct crash_inject *param);
137
Govind Singhae855362016-03-07 14:24:22 +0530138CDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530139(*send_dbglog_cmd)(wmi_unified_t wmi_handle,
140 struct dbglog_params *dbglog_param);
141
Govind Singhae855362016-03-07 14:24:22 +0530142CDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530143 struct vdev_set_params *param);
144
Govind Singhae855362016-03-07 14:24:22 +0530145CDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530146 uint8_t macaddr[IEEE80211_ADDR_LEN],
147 struct stats_request_params *param);
148
Govind Singhae855362016-03-07 14:24:22 +0530149CDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530150 uint8_t macaddr[IEEE80211_ADDR_LEN],
151 struct packet_enable_params *param);
152
Govind Singhae855362016-03-07 14:24:22 +0530153CDF_STATUS (*send_beacon_send_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530154 struct beacon_params *param);
155
Govind Singhae855362016-03-07 14:24:22 +0530156CDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530157 struct peer_assoc_params *param);
158
Govind Singhae855362016-03-07 14:24:22 +0530159CDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530160 struct scan_start_params *param);
161
Govind Singhae855362016-03-07 14:24:22 +0530162CDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530163 struct scan_stop_params *param);
164
Govind Singhae855362016-03-07 14:24:22 +0530165CDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530166 struct scan_chan_list_params *param);
Govind Singh50988cc2016-02-26 18:09:36 +0530167
Govind Singhae855362016-03-07 14:24:22 +0530168CDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530169 struct wmi_mgmt_params *param);
170
Govind Singhae855362016-03-07 14:24:22 +0530171CDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530172 uint32_t param_value);
173
Govind Singhae855362016-03-07 14:24:22 +0530174CDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530175 uint32_t vdev_id, uint8_t val);
176
Govind Singhae855362016-03-07 14:24:22 +0530177CDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle);
Govind Singh50988cc2016-02-26 18:09:36 +0530178
Govind Singhae855362016-03-07 14:24:22 +0530179CDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530180 struct p2p_ps_params *oppps);
181
Govind Singhae855362016-03-07 14:24:22 +0530182CDF_STATUS (*send_set_p2pgo_noa_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530183 struct p2p_ps_params *noa);
184
Govind Singhae855362016-03-07 14:24:22 +0530185CDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle,
186 uint8_t vdev_id,
187 int value);
Govind Singh50988cc2016-02-26 18:09:36 +0530188
Govind Singhae855362016-03-07 14:24:22 +0530189CDF_STATUS (*send_set_mimops_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530190 uint8_t vdev_id, int value);
191
Govind Singhae855362016-03-07 14:24:22 +0530192CDF_STATUS (*send_set_sta_uapsd_auto_trig_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530193 struct sta_uapsd_trig_params *param);
Govind Singhe7b800c2016-03-01 15:30:53 +0530194
Govind Singhae855362016-03-07 14:24:22 +0530195CDF_STATUS (*send_ocb_set_utc_time_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530196 struct ocb_utc_param *utc);
197
Govind Singhae855362016-03-07 14:24:22 +0530198CDF_STATUS (*send_ocb_get_tsf_timer_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530199 uint8_t vdev_id);
200
Govind Singhae855362016-03-07 14:24:22 +0530201CDF_STATUS (*send_ocb_start_timing_advert_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530202 struct ocb_timing_advert_param *timing_advert);
203
Govind Singhae855362016-03-07 14:24:22 +0530204CDF_STATUS (*send_ocb_stop_timing_advert_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530205 struct ocb_timing_advert_param *timing_advert);
206
Govind Singhae855362016-03-07 14:24:22 +0530207CDF_STATUS (*send_dcc_get_stats_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530208 struct dcc_get_stats_param *get_stats_param);
209
Govind Singhae855362016-03-07 14:24:22 +0530210CDF_STATUS (*send_dcc_clear_stats_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530211 uint32_t vdev_id, uint32_t dcc_stats_bitmap);
212
Govind Singhae855362016-03-07 14:24:22 +0530213CDF_STATUS (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530214 struct dcc_update_ndl_param *update_ndl_param);
215
Govind Singhae855362016-03-07 14:24:22 +0530216CDF_STATUS (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530217 struct ocb_config_param *config, uint32_t *ch_mhz);
Govind Singhae855362016-03-07 14:24:22 +0530218
219CDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle,
Govind Singh9bad0002016-03-01 15:54:59 +0530220 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
221
Govind Singhae855362016-03-07 14:24:22 +0530222CDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle,
Govind Singh9bad0002016-03-01 15:54:59 +0530223 struct thermal_cmd_params *thermal_info);
224
Govind Singhae855362016-03-07 14:24:22 +0530225CDF_STATUS (*send_set_mcc_channel_time_quota_cmd)
Govind Singh9bad0002016-03-01 15:54:59 +0530226 (wmi_unified_t wmi_handle,
227 uint32_t adapter_1_chan_freq,
228 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
229
Govind Singhae855362016-03-07 14:24:22 +0530230CDF_STATUS (*send_set_mcc_channel_time_latency_cmd)
Govind Singh9bad0002016-03-01 15:54:59 +0530231 (wmi_unified_t wmi_handle,
232 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
233
Govind Singhae855362016-03-07 14:24:22 +0530234CDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
Govind Singh9bad0002016-03-01 15:54:59 +0530235 wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler);
Govind Singhae855362016-03-07 14:24:22 +0530236
237CDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle,
238 A_UINT32 vdev_id, uint8_t *p2p_ie);
239
240CDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle,
241 uint8_t vdev_id,
242 struct wmi_probe_resp_params *probe_rsp_info,
243 uint8_t *frm);
244
245CDF_STATUS (*send_process_update_edca_param_cmd)(wmi_unified_t wmi_handle,
246 uint8_t vdev_id,
247 wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC]);
248
249CDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle,
250 uint32_t if_id,
251 struct wmi_gtx_config *gtx_info);
252
253CDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle,
254 struct sta_params *params);
255
256CDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle,
257 uint8_t vdev_id, uint32_t max_retries,
258 uint32_t retry_interval);
259
260CDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle,
261 wmi_bcn_send_from_host_cmd_fixed_param *param);
262
263CDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle,
264 struct gateway_update_req_param *req);
265
266CDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle,
267 struct rssi_monitor_param *req);
268
269CDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle,
270 struct scan_mac_oui *psetoui);
271
272CDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
273 struct wifi_passpoint_req_param *req);
274
275CDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
276 struct wifi_passpoint_req_param *req);
277
278CDF_STATUS (*send_set_epno_network_list_cmd)(wmi_unified_t wmi_handle,
279 struct wifi_enhanched_pno_params *req);
280
281CDF_STATUS (*send_extscan_get_capabilities_cmd)(wmi_unified_t wmi_handle,
282 struct extscan_capabilities_params *pgetcapab);
283
284CDF_STATUS (*send_extscan_get_cached_results_cmd)(wmi_unified_t wmi_handle,
285 struct extscan_cached_result_params *pcached_results);
286
287CDF_STATUS (*send_extscan_stop_change_monitor_cmd)(wmi_unified_t wmi_handle,
288 struct extscan_capabilities_reset_params *reset_req);
289
290CDF_STATUS (*send_extscan_start_change_monitor_cmd)(wmi_unified_t wmi_handle,
291 struct extscan_set_sig_changereq_params *
292 psigchange);
293
294CDF_STATUS (*send_extscan_stop_hotlist_monitor_cmd)(wmi_unified_t wmi_handle,
295 struct extscan_bssid_hotlist_reset_params *photlist_reset);
296
297CDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle,
298 struct extscan_stop_req_params *pstopcmd);
299
300CDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle,
301 struct wifi_scan_cmd_req_params *pstart);
302
303CDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle,
304 const struct plm_req_params *plm);
305
306CDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle,
307 const struct plm_req_params *plm,
308 uint32_t *gchannel_list);
309
310CDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle,
311 uint8_t vdev_id);
312
313CDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
314
315CDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
316 struct pno_scan_req_params *pno,
317 uint32_t *gchannel_freq_list);
318
319CDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
320 struct ipa_offload_control_params *ipa_offload);
321
322CDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg,
323 uint8_t is_add_ts);
324
325CDF_STATUS (*send_process_ll_stats_clear_cmd)
326 (wmi_unified_t wmi_handle,
327 const struct ll_stats_clear_params *clear_req,
328 uint8_t addr[IEEE80211_ADDR_LEN]);
329
330CDF_STATUS (*send_process_ll_stats_set_cmd)
331 (wmi_unified_t wmi_handle, const struct ll_stats_set_params *set_req);
332
333CDF_STATUS (*send_process_ll_stats_get_cmd)
334 (wmi_unified_t wmi_handle, const struct ll_stats_get_params *get_req,
335 uint8_t addr[IEEE80211_ADDR_LEN]);
336
337CDF_STATUS (*send_get_stats_cmd)(wmi_unified_t wmi_handle,
338 struct pe_stats_req *get_stats_param,
339 uint8_t addr[IEEE80211_ADDR_LEN]);
Govind Singh229bc0d2016-03-07 15:33:31 +0530340
341CDF_STATUS (*send_snr_request_cmd)(wmi_unified_t wmi_handle);
342
343CDF_STATUS (*send_snr_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
344
345CDF_STATUS (*send_link_status_req_cmd)(wmi_unified_t wmi_handle,
346 struct link_status_params *link_status);
347
348CDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle,
349 wmi_hb_set_enable_cmd_fixed_param *params);
350
351CDF_STATUS (*send_lphb_config_tcp_params_cmd)(wmi_unified_t wmi_handle,
352 wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
353
354CDF_STATUS (*send_lphb_config_tcp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
355 wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp);
356
357CDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle,
358 wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
359
360CDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
361 wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req);
362
363CDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle,
364 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
365
366CDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle,
367 wmi_mac_addr peer_macaddr);
368
369CDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle,
370 wmi_ap_ps_egap_param_cmd_fixed_param *egap_params);
371
372CDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle,
373 uint32_t cmd, uint32_t value1, uint32_t value2);
374
375CDF_STATUS (*send_wow_sta_ra_filter_cmd)(wmi_unified_t wmi_handle,
376 uint8_t vdev_id, uint8_t default_pattern,
377 uint16_t rate_limit_interval);
378
379CDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
380
381CDF_STATUS (*send_start_oem_data_cmd)(wmi_unified_t wmi_handle,
382 uint8_t data_len,
383 uint8_t *data);
384
385CDF_STATUS
386(*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle,
387 bool dfs_phyerr_filter_offload);
388
389CDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle,
390 WMI_PKTLOG_EVENT pktlog_event,
391 WMI_CMD_ID cmd_id);
392
393CDF_STATUS (*send_add_wow_wakeup_event_cmd)(wmi_unified_t wmi_handle,
394 uint32_t vdev_id,
395 uint32_t bitmap,
396 bool enable);
397
398CDF_STATUS (*send_wow_patterns_to_fw_cmd)(wmi_unified_t wmi_handle,
399 uint8_t vdev_id, uint8_t ptrn_id,
400 const uint8_t *ptrn, uint8_t ptrn_len,
401 uint8_t ptrn_offset, const uint8_t *mask,
402 uint8_t mask_len, bool user,
403 uint8_t default_patterns);
404
405CDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t ptrn_id,
406 uint8_t vdev_id);
407
408CDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle);
409
410CDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
411 uint8_t ac);
412
413CDF_STATUS (*send_aggr_qos_cmd)(wmi_unified_t wmi_handle,
414 struct aggr_add_ts_param *aggr_qos_rsp_msg);
415
416CDF_STATUS (*send_add_ts_cmd)(wmi_unified_t wmi_handle,
417 struct add_ts_param *msg);
418
419CDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle,
420 uint8_t vdev_id, bool enable);
421
422CDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle,
423 uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param,
424 uint8_t filter_id, bool enable);
425
426CDF_STATUS (*send_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle,
427 uint8_t vdev_id,
428 struct cdf_mac_addr multicast_addr,
429 bool clearList);
430
431CDF_STATUS (*send_gtk_offload_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
432 struct gtk_offload_params *params,
433 bool enable_offload,
434 uint32_t gtk_offload_opcode);
435
436CDF_STATUS (*send_process_gtk_offload_getinfo_cmd)(wmi_unified_t wmi_handle,
437 uint8_t vdev_id,
438 uint64_t offload_req_opcode);
439
440CDF_STATUS (*send_process_add_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
441 struct periodic_tx_pattern *
442 pAddPeriodicTxPtrnParams,
443 uint8_t vdev_id);
444
445CDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
446 uint8_t vdev_id,
447 uint8_t pattern_id);
448
449CDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle,
450 struct stats_ext_params *preq);
451
452CDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle,
453 struct ext_wow_params *params);
454
455CDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle,
456 struct app_type2_params *appType2Params);
457
458CDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle,
459 uint32_t timer_val);
460
461CDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle,
462 struct nan_req_params *nan_req);
463
464CDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle,
465 struct dhcp_offload_info_params *pDhcpSrvOffloadInfo);
466
467CDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle);
468
469CDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle,
470 uint32_t reg_dmn, uint16_t regdmn2G,
471 uint16_t regdmn5G, int8_t ctl2G,
472 int8_t ctl5G);
473
474CDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle,
475 struct tdls_channel_switch_params *chan_switch_params);
476
477CDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle,
478 void *tdls_param, uint8_t tdls_state);
479
480CDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle,
481 struct tdls_peer_state_params *peerStateParams,
482 uint32_t *ch_mhz);
483
484
485CDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle,
486 struct fw_dump_req_param *mem_dump_req);
487
488CDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
489 struct vdev_ie_info_param *ie_info);
Govind Singh71ee2d72016-03-07 16:30:32 +0530490
491CDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle,
492 wmi_resource_config *res_cfg,
493 uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
494 bool action);
495
496CDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
497
498CDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev);
499
500CDF_STATUS (*send_saved_init_cmd)(wmi_unified_t wmi_handle);
Govind Singh229bc0d2016-03-07 15:33:31 +0530501/**
502 * struct wmi_init_cmd - Saved wmi INIT command
503 * @buf: Buffer containing the wmi INIT command
504 * @buf_len: Length of the buffer
505 */
506struct wmi_init_cmd {
507 wmi_buf_t buf;
508 uint32_t buf_len;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530509};
510
Govind Singhd475ea92016-03-06 19:55:02 +0530511struct wmi_unified {
512 ol_scn_t scn_handle; /* handle to device */
Govind Singh6ad6ada2016-02-04 18:42:30 +0530513 osdev_t osdev; /* handle to use OS-independent services */
Govind Singhd475ea92016-03-06 19:55:02 +0530514 cdf_atomic_t pending_cmds;
515 HTC_ENDPOINT_ID wmi_endpoint_id;
516 uint16_t max_msg_len;
517 WMI_EVT_ID event_id[WMI_UNIFIED_MAX_EVENT];
518 wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
Govind Singh4ec6ff92016-03-09 12:03:29 +0530519 enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
Govind Singhd475ea92016-03-06 19:55:02 +0530520 uint32_t max_event_idx;
521 void *htc_handle;
522 cdf_spinlock_t eventq_lock;
523 cdf_nbuf_queue_t event_queue;
524 struct work_struct rx_event_work;
Govind Singh6ad6ada2016-02-04 18:42:30 +0530525 int wmi_stop_in_progress;
Govind Singh229bc0d2016-03-07 15:33:31 +0530526 struct _wmi_abi_version fw_abi_version;
527 struct _wmi_abi_version final_abi_vers;
528 struct wmi_init_cmd saved_wmi_init_cmd;
529 uint32_t num_of_diag_events_logs;
530 uint32_t *events_logs_list;
531 struct host_offload_req_param arp_info;
Govind Singhd475ea92016-03-06 19:55:02 +0530532#ifdef WLAN_OPEN_SOURCE
533 struct fwdebug dbglog;
534 struct dentry *debugfs_phy;
535#endif /* WLAN_OPEN_SOURCE */
536
537#ifdef WMI_INTERFACE_EVENT_LOGGING
538 cdf_spinlock_t wmi_record_lock;
539#endif /*WMI_INTERFACE_EVENT_LOGGING */
540
541 cdf_atomic_t is_target_suspended;
542
543#ifdef FEATURE_RUNTIME_PM
544 cdf_atomic_t runtime_pm_inprogress;
545#endif
546
Govind Singh3ddda1f2016-03-09 11:34:12 +0530547 struct wmi_rx_ops rx_ops;
548 struct wmi_ops *ops;
Govind Singh6ad6ada2016-02-04 18:42:30 +0530549 void *event_handler_cookie[WMI_UNIFIED_MAX_EVENT];
550 bool use_cookie;
Govind Singhd475ea92016-03-06 19:55:02 +0530551};
Govind Singh3ddda1f2016-03-09 11:34:12 +0530552struct wmi_ops *wmi_get_tlv_ops(void);
553struct wmi_ops *wmi_get_non_tlv_ops(void);
Govind Singhd475ea92016-03-06 19:55:02 +0530554#endif