blob: 24e3cddd284053032b5be67cdbdf18eb5bcb2237 [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)
Naveen Rawatf440a132017-05-05 12:27:39 -070065#define WMA_TGT_MAX_SNR (WMA_TGT_NOISE_FLOOR_DBM * (-1))
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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080086#define WMI_DEFAULT_NOISE_FLOOR_DBM (-96)
87
88#define WMI_MCC_MIN_CHANNEL_QUOTA 20
89#define WMI_MCC_MAX_CHANNEL_QUOTA 80
90#define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
91
92/* The maximum number of patterns that can be transmitted by the firmware
93 * and maximum patterns size.
94 */
95#define WMA_MAXNUM_PERIODIC_TX_PTRNS 6
96
97#define WMI_MAX_HOST_CREDITS 2
98#define WMI_WOW_REQUIRED_CREDITS 1
99
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800100#define WMI_MAX_MHF_ENTRIES 32
101
102
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800103#define MAX_HT_MCS_IDX 8
104#define MAX_VHT_MCS_IDX 10
105#define INVALID_MCS_IDX 255
106
107#define LINK_STATUS_LEGACY 0
108#define LINK_STATUS_VHT 0x1
109#define LINK_STATUS_MIMO 0x2
110#define LINK_SUPPORT_VHT 0x4
111#define LINK_SUPPORT_MIMO 0x8
112
113#define LINK_RATE_VHT 0x3
114
115#define MAX_ENTRY_HOLD_REQ_QUEUE 2
Krishna Kumaar Natarajana5c53bd2015-10-27 11:48:27 -0700116#define MAX_ENTRY_VDEV_RESP_QUEUE 10
117
Krishna Kumaar Natarajanb7f9a352016-03-18 11:40:07 -0700118/* Time(in ms) to detect DOS attack */
119#define WMA_MGMT_FRAME_DETECT_DOS_TIMER 1000
120
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800121/**
122 * struct index_data_rate_type - non vht data rate type
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800123 * @mcs_index: mcs rate index
124 * @ht20_rate: HT20 supported rate table
125 * @ht40_rate: HT40 supported rate table
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800126 */
127struct index_data_rate_type {
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800128 uint8_t mcs_index;
129 uint16_t ht20_rate[2];
130 uint16_t ht40_rate[2];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800131};
132
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800133/**
134 * struct index_vht_data_rate_type - vht data rate type
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800135 * @mcs_index: mcs rate index
136 * @ht20_rate: VHT20 supported rate table
137 * @ht40_rate: VHT40 supported rate table
138 * @ht80_rate: VHT80 supported rate table
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800139 */
140struct index_vht_data_rate_type {
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800141 uint8_t mcs_index;
142 uint16_t ht20_rate[2];
143 uint16_t ht40_rate[2];
144 uint16_t ht80_rate[2];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800145};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800146
147/*
148 * wma_main.c functions declarations
149 */
150
151int
152wmi_unified_pdev_set_param(wmi_unified_t wmi_handle, WMI_PDEV_PARAM param_id,
153 uint32_t param_value);
154
155void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
156 void *body_ptr, uint32_t body_val);
157
158void wma_data_tx_ack_comp_hdlr(void *wma_context,
Nirav Shahcbc6d722016-03-01 16:24:53 +0530159 qdf_nbuf_t netbuf, int32_t status);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800160
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530161QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800162 int value);
163
164/*
165 * wma_scan_roam.c functions declarations
166 */
167
168#ifdef WLAN_FEATURE_ROAM_OFFLOAD
169void wma_process_roam_invoke(WMA_HANDLE handle,
170 struct wma_roam_invoke_cmd *roaminvoke);
171
172void wma_process_roam_synch_fail(WMA_HANDLE handle,
173 struct roam_offload_synch_fail *synch_fail);
174
175int wma_roam_synch_event_handler(void *handle, uint8_t *event,
176 uint32_t len);
177#endif
178
Kapil Gupta5cda2252016-12-29 18:44:26 +0530179/**
180 * wma_update_per_roam_config() -per roam config parameter updation to FW
181 * @handle: wma handle
182 * @req_buf: per roam config parameters
183 *
184 * Return: none
185 */
186void wma_update_per_roam_config(WMA_HANDLE handle,
187 struct wmi_per_roam_config_req *req_buf);
188
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530189QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800190 tSirScanOffloadReq *scan_req,
Sandeep Puligilla1fcdb772017-02-22 21:14:59 -0800191 struct scan_req_params *cmd);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800192
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530193QDF_STATUS wma_get_buf_stop_scan_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800194 wmi_buf_t *buf,
195 int *buf_len,
196 tAbortScanParams *abort_scan_req);
197
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530198QDF_STATUS wma_start_scan(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800199 tSirScanOffloadReq *scan_req, uint16_t msg_type);
200
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530201QDF_STATUS wma_stop_scan(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800202 tAbortScanParams *abort_scan_req);
203
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530204QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800205 tSirUpdateChanList *chan_list);
206
207#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530208QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
Himanshu Agarwalb56ad2e2016-07-19 15:43:09 +0530209 roam_offload_param *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800210 roam_offload_params,
211 tSirRoamOffloadScanReq *roam_req);
212#endif
213
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530214QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800215 wmi_start_scan_cmd_fixed_param *
216 scan_cmd_fp,
217 tSirRoamOffloadScanReq *roam_req,
218 uint32_t mode, uint32_t vdev_id);
219
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530220QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800221 tSirRoamOffloadScanReq *roam_req);
222
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530223QDF_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800224 uint32_t scan_period,
225 uint32_t scan_age,
226 uint32_t vdev_id);
227
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530228QDF_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800229 uint32_t vdev_id,
230 int32_t rssi_change_thresh,
231 uint32_t bcn_rssi_weight,
232 uint32_t hirssi_delay_btw_scans);
233
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530234QDF_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800235 uint8_t chan_count,
236 uint8_t *chan_list,
237 uint8_t list_type, uint32_t vdev_id);
238
239A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype,
240 eCsrEncryptionType encr);
241
242A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr);
243
244void wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle,
245 tpAniSirGlobal pMac,
246 tSirRoamOffloadScanReq *roam_req,
247 wmi_ap_profile *ap_profile_p);
248
249void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
250 tpAniSirGlobal pMac,
251 tSirRoamOffloadScanReq *roam_req,
252 wmi_start_scan_cmd_fixed_param *
253 scan_params);
254
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530255QDF_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800256 wmi_ap_profile *ap_profile_p,
257 uint32_t vdev_id);
258
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530259QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800260 A_INT32 first_bcnt,
261 A_UINT32 final_bcnt, uint32_t vdev_id);
262
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530263QDF_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800264 uint32_t command, uint32_t vdev_id);
265
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530266QDF_STATUS wma_roam_preauth_chan_set(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800267 tpSwitchChannelParams params,
268 uint8_t vdev_id);
269
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530270QDF_STATUS wma_roam_preauth_chan_cancel(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800271 tpSwitchChannelParams params,
272 uint8_t vdev_id);
273
274void wma_roam_preauth_scan_event_handler(tp_wma_handle wma_handle,
275 uint8_t vdev_id,
276 wmi_scan_event_fixed_param *
277 wmi_event);
278
279void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params);
280
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800281#ifdef WLAN_FEATURE_ROAM_OFFLOAD
282void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts);
283#endif
284
285#ifdef FEATURE_WLAN_EXTSCAN
286
287int wma_extscan_start_stop_event_handler(void *handle,
288 uint8_t *cmd_param_info,
289 uint32_t len);
290
291int wma_extscan_operations_event_handler(void *handle,
292 uint8_t *cmd_param_info,
293 uint32_t len);
294
295int wma_extscan_table_usage_event_handler(void *handle,
296 uint8_t *cmd_param_info,
297 uint32_t len);
298
299int wma_extscan_capabilities_event_handler(void *handle,
300 uint8_t *cmd_param_info,
301 uint32_t len);
302
303int wma_extscan_hotlist_match_event_handler(void *handle,
304 uint8_t *cmd_param_info,
305 uint32_t len);
306
307int wma_extscan_cached_results_event_handler(void *handle,
308 uint8_t *cmd_param_info,
309 uint32_t len);
310
311int wma_extscan_change_results_event_handler(void *handle,
312 uint8_t *cmd_param_info,
313 uint32_t len);
314
315int wma_passpoint_match_event_handler(void *handle,
316 uint8_t *cmd_param_info,
317 uint32_t len);
318
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800319#endif
320
321void wma_register_extscan_event_handler(tp_wma_handle wma_handle);
322
323#ifdef FEATURE_WLAN_EXTSCAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530324QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800325 tSirWifiScanCmdReqParams *pstart,
326 wmi_buf_t *buf, int *buf_len);
327
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530328QDF_STATUS wma_start_extscan(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800329 tSirWifiScanCmdReqParams *pstart);
330
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530331QDF_STATUS wma_stop_extscan(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800332 tSirExtScanStopReqParams *pstopcmd);
333
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530334QDF_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800335 tSirExtScanSetBssidHotListReqParams *
336 photlist, int *buf_len);
337
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530338QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800339 tSirExtScanSetBssidHotListReqParams
340 *photlist);
341
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530342QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700343 tSirExtScanResetBssidHotlistReqParams *photlist_reset);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800344
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530345QDF_STATUS wma_get_buf_extscan_change_monitor_cmd(tp_wma_handle wma_handle,
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700346 tSirExtScanSetSigChangeReqParams *psigchange,
347 wmi_buf_t *buf, int *buf_len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800348
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530349QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800350 tSirExtScanSetSigChangeReqParams *
351 psigchange);
352
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530353QDF_STATUS wma_extscan_stop_change_monitor(tp_wma_handle wma,
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700354 tSirExtScanResetSignificantChangeReqParams *pResetReq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800355
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530356QDF_STATUS wma_extscan_get_cached_results(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800357 tSirExtScanGetCachedResultsReqParams *
358 pcached_results);
359
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530360QDF_STATUS wma_extscan_get_capabilities(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800361 tSirGetExtScanCapabilitiesReqParams *
362 pgetcapab);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530363QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800364 struct wifi_epno_params *req);
365
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530366QDF_STATUS wma_set_passpoint_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800367 struct wifi_passpoint_req *req);
368
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530369QDF_STATUS wma_reset_passpoint_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800370 struct wifi_passpoint_req *req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800371#endif
372
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530373QDF_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800374 struct sir_ipa_offload_enable_disable *ipa_offload);
375
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800376void wma_process_unit_test_cmd(WMA_HANDLE handle,
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700377 t_wma_unit_test_cmd *wma_utest);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800378
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530379QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800380
381int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data, uint32_t len);
382
383void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id);
384
385int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
386 uint32_t len);
387
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800388#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800389void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id);
390static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
391 uint8_t vdev_id)
392{
393 return wma->interfaces[vdev_id].roam_synch_in_progress;
394}
395#else
396static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
397 uint8_t vdev_id)
398{
399 return false;
400}
Varun Reddy Yeturu101f9542016-05-24 10:07:52 -0700401static inline uint32_t wma_roam_scan_get_cckm_mode(
402 struct sSirRoamOffloadScanReq *roam_req, uint32_t auth_mode)
403{
404 return WMI_AUTH_CCKM;
405}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800406#endif
407
408/*
409 * wma_dev_if.c functions declarations
410 */
411
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800412struct cdp_vdev *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800413 uint8_t *vdev_id);
414
415/**
416 * wma_find_vdev_by_id() - Returns vdev handle for given vdev id.
417 * @wma - wma handle
418 * @vdev_id - vdev ID
419 *
420 * Return: Returns vdev handle if given vdev id is valid.
421 * Otherwise returns NULL.
422 */
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800423static inline
424struct cdp_vdev *wma_find_vdev_by_id(tp_wma_handle wma, uint8_t vdev_id)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800425{
Naveen Rawatf2bd42d2017-06-29 14:51:43 -0700426 if (vdev_id >= wma->max_bssid)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800427 return NULL;
428
429 return wma->interfaces[vdev_id].handle;
430}
431
432/**
433 * wma_get_vdev_count() - Returns number of active vdev.
434 * @wma - wma handle
435 *
436 * Return: Returns valid vdev count.
437 */
438static inline uint8_t wma_get_vdev_count(tp_wma_handle wma)
439{
440 uint8_t vdev_count = 0, i;
441
442 for (i = 0; i < wma->max_bssid; i++) {
443 if (wma->interfaces[i].handle)
444 vdev_count++;
445 }
446 return vdev_count;
447}
448
449bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id);
450
451#ifdef QCA_IBSS_SUPPORT
452bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id);
Houston Hoffman79b4af22015-10-06 12:01:08 -0700453#else
454/**
455 * wma_is_vdev_in_ibss_mode(): dummy function
456 * @wma: wma handle
457 * @vdev_id: vdev id
458 *
459 * Return false since no vdev can be in ibss mode without ibss support
460 */
461static inline
Mahesh Kumar Kalikot Veetil32e4fc72016-09-09 17:05:22 -0700462bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id)
Houston Hoffman79b4af22015-10-06 12:01:08 -0700463{
464 return false;
465}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800466#endif
467
468/**
Houston Hoffman79b4af22015-10-06 12:01:08 -0700469 * wma_is_vdev_in_beaconning_mode() - check if vdev is in a beaconning mode
470 * @wma: wma handle
471 * @vdev_id: vdev id
472 *
473 * Helper function to know whether given vdev id
474 * is in a beaconning mode or not.
475 *
476 * Return: True if vdev needs to beacon.
477 */
478static inline
479bool wma_is_vdev_in_beaconning_mode(tp_wma_handle wma, uint8_t vdev_id)
480{
481 return wma_is_vdev_in_ap_mode(wma, vdev_id) ||
482 wma_is_vdev_in_ibss_mode(wma, vdev_id);
483}
484
485/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800486 * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID
487 * @wma - wma handle
488 * @vdev_id - vdev ID
489 *
490 * Return: Returns pointer to bssid on success,
491 * otherwise returns NULL.
492 */
493static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma,
494 uint8_t vdev_id)
495{
496 if (vdev_id >= wma->max_bssid)
497 return NULL;
498
499 return wma->interfaces[vdev_id].bssid;
500}
501
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800502struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800503 uint8_t *vdev_id);
504
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530505QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800506 struct del_sta_self_params *pdel_sta_self_req_param,
507 uint8_t generateRsp);
508
509int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
510 uint32_t len);
511
Govind Singhd76a5b02016-03-08 15:12:14 +0530512QDF_STATUS wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800513 uint32_t param_id, uint32_t param_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800514void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
Leo Chang96464902016-10-28 11:10:54 -0700515 uint8_t vdev_id, void *peer,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800516 bool roam_synch_in_progress);
517
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800518QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
519 struct cdp_vdev *vdev,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800520 u8 peer_addr[IEEE80211_ADDR_LEN],
521 uint32_t peer_type, uint8_t vdev_id,
522 bool roam_synch_in_progress);
523
524int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
525 u32 len);
526
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800527struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800528 struct add_sta_self_params *self_sta_req,
529 uint8_t generateRsp);
530
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700531QDF_STATUS wma_vdev_start(tp_wma_handle wma, struct wma_vdev_start_req *req,
532 bool isRestart);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800533
534void wma_vdev_resp_timer(void *data);
535
536struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma,
537 uint8_t vdev_id,
538 uint32_t msg_type, uint8_t type,
539 void *params, uint32_t timeout);
540
541void wma_hold_req_timer(void *data);
542struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
543 uint8_t vdev_id, uint32_t msg_type,
544 uint8_t type, void *params,
545 uint32_t timeout);
546
547void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id,
548 uint8_t type);
549
550void wma_add_bss(tp_wma_handle wma, tpAddBssParams params);
551
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800552void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta);
553
554void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta);
555
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800556void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params);
557
558int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type);
559
560void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle,
561 tpDisableIntraBssFwd pdis_intra_fwd);
562
Deepak Dhamdhere2dae1bd2016-10-27 10:58:29 -0700563void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params);
564
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800565/*
566 * wma_mgmt.c functions declarations
567 */
568
569int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len);
570
571int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len);
572
Dustin Browne2206fb2017-04-20 13:39:25 -0700573int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800574
575int wma_unified_bcntx_status_event_handler(void *handle,
576 uint8_t *cmd_param_info,
577 uint32_t len);
578
mukul sharma72c8b222015-09-04 17:02:01 +0530579void wma_set_sta_sa_query_param(tp_wma_handle wma,
580 uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800581
582void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
583 uint32_t method, uint32_t timeperiod,
584 uint8_t *hostv4addr, uint8_t *destv4addr,
585 uint8_t *destmac);
586
587int wma_vdev_install_key_complete_event_handler(void *handle,
588 uint8_t *event,
589 uint32_t len);
590
Govind Singhb30d4c02016-03-24 11:01:23 +0530591QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800592 tSirNwType nw_type,
593 tpAddStaParams params);
594
Himanshu Agarwal009f1572016-03-09 17:26:02 +0530595QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle,
596 uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800597 gtx_config_t *gtx_info);
598
599void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id,
600 uint8_t llbcoexist);
601
602void wma_process_update_beacon_params(tp_wma_handle wma,
603 tUpdateBeaconParams *bcn_params);
604
Rajeev Kumar416b73f2017-01-21 16:45:21 -0800605void wma_update_cfg_params(tp_wma_handle wma, struct scheduler_msg *cfgParam);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800606
607void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info);
608
609void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
610 uint8_t vdev_id,
611 int8_t peer_num_delta);
612
613void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info);
614
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530615QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800616 tEdcaParams *edca_params);
617
618int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event,
619 uint32_t len);
620
621void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
622 tpSendProbeRespParams probe_rsp_info);
623
624void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info);
625
626void wma_set_keepalive_req(tp_wma_handle wma,
627 tSirKeepAliveReq *keepalive);
628
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +0530629void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id,
630 int32_t rssi);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800631
632void wma_process_update_opmode(tp_wma_handle wma_handle,
633 tUpdateVHTOpMode *update_vht_opmode);
634
635void wma_process_update_rx_nss(tp_wma_handle wma_handle,
636 tUpdateRxNss *update_rx_nss);
637
638void wma_process_update_membership(tp_wma_handle wma_handle,
639 tUpdateMembership *membership);
640
641void wma_process_update_userpos(tp_wma_handle wma_handle,
642 tUpdateUserPos *userpos);
643
644void wma_hidden_ssid_vdev_restart(tp_wma_handle wma_handle,
645 tHalHiddenSsidVdevRestart *pReq);
646
647/*
648 * wma_power.c functions declarations
649 */
650
651void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req);
652
Govind Singhd76a5b02016-03-08 15:12:14 +0530653QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800654 uint32_t vdev_id, uint32_t param,
655 uint32_t value);
656
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530657QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800658wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id);
659
Govind Singhd76a5b02016-03-08 15:12:14 +0530660QDF_STATUS wma_set_ap_peer_uapsd(tp_wma_handle wma, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800661 uint8_t *peer_addr, uint8_t uapsd_value,
662 uint8_t max_sp);
663
664void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param,
665 wmi_wmm_vparams *wmm_param, int ac);
666
667void wma_set_tx_power(WMA_HANDLE handle,
668 tMaxTxPowerParams *tx_pwr_params);
669
670void wma_set_max_tx_power(WMA_HANDLE handle,
671 tMaxTxPowerParams *tx_pwr_params);
672
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800673void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req);
674
675void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req);
676
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700677void wma_disable_uapsd_mode(tp_wma_handle wma, tpDisableUapsdParams ps_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800678
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530679QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800680
681int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
682 uint32_t len);
683
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530684QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800685 tSirTxPowerLimit *ptxlim);
686
687void wma_update_noa(struct beacon_info *beacon,
688 struct p2p_sub_element_noa *noa_ie);
689
690void wma_update_probe_resp_noa(tp_wma_handle wma_handle,
691 struct p2p_sub_element_noa *noa_ie);
692
693int wma_p2p_noa_event_handler(void *handle, uint8_t *event,
694 uint32_t len);
695
696void wma_process_set_p2pgo_noa_req(tp_wma_handle wma,
697 tP2pPsParams *ps_params);
698
699void wma_process_set_mimops_req(tp_wma_handle wma_handle,
700 tSetMIMOPS *mimops);
701
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530702QDF_STATUS wma_set_mimops(tp_wma_handle wma, uint8_t vdev_id, int value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800703
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530704QDF_STATUS wma_notify_modem_power_state(void *wma_ptr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800705 tSirModemPowerStateInd *pReq);
706
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530707QDF_STATUS wma_set_smps_params(tp_wma_handle wma, uint8_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800708 int value);
709
710void wma_set_suspend_dtim(tp_wma_handle wma);
711
712void wma_set_resume_dtim(tp_wma_handle wma);
713
714/*
715 * wma_data.c functions declarations
716 */
717
718
719void wma_set_bss_rate_flags(struct wma_txrx_node *iface,
720 tpAddBssParams add_bss);
721
722int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params);
723
724void wma_update_txrx_chainmask(int num_rf_chains, int *cmd_value);
725
726int wma_peer_state_change_event_handler(void *handle,
727 uint8_t *event_buff,
728 uint32_t len);
729
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530730QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800731 mcc_adaptive_scheduler);
732
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530733QDF_STATUS wma_set_mcc_channel_time_latency
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800734 (tp_wma_handle wma,
735 uint32_t mcc_channel, uint32_t mcc_channel_time_latency);
736
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530737QDF_STATUS wma_set_mcc_channel_time_quota
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800738 (tp_wma_handle wma,
739 uint32_t adapter_1_chan_number,
740 uint32_t adapter_1_quota, uint32_t adapter_2_chan_number);
741
742void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params);
743
744void wma_unpause_vdev(tp_wma_handle wma);
745
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530746QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800747 tSirRateUpdateInd *
748 pRateUpdateParams);
749
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530750QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800751
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530752QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800753
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530754#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \
755 defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT)
756
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800757int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
758 uint32_t len);
759#endif
760
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530761#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
762QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
763 struct t_bad_peer_txtcl_config *config);
Mohit Khanna0fe61672016-05-19 16:53:39 -0700764#else
765static inline QDF_STATUS
766wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
767 struct t_bad_peer_txtcl_config *config)
768{
769 return QDF_STATUS_E_FAILURE;
770}
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530771#endif
772
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530773QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800774 t_thermal_mgmt *pThermalParams);
775
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530776QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800777 uint8_t thermal_level);
778
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530779QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800780 t_thermal_cmd_params thermal_info);
781
782int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event,
783 uint32_t len);
784
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800785int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
786 uint32_t len);
787
788int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
789 uint32_t len);
790
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800791/*
792 * wma_utils.c functions declarations
793 */
794
795#ifdef WLAN_FEATURE_STATS_EXT
796int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf,
797 uint32_t len);
798#endif
799
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700800enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode);
Archana Ramachandran20d2e232016-02-11 16:58:40 -0800801int wma_smps_mode_to_force_mode_param(uint8_t smps_mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800802
803#ifdef WLAN_FEATURE_LINK_LAYER_STATS
804void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle);
805
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530806QDF_STATUS wma_process_ll_stats_clear_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800807 (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq);
808
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530809QDF_STATUS wma_process_ll_stats_set_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800810 (tp_wma_handle wma, const tpSirLLStatsSetReq setReq);
811
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530812QDF_STATUS wma_process_ll_stats_get_req
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -0700813 (tp_wma_handle wma, const tpSirLLStatsGetReq getReq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800814
815int wma_unified_link_iface_stats_event_handler(void *handle,
816 uint8_t *cmd_param_info,
817 uint32_t len);
Zhang Qian73c348a2017-03-13 16:15:55 +0800818void wma_config_stats_ext_threshold(tp_wma_handle wma,
819 struct sir_ll_ext_stats_threshold *thresh);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800820#endif
821
822void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus,
823 uint8_t link_status);
824
825int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
826 uint32_t len);
827
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +0530828/**
829 * wma_rso_cmd_status_event_handler() - RSO Command status event handler
830 * @wmi_event: WMI event
831 *
832 * This function is used to send RSO command status to upper layer
833 *
834 * Return: 0 for success
835 */
836int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event);
837
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800838int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
839 uint32_t len);
840
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530841QDF_STATUS wma_send_link_speed(uint32_t link_speed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800842
843int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info,
844 uint32_t len);
845
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530846QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800847
848int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
849 uint32_t len);
850
851bool wma_is_sap_active(tp_wma_handle wma_handle);
852
853bool wma_is_p2p_go_active(tp_wma_handle wma_handle);
854
855bool wma_is_p2p_cli_active(tp_wma_handle wma_handle);
856
857bool wma_is_sta_active(tp_wma_handle wma_handle);
858
859WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type,
860 uint8_t is_ht, uint8_t ch_width,
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800861 uint8_t is_vht, bool is_he);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800862
863int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle,
864 uint8_t vdev_id, uint32_t value);
865
866int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
867 uint8_t vdev_id, uint32_t value);
868
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800869void wma_get_stats_req(WMA_HANDLE handle,
870 tAniGetPEStatsReq *get_stats_param);
871
872#if defined(QCA_WIFI_FTM)
873void wma_utf_detach(tp_wma_handle wma_handle);
874
875void wma_utf_attach(tp_wma_handle wma_handle);
876
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530877QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800878wma_process_ftm_command(tp_wma_handle wma_handle,
879 struct ar6k_testmode_cmd_data *msg_buffer);
880#endif
881
882/*
883 * wma_features.c functions declarations
884 */
885
886void wma_process_link_status_req(tp_wma_handle wma,
887 tAniGetLinkStatus *pGetLinkStatus);
888
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530889QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800890 tAniDHCPInd *ta_dhcp_ind);
891
Will Huanga9814592017-05-24 15:47:58 +0800892QDF_STATUS wma_get_peer_info(WMA_HANDLE handle,
893 struct sir_peer_info_req *peer_info_req);
894
895/**
896 * wma_get_peer_info_ext() - get peer info
897 * @handle: wma interface
898 * @peer_info_req: get peer info request information
899 *
900 * This function will send WMI_REQUEST_PEER_STATS_INFO_CMDID to FW
901 *
902 * Return: 0 on success, otherwise error value
903 */
904QDF_STATUS wma_get_peer_info_ext(WMA_HANDLE handle,
905 struct sir_peer_info_ext_req *peer_info_req);
906
907/**
908 * wma_peer_info_event_handler() - Handler for WMI_PEER_STATS_INFO_EVENTID
909 * @handle: WMA global handle
910 * @cmd_param_info: Command event data
911 * @len: Length of cmd_param_info
912 *
913 * This function will handle WMI_PEER_STATS_INFO_EVENTID
914 *
915 * Return: 0 on success, error code otherwise
916 */
917int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info,
918 u_int32_t len);
919
Govind Singha471e5e2015-10-12 17:11:14 +0530920int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf,
921 uint32_t len);
922
Govind Singhf25a0f12016-03-08 16:09:48 +0530923QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle,
Govind Singha471e5e2015-10-12 17:11:14 +0530924 uint32_t cmd, uint32_t value1, uint32_t value2);
925
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800926void wma_wow_tx_complete(void *wma);
927
928int wmi_unified_nat_keepalive_enable(tp_wma_handle wma, uint8_t vdev_id);
929
Govind Singhd76a5b02016-03-08 15:12:14 +0530930int wma_unified_csa_offload_enable(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800931
932#ifdef WLAN_FEATURE_NAN
933int wma_nan_rsp_event_handler(void *handle, uint8_t *event_buf, uint32_t len);
934#endif
935
936#ifdef FEATURE_WLAN_TDLS
937int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len);
938#endif
939
940int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len);
941
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800942#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajan4e9cf392015-11-20 13:35:05 -0800943int wma_oem_data_response_handler(void *handle, uint8_t *datap,
944 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800945#endif
946
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800947#if !defined(REMOVE_PKT_LOG)
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530948QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800949 struct ath_pktlog_wmi_params *params);
950#endif
951
952int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
953 uint32_t len);
954int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len);
955
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530956QDF_STATUS wma_wow_add_pattern(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800957 struct wow_add_pattern *ptrn);
958
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530959QDF_STATUS wma_wow_delete_user_pattern(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800960 struct wow_delete_pattern *pattern);
961
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530962QDF_STATUS wma_wow_enter(tp_wma_handle wma, tpSirHalWowlEnterParams info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800963
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530964QDF_STATUS wma_wow_exit(tp_wma_handle wma, tpSirHalWowlExitParams info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800965
Houston Hoffmana76591b2015-11-10 16:52:05 -0800966void wma_calculate_and_update_conn_state(tp_wma_handle wma);
967void wma_update_conn_state(tp_wma_handle wma, uint32_t conn_mask);
Houston Hoffman7260ecb2015-10-05 18:43:07 -0700968void wma_update_conn_state(tp_wma_handle wma, uint32_t conn_mask);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800969
970void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg);
971
972void wma_aggr_qos_req(tp_wma_handle wma,
973 tAggrAddTsParams *pAggrQosRspMsg);
974
975void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg);
976
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800977#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530978QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800979 void *pTsmStatsMsg);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800980QDF_STATUS wma_plm_start(tp_wma_handle wma, const tpSirPlmReq plm);
981QDF_STATUS wma_plm_stop(tp_wma_handle wma, const tpSirPlmReq plm);
982void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800983#endif
984
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530985QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
986 tSirRcvFltMcAddrList * mcbc_param);
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800987QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma);
988
989QDF_STATUS wma_process_get_peer_info_req
990 (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq);
991
992QDF_STATUS wma_process_tx_fail_monitor_ind
993 (tp_wma_handle wma, tAniTXFailMonitorInd *pReq);
994
995QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma);
996
997QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma);
998
999QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma);
1000
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301001QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001002 tSirAddPeriodicTxPtrn *
1003 pAddPeriodicTxPtrnParams);
1004
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301005QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001006 tSirDelPeriodicTxPtrn *
1007 pDelPeriodicTxPtrnParams);
1008
1009#ifdef WLAN_FEATURE_STATS_EXT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301010QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001011#endif
1012
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301013QDF_STATUS wma_process_ibss_route_table_update_ind(void *wma_handle,
1014 tAniIbssRouteTable * pData);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001015
1016#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Himanshu Agarwal44195412016-03-09 13:03:54 +05301017QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001018
1019int wma_set_app_type1_params_in_fw(tp_wma_handle wma,
1020 tpSirAppType1Params appType1Params);
1021
Himanshu Agarwal44195412016-03-09 13:03:54 +05301022QDF_STATUS wma_set_app_type2_params_in_fw(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001023 tpSirAppType2Params appType2Params);
1024#endif
1025
1026#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
1027int wma_auto_shutdown_event_handler(void *handle, uint8_t *event,
1028 uint32_t len);
1029
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301030QDF_STATUS wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001031 tSirAutoShutdownCmdParams *
1032 auto_sh_cmd);
1033#endif
1034
Manikandan Mohan976e7562016-03-15 16:33:31 -07001035#ifdef WLAN_FEATURE_TSF
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001036int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len);
1037QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id);
1038QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, uint32_t vdev_id);
Manikandan Mohan976e7562016-03-15 16:33:31 -07001039QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin);
1040#else
1041static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle,
1042 uint32_t vdev_id)
1043{
1044 return QDF_STATUS_SUCCESS;
1045}
1046
1047static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle,
1048 uint32_t vdev_id)
1049{
1050 return QDF_STATUS_SUCCESS;
1051}
1052
1053static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data,
1054 uint32_t data_len)
1055{
1056 return 0;
1057}
1058
1059static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin)
1060{
1061 return QDF_STATUS_E_INVAL;
1062}
1063#endif
Manikandan Mohan80dea792016-04-28 16:36:48 -07001064QDF_STATUS wma_set_wisa_params(tp_wma_handle wma, struct sir_wisa_params *wisa);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001065
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001066#ifdef WLAN_FEATURE_NAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301067QDF_STATUS wma_nan_req(void *wma_ptr, tpNanRequest nan_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001068#endif
1069
1070#ifdef DHCP_SERVER_OFFLOAD
1071int wma_process_dhcpserver_offload(tp_wma_handle wma_handle,
1072 tSirDhcpSrvOffloadInfo *
1073 pDhcpSrvOffloadInfo);
1074#endif
1075
1076#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301077QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001078 tSirLedFlashingReq *flashing);
1079#endif
1080
1081#ifdef FEATURE_WLAN_CH_AVOID
1082int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
1083 uint32_t len);
1084
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301085QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001086 tSirChAvoidUpdateReq *
1087 ch_avoid_update_req);
1088#endif
1089
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001090
1091#ifdef FEATURE_WLAN_TDLS
1092
Himanshu Agarwal44195412016-03-09 13:03:54 +05301093QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001094int wma_update_tdls_peer_state(WMA_HANDLE handle,
1095 tTdlsPeerStateParams *peerStateParams);
1096/**
1097 * wma_set_tdls_offchan_mode() - set tdls off channel mode
1098 * @handle: wma handle
1099 * @chan_switch_params: Pointer to tdls channel switch parameter structure
1100 *
1101 * This function sets tdls off channel mode
1102 *
1103 * Return: 0 on success; negative errno otherwise
1104 */
Himanshu Agarwal44195412016-03-09 13:03:54 +05301105QDF_STATUS wma_set_tdls_offchan_mode(WMA_HANDLE wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001106 tdls_chan_switch_params *chan_switch_params);
1107#endif
1108
Hong Shib90718f2017-02-20 00:57:22 +08001109void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001110void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id);
1111
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001112int wma_rssi_breached_event_handler(void *handle,
1113 u_int8_t *cmd_param_info, u_int32_t len);
1114#ifdef WLAN_FEATURE_MEMDUMP
1115int wma_fw_mem_dump_event_handler(void *handle, u_int8_t *cmd_param_info,
1116 u_int32_t len);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301117QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001118 struct fw_dump_req *mem_dump_req);
1119#else
1120static inline int wma_fw_mem_dump_event_handler(void *handle,
1121 u_int8_t *cmd_param_info, u_int32_t len)
1122{
1123 return 0;
1124}
1125
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301126static inline QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001127 void *mem_dump_req)
1128{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301129 return QDF_STATUS_SUCCESS;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001130}
1131#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301132QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001133 struct vdev_ie_info *ie_info);
1134int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
1135 uint32_t len);
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001136int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info,
1137 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001138
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001139int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
1140 uint32_t len);
1141void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id,
1142 uint8_t type);
Peng Xu8fdaa492016-06-22 10:20:47 -07001143int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf,
1144 uint32_t len);
Manjeet Singhf82ed072016-07-08 11:40:00 +05301145
1146QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle,
1147 struct sir_mac_pwr_dbg_cmd *
1148 sir_pwr_dbg_params);
1149
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301150#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301151int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
1152 uint32_t data_len);
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301153#else
1154static inline int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
1155 uint32_t data_len)
1156{
1157 return 0;
1158}
1159#endif
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301160
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301161/**
1162 * wma_lost_link_info_handler() - collect lost link information and inform SME
1163 * @wma: WMA handle
1164 * @vdev_id: vdev ID
1165 * @rssi: rssi at disconnection time
1166 *
1167 * Return: none
1168 */
1169void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
1170 int32_t rssi);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301171int wma_unified_power_debug_stats_event_handler(void *handle,
1172 uint8_t *cmd_param_info, uint32_t len);
Sen, Devendra154b3c42017-02-13 20:44:15 +05301173
1174#ifdef FEATURE_WLAN_DIAG_SUPPORT
1175/**
1176 * wma_sta_kickout_event()- send sta kickout event
1177 * @kickout_reason - reasoncode for kickout
1178 * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address
1179 * @vdev_id: Unique id for identifying the VDEV
1180 *
1181 * This function sends sta kickout diag event
1182 *
1183 * Return: void.
1184 */
1185void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
1186 uint8_t *macaddr);
1187#else
1188static inline void wma_sta_kickout_event(uint32_t kickout_reason,
1189 uint8_t vdev_id, uint8_t *macaddr)
1190{
1191
1192};
1193#endif /* FEATURE_WLAN_DIAG_SUPPORT */
1194
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001195/**
1196 * wma_acquire_wmi_resp_wakelock() - acquire the WMI response wakelock
1197 * @wma: the WMA handle containing the wakelock to acquire
1198 * @msec: the wakelock duration in milliseconds
1199 *
1200 * Return: void
1201 */
1202void wma_acquire_wmi_resp_wakelock(t_wma_handle *wma, uint32_t msec);
1203
1204/**
1205 * wma_release_wmi_resp_wakelock() - release the WMI response wakelock
1206 * @wma: the WMA handle containing the wakelock to release
1207 *
1208 * Return: void
1209 */
1210void wma_release_wmi_resp_wakelock(t_wma_handle *wma);
1211
1212/**
Dustin Brownd5f12942017-03-10 11:06:25 -08001213 * wma_send_vdev_start_to_fw() - send the vdev start command to firmware
1214 * @wma: the WMA handle containing a reference to the wmi_handle to use
1215 * @params: the VDEV_START params to send to firmware
1216 *
1217 * This is a helper function that acquires the WMI response wakelock before
1218 * sending down the VDEV_START command to firmware. This wakelock is
1219 * automatically released on failure. Consumers should call
1220 * wma_release_wmi_resp_wakelock() upon receipt of the VDEV_START response from
1221 * firmware, to avoid power penalties.
1222 *
1223 * Return: QDF_STATUS
1224 */
1225QDF_STATUS
1226wma_send_vdev_start_to_fw(t_wma_handle *wma, struct vdev_start_params *params);
1227
1228/**
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001229 * wma_send_vdev_stop_to_fw() - send the vdev stop command to firmware
1230 * @wma: the WMA handle containing a reference to the wmi_handle to use
1231 * @vdev_id: the VDEV Id of the VDEV to stop
1232 *
1233 * This is a helper function that acquires the WMI response wakelock before
1234 * sending down the VDEV_STOP command to firmware. This wakelock is
1235 * automatically released on failure. Consumers should call
1236 * wma_release_wmi_resp_wakelock() upon receipt of the VDEV_STOP response from
1237 * firmware, to avoid power penalties.
1238 *
1239 * Return: QDF_STATUS
1240 */
1241QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id);
1242
lifeng66831662017-05-19 16:01:35 +08001243/*
1244 * wma_rx_aggr_failure_event_handler - event handler to handle rx aggr failure
1245 * @handle: the wma handle
1246 * @event_buf: buffer with event
1247 * @len: buffer length
1248 *
1249 * This function receives rx aggregation failure event and then pass to upper
1250 * layer
1251 *
1252 * Return: 0 on success
1253 */
1254int wma_rx_aggr_failure_event_handler(void *handle, u_int8_t *event_buf,
1255 u_int32_t len);
1256
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05301257/**
1258 * wma_wlan_bt_activity_evt_handler - event handler to handle bt activity
1259 * @handle: the WMA handle
1260 * @event: buffer with the event parameters
1261 * @len: length of the buffer
1262 *
1263 * This function receives BT activity event from firmware and passes the event
1264 * information to upper layers
1265 *
1266 * Return: 0 on success
1267 */
1268int wma_wlan_bt_activity_evt_handler(void *handle, uint8_t *event,
1269 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001270#endif