blob: fa8e81f4372f052dcf3529b0fa9edaffb5f70147 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Rajeev Kumar416b73f2017-01-21 16:45:21 -08002 * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
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#ifndef WMA_INTERNAL_H
29#define WMA_INTERNAL_H
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -080030#include <cdp_txrx_handle.h>
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -070031#if !defined(REMOVE_PKT_LOG)
32#include "pktlog_ac.h"
33#endif
34
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080035/* ################### defines ################### */
36/*
37 * TODO: Following constant should be shared by firwmare in
38 * wmi_unified.h. This will be done once wmi_unified.h is updated.
39 */
40#define WMI_PEER_STATE_AUTHORIZED 0x2
41
42#define WMA_2_4_GHZ_MAX_FREQ 3000
43#define WOW_CSA_EVENT_OFFSET 12
44
45#define WMA_DEFAULT_SCAN_REQUESTER_ID 1
46#define WMI_SCAN_FINISH_EVENTS (WMI_SCAN_EVENT_START_FAILED | \
47 WMI_SCAN_EVENT_COMPLETED | \
48 WMI_SCAN_EVENT_DEQUEUED)
49/* default value */
50#define DEFAULT_INFRA_STA_KEEP_ALIVE_PERIOD 20
mukul sharma72c8b222015-09-04 17:02:01 +053051#define DEFAULT_STA_SA_QUERY_MAX_RETRIES_COUNT (5)
52#define DEFAULT_STA_SA_QUERY_RETRY_INTERVAL (200)
53
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080054/* pdev vdev and peer stats*/
55#define FW_PDEV_STATS_SET 0x1
56#define FW_VDEV_STATS_SET 0x2
57#define FW_PEER_STATS_SET 0x4
Himanshu Agarwal37e42412016-07-21 14:35:09 +053058#define FW_RSSI_PER_CHAIN_STATS_SET 0x8
59#define FW_STATS_SET 0xf
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080060
61/*AR9888/AR6320 noise floor approx value
62 * similar to the mentioned the WMA
63 */
64#define WMA_TGT_NOISE_FLOOR_DBM (-96)
Himanshu Agarwal37e42412016-07-21 14:35:09 +053065#define WMA_TGT_RSSI_INVALID 96
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080066
67/*
68 * Make sure that link monitor and keep alive
69 * default values should be in sync with CFG.
70 */
71#define WMA_LINK_MONITOR_DEFAULT_TIME_SECS 10
72#define WMA_KEEP_ALIVE_DEFAULT_TIME_SECS 5
73
74#define AGC_DUMP 1
75#define CHAN_DUMP 2
76#define WD_DUMP 3
77#ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG
78#define PCIE_DUMP 4
79#endif
80
81/* conformance test limits */
82#define FCC 0x10
83#define MKK 0x40
84#define ETSI 0x30
85
Rakesh Sunki8641f8a2015-12-10 15:11:19 -080086/* Maximum Buffer length allowed for DFS-2 phyerrors */
87#define DFS_MAX_BUF_LENGTH 4096
88
89/*
90 * Maximum Buffer length allowed for DFS-3 phyerrors
91 * When 160MHz is supported the Max length of phyerrors
92 * is larger than the legacy phyerrors.
93 */
94#define DFS3_MAX_BUF_LENGTH 4436
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080095
96#define WMI_DEFAULT_NOISE_FLOOR_DBM (-96)
97
98#define WMI_MCC_MIN_CHANNEL_QUOTA 20
99#define WMI_MCC_MAX_CHANNEL_QUOTA 80
100#define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
101
102/* The maximum number of patterns that can be transmitted by the firmware
103 * and maximum patterns size.
104 */
105#define WMA_MAXNUM_PERIODIC_TX_PTRNS 6
106
107#define WMI_MAX_HOST_CREDITS 2
108#define WMI_WOW_REQUIRED_CREDITS 1
109
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800110#define WMI_MAX_MHF_ENTRIES 32
111
112
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800113#define MAX_HT_MCS_IDX 8
114#define MAX_VHT_MCS_IDX 10
115#define INVALID_MCS_IDX 255
116
117#define LINK_STATUS_LEGACY 0
118#define LINK_STATUS_VHT 0x1
119#define LINK_STATUS_MIMO 0x2
120#define LINK_SUPPORT_VHT 0x4
121#define LINK_SUPPORT_MIMO 0x8
122
123#define LINK_RATE_VHT 0x3
124
125#define MAX_ENTRY_HOLD_REQ_QUEUE 2
Krishna Kumaar Natarajana5c53bd2015-10-27 11:48:27 -0700126#define MAX_ENTRY_VDEV_RESP_QUEUE 10
127
Krishna Kumaar Natarajanb7f9a352016-03-18 11:40:07 -0700128/* Time(in ms) to detect DOS attack */
129#define WMA_MGMT_FRAME_DETECT_DOS_TIMER 1000
130
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800131/**
132 * struct index_data_rate_type - non vht data rate type
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800133 * @mcs_index: mcs rate index
134 * @ht20_rate: HT20 supported rate table
135 * @ht40_rate: HT40 supported rate table
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800136 */
137struct index_data_rate_type {
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800138 uint8_t mcs_index;
139 uint16_t ht20_rate[2];
140 uint16_t ht40_rate[2];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800141};
142
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800143/**
144 * struct index_vht_data_rate_type - vht data rate type
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800145 * @mcs_index: mcs rate index
146 * @ht20_rate: VHT20 supported rate table
147 * @ht40_rate: VHT40 supported rate table
148 * @ht80_rate: VHT80 supported rate table
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800149 */
150struct index_vht_data_rate_type {
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800151 uint8_t mcs_index;
152 uint16_t ht20_rate[2];
153 uint16_t ht40_rate[2];
154 uint16_t ht80_rate[2];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800155};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800156
157/*
158 * wma_main.c functions declarations
159 */
160
161int
162wmi_unified_pdev_set_param(wmi_unified_t wmi_handle, WMI_PDEV_PARAM param_id,
163 uint32_t param_value);
164
165void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
166 void *body_ptr, uint32_t body_val);
167
168void wma_data_tx_ack_comp_hdlr(void *wma_context,
Nirav Shahcbc6d722016-03-01 16:24:53 +0530169 qdf_nbuf_t netbuf, int32_t status);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800170
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530171QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800172 int value);
173
174/*
175 * wma_scan_roam.c functions declarations
176 */
177
178#ifdef WLAN_FEATURE_ROAM_OFFLOAD
179void wma_process_roam_invoke(WMA_HANDLE handle,
180 struct wma_roam_invoke_cmd *roaminvoke);
181
182void wma_process_roam_synch_fail(WMA_HANDLE handle,
183 struct roam_offload_synch_fail *synch_fail);
184
185int wma_roam_synch_event_handler(void *handle, uint8_t *event,
186 uint32_t len);
187#endif
188
Kapil Gupta5cda2252016-12-29 18:44:26 +0530189/**
190 * wma_update_per_roam_config() -per roam config parameter updation to FW
191 * @handle: wma handle
192 * @req_buf: per roam config parameters
193 *
194 * Return: none
195 */
196void wma_update_per_roam_config(WMA_HANDLE handle,
197 struct wmi_per_roam_config_req *req_buf);
198
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530199QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800200 tSirScanOffloadReq *scan_req,
Sandeep Puligilla1fcdb772017-02-22 21:14:59 -0800201 struct scan_req_params *cmd);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800202
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530203QDF_STATUS wma_get_buf_stop_scan_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800204 wmi_buf_t *buf,
205 int *buf_len,
206 tAbortScanParams *abort_scan_req);
207
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530208QDF_STATUS wma_start_scan(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800209 tSirScanOffloadReq *scan_req, uint16_t msg_type);
210
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530211QDF_STATUS wma_stop_scan(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800212 tAbortScanParams *abort_scan_req);
213
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530214QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800215 tSirUpdateChanList *chan_list);
216
217#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530218QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
Himanshu Agarwalb56ad2e2016-07-19 15:43:09 +0530219 roam_offload_param *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800220 roam_offload_params,
221 tSirRoamOffloadScanReq *roam_req);
222#endif
223
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530224QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800225 wmi_start_scan_cmd_fixed_param *
226 scan_cmd_fp,
227 tSirRoamOffloadScanReq *roam_req,
228 uint32_t mode, uint32_t vdev_id);
229
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530230QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800231 tSirRoamOffloadScanReq *roam_req);
232
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530233QDF_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800234 uint32_t scan_period,
235 uint32_t scan_age,
236 uint32_t vdev_id);
237
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530238QDF_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800239 uint32_t vdev_id,
240 int32_t rssi_change_thresh,
241 uint32_t bcn_rssi_weight,
242 uint32_t hirssi_delay_btw_scans);
243
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530244QDF_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800245 uint8_t chan_count,
246 uint8_t *chan_list,
247 uint8_t list_type, uint32_t vdev_id);
248
249A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype,
250 eCsrEncryptionType encr);
251
252A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr);
253
254void wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle,
255 tpAniSirGlobal pMac,
256 tSirRoamOffloadScanReq *roam_req,
257 wmi_ap_profile *ap_profile_p);
258
259void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
260 tpAniSirGlobal pMac,
261 tSirRoamOffloadScanReq *roam_req,
262 wmi_start_scan_cmd_fixed_param *
263 scan_params);
264
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530265QDF_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800266 wmi_ap_profile *ap_profile_p,
267 uint32_t vdev_id);
268
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530269QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800270 A_INT32 first_bcnt,
271 A_UINT32 final_bcnt, uint32_t vdev_id);
272
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530273QDF_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800274 uint32_t command, uint32_t vdev_id);
275
Varun Reddy Yeturu30bc42c2016-02-04 10:07:30 -0800276QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800277 tSirRoamOffloadScanReq *roam_req);
278
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530279QDF_STATUS wma_roam_preauth_chan_set(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800280 tpSwitchChannelParams params,
281 uint8_t vdev_id);
282
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530283QDF_STATUS wma_roam_preauth_chan_cancel(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800284 tpSwitchChannelParams params,
285 uint8_t vdev_id);
286
287void wma_roam_preauth_scan_event_handler(tp_wma_handle wma_handle,
288 uint8_t vdev_id,
289 wmi_scan_event_fixed_param *
290 wmi_event);
291
292void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params);
293
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800294#ifdef WLAN_FEATURE_ROAM_OFFLOAD
295void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts);
296#endif
297
298#ifdef FEATURE_WLAN_EXTSCAN
299
300int wma_extscan_start_stop_event_handler(void *handle,
301 uint8_t *cmd_param_info,
302 uint32_t len);
303
304int wma_extscan_operations_event_handler(void *handle,
305 uint8_t *cmd_param_info,
306 uint32_t len);
307
308int wma_extscan_table_usage_event_handler(void *handle,
309 uint8_t *cmd_param_info,
310 uint32_t len);
311
312int wma_extscan_capabilities_event_handler(void *handle,
313 uint8_t *cmd_param_info,
314 uint32_t len);
315
316int wma_extscan_hotlist_match_event_handler(void *handle,
317 uint8_t *cmd_param_info,
318 uint32_t len);
319
320int wma_extscan_cached_results_event_handler(void *handle,
321 uint8_t *cmd_param_info,
322 uint32_t len);
323
324int wma_extscan_change_results_event_handler(void *handle,
325 uint8_t *cmd_param_info,
326 uint32_t len);
327
328int wma_passpoint_match_event_handler(void *handle,
329 uint8_t *cmd_param_info,
330 uint32_t len);
331
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800332#endif
333
334void wma_register_extscan_event_handler(tp_wma_handle wma_handle);
335
336#ifdef FEATURE_WLAN_EXTSCAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530337QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800338 tSirWifiScanCmdReqParams *pstart,
339 wmi_buf_t *buf, int *buf_len);
340
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530341QDF_STATUS wma_start_extscan(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800342 tSirWifiScanCmdReqParams *pstart);
343
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530344QDF_STATUS wma_stop_extscan(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800345 tSirExtScanStopReqParams *pstopcmd);
346
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530347QDF_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800348 tSirExtScanSetBssidHotListReqParams *
349 photlist, int *buf_len);
350
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530351QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800352 tSirExtScanSetBssidHotListReqParams
353 *photlist);
354
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530355QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800356 tSirExtScanResetBssidHotlistReqParams
357 *photlist_reset);
358
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530359QDF_STATUS wma_get_buf_extscan_change_monitor_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800360 tSirExtScanSetSigChangeReqParams
361 *psigchange, wmi_buf_t *buf,
362 int *buf_len);
363
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530364QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800365 tSirExtScanSetSigChangeReqParams *
366 psigchange);
367
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530368QDF_STATUS wma_extscan_stop_change_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800369 tSirExtScanResetSignificantChangeReqParams
370 *pResetReq);
371
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530372QDF_STATUS wma_extscan_get_cached_results(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800373 tSirExtScanGetCachedResultsReqParams *
374 pcached_results);
375
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530376QDF_STATUS wma_extscan_get_capabilities(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800377 tSirGetExtScanCapabilitiesReqParams *
378 pgetcapab);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530379QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800380 struct wifi_epno_params *req);
381
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530382QDF_STATUS wma_set_passpoint_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800383 struct wifi_passpoint_req *req);
384
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530385QDF_STATUS wma_reset_passpoint_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800386 struct wifi_passpoint_req *req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800387#endif
388
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530389QDF_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800390 struct sir_ipa_offload_enable_disable *ipa_offload);
391
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800392void wma_process_unit_test_cmd(WMA_HANDLE handle,
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530393 t_wma_unit_test_cmd * wma_utest);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800394
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530395QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800396
397int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data, uint32_t len);
398
399void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id);
400
401int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
402 uint32_t len);
403
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800404#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800405void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id);
406static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
407 uint8_t vdev_id)
408{
409 return wma->interfaces[vdev_id].roam_synch_in_progress;
410}
411#else
412static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
413 uint8_t vdev_id)
414{
415 return false;
416}
Varun Reddy Yeturu101f9542016-05-24 10:07:52 -0700417static inline uint32_t wma_roam_scan_get_cckm_mode(
418 struct sSirRoamOffloadScanReq *roam_req, uint32_t auth_mode)
419{
420 return WMI_AUTH_CCKM;
421}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800422#endif
423
424/*
425 * wma_dev_if.c functions declarations
426 */
427
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800428struct cdp_vdev *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800429 uint8_t *vdev_id);
430
431/**
432 * wma_find_vdev_by_id() - Returns vdev handle for given vdev id.
433 * @wma - wma handle
434 * @vdev_id - vdev ID
435 *
436 * Return: Returns vdev handle if given vdev id is valid.
437 * Otherwise returns NULL.
438 */
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800439static inline
440struct cdp_vdev *wma_find_vdev_by_id(tp_wma_handle wma, uint8_t vdev_id)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800441{
442 if (vdev_id > wma->max_bssid)
443 return NULL;
444
445 return wma->interfaces[vdev_id].handle;
446}
447
448/**
449 * wma_get_vdev_count() - Returns number of active vdev.
450 * @wma - wma handle
451 *
452 * Return: Returns valid vdev count.
453 */
454static inline uint8_t wma_get_vdev_count(tp_wma_handle wma)
455{
456 uint8_t vdev_count = 0, i;
457
458 for (i = 0; i < wma->max_bssid; i++) {
459 if (wma->interfaces[i].handle)
460 vdev_count++;
461 }
462 return vdev_count;
463}
464
465bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id);
466
467#ifdef QCA_IBSS_SUPPORT
468bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id);
Houston Hoffman79b4af22015-10-06 12:01:08 -0700469#else
470/**
471 * wma_is_vdev_in_ibss_mode(): dummy function
472 * @wma: wma handle
473 * @vdev_id: vdev id
474 *
475 * Return false since no vdev can be in ibss mode without ibss support
476 */
477static inline
Mahesh Kumar Kalikot Veetil32e4fc72016-09-09 17:05:22 -0700478bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id)
Houston Hoffman79b4af22015-10-06 12:01:08 -0700479{
480 return false;
481}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800482#endif
483
484/**
Houston Hoffman79b4af22015-10-06 12:01:08 -0700485 * wma_is_vdev_in_beaconning_mode() - check if vdev is in a beaconning mode
486 * @wma: wma handle
487 * @vdev_id: vdev id
488 *
489 * Helper function to know whether given vdev id
490 * is in a beaconning mode or not.
491 *
492 * Return: True if vdev needs to beacon.
493 */
494static inline
495bool wma_is_vdev_in_beaconning_mode(tp_wma_handle wma, uint8_t vdev_id)
496{
497 return wma_is_vdev_in_ap_mode(wma, vdev_id) ||
498 wma_is_vdev_in_ibss_mode(wma, vdev_id);
499}
500
501/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800502 * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID
503 * @wma - wma handle
504 * @vdev_id - vdev ID
505 *
506 * Return: Returns pointer to bssid on success,
507 * otherwise returns NULL.
508 */
509static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma,
510 uint8_t vdev_id)
511{
512 if (vdev_id >= wma->max_bssid)
513 return NULL;
514
515 return wma->interfaces[vdev_id].bssid;
516}
517
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800518struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800519 uint8_t *vdev_id);
520
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530521QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800522 struct del_sta_self_params *pdel_sta_self_req_param,
523 uint8_t generateRsp);
524
525int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
526 uint32_t len);
527
Govind Singhd76a5b02016-03-08 15:12:14 +0530528QDF_STATUS wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800529 uint32_t param_id, uint32_t param_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800530void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
Leo Chang96464902016-10-28 11:10:54 -0700531 uint8_t vdev_id, void *peer,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800532 bool roam_synch_in_progress);
533
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800534QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
535 struct cdp_vdev *vdev,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800536 u8 peer_addr[IEEE80211_ADDR_LEN],
537 uint32_t peer_type, uint8_t vdev_id,
538 bool roam_synch_in_progress);
539
540int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
541 u32 len);
542
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800543struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800544 struct add_sta_self_params *self_sta_req,
545 uint8_t generateRsp);
546
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530547QDF_STATUS wma_vdev_start(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800548 struct wma_vdev_start_req *req, bool isRestart);
549
550void wma_vdev_resp_timer(void *data);
551
552struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma,
553 uint8_t vdev_id,
554 uint32_t msg_type, uint8_t type,
555 void *params, uint32_t timeout);
556
557void wma_hold_req_timer(void *data);
558struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
559 uint8_t vdev_id, uint32_t msg_type,
560 uint8_t type, void *params,
561 uint32_t timeout);
562
563void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id,
564 uint8_t type);
565
566void wma_add_bss(tp_wma_handle wma, tpAddBssParams params);
567
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800568void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta);
569
570void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta);
571
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800572void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params);
573
574int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type);
575
576void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle,
577 tpDisableIntraBssFwd pdis_intra_fwd);
578
Deepak Dhamdhere2dae1bd2016-10-27 10:58:29 -0700579void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params);
580
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800581/*
582 * wma_mgmt.c functions declarations
583 */
584
585int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len);
586
587int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len);
588
589void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
590
591int wma_unified_bcntx_status_event_handler(void *handle,
592 uint8_t *cmd_param_info,
593 uint32_t len);
594
mukul sharma72c8b222015-09-04 17:02:01 +0530595void wma_set_sta_sa_query_param(tp_wma_handle wma,
596 uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800597
598void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
599 uint32_t method, uint32_t timeperiod,
600 uint8_t *hostv4addr, uint8_t *destv4addr,
601 uint8_t *destmac);
602
603int wma_vdev_install_key_complete_event_handler(void *handle,
604 uint8_t *event,
605 uint32_t len);
606
Govind Singhb30d4c02016-03-24 11:01:23 +0530607QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800608 tSirNwType nw_type,
609 tpAddStaParams params);
610
Himanshu Agarwal009f1572016-03-09 17:26:02 +0530611QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle,
612 uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800613 gtx_config_t *gtx_info);
614
615void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id,
616 uint8_t llbcoexist);
617
618void wma_process_update_beacon_params(tp_wma_handle wma,
619 tUpdateBeaconParams *bcn_params);
620
Rajeev Kumar416b73f2017-01-21 16:45:21 -0800621void wma_update_cfg_params(tp_wma_handle wma, struct scheduler_msg *cfgParam);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800622
623void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info);
624
625void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
626 uint8_t vdev_id,
627 int8_t peer_num_delta);
628
629void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info);
630
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530631QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800632 tEdcaParams *edca_params);
633
634int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event,
635 uint32_t len);
636
637void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
638 tpSendProbeRespParams probe_rsp_info);
639
640void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info);
641
642void wma_set_keepalive_req(tp_wma_handle wma,
643 tSirKeepAliveReq *keepalive);
644
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +0530645void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id,
646 int32_t rssi);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800647
648void wma_process_update_opmode(tp_wma_handle wma_handle,
649 tUpdateVHTOpMode *update_vht_opmode);
650
651void wma_process_update_rx_nss(tp_wma_handle wma_handle,
652 tUpdateRxNss *update_rx_nss);
653
654void wma_process_update_membership(tp_wma_handle wma_handle,
655 tUpdateMembership *membership);
656
657void wma_process_update_userpos(tp_wma_handle wma_handle,
658 tUpdateUserPos *userpos);
659
660void wma_hidden_ssid_vdev_restart(tp_wma_handle wma_handle,
661 tHalHiddenSsidVdevRestart *pReq);
662
663/*
664 * wma_power.c functions declarations
665 */
666
667void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req);
668
Govind Singhd76a5b02016-03-08 15:12:14 +0530669QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800670 uint32_t vdev_id, uint32_t param,
671 uint32_t value);
672
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530673QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800674wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id);
675
Govind Singhd76a5b02016-03-08 15:12:14 +0530676QDF_STATUS wma_set_ap_peer_uapsd(tp_wma_handle wma, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800677 uint8_t *peer_addr, uint8_t uapsd_value,
678 uint8_t max_sp);
679
680void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param,
681 wmi_wmm_vparams *wmm_param, int ac);
682
683void wma_set_tx_power(WMA_HANDLE handle,
684 tMaxTxPowerParams *tx_pwr_params);
685
686void wma_set_max_tx_power(WMA_HANDLE handle,
687 tMaxTxPowerParams *tx_pwr_params);
688
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800689void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req);
690
691void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req);
692
693void wma_disable_uapsd_mode(tp_wma_handle wma,
694 tpDisableUapsdParams ps_req);
695
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530696QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800697
698int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
699 uint32_t len);
700
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530701QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800702 tSirTxPowerLimit *ptxlim);
703
704void wma_update_noa(struct beacon_info *beacon,
705 struct p2p_sub_element_noa *noa_ie);
706
707void wma_update_probe_resp_noa(tp_wma_handle wma_handle,
708 struct p2p_sub_element_noa *noa_ie);
709
710int wma_p2p_noa_event_handler(void *handle, uint8_t *event,
711 uint32_t len);
712
713void wma_process_set_p2pgo_noa_req(tp_wma_handle wma,
714 tP2pPsParams *ps_params);
715
716void wma_process_set_mimops_req(tp_wma_handle wma_handle,
717 tSetMIMOPS *mimops);
718
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530719QDF_STATUS wma_set_mimops(tp_wma_handle wma, uint8_t vdev_id, int value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800720
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530721QDF_STATUS wma_notify_modem_power_state(void *wma_ptr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800722 tSirModemPowerStateInd *pReq);
723
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530724QDF_STATUS wma_set_smps_params(tp_wma_handle wma, uint8_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800725 int value);
726
727void wma_set_suspend_dtim(tp_wma_handle wma);
728
729void wma_set_resume_dtim(tp_wma_handle wma);
730
731/*
732 * wma_data.c functions declarations
733 */
734
735
736void wma_set_bss_rate_flags(struct wma_txrx_node *iface,
737 tpAddBssParams add_bss);
738
739int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params);
740
741void wma_update_txrx_chainmask(int num_rf_chains, int *cmd_value);
742
743int wma_peer_state_change_event_handler(void *handle,
744 uint8_t *event_buff,
745 uint32_t len);
746
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530747QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800748 mcc_adaptive_scheduler);
749
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530750QDF_STATUS wma_set_mcc_channel_time_latency
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800751 (tp_wma_handle wma,
752 uint32_t mcc_channel, uint32_t mcc_channel_time_latency);
753
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530754QDF_STATUS wma_set_mcc_channel_time_quota
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800755 (tp_wma_handle wma,
756 uint32_t adapter_1_chan_number,
757 uint32_t adapter_1_quota, uint32_t adapter_2_chan_number);
758
759void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params);
760
761void wma_unpause_vdev(tp_wma_handle wma);
762
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530763QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800764 tSirRateUpdateInd *
765 pRateUpdateParams);
766
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530767QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800768
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530769QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800770
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530771#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \
772 defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT)
773
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800774int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
775 uint32_t len);
776#endif
777
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530778#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
779QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
780 struct t_bad_peer_txtcl_config *config);
Mohit Khanna0fe61672016-05-19 16:53:39 -0700781#else
782static inline QDF_STATUS
783wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
784 struct t_bad_peer_txtcl_config *config)
785{
786 return QDF_STATUS_E_FAILURE;
787}
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530788#endif
789
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530790QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800791 t_thermal_mgmt *pThermalParams);
792
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530793QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800794 uint8_t thermal_level);
795
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530796QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800797 t_thermal_cmd_params thermal_info);
798
799int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event,
800 uint32_t len);
801
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800802int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
803 uint32_t len);
804
805int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
806 uint32_t len);
807
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800808/*
809 * wma_utils.c functions declarations
810 */
811
812#ifdef WLAN_FEATURE_STATS_EXT
813int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf,
814 uint32_t len);
815#endif
816
817tSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode);
Archana Ramachandran20d2e232016-02-11 16:58:40 -0800818int wma_smps_mode_to_force_mode_param(uint8_t smps_mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800819
820#ifdef WLAN_FEATURE_LINK_LAYER_STATS
821void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle);
822
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530823QDF_STATUS wma_process_ll_stats_clear_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800824 (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq);
825
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530826QDF_STATUS wma_process_ll_stats_set_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800827 (tp_wma_handle wma, const tpSirLLStatsSetReq setReq);
828
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530829QDF_STATUS wma_process_ll_stats_get_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800830 (tp_wma_handle wma, const tpSirLLStatsGetReq getReq) ;
831
832int wma_unified_link_iface_stats_event_handler(void *handle,
833 uint8_t *cmd_param_info,
834 uint32_t len);
835#endif
836
837void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus,
838 uint8_t link_status);
839
840int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
841 uint32_t len);
842
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +0530843/**
844 * wma_rso_cmd_status_event_handler() - RSO Command status event handler
845 * @wmi_event: WMI event
846 *
847 * This function is used to send RSO command status to upper layer
848 *
849 * Return: 0 for success
850 */
851int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event);
852
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800853int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
854 uint32_t len);
855
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530856QDF_STATUS wma_send_link_speed(uint32_t link_speed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800857
858int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info,
859 uint32_t len);
860
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530861QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800862
863int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
864 uint32_t len);
865
866bool wma_is_sap_active(tp_wma_handle wma_handle);
867
868bool wma_is_p2p_go_active(tp_wma_handle wma_handle);
869
870bool wma_is_p2p_cli_active(tp_wma_handle wma_handle);
871
872bool wma_is_sta_active(tp_wma_handle wma_handle);
873
874WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type,
875 uint8_t is_ht, uint8_t ch_width,
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800876 uint8_t is_vht, bool is_he);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800877
878int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle,
879 uint8_t vdev_id, uint32_t value);
880
881int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
882 uint8_t vdev_id, uint32_t value);
883
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800884void wma_get_stats_req(WMA_HANDLE handle,
885 tAniGetPEStatsReq *get_stats_param);
886
887#if defined(QCA_WIFI_FTM)
888void wma_utf_detach(tp_wma_handle wma_handle);
889
890void wma_utf_attach(tp_wma_handle wma_handle);
891
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530892QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800893wma_process_ftm_command(tp_wma_handle wma_handle,
894 struct ar6k_testmode_cmd_data *msg_buffer);
895#endif
896
897/*
898 * wma_features.c functions declarations
899 */
900
901void wma_process_link_status_req(tp_wma_handle wma,
902 tAniGetLinkStatus *pGetLinkStatus);
903
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530904QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800905 tAniDHCPInd *ta_dhcp_ind);
906
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530907QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800908
Govind Singha471e5e2015-10-12 17:11:14 +0530909int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf,
910 uint32_t len);
911
Govind Singhf25a0f12016-03-08 16:09:48 +0530912QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle,
Govind Singha471e5e2015-10-12 17:11:14 +0530913 uint32_t cmd, uint32_t value1, uint32_t value2);
914
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800915void wma_wow_tx_complete(void *wma);
916
917int wmi_unified_nat_keepalive_enable(tp_wma_handle wma, uint8_t vdev_id);
918
Govind Singhd76a5b02016-03-08 15:12:14 +0530919int wma_unified_csa_offload_enable(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800920
921#ifdef WLAN_FEATURE_NAN
922int wma_nan_rsp_event_handler(void *handle, uint8_t *event_buf, uint32_t len);
923#endif
924
925#ifdef FEATURE_WLAN_TDLS
926int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len);
927#endif
928
929int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len);
930
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800931#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajan4e9cf392015-11-20 13:35:05 -0800932int wma_oem_data_response_handler(void *handle, uint8_t *datap,
933 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800934#endif
935
936void wma_register_dfs_event_handler(tp_wma_handle wma_handle);
937
938int
939wma_unified_dfs_phyerr_filter_offload_enable(tp_wma_handle wma_handle);
940
941#if !defined(REMOVE_PKT_LOG)
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530942QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800943 struct ath_pktlog_wmi_params *params);
944#endif
945
946int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
947 uint32_t len);
948int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len);
949
Anurag Chouhan6d760662016-02-20 16:05:43 +0530950QDF_STATUS wma_resume_req(tp_wma_handle wma, enum qdf_suspend_type type);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800951
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530952QDF_STATUS wma_wow_add_pattern(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800953 struct wow_add_pattern *ptrn);
954
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530955QDF_STATUS wma_wow_delete_user_pattern(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800956 struct wow_delete_pattern *pattern);
957
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530958QDF_STATUS wma_wow_enter(tp_wma_handle wma, tpSirHalWowlEnterParams info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800959
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530960QDF_STATUS wma_wow_exit(tp_wma_handle wma, tpSirHalWowlExitParams info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800961
Anurag Chouhan6d760662016-02-20 16:05:43 +0530962QDF_STATUS wma_suspend_req(tp_wma_handle wma, enum qdf_suspend_type type);
Mukul Sharma4c60a7e2017-03-06 19:42:18 +0530963
Houston Hoffmana76591b2015-11-10 16:52:05 -0800964void wma_calculate_and_update_conn_state(tp_wma_handle wma);
965void wma_update_conn_state(tp_wma_handle wma, uint32_t conn_mask);
Houston Hoffman7260ecb2015-10-05 18:43:07 -0700966void wma_update_conn_state(tp_wma_handle wma, uint32_t conn_mask);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800967
968void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg);
969
970void wma_aggr_qos_req(tp_wma_handle wma,
971 tAggrAddTsParams *pAggrQosRspMsg);
972
973void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg);
974
975int wma_process_receive_filter_set_filter_req(tp_wma_handle wma_handle,
976 tSirRcvPktFilterCfgType *
977 rcv_filter_param);
978
979int wma_process_receive_filter_clear_filter_req(tp_wma_handle wma_handle,
980 tSirRcvFltPktClearParam *
981 rcv_clear_param);
982
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800983#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530984QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800985 void *pTsmStatsMsg);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800986QDF_STATUS wma_plm_start(tp_wma_handle wma, const tpSirPlmReq plm);
987QDF_STATUS wma_plm_stop(tp_wma_handle wma, const tpSirPlmReq plm);
988void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800989#endif
990
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530991QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
992 tSirRcvFltMcAddrList * mcbc_param);
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800993QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma);
994
995QDF_STATUS wma_process_get_peer_info_req
996 (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq);
997
998QDF_STATUS wma_process_tx_fail_monitor_ind
999 (tp_wma_handle wma, tAniTXFailMonitorInd *pReq);
1000
1001QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma);
1002
1003QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma);
1004
1005QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma);
1006
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301007QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001008 tSirAddPeriodicTxPtrn *
1009 pAddPeriodicTxPtrnParams);
1010
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301011QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001012 tSirDelPeriodicTxPtrn *
1013 pDelPeriodicTxPtrnParams);
1014
1015#ifdef WLAN_FEATURE_STATS_EXT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301016QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001017#endif
1018
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301019QDF_STATUS wma_process_ibss_route_table_update_ind(void *wma_handle,
1020 tAniIbssRouteTable * pData);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001021
1022#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Himanshu Agarwal44195412016-03-09 13:03:54 +05301023QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001024
1025int wma_set_app_type1_params_in_fw(tp_wma_handle wma,
1026 tpSirAppType1Params appType1Params);
1027
Himanshu Agarwal44195412016-03-09 13:03:54 +05301028QDF_STATUS wma_set_app_type2_params_in_fw(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001029 tpSirAppType2Params appType2Params);
1030#endif
1031
1032#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
1033int wma_auto_shutdown_event_handler(void *handle, uint8_t *event,
1034 uint32_t len);
1035
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301036QDF_STATUS wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001037 tSirAutoShutdownCmdParams *
1038 auto_sh_cmd);
1039#endif
1040
Manikandan Mohan976e7562016-03-15 16:33:31 -07001041#ifdef WLAN_FEATURE_TSF
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001042int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len);
1043QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id);
1044QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, uint32_t vdev_id);
Manikandan Mohan976e7562016-03-15 16:33:31 -07001045QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin);
1046#else
1047static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle,
1048 uint32_t vdev_id)
1049{
1050 return QDF_STATUS_SUCCESS;
1051}
1052
1053static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle,
1054 uint32_t vdev_id)
1055{
1056 return QDF_STATUS_SUCCESS;
1057}
1058
1059static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data,
1060 uint32_t data_len)
1061{
1062 return 0;
1063}
1064
1065static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin)
1066{
1067 return QDF_STATUS_E_INVAL;
1068}
1069#endif
Manikandan Mohan80dea792016-04-28 16:36:48 -07001070QDF_STATUS wma_set_wisa_params(tp_wma_handle wma, struct sir_wisa_params *wisa);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001071
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001072#ifdef WLAN_FEATURE_NAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301073QDF_STATUS wma_nan_req(void *wma_ptr, tpNanRequest nan_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001074#endif
1075
1076#ifdef DHCP_SERVER_OFFLOAD
1077int wma_process_dhcpserver_offload(tp_wma_handle wma_handle,
1078 tSirDhcpSrvOffloadInfo *
1079 pDhcpSrvOffloadInfo);
1080#endif
1081
1082#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301083QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001084 tSirLedFlashingReq *flashing);
1085#endif
1086
1087#ifdef FEATURE_WLAN_CH_AVOID
1088int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
1089 uint32_t len);
1090
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301091QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001092 tSirChAvoidUpdateReq *
1093 ch_avoid_update_req);
1094#endif
1095
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001096
1097#ifdef FEATURE_WLAN_TDLS
1098
Himanshu Agarwal44195412016-03-09 13:03:54 +05301099QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001100int wma_update_tdls_peer_state(WMA_HANDLE handle,
1101 tTdlsPeerStateParams *peerStateParams);
1102/**
1103 * wma_set_tdls_offchan_mode() - set tdls off channel mode
1104 * @handle: wma handle
1105 * @chan_switch_params: Pointer to tdls channel switch parameter structure
1106 *
1107 * This function sets tdls off channel mode
1108 *
1109 * Return: 0 on success; negative errno otherwise
1110 */
Himanshu Agarwal44195412016-03-09 13:03:54 +05301111QDF_STATUS wma_set_tdls_offchan_mode(WMA_HANDLE wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001112 tdls_chan_switch_params *chan_switch_params);
1113#endif
1114
1115struct ieee80211com *wma_dfs_attach(struct ieee80211com *dfs_ic);
1116
1117void wma_dfs_detach(struct ieee80211com *dfs_ic);
1118
1119void wma_dfs_configure(struct ieee80211com *ic);
1120
Chandrasekaran, Manishekar22a7e1e2015-11-05 10:38:49 +05301121struct dfs_ieee80211_channel *wma_dfs_configure_channel(
1122 struct ieee80211com *dfs_ic,
Siddarth Poddar17dc4712016-03-09 16:30:27 +05301123 uint32_t band_center_freq1,
1124 uint32_t band_center_freq2,
Chandrasekaran, Manishekar22a7e1e2015-11-05 10:38:49 +05301125 struct wma_vdev_start_req
1126 *req);
Hong Shib90718f2017-02-20 00:57:22 +08001127void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001128void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id);
1129
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001130int wma_rssi_breached_event_handler(void *handle,
1131 u_int8_t *cmd_param_info, u_int32_t len);
1132#ifdef WLAN_FEATURE_MEMDUMP
1133int wma_fw_mem_dump_event_handler(void *handle, u_int8_t *cmd_param_info,
1134 u_int32_t len);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301135QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001136 struct fw_dump_req *mem_dump_req);
1137#else
1138static inline int wma_fw_mem_dump_event_handler(void *handle,
1139 u_int8_t *cmd_param_info, u_int32_t len)
1140{
1141 return 0;
1142}
1143
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301144static inline QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001145 void *mem_dump_req)
1146{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301147 return QDF_STATUS_SUCCESS;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001148}
1149#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301150QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001151 struct vdev_ie_info *ie_info);
1152int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
1153 uint32_t len);
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001154int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info,
1155 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001156
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001157int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
1158 uint32_t len);
1159void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id,
1160 uint8_t type);
Peng Xu8fdaa492016-06-22 10:20:47 -07001161int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf,
1162 uint32_t len);
Manjeet Singhf82ed072016-07-08 11:40:00 +05301163
1164QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle,
1165 struct sir_mac_pwr_dbg_cmd *
1166 sir_pwr_dbg_params);
1167
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301168#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301169int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
1170 uint32_t data_len);
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301171#else
1172static inline int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
1173 uint32_t data_len)
1174{
1175 return 0;
1176}
1177#endif
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301178
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301179/**
1180 * wma_lost_link_info_handler() - collect lost link information and inform SME
1181 * @wma: WMA handle
1182 * @vdev_id: vdev ID
1183 * @rssi: rssi at disconnection time
1184 *
1185 * Return: none
1186 */
1187void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
1188 int32_t rssi);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301189int wma_unified_power_debug_stats_event_handler(void *handle,
1190 uint8_t *cmd_param_info, uint32_t len);
Sen, Devendra154b3c42017-02-13 20:44:15 +05301191
1192#ifdef FEATURE_WLAN_DIAG_SUPPORT
1193/**
1194 * wma_sta_kickout_event()- send sta kickout event
1195 * @kickout_reason - reasoncode for kickout
1196 * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address
1197 * @vdev_id: Unique id for identifying the VDEV
1198 *
1199 * This function sends sta kickout diag event
1200 *
1201 * Return: void.
1202 */
1203void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
1204 uint8_t *macaddr);
1205#else
1206static inline void wma_sta_kickout_event(uint32_t kickout_reason,
1207 uint8_t vdev_id, uint8_t *macaddr)
1208{
1209
1210};
1211#endif /* FEATURE_WLAN_DIAG_SUPPORT */
1212
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001213/**
1214 * wma_acquire_wmi_resp_wakelock() - acquire the WMI response wakelock
1215 * @wma: the WMA handle containing the wakelock to acquire
1216 * @msec: the wakelock duration in milliseconds
1217 *
1218 * Return: void
1219 */
1220void wma_acquire_wmi_resp_wakelock(t_wma_handle *wma, uint32_t msec);
1221
1222/**
1223 * wma_release_wmi_resp_wakelock() - release the WMI response wakelock
1224 * @wma: the WMA handle containing the wakelock to release
1225 *
1226 * Return: void
1227 */
1228void wma_release_wmi_resp_wakelock(t_wma_handle *wma);
1229
1230/**
Dustin Brownd5f12942017-03-10 11:06:25 -08001231 * wma_send_vdev_start_to_fw() - send the vdev start command to firmware
1232 * @wma: the WMA handle containing a reference to the wmi_handle to use
1233 * @params: the VDEV_START params to send to firmware
1234 *
1235 * This is a helper function that acquires the WMI response wakelock before
1236 * sending down the VDEV_START command to firmware. This wakelock is
1237 * automatically released on failure. Consumers should call
1238 * wma_release_wmi_resp_wakelock() upon receipt of the VDEV_START response from
1239 * firmware, to avoid power penalties.
1240 *
1241 * Return: QDF_STATUS
1242 */
1243QDF_STATUS
1244wma_send_vdev_start_to_fw(t_wma_handle *wma, struct vdev_start_params *params);
1245
1246/**
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001247 * wma_send_vdev_stop_to_fw() - send the vdev stop command to firmware
1248 * @wma: the WMA handle containing a reference to the wmi_handle to use
1249 * @vdev_id: the VDEV Id of the VDEV to stop
1250 *
1251 * This is a helper function that acquires the WMI response wakelock before
1252 * sending down the VDEV_STOP command to firmware. This wakelock is
1253 * automatically released on failure. Consumers should call
1254 * wma_release_wmi_resp_wakelock() upon receipt of the VDEV_STOP response from
1255 * firmware, to avoid power penalties.
1256 *
1257 * Return: QDF_STATUS
1258 */
1259QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id);
1260
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001261#endif