blob: 815b8c0f0eafa1a8436c719155c920d128db13a6 [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,
Govind Singh498bf2a2016-03-08 15:44:17 +0530201 struct scan_start_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
294#ifdef FEATURE_WLAN_SCAN_PNO
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530295QDF_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800296
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530297QDF_STATUS wma_pno_stop(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800298
299void wma_config_pno(tp_wma_handle wma, tpSirPNOScanReq pno);
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -0700300void wma_set_pno_channel_prediction(uint8_t *buf_ptr,
301 tpSirPNOScanReq pno);
302void wma_scan_cache_updated_ind(tp_wma_handle wma, uint8_t sessionId);
303#else
304static inline void wma_set_pno_channel_prediction(uint8_t *buf_ptr,
305 void *pno)
306{
307 WMA_LOGD("PNO Channel Prediction feature not supported");
308 WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_FIXED_STRUC, 0);
309}
310#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800311
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800312#ifdef WLAN_FEATURE_ROAM_OFFLOAD
313void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts);
314#endif
315
316#ifdef FEATURE_WLAN_EXTSCAN
317
318int wma_extscan_start_stop_event_handler(void *handle,
319 uint8_t *cmd_param_info,
320 uint32_t len);
321
322int wma_extscan_operations_event_handler(void *handle,
323 uint8_t *cmd_param_info,
324 uint32_t len);
325
326int wma_extscan_table_usage_event_handler(void *handle,
327 uint8_t *cmd_param_info,
328 uint32_t len);
329
330int wma_extscan_capabilities_event_handler(void *handle,
331 uint8_t *cmd_param_info,
332 uint32_t len);
333
334int wma_extscan_hotlist_match_event_handler(void *handle,
335 uint8_t *cmd_param_info,
336 uint32_t len);
337
338int wma_extscan_cached_results_event_handler(void *handle,
339 uint8_t *cmd_param_info,
340 uint32_t len);
341
342int wma_extscan_change_results_event_handler(void *handle,
343 uint8_t *cmd_param_info,
344 uint32_t len);
345
346int wma_passpoint_match_event_handler(void *handle,
347 uint8_t *cmd_param_info,
348 uint32_t len);
349
350int
351wma_extscan_hotlist_ssid_match_event_handler(void *handle,
352 uint8_t *cmd_param_info,
353 uint32_t len);
354#endif
355
356void wma_register_extscan_event_handler(tp_wma_handle wma_handle);
357
358#ifdef FEATURE_WLAN_EXTSCAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530359QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800360 tSirWifiScanCmdReqParams *pstart,
361 wmi_buf_t *buf, int *buf_len);
362
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530363QDF_STATUS wma_start_extscan(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800364 tSirWifiScanCmdReqParams *pstart);
365
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530366QDF_STATUS wma_stop_extscan(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800367 tSirExtScanStopReqParams *pstopcmd);
368
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530369QDF_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800370 tSirExtScanSetBssidHotListReqParams *
371 photlist, int *buf_len);
372
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530373QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800374 tSirExtScanSetBssidHotListReqParams
375 *photlist);
376
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530377QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800378 tSirExtScanResetBssidHotlistReqParams
379 *photlist_reset);
380
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530381QDF_STATUS wma_get_buf_extscan_change_monitor_cmd(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800382 tSirExtScanSetSigChangeReqParams
383 *psigchange, wmi_buf_t *buf,
384 int *buf_len);
385
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530386QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800387 tSirExtScanSetSigChangeReqParams *
388 psigchange);
389
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530390QDF_STATUS wma_extscan_stop_change_monitor(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800391 tSirExtScanResetSignificantChangeReqParams
392 *pResetReq);
393
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530394QDF_STATUS wma_extscan_get_cached_results(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800395 tSirExtScanGetCachedResultsReqParams *
396 pcached_results);
397
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530398QDF_STATUS wma_extscan_get_capabilities(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800399 tSirGetExtScanCapabilitiesReqParams *
400 pgetcapab);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530401QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800402 struct wifi_epno_params *req);
403
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530404QDF_STATUS wma_set_passpoint_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800405 struct wifi_passpoint_req *req);
406
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530407QDF_STATUS wma_reset_passpoint_network_list(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800408 struct wifi_passpoint_req *req);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530409QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800410wma_set_ssid_hotlist(tp_wma_handle wma,
411 struct sir_set_ssid_hotlist_request *request);
412#endif
413
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530414QDF_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800415 struct sir_ipa_offload_enable_disable *ipa_offload);
416
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800417void wma_process_unit_test_cmd(WMA_HANDLE handle,
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530418 t_wma_unit_test_cmd * wma_utest);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800419
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530420QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800421
422int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data, uint32_t len);
423
424void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id);
425
426int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
427 uint32_t len);
428
429#ifdef FEATURE_WLAN_SCAN_PNO
430int wma_nlo_match_evt_handler(void *handle, uint8_t *event, uint32_t len);
431
432int wma_nlo_scan_cmp_evt_handler(void *handle, uint8_t *event, uint32_t len);
433#endif
434
435#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800436void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id);
437static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
438 uint8_t vdev_id)
439{
440 return wma->interfaces[vdev_id].roam_synch_in_progress;
441}
442#else
443static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
444 uint8_t vdev_id)
445{
446 return false;
447}
Varun Reddy Yeturu101f9542016-05-24 10:07:52 -0700448static inline uint32_t wma_roam_scan_get_cckm_mode(
449 struct sSirRoamOffloadScanReq *roam_req, uint32_t auth_mode)
450{
451 return WMI_AUTH_CCKM;
452}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800453#endif
454
455/*
456 * wma_dev_if.c functions declarations
457 */
458
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800459struct cdp_vdev *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800460 uint8_t *vdev_id);
461
462/**
463 * wma_find_vdev_by_id() - Returns vdev handle for given vdev id.
464 * @wma - wma handle
465 * @vdev_id - vdev ID
466 *
467 * Return: Returns vdev handle if given vdev id is valid.
468 * Otherwise returns NULL.
469 */
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800470static inline
471struct cdp_vdev *wma_find_vdev_by_id(tp_wma_handle wma, uint8_t vdev_id)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800472{
473 if (vdev_id > wma->max_bssid)
474 return NULL;
475
476 return wma->interfaces[vdev_id].handle;
477}
478
479/**
480 * wma_get_vdev_count() - Returns number of active vdev.
481 * @wma - wma handle
482 *
483 * Return: Returns valid vdev count.
484 */
485static inline uint8_t wma_get_vdev_count(tp_wma_handle wma)
486{
487 uint8_t vdev_count = 0, i;
488
489 for (i = 0; i < wma->max_bssid; i++) {
490 if (wma->interfaces[i].handle)
491 vdev_count++;
492 }
493 return vdev_count;
494}
495
496bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id);
497
498#ifdef QCA_IBSS_SUPPORT
499bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id);
Houston Hoffman79b4af22015-10-06 12:01:08 -0700500#else
501/**
502 * wma_is_vdev_in_ibss_mode(): dummy function
503 * @wma: wma handle
504 * @vdev_id: vdev id
505 *
506 * Return false since no vdev can be in ibss mode without ibss support
507 */
508static inline
Mahesh Kumar Kalikot Veetil32e4fc72016-09-09 17:05:22 -0700509bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id)
Houston Hoffman79b4af22015-10-06 12:01:08 -0700510{
511 return false;
512}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800513#endif
514
515/**
Houston Hoffman79b4af22015-10-06 12:01:08 -0700516 * wma_is_vdev_in_beaconning_mode() - check if vdev is in a beaconning mode
517 * @wma: wma handle
518 * @vdev_id: vdev id
519 *
520 * Helper function to know whether given vdev id
521 * is in a beaconning mode or not.
522 *
523 * Return: True if vdev needs to beacon.
524 */
525static inline
526bool wma_is_vdev_in_beaconning_mode(tp_wma_handle wma, uint8_t vdev_id)
527{
528 return wma_is_vdev_in_ap_mode(wma, vdev_id) ||
529 wma_is_vdev_in_ibss_mode(wma, vdev_id);
530}
531
532/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800533 * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID
534 * @wma - wma handle
535 * @vdev_id - vdev ID
536 *
537 * Return: Returns pointer to bssid on success,
538 * otherwise returns NULL.
539 */
540static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma,
541 uint8_t vdev_id)
542{
543 if (vdev_id >= wma->max_bssid)
544 return NULL;
545
546 return wma->interfaces[vdev_id].bssid;
547}
548
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800549struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800550 uint8_t *vdev_id);
551
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530552QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800553 struct del_sta_self_params *pdel_sta_self_req_param,
554 uint8_t generateRsp);
555
556int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
557 uint32_t len);
558
Govind Singhd76a5b02016-03-08 15:12:14 +0530559QDF_STATUS wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800560 uint32_t param_id, uint32_t param_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800561void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
Leo Chang96464902016-10-28 11:10:54 -0700562 uint8_t vdev_id, void *peer,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800563 bool roam_synch_in_progress);
564
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800565QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
566 struct cdp_vdev *vdev,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800567 u8 peer_addr[IEEE80211_ADDR_LEN],
568 uint32_t peer_type, uint8_t vdev_id,
569 bool roam_synch_in_progress);
570
571int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
572 u32 len);
573
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800574struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800575 struct add_sta_self_params *self_sta_req,
576 uint8_t generateRsp);
577
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530578QDF_STATUS wma_vdev_start(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800579 struct wma_vdev_start_req *req, bool isRestart);
580
581void wma_vdev_resp_timer(void *data);
582
583struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma,
584 uint8_t vdev_id,
585 uint32_t msg_type, uint8_t type,
586 void *params, uint32_t timeout);
587
588void wma_hold_req_timer(void *data);
589struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
590 uint8_t vdev_id, uint32_t msg_type,
591 uint8_t type, void *params,
592 uint32_t timeout);
593
594void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id,
595 uint8_t type);
596
597void wma_add_bss(tp_wma_handle wma, tpAddBssParams params);
598
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800599void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta);
600
601void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta);
602
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800603void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params);
604
605int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type);
606
607void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle,
608 tpDisableIntraBssFwd pdis_intra_fwd);
609
Deepak Dhamdhere2dae1bd2016-10-27 10:58:29 -0700610void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params);
611
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800612/*
613 * wma_mgmt.c functions declarations
614 */
615
616int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len);
617
618int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len);
619
620void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
621
622int wma_unified_bcntx_status_event_handler(void *handle,
623 uint8_t *cmd_param_info,
624 uint32_t len);
625
mukul sharma72c8b222015-09-04 17:02:01 +0530626void wma_set_sta_sa_query_param(tp_wma_handle wma,
627 uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800628
629void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
630 uint32_t method, uint32_t timeperiod,
631 uint8_t *hostv4addr, uint8_t *destv4addr,
632 uint8_t *destmac);
633
634int wma_vdev_install_key_complete_event_handler(void *handle,
635 uint8_t *event,
636 uint32_t len);
637
Govind Singhb30d4c02016-03-24 11:01:23 +0530638QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800639 tSirNwType nw_type,
640 tpAddStaParams params);
641
Himanshu Agarwal009f1572016-03-09 17:26:02 +0530642QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle,
643 uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800644 gtx_config_t *gtx_info);
645
646void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id,
647 uint8_t llbcoexist);
648
649void wma_process_update_beacon_params(tp_wma_handle wma,
650 tUpdateBeaconParams *bcn_params);
651
Rajeev Kumar416b73f2017-01-21 16:45:21 -0800652void wma_update_cfg_params(tp_wma_handle wma, struct scheduler_msg *cfgParam);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800653
654void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info);
655
656void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
657 uint8_t vdev_id,
658 int8_t peer_num_delta);
659
660void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info);
661
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530662QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800663 tEdcaParams *edca_params);
664
665int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event,
666 uint32_t len);
667
668void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
669 tpSendProbeRespParams probe_rsp_info);
670
671void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info);
672
673void wma_set_keepalive_req(tp_wma_handle wma,
674 tSirKeepAliveReq *keepalive);
675
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +0530676void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id,
677 int32_t rssi);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800678
679void wma_process_update_opmode(tp_wma_handle wma_handle,
680 tUpdateVHTOpMode *update_vht_opmode);
681
682void wma_process_update_rx_nss(tp_wma_handle wma_handle,
683 tUpdateRxNss *update_rx_nss);
684
685void wma_process_update_membership(tp_wma_handle wma_handle,
686 tUpdateMembership *membership);
687
688void wma_process_update_userpos(tp_wma_handle wma_handle,
689 tUpdateUserPos *userpos);
690
691void wma_hidden_ssid_vdev_restart(tp_wma_handle wma_handle,
692 tHalHiddenSsidVdevRestart *pReq);
693
694/*
695 * wma_power.c functions declarations
696 */
697
698void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req);
699
Govind Singhd76a5b02016-03-08 15:12:14 +0530700QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800701 uint32_t vdev_id, uint32_t param,
702 uint32_t value);
703
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530704QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800705wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id);
706
Govind Singhd76a5b02016-03-08 15:12:14 +0530707QDF_STATUS wma_set_ap_peer_uapsd(tp_wma_handle wma, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800708 uint8_t *peer_addr, uint8_t uapsd_value,
709 uint8_t max_sp);
710
711void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param,
712 wmi_wmm_vparams *wmm_param, int ac);
713
714void wma_set_tx_power(WMA_HANDLE handle,
715 tMaxTxPowerParams *tx_pwr_params);
716
717void wma_set_max_tx_power(WMA_HANDLE handle,
718 tMaxTxPowerParams *tx_pwr_params);
719
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800720void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req);
721
722void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req);
723
724void wma_disable_uapsd_mode(tp_wma_handle wma,
725 tpDisableUapsdParams ps_req);
726
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530727QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800728
729int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
730 uint32_t len);
731
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530732QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800733 tSirTxPowerLimit *ptxlim);
734
735void wma_update_noa(struct beacon_info *beacon,
736 struct p2p_sub_element_noa *noa_ie);
737
738void wma_update_probe_resp_noa(tp_wma_handle wma_handle,
739 struct p2p_sub_element_noa *noa_ie);
740
741int wma_p2p_noa_event_handler(void *handle, uint8_t *event,
742 uint32_t len);
743
744void wma_process_set_p2pgo_noa_req(tp_wma_handle wma,
745 tP2pPsParams *ps_params);
746
747void wma_process_set_mimops_req(tp_wma_handle wma_handle,
748 tSetMIMOPS *mimops);
749
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530750QDF_STATUS wma_set_mimops(tp_wma_handle wma, uint8_t vdev_id, int value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800751
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530752QDF_STATUS wma_notify_modem_power_state(void *wma_ptr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800753 tSirModemPowerStateInd *pReq);
754
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530755QDF_STATUS wma_set_smps_params(tp_wma_handle wma, uint8_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800756 int value);
757
758void wma_set_suspend_dtim(tp_wma_handle wma);
759
760void wma_set_resume_dtim(tp_wma_handle wma);
761
762/*
763 * wma_data.c functions declarations
764 */
765
766
767void wma_set_bss_rate_flags(struct wma_txrx_node *iface,
768 tpAddBssParams add_bss);
769
770int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params);
771
772void wma_update_txrx_chainmask(int num_rf_chains, int *cmd_value);
773
774int wma_peer_state_change_event_handler(void *handle,
775 uint8_t *event_buff,
776 uint32_t len);
777
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530778QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800779 mcc_adaptive_scheduler);
780
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530781QDF_STATUS wma_set_mcc_channel_time_latency
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800782 (tp_wma_handle wma,
783 uint32_t mcc_channel, uint32_t mcc_channel_time_latency);
784
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530785QDF_STATUS wma_set_mcc_channel_time_quota
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800786 (tp_wma_handle wma,
787 uint32_t adapter_1_chan_number,
788 uint32_t adapter_1_quota, uint32_t adapter_2_chan_number);
789
790void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params);
791
792void wma_unpause_vdev(tp_wma_handle wma);
793
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530794QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800795 tSirRateUpdateInd *
796 pRateUpdateParams);
797
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530798QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800799
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530800QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800801
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530802#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \
803 defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT)
804
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800805int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
806 uint32_t len);
807#endif
808
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530809#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
810QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
811 struct t_bad_peer_txtcl_config *config);
Mohit Khanna0fe61672016-05-19 16:53:39 -0700812#else
813static inline QDF_STATUS
814wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
815 struct t_bad_peer_txtcl_config *config)
816{
817 return QDF_STATUS_E_FAILURE;
818}
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +0530819#endif
820
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530821QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800822 t_thermal_mgmt *pThermalParams);
823
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530824QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800825 uint8_t thermal_level);
826
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530827QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800828 t_thermal_cmd_params thermal_info);
829
830int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event,
831 uint32_t len);
832
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800833int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
834 uint32_t len);
835
836int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
837 uint32_t len);
838
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800839/*
840 * wma_utils.c functions declarations
841 */
842
843#ifdef WLAN_FEATURE_STATS_EXT
844int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf,
845 uint32_t len);
846#endif
847
848tSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode);
Archana Ramachandran20d2e232016-02-11 16:58:40 -0800849int wma_smps_mode_to_force_mode_param(uint8_t smps_mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800850
851#ifdef WLAN_FEATURE_LINK_LAYER_STATS
852void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle);
853
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530854QDF_STATUS wma_process_ll_stats_clear_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800855 (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq);
856
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530857QDF_STATUS wma_process_ll_stats_set_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800858 (tp_wma_handle wma, const tpSirLLStatsSetReq setReq);
859
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530860QDF_STATUS wma_process_ll_stats_get_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800861 (tp_wma_handle wma, const tpSirLLStatsGetReq getReq) ;
862
863int wma_unified_link_iface_stats_event_handler(void *handle,
864 uint8_t *cmd_param_info,
865 uint32_t len);
866#endif
867
868void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus,
869 uint8_t link_status);
870
871int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
872 uint32_t len);
873
874int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
875 uint32_t len);
876
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530877QDF_STATUS wma_send_link_speed(uint32_t link_speed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800878
879int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info,
880 uint32_t len);
881
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530882QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800883
884int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
885 uint32_t len);
886
887bool wma_is_sap_active(tp_wma_handle wma_handle);
888
889bool wma_is_p2p_go_active(tp_wma_handle wma_handle);
890
891bool wma_is_p2p_cli_active(tp_wma_handle wma_handle);
892
893bool wma_is_sta_active(tp_wma_handle wma_handle);
894
895WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type,
896 uint8_t is_ht, uint8_t ch_width,
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800897 uint8_t is_vht, bool is_he);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800898
899int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle,
900 uint8_t vdev_id, uint32_t value);
901
902int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
903 uint8_t vdev_id, uint32_t value);
904
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800905void wma_get_stats_req(WMA_HANDLE handle,
906 tAniGetPEStatsReq *get_stats_param);
907
908#if defined(QCA_WIFI_FTM)
909void wma_utf_detach(tp_wma_handle wma_handle);
910
911void wma_utf_attach(tp_wma_handle wma_handle);
912
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530913QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800914wma_process_ftm_command(tp_wma_handle wma_handle,
915 struct ar6k_testmode_cmd_data *msg_buffer);
916#endif
917
918/*
919 * wma_features.c functions declarations
920 */
921
922void wma_process_link_status_req(tp_wma_handle wma,
923 tAniGetLinkStatus *pGetLinkStatus);
924
925#ifdef FEATURE_WLAN_LPHB
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530926QDF_STATUS wma_process_lphb_conf_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800927 tSirLPHBReq *lphb_conf_req);
928
929#endif
930
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530931QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800932 tAniDHCPInd *ta_dhcp_ind);
933
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530934QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800935
Govind Singha471e5e2015-10-12 17:11:14 +0530936int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf,
937 uint32_t len);
938
Govind Singhf25a0f12016-03-08 16:09:48 +0530939QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle,
Govind Singha471e5e2015-10-12 17:11:14 +0530940 uint32_t cmd, uint32_t value1, uint32_t value2);
941
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800942void wma_wow_tx_complete(void *wma);
943
944int wmi_unified_nat_keepalive_enable(tp_wma_handle wma, uint8_t vdev_id);
945
Govind Singhd76a5b02016-03-08 15:12:14 +0530946int wma_unified_csa_offload_enable(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800947
948#ifdef WLAN_FEATURE_NAN
949int wma_nan_rsp_event_handler(void *handle, uint8_t *event_buf, uint32_t len);
950#endif
951
952#ifdef FEATURE_WLAN_TDLS
953int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len);
954#endif
955
956int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len);
957
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800958#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajan4e9cf392015-11-20 13:35:05 -0800959int wma_oem_data_response_handler(void *handle, uint8_t *datap,
960 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800961#endif
962
963void wma_register_dfs_event_handler(tp_wma_handle wma_handle);
964
965int
966wma_unified_dfs_phyerr_filter_offload_enable(tp_wma_handle wma_handle);
967
968#if !defined(REMOVE_PKT_LOG)
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530969QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800970 struct ath_pktlog_wmi_params *params);
971#endif
972
973int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
974 uint32_t len);
975int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len);
976
Anurag Chouhan6d760662016-02-20 16:05:43 +0530977QDF_STATUS wma_resume_req(tp_wma_handle wma, enum qdf_suspend_type type);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800978
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530979QDF_STATUS wma_wow_add_pattern(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800980 struct wow_add_pattern *ptrn);
981
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530982QDF_STATUS wma_wow_delete_user_pattern(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800983 struct wow_delete_pattern *pattern);
984
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530985QDF_STATUS wma_wow_enter(tp_wma_handle wma, tpSirHalWowlEnterParams info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800986
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530987QDF_STATUS wma_wow_exit(tp_wma_handle wma, tpSirHalWowlExitParams info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800988
Anurag Chouhan6d760662016-02-20 16:05:43 +0530989QDF_STATUS wma_suspend_req(tp_wma_handle wma, enum qdf_suspend_type type);
Mukul Sharma4c60a7e2017-03-06 19:42:18 +0530990
Houston Hoffmana76591b2015-11-10 16:52:05 -0800991void wma_calculate_and_update_conn_state(tp_wma_handle wma);
992void wma_update_conn_state(tp_wma_handle wma, uint32_t conn_mask);
Houston Hoffman7260ecb2015-10-05 18:43:07 -0700993void wma_update_conn_state(tp_wma_handle wma, uint32_t conn_mask);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800994
995void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg);
996
997void wma_aggr_qos_req(tp_wma_handle wma,
998 tAggrAddTsParams *pAggrQosRspMsg);
999
1000void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg);
1001
1002int wma_process_receive_filter_set_filter_req(tp_wma_handle wma_handle,
1003 tSirRcvPktFilterCfgType *
1004 rcv_filter_param);
1005
1006int wma_process_receive_filter_clear_filter_req(tp_wma_handle wma_handle,
1007 tSirRcvFltPktClearParam *
1008 rcv_clear_param);
1009
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001010#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301011QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001012 void *pTsmStatsMsg);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -08001013QDF_STATUS wma_plm_start(tp_wma_handle wma, const tpSirPlmReq plm);
1014QDF_STATUS wma_plm_stop(tp_wma_handle wma, const tpSirPlmReq plm);
1015void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001016#endif
1017
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301018QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
1019 tSirRcvFltMcAddrList * mcbc_param);
Rajeev Kumar8e3e2832015-11-06 16:02:54 -08001020QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma);
1021
1022QDF_STATUS wma_process_get_peer_info_req
1023 (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq);
1024
1025QDF_STATUS wma_process_tx_fail_monitor_ind
1026 (tp_wma_handle wma, tAniTXFailMonitorInd *pReq);
1027
1028QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma);
1029
1030QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma);
1031
1032QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma);
1033
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301034QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001035 tSirAddPeriodicTxPtrn *
1036 pAddPeriodicTxPtrnParams);
1037
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301038QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001039 tSirDelPeriodicTxPtrn *
1040 pDelPeriodicTxPtrnParams);
1041
1042#ifdef WLAN_FEATURE_STATS_EXT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301043QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001044#endif
1045
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301046QDF_STATUS wma_process_ibss_route_table_update_ind(void *wma_handle,
1047 tAniIbssRouteTable * pData);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001048
1049#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Himanshu Agarwal44195412016-03-09 13:03:54 +05301050QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001051
1052int wma_set_app_type1_params_in_fw(tp_wma_handle wma,
1053 tpSirAppType1Params appType1Params);
1054
Himanshu Agarwal44195412016-03-09 13:03:54 +05301055QDF_STATUS wma_set_app_type2_params_in_fw(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001056 tpSirAppType2Params appType2Params);
1057#endif
1058
1059#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
1060int wma_auto_shutdown_event_handler(void *handle, uint8_t *event,
1061 uint32_t len);
1062
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301063QDF_STATUS wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001064 tSirAutoShutdownCmdParams *
1065 auto_sh_cmd);
1066#endif
1067
Manikandan Mohan976e7562016-03-15 16:33:31 -07001068#ifdef WLAN_FEATURE_TSF
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001069int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len);
1070QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id);
1071QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, uint32_t vdev_id);
Manikandan Mohan976e7562016-03-15 16:33:31 -07001072QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin);
1073#else
1074static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle,
1075 uint32_t vdev_id)
1076{
1077 return QDF_STATUS_SUCCESS;
1078}
1079
1080static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle,
1081 uint32_t vdev_id)
1082{
1083 return QDF_STATUS_SUCCESS;
1084}
1085
1086static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data,
1087 uint32_t data_len)
1088{
1089 return 0;
1090}
1091
1092static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin)
1093{
1094 return QDF_STATUS_E_INVAL;
1095}
1096#endif
Manikandan Mohan80dea792016-04-28 16:36:48 -07001097QDF_STATUS wma_set_wisa_params(tp_wma_handle wma, struct sir_wisa_params *wisa);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001098
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001099#ifdef WLAN_FEATURE_NAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301100QDF_STATUS wma_nan_req(void *wma_ptr, tpNanRequest nan_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001101#endif
1102
1103#ifdef DHCP_SERVER_OFFLOAD
1104int wma_process_dhcpserver_offload(tp_wma_handle wma_handle,
1105 tSirDhcpSrvOffloadInfo *
1106 pDhcpSrvOffloadInfo);
1107#endif
1108
1109#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301110QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001111 tSirLedFlashingReq *flashing);
1112#endif
1113
1114#ifdef FEATURE_WLAN_CH_AVOID
1115int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
1116 uint32_t len);
1117
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301118QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001119 tSirChAvoidUpdateReq *
1120 ch_avoid_update_req);
1121#endif
1122
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001123
1124#ifdef FEATURE_WLAN_TDLS
1125
Himanshu Agarwal44195412016-03-09 13:03:54 +05301126QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001127int wma_update_tdls_peer_state(WMA_HANDLE handle,
1128 tTdlsPeerStateParams *peerStateParams);
1129/**
1130 * wma_set_tdls_offchan_mode() - set tdls off channel mode
1131 * @handle: wma handle
1132 * @chan_switch_params: Pointer to tdls channel switch parameter structure
1133 *
1134 * This function sets tdls off channel mode
1135 *
1136 * Return: 0 on success; negative errno otherwise
1137 */
Himanshu Agarwal44195412016-03-09 13:03:54 +05301138QDF_STATUS wma_set_tdls_offchan_mode(WMA_HANDLE wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001139 tdls_chan_switch_params *chan_switch_params);
1140#endif
1141
1142struct ieee80211com *wma_dfs_attach(struct ieee80211com *dfs_ic);
1143
1144void wma_dfs_detach(struct ieee80211com *dfs_ic);
1145
1146void wma_dfs_configure(struct ieee80211com *ic);
1147
Chandrasekaran, Manishekar22a7e1e2015-11-05 10:38:49 +05301148struct dfs_ieee80211_channel *wma_dfs_configure_channel(
1149 struct ieee80211com *dfs_ic,
Siddarth Poddar17dc4712016-03-09 16:30:27 +05301150 uint32_t band_center_freq1,
1151 uint32_t band_center_freq2,
Chandrasekaran, Manishekar22a7e1e2015-11-05 10:38:49 +05301152 struct wma_vdev_start_req
1153 *req);
Hong Shib90718f2017-02-20 00:57:22 +08001154void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001155void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id);
1156
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001157int wma_rssi_breached_event_handler(void *handle,
1158 u_int8_t *cmd_param_info, u_int32_t len);
1159#ifdef WLAN_FEATURE_MEMDUMP
1160int wma_fw_mem_dump_event_handler(void *handle, u_int8_t *cmd_param_info,
1161 u_int32_t len);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301162QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001163 struct fw_dump_req *mem_dump_req);
1164#else
1165static inline int wma_fw_mem_dump_event_handler(void *handle,
1166 u_int8_t *cmd_param_info, u_int32_t len)
1167{
1168 return 0;
1169}
1170
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301171static inline QDF_STATUS wma_process_fw_mem_dump_req(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001172 void *mem_dump_req)
1173{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301174 return QDF_STATUS_SUCCESS;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001175}
1176#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301177QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001178 struct vdev_ie_info *ie_info);
1179int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
1180 uint32_t len);
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001181int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info,
1182 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001183
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001184int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
1185 uint32_t len);
1186void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id,
1187 uint8_t type);
Peng Xu8fdaa492016-06-22 10:20:47 -07001188int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf,
1189 uint32_t len);
Manjeet Singhf82ed072016-07-08 11:40:00 +05301190
1191QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle,
1192 struct sir_mac_pwr_dbg_cmd *
1193 sir_pwr_dbg_params);
1194
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301195#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301196int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
1197 uint32_t data_len);
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301198#else
1199static inline int wma_encrypt_decrypt_msg_handler(void *handle, uint8_t *data,
1200 uint32_t data_len)
1201{
1202 return 0;
1203}
1204#endif
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301205
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301206/**
1207 * wma_lost_link_info_handler() - collect lost link information and inform SME
1208 * @wma: WMA handle
1209 * @vdev_id: vdev ID
1210 * @rssi: rssi at disconnection time
1211 *
1212 * Return: none
1213 */
1214void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
1215 int32_t rssi);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301216int wma_unified_power_debug_stats_event_handler(void *handle,
1217 uint8_t *cmd_param_info, uint32_t len);
Sen, Devendra154b3c42017-02-13 20:44:15 +05301218
1219#ifdef FEATURE_WLAN_DIAG_SUPPORT
1220/**
1221 * wma_sta_kickout_event()- send sta kickout event
1222 * @kickout_reason - reasoncode for kickout
1223 * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address
1224 * @vdev_id: Unique id for identifying the VDEV
1225 *
1226 * This function sends sta kickout diag event
1227 *
1228 * Return: void.
1229 */
1230void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
1231 uint8_t *macaddr);
1232#else
1233static inline void wma_sta_kickout_event(uint32_t kickout_reason,
1234 uint8_t vdev_id, uint8_t *macaddr)
1235{
1236
1237};
1238#endif /* FEATURE_WLAN_DIAG_SUPPORT */
1239
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001240/**
1241 * wma_acquire_wmi_resp_wakelock() - acquire the WMI response wakelock
1242 * @wma: the WMA handle containing the wakelock to acquire
1243 * @msec: the wakelock duration in milliseconds
1244 *
1245 * Return: void
1246 */
1247void wma_acquire_wmi_resp_wakelock(t_wma_handle *wma, uint32_t msec);
1248
1249/**
1250 * wma_release_wmi_resp_wakelock() - release the WMI response wakelock
1251 * @wma: the WMA handle containing the wakelock to release
1252 *
1253 * Return: void
1254 */
1255void wma_release_wmi_resp_wakelock(t_wma_handle *wma);
1256
1257/**
Dustin Brownd5f12942017-03-10 11:06:25 -08001258 * wma_send_vdev_start_to_fw() - send the vdev start command to firmware
1259 * @wma: the WMA handle containing a reference to the wmi_handle to use
1260 * @params: the VDEV_START params to send to firmware
1261 *
1262 * This is a helper function that acquires the WMI response wakelock before
1263 * sending down the VDEV_START command to firmware. This wakelock is
1264 * automatically released on failure. Consumers should call
1265 * wma_release_wmi_resp_wakelock() upon receipt of the VDEV_START response from
1266 * firmware, to avoid power penalties.
1267 *
1268 * Return: QDF_STATUS
1269 */
1270QDF_STATUS
1271wma_send_vdev_start_to_fw(t_wma_handle *wma, struct vdev_start_params *params);
1272
1273/**
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001274 * wma_send_vdev_stop_to_fw() - send the vdev stop command to firmware
1275 * @wma: the WMA handle containing a reference to the wmi_handle to use
1276 * @vdev_id: the VDEV Id of the VDEV to stop
1277 *
1278 * This is a helper function that acquires the WMI response wakelock before
1279 * sending down the VDEV_STOP command to firmware. This wakelock is
1280 * automatically released on failure. Consumers should call
1281 * wma_release_wmi_resp_wakelock() upon receipt of the VDEV_STOP response from
1282 * firmware, to avoid power penalties.
1283 *
1284 * Return: QDF_STATUS
1285 */
1286QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id);
1287
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001288#endif