blob: b9127029b8fb57bc1f02190d4e867ac5dda6f78d [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"
Govind Singh89727882016-04-15 13:58:27 +053038#include "wmi_unified_param.h"
Govind Singhd7468a52016-03-09 14:32:57 +053039#include "qdf_atomic.h"
Govind Singhd475ea92016-03-06 19:55:02 +053040
41#define WMI_UNIFIED_MAX_EVENT 0x100
42#define WMI_MAX_CMDS 1024
43
Govind Singhd7468a52016-03-09 14:32:57 +053044typedef qdf_nbuf_t wmi_buf_t;
Govind Singhd475ea92016-03-06 19:55:02 +053045
46#ifdef WMI_INTERFACE_EVENT_LOGGING
47
48#define WMI_EVENT_DEBUG_MAX_ENTRY (1024)
Govind Singh5fed03b2016-05-12 12:45:51 +053049#define WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH (16)
50/* wmi_mgmt commands */
51#define WMI_MGMT_EVENT_DEBUG_MAX_ENTRY (256)
Govind Singhd475ea92016-03-06 19:55:02 +053052
Govind Singh5fed03b2016-05-12 12:45:51 +053053/**
54 * struct wmi_command_debug - WMI command log buffer data type
55 * @ command - Store WMI Command id
56 * @ data - Stores WMI command data
57 * @ time - Time of WMI command handling
58 */
Govind Singhd475ea92016-03-06 19:55:02 +053059struct wmi_command_debug {
60 uint32_t command;
Govind Singh5fed03b2016-05-12 12:45:51 +053061 /*16 bytes of WMI cmd excluding TLV and WMI headers */
62 uint32_t data[WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH/sizeof(uint32_t)];
Govind Singhd475ea92016-03-06 19:55:02 +053063 uint64_t time;
64};
65
Govind Singh5fed03b2016-05-12 12:45:51 +053066/**
67 * struct wmi_event_debug - WMI event log buffer data type
68 * @ command - Store WMI Event id
69 * @ data - Stores WMI Event data
70 * @ time - Time of WMI Event handling
71 */
Govind Singhd475ea92016-03-06 19:55:02 +053072struct wmi_event_debug {
73 uint32_t event;
Govind Singh5fed03b2016-05-12 12:45:51 +053074 /*16 bytes of WMI event data excluding TLV header */
75 uint32_t data[WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH/sizeof(uint32_t)];
Govind Singhd475ea92016-03-06 19:55:02 +053076 uint64_t time;
77};
78
Govind Singh5fed03b2016-05-12 12:45:51 +053079/**
80 * struct wmi_log_buf_t - WMI log buffer information type
81 * @buf - Refernce to WMI log buffer
82 * @ length - length of buffer
83 * @ buf_tail_idx - Tail index of buffer
84 * @ p_buf_tail_idx - refernce to buffer tail index. It is added to accommodate
85 * unified design since MCL uses global variable for buffer tail index
86 */
87struct wmi_log_buf_t {
88 void *buf;
89 uint32_t length;
90 uint32_t buf_tail_idx;
91 uint32_t *p_buf_tail_idx;
92};
93
94/**
95 * struct wmi_debug_log_info - Meta data to hold information of all buffers
96 * used for WMI logging
97 * @wmi_command_log_buf_info - Buffer info for WMI Command log
98 * @wmi_command_tx_cmp_log_buf_info - Buffer info for WMI Command Tx completion
99 * log
100 * @wmi_event_log_buf_info - Buffer info for WMI Event log
101 * @wmi_rx_event_log_buf_info - Buffer info for WMI event received log
102 * @wmi_mgmt_command_log_buf_info - Buffer info for WMI Management Command log
103 * @wmi_mgmt_command_tx_cmp_log_buf_info - Buffer info for WMI Management
104 * Command Tx completion log
105 * @wmi_mgmt_event_log_buf_info - Buffer info for WMI Management event log
106 * @wmi_record_lock - Lock WMI recording
107 * @wmi_logging_enable - Enable/Disable state for WMI logging
108 * @buf_offset_command - Offset from where WMI command data should be logged
109 * @buf_offset_event - Offset from where WMI event data should be logged
110 * @is_management_record - Function refernce to check if command/event is
111 * management record
112 * @wmi_id_to_name - Function refernce to API to convert Command id to
113 * string name
114 * @wmi_log_debugfs_dir - refernce to debugfs directory
115 */
116struct wmi_debug_log_info {
117 struct wmi_log_buf_t wmi_command_log_buf_info;
118 struct wmi_log_buf_t wmi_command_tx_cmp_log_buf_info;
119
120 struct wmi_log_buf_t wmi_event_log_buf_info;
121 struct wmi_log_buf_t wmi_rx_event_log_buf_info;
122
123 struct wmi_log_buf_t wmi_mgmt_command_log_buf_info;
124 struct wmi_log_buf_t wmi_mgmt_command_tx_cmp_log_buf_info;
125 struct wmi_log_buf_t wmi_mgmt_event_log_buf_info;
126
127 qdf_spinlock_t wmi_record_lock;
128 bool wmi_logging_enable;
129 uint32_t buf_offset_command;
130 uint32_t buf_offset_event;
131 bool (*is_management_record)(uint32_t cmd_id);
132 uint8_t *(*wmi_id_to_name)(uint32_t cmd_id);
133 struct dentry *wmi_log_debugfs_dir;
134 uint8_t wmi_instance_id;
135};
136
Govind Singhd475ea92016-03-06 19:55:02 +0530137#endif /*WMI_INTERFACE_EVENT_LOGGING */
138
139#ifdef WLAN_OPEN_SOURCE
140struct fwdebug {
141 struct sk_buff_head fwlog_queue;
142 struct completion fwlog_completion;
143 A_BOOL fwlog_open;
144};
145#endif /* WLAN_OPEN_SOURCE */
146
Govind Singh3ddda1f2016-03-09 11:34:12 +0530147struct wmi_ops {
Govind Singhd7468a52016-03-09 14:32:57 +0530148QDF_STATUS (*send_vdev_create_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530149 uint8_t macaddr[IEEE80211_ADDR_LEN],
150 struct vdev_create_params *param);
151
Govind Singhd7468a52016-03-09 14:32:57 +0530152QDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530153 uint8_t if_id);
154
Govind Singhd7468a52016-03-09 14:32:57 +0530155QDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530156 uint8_t vdev_id);
157
Govind Singhd7468a52016-03-09 14:32:57 +0530158QDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530159 uint8_t vdev_id);
160
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530161QDF_STATUS (*send_vdev_start_cmd)(wmi_unified_t wmi,
162 struct vdev_start_params *req);
163
164QDF_STATUS (*send_hidden_ssid_vdev_restart_cmd)(wmi_unified_t wmi_handle,
165 struct hidden_ssid_vdev_restart_params *restart_params);
166
Govind Singhd7468a52016-03-09 14:32:57 +0530167QDF_STATUS (*send_peer_flush_tids_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530168 uint8_t peer_addr[IEEE80211_ADDR_LEN],
169 struct peer_flush_params *param);
170
Govind Singhd7468a52016-03-09 14:32:57 +0530171QDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530172 uint8_t peer_addr[IEEE80211_ADDR_LEN],
173 uint8_t vdev_id);
174
Govind Singhd7468a52016-03-09 14:32:57 +0530175QDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530176 uint8_t peer_addr[IEEE80211_ADDR_LEN],
177 struct peer_set_params *param);
178
Govind Singhd7468a52016-03-09 14:32:57 +0530179QDF_STATUS (*send_vdev_up_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530180 uint8_t bssid[IEEE80211_ADDR_LEN],
181 struct vdev_up_params *params);
182
Govind Singhd7468a52016-03-09 14:32:57 +0530183QDF_STATUS (*send_peer_create_cmd)(wmi_unified_t wmi,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530184 struct peer_create_params *param);
185
Govind Singhd7468a52016-03-09 14:32:57 +0530186QDF_STATUS (*send_green_ap_ps_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530187 uint32_t value, uint8_t mac_id);
188
Govind Singhd7468a52016-03-09 14:32:57 +0530189QDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530190(*send_pdev_utf_cmd)(wmi_unified_t wmi_handle,
191 struct pdev_utf_params *param,
192 uint8_t mac_id);
193
Govind Singhd7468a52016-03-09 14:32:57 +0530194QDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530195(*send_pdev_param_cmd)(wmi_unified_t wmi_handle,
196 struct pdev_params *param,
197 uint8_t mac_id);
198
Govind Singhd7468a52016-03-09 14:32:57 +0530199QDF_STATUS (*send_suspend_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530200 struct suspend_params *param,
201 uint8_t mac_id);
202
Govind Singhd7468a52016-03-09 14:32:57 +0530203QDF_STATUS (*send_resume_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530204 uint8_t mac_id);
205
Govind Singhd7468a52016-03-09 14:32:57 +0530206QDF_STATUS (*send_wow_enable_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530207 struct wow_cmd_params *param,
208 uint8_t mac_id);
209
Govind Singhd7468a52016-03-09 14:32:57 +0530210QDF_STATUS (*send_set_ap_ps_param_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530211 uint8_t *peer_addr,
212 struct ap_ps_params *param);
213
Govind Singhd7468a52016-03-09 14:32:57 +0530214QDF_STATUS (*send_set_sta_ps_param_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530215 struct sta_ps_params *param);
216
Govind Singhd7468a52016-03-09 14:32:57 +0530217QDF_STATUS (*send_crash_inject_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530218 struct crash_inject *param);
219
Govind Singhd7468a52016-03-09 14:32:57 +0530220QDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530221(*send_dbglog_cmd)(wmi_unified_t wmi_handle,
222 struct dbglog_params *dbglog_param);
223
Govind Singhd7468a52016-03-09 14:32:57 +0530224QDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530225 struct vdev_set_params *param);
226
Govind Singhd7468a52016-03-09 14:32:57 +0530227QDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530228 uint8_t macaddr[IEEE80211_ADDR_LEN],
229 struct stats_request_params *param);
230
Govind Singh89727882016-04-15 13:58:27 +0530231#ifdef WMI_NON_TLV_SUPPORT
232QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
233 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT);
234#else
Govind Singhd7468a52016-03-09 14:32:57 +0530235QDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530236 uint8_t macaddr[IEEE80211_ADDR_LEN],
237 struct packet_enable_params *param);
Govind Singh89727882016-04-15 13:58:27 +0530238#endif
239
240QDF_STATUS (*send_packet_log_disable_cmd)(wmi_unified_t wmi_handle);
Govind Singh3ddda1f2016-03-09 11:34:12 +0530241
Govind Singhd7468a52016-03-09 14:32:57 +0530242QDF_STATUS (*send_beacon_send_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530243 struct beacon_params *param);
244
Govind Singh89727882016-04-15 13:58:27 +0530245QDF_STATUS (*send_beacon_tmpl_send_cmd)(wmi_unified_t wmi_handle,
246 struct beacon_tmpl_params *param);
247
Govind Singhd7468a52016-03-09 14:32:57 +0530248QDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530249 struct peer_assoc_params *param);
250
Govind Singhd7468a52016-03-09 14:32:57 +0530251QDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530252 struct scan_start_params *param);
253
Govind Singhd7468a52016-03-09 14:32:57 +0530254QDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530255 struct scan_stop_params *param);
256
Govind Singhd7468a52016-03-09 14:32:57 +0530257QDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530258 struct scan_chan_list_params *param);
Govind Singh50988cc2016-02-26 18:09:36 +0530259
Govind Singhd7468a52016-03-09 14:32:57 +0530260QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530261 struct wmi_mgmt_params *param);
262
Govind Singhd7468a52016-03-09 14:32:57 +0530263QDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530264 uint32_t param_value);
265
Govind Singhd7468a52016-03-09 14:32:57 +0530266QDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530267 uint32_t vdev_id, uint8_t val);
268
Govind Singhd7468a52016-03-09 14:32:57 +0530269QDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle);
Govind Singh50988cc2016-02-26 18:09:36 +0530270
Govind Singhd7468a52016-03-09 14:32:57 +0530271QDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530272 struct p2p_ps_params *oppps);
273
Govind Singhd7468a52016-03-09 14:32:57 +0530274QDF_STATUS (*send_set_p2pgo_noa_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530275 struct p2p_ps_params *noa);
276
Govind Singhd7468a52016-03-09 14:32:57 +0530277QDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530278 uint8_t vdev_id,
279 int value);
Govind Singh50988cc2016-02-26 18:09:36 +0530280
Govind Singhd7468a52016-03-09 14:32:57 +0530281QDF_STATUS (*send_set_mimops_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530282 uint8_t vdev_id, int value);
283
Govind Singhd7468a52016-03-09 14:32:57 +0530284QDF_STATUS (*send_set_sta_uapsd_auto_trig_cmd)(wmi_unified_t wmi_handle,
Govind Singh50988cc2016-02-26 18:09:36 +0530285 struct sta_uapsd_trig_params *param);
Govind Singhe7b800c2016-03-01 15:30:53 +0530286
Govind Singhd7468a52016-03-09 14:32:57 +0530287QDF_STATUS (*send_ocb_set_utc_time_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530288 struct ocb_utc_param *utc);
289
Govind Singhd7468a52016-03-09 14:32:57 +0530290QDF_STATUS (*send_ocb_get_tsf_timer_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530291 uint8_t vdev_id);
292
Govind Singhd7468a52016-03-09 14:32:57 +0530293QDF_STATUS (*send_ocb_start_timing_advert_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530294 struct ocb_timing_advert_param *timing_advert);
295
Govind Singhd7468a52016-03-09 14:32:57 +0530296QDF_STATUS (*send_ocb_stop_timing_advert_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530297 struct ocb_timing_advert_param *timing_advert);
298
Govind Singhd7468a52016-03-09 14:32:57 +0530299QDF_STATUS (*send_dcc_get_stats_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530300 struct dcc_get_stats_param *get_stats_param);
301
Govind Singhd7468a52016-03-09 14:32:57 +0530302QDF_STATUS (*send_dcc_clear_stats_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530303 uint32_t vdev_id, uint32_t dcc_stats_bitmap);
304
Govind Singhd7468a52016-03-09 14:32:57 +0530305QDF_STATUS (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530306 struct dcc_update_ndl_param *update_ndl_param);
307
Govind Singhd7468a52016-03-09 14:32:57 +0530308QDF_STATUS (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530309 struct ocb_config_param *config, uint32_t *ch_mhz);
Govind Singhae855362016-03-07 14:24:22 +0530310
Govind Singhd7468a52016-03-09 14:32:57 +0530311QDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle,
Govind Singh9bad0002016-03-01 15:54:59 +0530312 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
313
Govind Singhd7468a52016-03-09 14:32:57 +0530314QDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle,
Govind Singh9bad0002016-03-01 15:54:59 +0530315 struct thermal_cmd_params *thermal_info);
316
Govind Singhd7468a52016-03-09 14:32:57 +0530317QDF_STATUS (*send_set_mcc_channel_time_quota_cmd)
Govind Singh9bad0002016-03-01 15:54:59 +0530318 (wmi_unified_t wmi_handle,
319 uint32_t adapter_1_chan_freq,
320 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
321
Govind Singhd7468a52016-03-09 14:32:57 +0530322QDF_STATUS (*send_set_mcc_channel_time_latency_cmd)
Govind Singh9bad0002016-03-01 15:54:59 +0530323 (wmi_unified_t wmi_handle,
324 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
325
Govind Singhd7468a52016-03-09 14:32:57 +0530326QDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
Govind Singh608e8892016-04-16 19:24:23 -0700327 wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
328 uint32_t pdev_id);
Govind Singhae855362016-03-07 14:24:22 +0530329
Govind Singhd7468a52016-03-09 14:32:57 +0530330QDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530331 A_UINT32 vdev_id, uint8_t *p2p_ie);
332
Govind Singhd7468a52016-03-09 14:32:57 +0530333QDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530334 uint8_t vdev_id,
335 struct wmi_probe_resp_params *probe_rsp_info,
336 uint8_t *frm);
337
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +0530338QDF_STATUS (*send_setup_install_key_cmd)(wmi_unified_t wmi_handle,
339 struct set_key_params *key_params);
340
Govind Singh89727882016-04-15 13:58:27 +0530341#ifndef WMI_NON_TLV_SUPPORT
Govind Singhd7468a52016-03-09 14:32:57 +0530342QDF_STATUS (*send_process_update_edca_param_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530343 uint8_t vdev_id,
344 wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC]);
Govind Singh89727882016-04-15 13:58:27 +0530345#endif
Govind Singhae855362016-03-07 14:24:22 +0530346
Govind Singhd7468a52016-03-09 14:32:57 +0530347QDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530348 uint32_t if_id,
349 struct wmi_gtx_config *gtx_info);
350
Govind Singhd7468a52016-03-09 14:32:57 +0530351QDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530352 struct sta_params *params);
353
Govind Singhd7468a52016-03-09 14:32:57 +0530354QDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530355 uint8_t vdev_id, uint32_t max_retries,
356 uint32_t retry_interval);
Govind Singh89727882016-04-15 13:58:27 +0530357#ifndef WMI_NON_TLV_SUPPORT
Govind Singhd7468a52016-03-09 14:32:57 +0530358QDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530359 wmi_bcn_send_from_host_cmd_fixed_param *param);
Govind Singh89727882016-04-15 13:58:27 +0530360#endif
Govind Singhae855362016-03-07 14:24:22 +0530361
Govind Singhd7468a52016-03-09 14:32:57 +0530362QDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530363 struct gateway_update_req_param *req);
364
Govind Singhd7468a52016-03-09 14:32:57 +0530365QDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530366 struct rssi_monitor_param *req);
367
Govind Singhd7468a52016-03-09 14:32:57 +0530368QDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530369 struct scan_mac_oui *psetoui);
370
Govind Singhd7468a52016-03-09 14:32:57 +0530371QDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530372 struct wifi_passpoint_req_param *req);
Govind Singh89727882016-04-15 13:58:27 +0530373#ifndef WMI_NON_TLV_SUPPORT
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +0530374QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle,
375 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
376 struct roam_offload_scan_params *roam_req);
Govind Singh89727882016-04-15 13:58:27 +0530377#endif
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +0530378
379QDF_STATUS (*send_roam_scan_offload_rssi_thresh_cmd)(wmi_unified_t wmi_handle,
380 struct roam_offload_scan_rssi_params *roam_req);
381
382QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle,
383 struct roam_scan_filter_params *roam_req);
384
Govind Singhd7468a52016-03-09 14:32:57 +0530385QDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530386 struct wifi_passpoint_req_param *req);
387
Govind Singhd7468a52016-03-09 14:32:57 +0530388QDF_STATUS (*send_set_epno_network_list_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530389 struct wifi_enhanched_pno_params *req);
390
Govind Singhd7468a52016-03-09 14:32:57 +0530391QDF_STATUS (*send_extscan_get_capabilities_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530392 struct extscan_capabilities_params *pgetcapab);
393
Govind Singhd7468a52016-03-09 14:32:57 +0530394QDF_STATUS (*send_extscan_get_cached_results_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530395 struct extscan_cached_result_params *pcached_results);
396
Govind Singhd7468a52016-03-09 14:32:57 +0530397QDF_STATUS (*send_extscan_stop_change_monitor_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530398 struct extscan_capabilities_reset_params *reset_req);
399
Govind Singhd7468a52016-03-09 14:32:57 +0530400QDF_STATUS (*send_extscan_start_change_monitor_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530401 struct extscan_set_sig_changereq_params *
402 psigchange);
403
Govind Singhd7468a52016-03-09 14:32:57 +0530404QDF_STATUS (*send_extscan_stop_hotlist_monitor_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530405 struct extscan_bssid_hotlist_reset_params *photlist_reset);
406
Govind Singhd7468a52016-03-09 14:32:57 +0530407QDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530408 struct extscan_stop_req_params *pstopcmd);
409
Govind Singhd7468a52016-03-09 14:32:57 +0530410QDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530411 struct wifi_scan_cmd_req_params *pstart);
412
Govind Singhd7468a52016-03-09 14:32:57 +0530413QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530414 const struct plm_req_params *plm);
415
Govind Singh89727882016-04-15 13:58:27 +0530416
Govind Singhd7468a52016-03-09 14:32:57 +0530417QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530418 const struct plm_req_params *plm,
419 uint32_t *gchannel_list);
420
Govind Singhd7468a52016-03-09 14:32:57 +0530421QDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530422 uint8_t vdev_id);
423
Govind Singhd7468a52016-03-09 14:32:57 +0530424QDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
Govind Singhae855362016-03-07 14:24:22 +0530425
Govind Singh89727882016-04-15 13:58:27 +0530426#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhd7468a52016-03-09 14:32:57 +0530427QDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530428 struct pno_scan_req_params *pno,
429 uint32_t *gchannel_freq_list);
Govind Singh89727882016-04-15 13:58:27 +0530430#endif
Govind Singhae855362016-03-07 14:24:22 +0530431
Govind Singhd7468a52016-03-09 14:32:57 +0530432QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530433 struct ipa_offload_control_params *ipa_offload);
434
Govind Singhd7468a52016-03-09 14:32:57 +0530435QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg,
Govind Singhae855362016-03-07 14:24:22 +0530436 uint8_t is_add_ts);
437
Govind Singhd7468a52016-03-09 14:32:57 +0530438QDF_STATUS (*send_process_ll_stats_clear_cmd)
Govind Singhae855362016-03-07 14:24:22 +0530439 (wmi_unified_t wmi_handle,
440 const struct ll_stats_clear_params *clear_req,
441 uint8_t addr[IEEE80211_ADDR_LEN]);
442
Govind Singhd7468a52016-03-09 14:32:57 +0530443QDF_STATUS (*send_process_ll_stats_set_cmd)
Govind Singhae855362016-03-07 14:24:22 +0530444 (wmi_unified_t wmi_handle, const struct ll_stats_set_params *set_req);
445
Govind Singhd7468a52016-03-09 14:32:57 +0530446QDF_STATUS (*send_process_ll_stats_get_cmd)
Govind Singhae855362016-03-07 14:24:22 +0530447 (wmi_unified_t wmi_handle, const struct ll_stats_get_params *get_req,
448 uint8_t addr[IEEE80211_ADDR_LEN]);
449
Govind Singhd7468a52016-03-09 14:32:57 +0530450QDF_STATUS (*send_get_stats_cmd)(wmi_unified_t wmi_handle,
Govind Singhae855362016-03-07 14:24:22 +0530451 struct pe_stats_req *get_stats_param,
452 uint8_t addr[IEEE80211_ADDR_LEN]);
Govind Singh229bc0d2016-03-07 15:33:31 +0530453
Govind Singhd7468a52016-03-09 14:32:57 +0530454QDF_STATUS (*send_snr_request_cmd)(wmi_unified_t wmi_handle);
Govind Singh229bc0d2016-03-07 15:33:31 +0530455
Govind Singhd7468a52016-03-09 14:32:57 +0530456QDF_STATUS (*send_snr_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
Govind Singh229bc0d2016-03-07 15:33:31 +0530457
Govind Singhd7468a52016-03-09 14:32:57 +0530458QDF_STATUS (*send_link_status_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530459 struct link_status_params *link_status);
Govind Singh89727882016-04-15 13:58:27 +0530460#ifndef WMI_NON_TLV_SUPPORT
Govind Singhd7468a52016-03-09 14:32:57 +0530461QDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530462 wmi_hb_set_enable_cmd_fixed_param *params);
463
Govind Singhd7468a52016-03-09 14:32:57 +0530464QDF_STATUS (*send_lphb_config_tcp_params_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530465 wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req);
466
Govind Singhd7468a52016-03-09 14:32:57 +0530467QDF_STATUS (*send_lphb_config_tcp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530468 wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp);
469
Govind Singhd7468a52016-03-09 14:32:57 +0530470QDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530471 wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req);
472
Govind Singhd7468a52016-03-09 14:32:57 +0530473QDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530474 wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req);
475
Govind Singhd7468a52016-03-09 14:32:57 +0530476QDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530477 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
478
Govind Singhd7468a52016-03-09 14:32:57 +0530479QDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530480 wmi_mac_addr peer_macaddr);
481
Govind Singhd7468a52016-03-09 14:32:57 +0530482QDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530483 wmi_ap_ps_egap_param_cmd_fixed_param *egap_params);
Govind Singh89727882016-04-15 13:58:27 +0530484#endif
Govind Singh229bc0d2016-03-07 15:33:31 +0530485
Govind Singhd7468a52016-03-09 14:32:57 +0530486QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530487 uint32_t cmd, uint32_t value1, uint32_t value2);
488
Govind Singhd7468a52016-03-09 14:32:57 +0530489QDF_STATUS (*send_wow_sta_ra_filter_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530490 uint8_t vdev_id, uint8_t default_pattern,
491 uint16_t rate_limit_interval);
492
Govind Singhd7468a52016-03-09 14:32:57 +0530493QDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
Govind Singh229bc0d2016-03-07 15:33:31 +0530494
Govind Singhd7468a52016-03-09 14:32:57 +0530495QDF_STATUS (*send_start_oem_data_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530496 uint8_t data_len,
497 uint8_t *data);
498
Govind Singhd7468a52016-03-09 14:32:57 +0530499QDF_STATUS
Govind Singh229bc0d2016-03-07 15:33:31 +0530500(*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle,
501 bool dfs_phyerr_filter_offload);
Govind Singh89727882016-04-15 13:58:27 +0530502#ifndef WMI_NON_TLV_SUPPORT
Govind Singhd7468a52016-03-09 14:32:57 +0530503QDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530504 WMI_PKTLOG_EVENT pktlog_event,
505 WMI_CMD_ID cmd_id);
Govind Singh89727882016-04-15 13:58:27 +0530506#endif
Govind Singh229bc0d2016-03-07 15:33:31 +0530507
Govind Singhd7468a52016-03-09 14:32:57 +0530508QDF_STATUS (*send_add_wow_wakeup_event_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530509 uint32_t vdev_id,
510 uint32_t bitmap,
511 bool enable);
512
Govind Singhd7468a52016-03-09 14:32:57 +0530513QDF_STATUS (*send_wow_patterns_to_fw_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530514 uint8_t vdev_id, uint8_t ptrn_id,
515 const uint8_t *ptrn, uint8_t ptrn_len,
516 uint8_t ptrn_offset, const uint8_t *mask,
517 uint8_t mask_len, bool user,
518 uint8_t default_patterns);
519
Govind Singhd7468a52016-03-09 14:32:57 +0530520QDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t ptrn_id,
Govind Singh229bc0d2016-03-07 15:33:31 +0530521 uint8_t vdev_id);
522
Govind Singhd7468a52016-03-09 14:32:57 +0530523QDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle);
Govind Singh229bc0d2016-03-07 15:33:31 +0530524
Govind Singhd7468a52016-03-09 14:32:57 +0530525QDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
Govind Singh229bc0d2016-03-07 15:33:31 +0530526 uint8_t ac);
527
Govind Singhd7468a52016-03-09 14:32:57 +0530528QDF_STATUS (*send_aggr_qos_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530529 struct aggr_add_ts_param *aggr_qos_rsp_msg);
530
Govind Singhd7468a52016-03-09 14:32:57 +0530531QDF_STATUS (*send_add_ts_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530532 struct add_ts_param *msg);
533
Govind Singhd7468a52016-03-09 14:32:57 +0530534QDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530535 uint8_t vdev_id, bool enable);
536
Govind Singhd7468a52016-03-09 14:32:57 +0530537QDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530538 uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param,
539 uint8_t filter_id, bool enable);
540
Govind Singhd7468a52016-03-09 14:32:57 +0530541QDF_STATUS (*send_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530542 uint8_t vdev_id,
Govind Singhd7468a52016-03-09 14:32:57 +0530543 struct qdf_mac_addr multicast_addr,
Govind Singh229bc0d2016-03-07 15:33:31 +0530544 bool clearList);
545
Govind Singhd7468a52016-03-09 14:32:57 +0530546QDF_STATUS (*send_gtk_offload_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id,
Govind Singh229bc0d2016-03-07 15:33:31 +0530547 struct gtk_offload_params *params,
548 bool enable_offload,
549 uint32_t gtk_offload_opcode);
550
Govind Singhd7468a52016-03-09 14:32:57 +0530551QDF_STATUS (*send_process_gtk_offload_getinfo_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530552 uint8_t vdev_id,
553 uint64_t offload_req_opcode);
554
Govind Singhd7468a52016-03-09 14:32:57 +0530555QDF_STATUS (*send_process_add_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530556 struct periodic_tx_pattern *
557 pAddPeriodicTxPtrnParams,
558 uint8_t vdev_id);
559
Govind Singhd7468a52016-03-09 14:32:57 +0530560QDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530561 uint8_t vdev_id,
562 uint8_t pattern_id);
563
Govind Singhd7468a52016-03-09 14:32:57 +0530564QDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530565 struct stats_ext_params *preq);
566
Govind Singhd7468a52016-03-09 14:32:57 +0530567QDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530568 struct ext_wow_params *params);
569
Govind Singhd7468a52016-03-09 14:32:57 +0530570QDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530571 struct app_type2_params *appType2Params);
572
Govind Singhd7468a52016-03-09 14:32:57 +0530573QDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530574 uint32_t timer_val);
575
Govind Singhd7468a52016-03-09 14:32:57 +0530576QDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530577 struct nan_req_params *nan_req);
578
Govind Singhd7468a52016-03-09 14:32:57 +0530579QDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530580 struct dhcp_offload_info_params *pDhcpSrvOffloadInfo);
581
Govind Singhd7468a52016-03-09 14:32:57 +0530582QDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle);
Govind Singh229bc0d2016-03-07 15:33:31 +0530583
Govind Singhd7468a52016-03-09 14:32:57 +0530584QDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530585 uint32_t reg_dmn, uint16_t regdmn2G,
586 uint16_t regdmn5G, int8_t ctl2G,
587 int8_t ctl5G);
588
Govind Singhd7468a52016-03-09 14:32:57 +0530589QDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530590 struct tdls_channel_switch_params *chan_switch_params);
591
Govind Singhd7468a52016-03-09 14:32:57 +0530592QDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530593 void *tdls_param, uint8_t tdls_state);
594
Govind Singhd7468a52016-03-09 14:32:57 +0530595QDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530596 struct tdls_peer_state_params *peerStateParams,
597 uint32_t *ch_mhz);
598
599
Govind Singhd7468a52016-03-09 14:32:57 +0530600QDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530601 struct fw_dump_req_param *mem_dump_req);
602
Govind Singhd7468a52016-03-09 14:32:57 +0530603QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle,
Govind Singh229bc0d2016-03-07 15:33:31 +0530604 struct vdev_ie_info_param *ie_info);
Govind Singh71ee2d72016-03-07 16:30:32 +0530605
Govind Singhd7468a52016-03-09 14:32:57 +0530606QDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle,
Govind Singh71ee2d72016-03-07 16:30:32 +0530607 wmi_resource_config *res_cfg,
608 uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
609 bool action);
610
Govind Singhd7468a52016-03-09 14:32:57 +0530611QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf);
Govind Singh71ee2d72016-03-07 16:30:32 +0530612
Govind Singhd7468a52016-03-09 14:32:57 +0530613QDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev);
Govind Singh71ee2d72016-03-07 16:30:32 +0530614
Govind Singhd7468a52016-03-09 14:32:57 +0530615QDF_STATUS (*send_saved_init_cmd)(wmi_unified_t wmi_handle);
Govind Singh2ae94372016-03-07 16:45:38 +0530616
Govind Singhd7468a52016-03-09 14:32:57 +0530617QDF_STATUS (*send_set_base_macaddr_indicate_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530618 uint8_t *custom_addr);
619
Govind Singhd7468a52016-03-09 14:32:57 +0530620QDF_STATUS (*send_log_supported_evt_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530621 uint8_t *event,
622 uint32_t len);
623
Govind Singhd7468a52016-03-09 14:32:57 +0530624QDF_STATUS (*send_enable_specific_fw_logs_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530625 struct wmi_wifi_start_log *start_log);
626
Govind Singhd7468a52016-03-09 14:32:57 +0530627QDF_STATUS (*send_flush_logs_to_fw_cmd)(wmi_unified_t wmi_handle);
Govind Singh2ae94372016-03-07 16:45:38 +0530628
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +0530629QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
630 struct wmi_pcl_chan_weights *msg);
Govind Singh2ae94372016-03-07 16:45:38 +0530631
Manishekar Chandrasekaran68430d32016-04-27 12:29:16 +0530632QDF_STATUS (*send_pdev_set_hw_mode_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530633 uint32_t hw_mode_index);
634
Manishekar Chandrasekaran81d7aaa2016-04-27 12:52:51 +0530635QDF_STATUS (*send_pdev_set_dual_mac_config_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530636 struct wmi_dual_mac_config *msg);
637
Govind Singhd7468a52016-03-09 14:32:57 +0530638QDF_STATUS (*send_enable_arp_ns_offload_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530639 struct host_offload_req_param *param, bool arp_only,
640 uint8_t vdev_id);
641
Govind Singhd7468a52016-03-09 14:32:57 +0530642QDF_STATUS (*send_set_led_flashing_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530643 struct flashing_req_params *flashing);
644
Govind Singhd7468a52016-03-09 14:32:57 +0530645QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530646 struct app_type1_params *app_type1_params);
647
Govind Singhd7468a52016-03-09 14:32:57 +0530648QDF_STATUS (*send_set_ssid_hotlist_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530649 struct ssid_hotlist_request_params *request);
650
Govind Singhd7468a52016-03-09 14:32:57 +0530651QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530652 uint8_t vdev_id);
653
Govind Singhd7468a52016-03-09 14:32:57 +0530654QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530655 struct wmi_unit_test_cmd *wmi_utest);
656
Govind Singhd7468a52016-03-09 14:32:57 +0530657QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530658 struct wmi_roam_invoke_cmd *roaminvoke,
659 uint32_t ch_hz);
660
Govind Singhd7468a52016-03-09 14:32:57 +0530661QDF_STATUS (*send_roam_scan_offload_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530662 uint32_t command, uint32_t vdev_id);
Govind Singh89727882016-04-15 13:58:27 +0530663#ifndef WMI_NON_TLV_SUPPORT
Govind Singhd7468a52016-03-09 14:32:57 +0530664QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530665 wmi_ap_profile *ap_profile_p,
666 uint32_t vdev_id);
Govind Singh89727882016-04-15 13:58:27 +0530667#endif
Govind Singh2ae94372016-03-07 16:45:38 +0530668
Govind Singhd7468a52016-03-09 14:32:57 +0530669QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530670 uint32_t scan_period,
671 uint32_t scan_age,
672 uint32_t vdev_id);
673
Govind Singhd7468a52016-03-09 14:32:57 +0530674QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530675 uint8_t chan_count,
676 uint8_t *chan_list,
677 uint8_t list_type, uint32_t vdev_id);
678
Govind Singhd7468a52016-03-09 14:32:57 +0530679QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530680 uint32_t vdev_id,
681 int32_t rssi_change_thresh,
682 uint32_t bcn_rssi_weight,
683 uint32_t hirssi_delay_btw_scans);
684
Govind Singhd7468a52016-03-09 14:32:57 +0530685QDF_STATUS (*send_get_buf_extscan_hotlist_cmd)(wmi_unified_t wmi_handle,
Govind Singh2ae94372016-03-07 16:45:38 +0530686 struct ext_scan_setbssi_hotlist_params *
687 photlist, int *buf_len);
Govind Singh89727882016-04-15 13:58:27 +0530688
689QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle,
690 uint32_t param);
691
692QDF_STATUS (*send_set_atf_cmd)(wmi_unified_t wmi_handle,
693 struct set_atf_params *param);
694
695QDF_STATUS (*send_pdev_fips_cmd)(wmi_unified_t wmi_handle,
696 struct fips_params *param);
697
698QDF_STATUS (*send_wlan_profile_enable_cmd)(wmi_unified_t wmi_handle,
699 struct wlan_profile_params *param);
700
701QDF_STATUS (*send_wlan_profile_trigger_cmd)(wmi_unified_t wmi_handle,
702 struct wlan_profile_params *param);
703
704QDF_STATUS (*send_pdev_set_chan_cmd)(wmi_unified_t wmi_handle,
705 struct channel_param *param);
706
707QDF_STATUS (*send_set_ht_ie_cmd)(wmi_unified_t wmi_handle,
708 struct ht_ie_params *param);
709
710QDF_STATUS (*send_set_vht_ie_cmd)(wmi_unified_t wmi_handle,
711 struct vht_ie_params *param);
712
713QDF_STATUS (*send_wmm_update_cmd)(wmi_unified_t wmi_handle,
714 struct wmm_update_params *param);
715
716QDF_STATUS (*send_set_ant_switch_tbl_cmd)(wmi_unified_t wmi_handle,
717 struct ant_switch_tbl_params *param);
718
719QDF_STATUS (*send_set_ratepwr_table_cmd)(wmi_unified_t wmi_handle,
720 struct ratepwr_table_params *param);
721
722QDF_STATUS (*send_get_ratepwr_table_cmd)(wmi_unified_t wmi_handle);
723
724QDF_STATUS (*send_set_ctl_table_cmd)(wmi_unified_t wmi_handle,
725 struct ctl_table_params *param);
726
727QDF_STATUS (*send_set_mimogain_table_cmd)(wmi_unified_t wmi_handle,
728 struct mimogain_table_params *param);
729
730QDF_STATUS (*send_set_ratepwr_chainmsk_cmd)(wmi_unified_t wmi_handle,
731 struct ratepwr_chainmsk_params *param);
732
733QDF_STATUS (*send_set_macaddr_cmd)(wmi_unified_t wmi_handle,
734 struct macaddr_params *param);
735
736QDF_STATUS (*send_pdev_scan_start_cmd)(wmi_unified_t wmi_handle);
737
738QDF_STATUS (*send_pdev_scan_end_cmd)(wmi_unified_t wmi_handle);
739
740QDF_STATUS (*send_set_acparams_cmd)(wmi_unified_t wmi_handle,
741 struct acparams_params *param);
742
743QDF_STATUS (*send_set_vap_dscp_tid_map_cmd)(wmi_unified_t wmi_handle,
744 struct vap_dscp_tid_map_params *param);
745
746QDF_STATUS (*send_proxy_ast_reserve_cmd)(wmi_unified_t wmi_handle,
747 struct proxy_ast_reserve_params *param);
748
749QDF_STATUS (*send_pdev_qvit_cmd)(wmi_unified_t wmi_handle,
750 struct pdev_qvit_params *param);
751
752QDF_STATUS (*send_mcast_group_update_cmd)(wmi_unified_t wmi_handle,
753 struct mcast_group_update_params *param);
754
755QDF_STATUS (*send_peer_add_wds_entry_cmd)(wmi_unified_t wmi_handle,
756 struct peer_add_wds_entry_params *param);
757
758QDF_STATUS (*send_peer_del_wds_entry_cmd)(wmi_unified_t wmi_handle,
759 struct peer_del_wds_entry_params *param);
760
761QDF_STATUS (*send_peer_update_wds_entry_cmd)(wmi_unified_t wmi_handle,
762 struct peer_update_wds_entry_params *param);
763
764QDF_STATUS (*send_phyerr_enable_cmd)(wmi_unified_t wmi_handle);
765
766QDF_STATUS (*send_phyerr_disable_cmd)(wmi_unified_t wmi_handle);
767
768QDF_STATUS (*send_smart_ant_enable_cmd)(wmi_unified_t wmi_handle,
769 struct smart_ant_enable_params *param);
770
771QDF_STATUS (*send_smart_ant_set_rx_ant_cmd)(wmi_unified_t wmi_handle,
772 struct smart_ant_rx_ant_params *param);
773
774QDF_STATUS (*send_smart_ant_set_tx_ant_cmd)(wmi_unified_t wmi_handle,
775 uint8_t macaddr[IEEE80211_ADDR_LEN],
776 struct smart_ant_tx_ant_params *param);
777
778QDF_STATUS (*send_smart_ant_set_training_info_cmd)(wmi_unified_t wmi_handle,
779 uint8_t macaddr[IEEE80211_ADDR_LEN],
780 struct smart_ant_training_info_params *param);
781
782QDF_STATUS (*send_smart_ant_set_node_config_cmd)(wmi_unified_t wmi_handle,
783 uint8_t macaddr[IEEE80211_ADDR_LEN],
784 struct smart_ant_node_config_params *param);
785
786QDF_STATUS (*send_smart_ant_enable_tx_feedback_cmd)(wmi_unified_t wmi_handle,
787 struct smart_ant_enable_tx_feedback_params *param);
788
789QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
790 struct vdev_spectral_configure_params *param);
791
792QDF_STATUS (*send_vdev_spectral_enable_cmd)(wmi_unified_t wmi_handle,
793 struct vdev_spectral_enable_params *param);
794
795QDF_STATUS (*send_bss_chan_info_request_cmd)(wmi_unified_t wmi_handle,
796 struct bss_chan_info_request_params *param);
797
798QDF_STATUS (*send_thermal_mitigation_param_cmd)(wmi_unified_t wmi_handle,
799 struct thermal_mitigation_params *param);
800
801QDF_STATUS (*send_vdev_set_neighbour_rx_cmd)(wmi_unified_t wmi_handle,
802 uint8_t macaddr[IEEE80211_ADDR_LEN],
803 struct set_neighbour_rx_params *param);
804
805QDF_STATUS (*send_vdev_set_fwtest_param_cmd)(wmi_unified_t wmi_handle,
806 struct set_fwtest_params *param);
807
808QDF_STATUS (*send_vdev_config_ratemask_cmd)(wmi_unified_t wmi_handle,
809 struct config_ratemask_params *param);
810
811QDF_STATUS (*send_vdev_install_key_cmd)(wmi_unified_t wmi_handle,
812 uint8_t macaddr[IEEE80211_ADDR_LEN],
813 struct vdev_install_key_params *param);
814
815QDF_STATUS (*send_wow_wakeup_cmd)(wmi_unified_t wmi_handle);
816
817QDF_STATUS (*send_wow_add_wakeup_event_cmd)(wmi_unified_t wmi_handle,
818 struct wow_add_wakeup_params *param);
819
820QDF_STATUS (*send_wow_add_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
821 struct wow_add_wakeup_pattern_params *param);
822
823QDF_STATUS (*send_wow_remove_wakeup_pattern_cmd)(wmi_unified_t wmi_handle,
824 struct wow_remove_wakeup_pattern_params *param);
825
826QDF_STATUS (*send_pdev_set_regdomain_cmd)(wmi_unified_t wmi_handle,
827 struct pdev_set_regdomain_params *param);
828
829QDF_STATUS (*send_set_quiet_mode_cmd)(wmi_unified_t wmi_handle,
830 struct set_quiet_mode_params *param);
831
832QDF_STATUS (*send_set_beacon_filter_cmd)(wmi_unified_t wmi_handle,
833 struct set_beacon_filter_params *param);
834
835QDF_STATUS (*send_remove_beacon_filter_cmd)(wmi_unified_t wmi_handle,
836 struct remove_beacon_filter_params *param);
837/*
838QDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle,
839 uint8_t macaddr[IEEE80211_ADDR_LEN],
840 struct mgmt_params *param);
841 */
842
843QDF_STATUS (*send_addba_clearresponse_cmd)(wmi_unified_t wmi_handle,
844 uint8_t macaddr[IEEE80211_ADDR_LEN],
845 struct addba_clearresponse_params *param);
846
847QDF_STATUS (*send_addba_send_cmd)(wmi_unified_t wmi_handle,
848 uint8_t macaddr[IEEE80211_ADDR_LEN],
849 struct addba_send_params *param);
850
851QDF_STATUS (*send_delba_send_cmd)(wmi_unified_t wmi_handle,
852 uint8_t macaddr[IEEE80211_ADDR_LEN],
853 struct delba_send_params *param);
854
855QDF_STATUS (*send_addba_setresponse_cmd)(wmi_unified_t wmi_handle,
856 uint8_t macaddr[IEEE80211_ADDR_LEN],
857 struct addba_setresponse_params *param);
858
859QDF_STATUS (*send_singleamsdu_cmd)(wmi_unified_t wmi_handle,
860 uint8_t macaddr[IEEE80211_ADDR_LEN],
861 struct singleamsdu_params *param);
862
863QDF_STATUS (*send_set_qboost_param_cmd)(wmi_unified_t wmi_handle,
864 uint8_t macaddr[IEEE80211_ADDR_LEN],
865 struct set_qboost_params *param);
866
867QDF_STATUS (*send_mu_scan_cmd)(wmi_unified_t wmi_handle,
868 struct mu_scan_params *param);
869
870QDF_STATUS (*send_lteu_config_cmd)(wmi_unified_t wmi_handle,
871 struct lteu_config_params *param);
872
873QDF_STATUS (*send_set_ps_mode_cmd)(wmi_unified_t wmi_handle,
874 struct set_ps_mode_params *param);
875void (*save_service_bitmap)(wmi_unified_t wmi_handle,
876 void *evt_buf);
877bool (*is_service_enabled)(wmi_unified_t wmi_handle,
878 uint32_t service_id);
879QDF_STATUS (*get_target_cap_from_service_ready)(wmi_unified_t wmi_handle,
880 void *evt_buf, target_capability_info *ev);
881
882QDF_STATUS (*extract_fw_version)(wmi_unified_t wmi_handle,
883 void *ev, struct wmi_host_fw_ver *fw_ver);
884
885QDF_STATUS (*extract_fw_abi_version)(wmi_unified_t wmi_handle,
886 void *ev, struct wmi_host_fw_abi_ver *fw_ver);
887
888QDF_STATUS (*extract_hal_reg_cap)(wmi_unified_t wmi_handle, void *evt_buf,
889 TARGET_HAL_REG_CAPABILITIES *hal_reg_cap);
890
891host_mem_req * (*extract_host_mem_req)(wmi_unified_t wmi_handle,
892 void *evt_buf, uint8_t *num_entries);
893
894QDF_STATUS (*init_cmd_send)(wmi_unified_t wmi_handle,
895 target_resource_config *res_cfg,
896 uint8_t num_mem_chunks,
897 struct wmi_host_mem_chunk *mem_chunk);
898
899QDF_STATUS (*save_fw_version)(wmi_unified_t wmi_handle, void *evt_buf);
900uint32_t (*ready_extract_init_status)(wmi_unified_t wmi_hdl, void *ev);
901QDF_STATUS (*ready_extract_mac_addr)(wmi_unified_t wmi_hdl, void *ev,
902 uint8_t *macaddr);
903QDF_STATUS (*check_and_update_fw_version)(wmi_unified_t wmi_hdl, void *ev);
904uint8_t* (*extract_dbglog_data_len)(wmi_unified_t wmi_handle, void *evt_buf,
905 uint16_t *len);
906QDF_STATUS (*send_ext_resource_config)(wmi_unified_t wmi_handle,
907 wmi_host_ext_resource_config *ext_cfg);
908
909QDF_STATUS (*send_nf_dbr_dbm_info_get_cmd)(wmi_unified_t wmi_handle);
910
911QDF_STATUS (*send_packet_power_info_get_cmd)(wmi_unified_t wmi_handle,
912 struct packet_power_info_params *param);
913
914QDF_STATUS (*send_gpio_config_cmd)(wmi_unified_t wmi_handle,
915 struct gpio_config_params *param);
916
917QDF_STATUS (*send_gpio_output_cmd)(wmi_unified_t wmi_handle,
918 struct gpio_output_params *param);
919
920QDF_STATUS (*send_rtt_meas_req_test_cmd)(wmi_unified_t wmi_handle,
921 struct rtt_meas_req_test_params *param);
922
923QDF_STATUS (*send_rtt_meas_req_cmd)(wmi_unified_t wmi_handle,
924 struct rtt_meas_req_params *param);
925
926QDF_STATUS (*send_rtt_keepalive_req_cmd)(wmi_unified_t wmi_handle,
927 struct rtt_keepalive_req_params *param);
928
929QDF_STATUS (*send_lci_set_cmd)(wmi_unified_t wmi_handle,
930 struct lci_set_params *param);
931
932QDF_STATUS (*send_lcr_set_cmd)(wmi_unified_t wmi_handle,
933 struct lcr_set_params *param);
934
935QDF_STATUS (*send_periodic_chan_stats_config_cmd)(wmi_unified_t wmi_handle,
936 struct periodic_chan_stats_params *param);
937
938QDF_STATUS
939(*send_atf_peer_request_cmd)(wmi_unified_t wmi_handle,
940 struct atf_peer_request_params *param);
941
942QDF_STATUS
943(*send_set_atf_grouping_cmd)(wmi_unified_t wmi_handle,
944 struct atf_grouping_params *param);
945
946QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle,
947 void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
948
949QDF_STATUS (*extract_dcs_interference_type)(wmi_unified_t wmi_handle,
950 void *evt_buf, uint32_t *interference_type);
951
952QDF_STATUS (*extract_dcs_cw_int)(wmi_unified_t wmi_handle, void *evt_buf,
953 wmi_host_ath_dcs_cw_int *cw_int);
954
955QDF_STATUS (*extract_dcs_im_tgt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
956 wmi_host_dcs_im_tgt_stats_t *wlan_stat);
957
958QDF_STATUS (*extract_fips_event_error_status)(wmi_unified_t wmi_handle,
959 void *evt_buf, uint32_t *err_status);
960
961QDF_STATUS (*extract_fips_event_data)(wmi_unified_t wmi_handle,
962 void *evt_buf, uint32_t *data_len, uint32_t **data);
963QDF_STATUS (*extract_vdev_start_resp)(wmi_unified_t wmi_handle, void *evt_buf,
964 wmi_host_vdev_start_resp *vdev_rsp);
965
966QDF_STATUS (*extract_tbttoffset_update_params)(void *wmi_hdl, void *evt_buf,
967 uint32_t *vdev_map, uint32_t **tbttoffset_list);
968
969QDF_STATUS (*extract_mgmt_rx_params)(wmi_unified_t wmi_handle, void *evt_buf,
970 wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp);
971
972QDF_STATUS (*extract_vdev_stopped_param)(wmi_unified_t wmi_handle,
973 void *evt_buf, uint32_t *vdev_id);
974
975QDF_STATUS (*extract_vdev_roam_param)(wmi_unified_t wmi_handle, void *evt_buf,
976 wmi_host_roam_event *param);
977
978QDF_STATUS (*extract_vdev_scan_ev_param)(wmi_unified_t wmi_handle,
979 void *evt_buf, wmi_host_scan_event *param);
980
981QDF_STATUS (*extract_mu_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
982 wmi_host_mu_report_event *param);
983
984QDF_STATUS (*extract_pdev_tpc_config_ev_param)(wmi_unified_t wmi_handle,
985 void *evt_buf, wmi_host_pdev_tpc_config_event *param);
986
987QDF_STATUS (*extract_gpio_input_ev_param)(wmi_unified_t wmi_handle,
988 void *evt_buf, uint32_t *gpio_num);
989
990QDF_STATUS (*extract_pdev_reserve_ast_ev_param)(wmi_unified_t wmi_handle,
991 void *evt_buf, uint32_t *result);
992
993QDF_STATUS (*extract_nfcal_power_ev_param)(wmi_unified_t wmi_handle,
994 void *evt_buf,
995 wmi_host_pdev_nfcal_power_all_channels_event *param);
996
997QDF_STATUS (*extract_pdev_tpc_ev_param)(wmi_unified_t wmi_handle,
998 void *evt_buf, wmi_host_pdev_tpc_event *param);
999
1000QDF_STATUS (*extract_pdev_generic_buffer_ev_param)(wmi_unified_t wmi_handle,
1001 void *evt_buf, wmi_host_pdev_generic_buffer_event *param);
1002
1003QDF_STATUS (*extract_mgmt_tx_compl_param)(wmi_unified_t wmi_handle,
1004 void *evt_buf, wmi_host_mgmt_tx_compl_event *param);
1005
1006QDF_STATUS (*extract_swba_vdev_map)(wmi_unified_t wmi_handle, void *evt_buf,
1007 uint32_t *vdev_map);
1008
1009QDF_STATUS (*extract_swba_tim_info)(wmi_unified_t wmi_handle, void *evt_buf,
1010 uint32_t idx, wmi_host_tim_info *tim_info);
1011
1012QDF_STATUS (*extract_swba_noa_info)(wmi_unified_t wmi_handle, void *evt_buf,
1013 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
1014
1015QDF_STATUS (*extract_peer_sta_ps_statechange_ev)(wmi_unified_t wmi_handle,
1016 void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
1017
1018QDF_STATUS (*extract_peer_sta_kickout_ev)(wmi_unified_t wmi_handle,
1019 void *evt_buf, wmi_host_peer_sta_kickout_event *ev);
1020
1021QDF_STATUS (*extract_peer_ratecode_list_ev)(wmi_unified_t wmi_handle,
1022 void *evt_buf, uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
1023
1024QDF_STATUS (*extract_comb_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
1025 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
1026
1027QDF_STATUS (*extract_single_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
1028 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr);
1029
1030QDF_STATUS (*extract_composite_phyerr)(wmi_unified_t wmi_handle, void *evt_buf,
1031 uint16_t datalen, wmi_host_phyerr_t *phyerr);
1032
1033QDF_STATUS (*extract_rtt_hdr)(wmi_unified_t wmi_handle, void *evt_buf,
1034 wmi_host_rtt_event_hdr *ev);
1035
1036QDF_STATUS (*extract_rtt_ev)(wmi_unified_t wmi_handle, void *evt_buf,
1037 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len);
1038
1039QDF_STATUS (*extract_rtt_error_report_ev)(wmi_unified_t wmi_handle,
1040 void *evt_buf, wmi_host_rtt_error_report_event *ev);
1041
1042QDF_STATUS (*extract_all_stats_count)(wmi_unified_t wmi_handle, void *evt_buf,
1043 wmi_host_stats_event *stats_param);
1044
1045QDF_STATUS (*extract_pdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1046 uint32_t index, wmi_host_pdev_stats *pdev_stats);
1047
1048QDF_STATUS (*extract_pdev_ext_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1049 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats);
1050
1051QDF_STATUS (*extract_vdev_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1052 uint32_t index, wmi_host_vdev_stats *vdev_stats);
1053
1054QDF_STATUS (*extract_peer_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1055 uint32_t index, wmi_host_peer_stats *peer_stats);
1056
1057QDF_STATUS (*extract_bcnflt_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1058 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
1059
1060QDF_STATUS (*extract_peer_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1061 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats);
1062
1063QDF_STATUS (*extract_chan_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1064 uint32_t index, wmi_host_chan_stats *chan_stats);
1065
1066QDF_STATUS (*extract_thermal_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1067 uint32_t *temp, uint32_t *level);
1068
1069QDF_STATUS (*extract_thermal_level_stats)(wmi_unified_t wmi_handle,
1070 void *evt_buf, uint8_t idx, uint32_t *levelcount,
1071 uint32_t *dccount);
1072
1073QDF_STATUS (*extract_profile_ctx)(wmi_unified_t wmi_handle, void *evt_buf,
1074 wmi_host_wlan_profile_ctx_t *profile_ctx);
1075
1076QDF_STATUS (*extract_profile_data)(wmi_unified_t wmi_handle, void *evt_buf,
Govind Singh41da3152016-05-06 20:20:25 +05301077 uint8_t idx,
1078 wmi_host_wlan_profile_t *profile_data);
Govind Singh89727882016-04-15 13:58:27 +05301079
1080QDF_STATUS (*extract_chan_info_event)(wmi_unified_t wmi_handle, void *evt_buf,
1081 wmi_host_chan_info_event *chan_info);
1082
1083QDF_STATUS (*extract_channel_hopping_event)(wmi_unified_t wmi_handle,
1084 void *evt_buf,
1085 wmi_host_pdev_channel_hopping_event *ch_hopping);
1086
1087QDF_STATUS (*extract_bss_chan_info_event)(wmi_unified_t wmi_handle,
1088 void *evt_buf,
1089 wmi_host_pdev_bss_chan_info_event *bss_chan_info);
1090
1091QDF_STATUS (*extract_inst_rssi_stats_event)(wmi_unified_t wmi_handle,
1092 void *evt_buf, wmi_host_inst_stats_resp *inst_rssi_resp);
1093
1094QDF_STATUS (*extract_tx_data_traffic_ctrl_ev)(wmi_unified_t wmi_handle,
1095 void *evt_buf, wmi_host_tx_data_traffic_ctrl_event *ev);
1096
1097QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
1098 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
Govind Singhc10bde82016-05-02 17:59:24 +05301099
1100QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle,
1101 struct wmi_power_dbg_params *param);
Gupta, Kapil7b768002016-04-25 19:14:19 +05301102
1103QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle,
1104 struct wmi_adaptive_dwelltime_params *dwelltime_params);
Govind Singh89727882016-04-15 13:58:27 +05301105};
1106
1107struct target_abi_version {
1108 A_UINT32 abi_version_0;
1109 /** WMI Major and Minor versions */
1110 A_UINT32 abi_version_1;
1111 /** WMI change revision */
1112 A_UINT32 abi_version_ns_0;
1113 /** ABI version namespace first four dwords */
1114 A_UINT32 abi_version_ns_1;
1115 /** ABI version namespace second four dwords */
1116 A_UINT32 abi_version_ns_2;
1117 /** ABI version namespace third four dwords */
1118 A_UINT32 abi_version_ns_3;
1119 /** ABI version namespace fourth four dwords */
Govind Singh2ae94372016-03-07 16:45:38 +05301120};
1121
Govind Singh229bc0d2016-03-07 15:33:31 +05301122/**
1123 * struct wmi_init_cmd - Saved wmi INIT command
1124 * @buf: Buffer containing the wmi INIT command
1125 * @buf_len: Length of the buffer
1126 */
Govind Singhec0bdef2016-03-16 16:27:50 +05301127struct wmi_cmd_init {
Govind Singh229bc0d2016-03-07 15:33:31 +05301128 wmi_buf_t buf;
1129 uint32_t buf_len;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301130};
1131
Govind Singhd475ea92016-03-06 19:55:02 +05301132struct wmi_unified {
Govind Singh89727882016-04-15 13:58:27 +05301133 void *scn_handle; /* handle to device */
Govind Singh6ad6ada2016-02-04 18:42:30 +05301134 osdev_t osdev; /* handle to use OS-independent services */
Govind Singhd7468a52016-03-09 14:32:57 +05301135 qdf_atomic_t pending_cmds;
Govind Singhd475ea92016-03-06 19:55:02 +05301136 HTC_ENDPOINT_ID wmi_endpoint_id;
1137 uint16_t max_msg_len;
1138 WMI_EVT_ID event_id[WMI_UNIFIED_MAX_EVENT];
1139 wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT];
Govind Singh4ec6ff92016-03-09 12:03:29 +05301140 enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT];
Govind Singhd475ea92016-03-06 19:55:02 +05301141 uint32_t max_event_idx;
1142 void *htc_handle;
Govind Singhd7468a52016-03-09 14:32:57 +05301143 qdf_spinlock_t eventq_lock;
1144 qdf_nbuf_queue_t event_queue;
Govind Singhd475ea92016-03-06 19:55:02 +05301145 struct work_struct rx_event_work;
Govind Singh6ad6ada2016-02-04 18:42:30 +05301146 int wmi_stop_in_progress;
Govind Singh89727882016-04-15 13:58:27 +05301147#ifndef WMI_NON_TLV_SUPPORT
Govind Singh229bc0d2016-03-07 15:33:31 +05301148 struct _wmi_abi_version fw_abi_version;
1149 struct _wmi_abi_version final_abi_vers;
Govind Singh89727882016-04-15 13:58:27 +05301150#endif
Govind Singhec0bdef2016-03-16 16:27:50 +05301151 struct wmi_cmd_init saved_wmi_init_cmd;
Govind Singh229bc0d2016-03-07 15:33:31 +05301152 uint32_t num_of_diag_events_logs;
1153 uint32_t *events_logs_list;
1154 struct host_offload_req_param arp_info;
Govind Singhd475ea92016-03-06 19:55:02 +05301155#ifdef WLAN_OPEN_SOURCE
1156 struct fwdebug dbglog;
1157 struct dentry *debugfs_phy;
1158#endif /* WLAN_OPEN_SOURCE */
1159
1160#ifdef WMI_INTERFACE_EVENT_LOGGING
Govind Singh5fed03b2016-05-12 12:45:51 +05301161 struct wmi_debug_log_info log_info;
Govind Singhd475ea92016-03-06 19:55:02 +05301162#endif /*WMI_INTERFACE_EVENT_LOGGING */
1163
Govind Singhd7468a52016-03-09 14:32:57 +05301164 qdf_atomic_t is_target_suspended;
Govind Singhd475ea92016-03-06 19:55:02 +05301165
1166#ifdef FEATURE_RUNTIME_PM
Govind Singhd7468a52016-03-09 14:32:57 +05301167 qdf_atomic_t runtime_pm_inprogress;
Govind Singhd475ea92016-03-06 19:55:02 +05301168#endif
1169
Govind Singh89727882016-04-15 13:58:27 +05301170 enum wmi_target_type target_type;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301171 struct wmi_rx_ops rx_ops;
1172 struct wmi_ops *ops;
Govind Singh6ad6ada2016-02-04 18:42:30 +05301173 bool use_cookie;
Govind Singh89727882016-04-15 13:58:27 +05301174 bool wmi_stopinprogress;
Govind Singhf06948c2016-03-12 09:26:52 +05301175 qdf_spinlock_t ctx_lock;
Govind Singh89727882016-04-15 13:58:27 +05301176#ifdef WMI_TLV_AND_NON_TLV_SUPPORT
1177 /* WMI service bitmap recieved from target */
1178 uint32_t wmi_service_bitmap[wmi_services_max];
1179 uint32_t wmi_events[wmi_events_max];
1180 uint32_t pdev_param[wmi_pdev_param_max];
1181 uint32_t vdev_param[wmi_vdev_param_max];
1182 uint32_t services[wmi_services_max];
1183#endif
Govind Singhd475ea92016-03-06 19:55:02 +05301184};
Govind Singh89727882016-04-15 13:58:27 +05301185#ifdef WMI_NON_TLV_SUPPORT
1186#define wmi_tlv_attach(x) qdf_print("TLV Unavailable\n")
1187#else
1188void wmi_tlv_attach(wmi_unified_t wmi_handle);
1189#endif
1190void wmi_non_tlv_attach(wmi_unified_t wmi_handle);
Govind Singh53c7ac82016-03-28 22:02:42 +05301191
1192/**
1193 * wmi_align() - provides word aligned parameter
1194 * @param: parameter to be aligned
1195 *
1196 * Return: word aligned parameter
1197 */
1198static inline uint32_t wmi_align(uint32_t param)
1199{
1200 return roundup(param, sizeof(uint32_t));
1201}
Govind Singhd475ea92016-03-06 19:55:02 +05301202#endif