blob: 3f4fe65a61be858dbf1de93620bc794ab15535d5 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Harprit Chhabada98225f62018-12-11 15:29:55 -08002 * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019#ifndef WMA_INTERNAL_H
20#define WMA_INTERNAL_H
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -080021#include <cdp_txrx_handle.h>
Deepak Dhamdheree2dd5442016-05-27 15:05:51 -070022#if !defined(REMOVE_PKT_LOG)
23#include "pktlog_ac.h"
24#endif
25
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080026/* ################### defines ################### */
27/*
28 * TODO: Following constant should be shared by firwmare in
29 * wmi_unified.h. This will be done once wmi_unified.h is updated.
30 */
31#define WMI_PEER_STATE_AUTHORIZED 0x2
32
33#define WMA_2_4_GHZ_MAX_FREQ 3000
mukul sharma72c8b222015-09-04 17:02:01 +053034
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080035/*AR9888/AR6320 noise floor approx value
36 * similar to the mentioned the WMA
37 */
38#define WMA_TGT_NOISE_FLOOR_DBM (-96)
Yeshwanth Sriram Guntuka14ab04c2018-09-21 15:06:49 +053039#define WMA_INVALID_PER_CHAIN_SNR (0x80)
40#define WMA_INVALID_PER_CHAIN_RSSI (0xFF)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080041
42/*
43 * Make sure that link monitor and keep alive
44 * default values should be in sync with CFG.
45 */
46#define WMA_LINK_MONITOR_DEFAULT_TIME_SECS 10
47#define WMA_KEEP_ALIVE_DEFAULT_TIME_SECS 5
48
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080049/* The maximum number of patterns that can be transmitted by the firmware
50 * and maximum patterns size.
51 */
jsreekumac44b922018-06-12 20:18:39 +053052#ifndef WMA_MAXNUM_PERIODIC_TX_PTRNS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080053#define WMA_MAXNUM_PERIODIC_TX_PTRNS 6
jsreekumac44b922018-06-12 20:18:39 +053054#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080055
Kiran Kumar Lokere80734c02018-12-16 22:48:14 -080056#define WMA_WMM_EXPO_TO_VAL(val) ((1 << (val)) - 1)
Rajeev Kumar8e3e2832015-11-06 16:02:54 -080057
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080058#define MAX_HT_MCS_IDX 8
59#define MAX_VHT_MCS_IDX 10
Jingxiang Gef1d81592019-10-20 12:03:22 +080060#ifdef WLAN_FEATURE_11AX
61#define MAX_HE_MCS_IDX 12
62#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080063#define INVALID_MCS_IDX 255
64
Jingxiang Gef1d81592019-10-20 12:03:22 +080065#define IS_MCS_HAS_DCM_RATE(val) \
66 ((val) == 0 || (val) == 1 || \
67 (val) == 3 || (val) == 4)
68
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080069#define LINK_STATUS_LEGACY 0
70#define LINK_STATUS_VHT 0x1
71#define LINK_STATUS_MIMO 0x2
72#define LINK_SUPPORT_VHT 0x4
73#define LINK_SUPPORT_MIMO 0x8
74
75#define LINK_RATE_VHT 0x3
76
77#define MAX_ENTRY_HOLD_REQ_QUEUE 2
Krishna Kumaar Natarajana5c53bd2015-10-27 11:48:27 -070078#define MAX_ENTRY_VDEV_RESP_QUEUE 10
79
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080080/**
81 * struct index_data_rate_type - non vht data rate type
Ryan Hsu6139d2d2015-11-04 17:29:00 -080082 * @mcs_index: mcs rate index
83 * @ht20_rate: HT20 supported rate table
84 * @ht40_rate: HT40 supported rate table
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080085 */
86struct index_data_rate_type {
Ryan Hsu6139d2d2015-11-04 17:29:00 -080087 uint8_t mcs_index;
88 uint16_t ht20_rate[2];
89 uint16_t ht40_rate[2];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080090};
91
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080092/**
93 * struct index_vht_data_rate_type - vht data rate type
Ryan Hsu6139d2d2015-11-04 17:29:00 -080094 * @mcs_index: mcs rate index
95 * @ht20_rate: VHT20 supported rate table
96 * @ht40_rate: VHT40 supported rate table
97 * @ht80_rate: VHT80 supported rate table
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080098 */
99struct index_vht_data_rate_type {
Ryan Hsu6139d2d2015-11-04 17:29:00 -0800100 uint8_t mcs_index;
101 uint16_t ht20_rate[2];
102 uint16_t ht40_rate[2];
103 uint16_t ht80_rate[2];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800104};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800105
Jingxiang Gef1d81592019-10-20 12:03:22 +0800106#ifdef WLAN_FEATURE_11AX
107#define MAX_HE_DCM_INDEX 2
108/**
109 * struct index_he_data_rate_type - he data rate type
110 * @beacon_rate_index: Beacon rate index
111 * @supported_he80_rate: he80 rate
112 * @supported_he40_rate: he40 rate
113 * @supported_he20_rate: he20 rate
114 */
115struct index_he_data_rate_type {
116 uint8_t beacon_rate_index;
117 uint16_t supported_he20_rate[MAX_HE_DCM_INDEX][3];
118 uint16_t supported_he40_rate[MAX_HE_DCM_INDEX][3];
119 uint16_t supported_he80_rate[MAX_HE_DCM_INDEX][3];
120};
121#endif
122
Jeff Johnsondab58602018-07-14 15:30:24 -0700123struct wifi_scan_cmd_req_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800124/*
125 * wma_main.c functions declarations
126 */
127
Abhishek Singh2d775fd2017-08-18 10:51:33 +0530128/**
129 * wma_send_msg_by_priority() - Send wma message to PE with priority.
130 * @wma_handle: wma handle
131 * @msg_type: message type
132 * @body_ptr: message body ptr
133 * @body_val: message body value
134 * @is_high_priority: if msg is high priority
135 *
136 * Return: none
137 */
138void wma_send_msg_by_priority(tp_wma_handle wma_handle, uint16_t msg_type,
139 void *body_ptr, uint32_t body_val, bool is_high_priority);
140
141/**
142 * wma_send_msg() - Send wma message to PE.
143 * @wma_handle: wma handle
144 * @msg_type: message type
145 * @body_ptr: message body ptr
146 * @body_val: message body value
147 *
148 * Return: none
149 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800150void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
151 void *body_ptr, uint32_t body_val);
152
Abhishek Singh2d775fd2017-08-18 10:51:33 +0530153/**
154 * wma_send_msg_high_priority() - Send wma message to PE with high priority.
155 * @wma_handle: wma handle
156 * @msg_type: message type
157 * @body_ptr: message body ptr
158 * @body_val: message body value
159 *
160 * Return: none
161 */
162void wma_send_msg_high_priority(tp_wma_handle wma_handle, uint16_t msg_type,
163 void *body_ptr, uint32_t body_val);
164
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800165void wma_data_tx_ack_comp_hdlr(void *wma_context,
Nirav Shahcbc6d722016-03-01 16:24:53 +0530166 qdf_nbuf_t netbuf, int32_t status);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800167
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530168QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800169 int value);
170
171/*
172 * wma_scan_roam.c functions declarations
173 */
174
175#ifdef WLAN_FEATURE_ROAM_OFFLOAD
176void wma_process_roam_invoke(WMA_HANDLE handle,
177 struct wma_roam_invoke_cmd *roaminvoke);
178
179void wma_process_roam_synch_fail(WMA_HANDLE handle,
180 struct roam_offload_synch_fail *synch_fail);
181
182int wma_roam_synch_event_handler(void *handle, uint8_t *event,
183 uint32_t len);
Padma, Santhosh Kumaraa2433e2017-10-06 14:34:46 +0530184
185/**
Pragaspathi Thilagaraj7a7163b2019-07-14 22:47:09 +0530186 * wma_roam_auth_offload_event_handler() - Handle LFR-3.0 Roam authentication
187 * offload event.
188 * @handle: wma_handle
189 * @event: rso auth offload event data pointer
190 * @len: length of the data
191 *
192 * Handles roam authentication offload event from firmware which is triggered
193 * after roam candidate selection.
194 */
195int wma_roam_auth_offload_event_handler(WMA_HANDLE handle, uint8_t *event,
196 uint32_t len);
197
198/**
Sandeep Puligilla3746d5d2018-10-23 16:01:11 -0700199 * wma_mlme_roam_synch_event_handler_cb() - roam synch event handler
200 * @handle: wma handle
201 * @event: event data
202 * @len: length of data
203 *
204 * This function is roam synch event handler. It sends roam
205 * indication for upper layer.
206 *
207 * Return: Success or Failure status
208 */
209int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
210 uint32_t len);
211
212/**
Padma, Santhosh Kumaraa2433e2017-10-06 14:34:46 +0530213 * wma_roam_synch_frame_event_handler() - roam synch frame event handler
214 * @handle: wma handle
215 * @event: event data
216 * @len: length of data
217 *
218 * This function is roam synch frame event handler.
219 *
220 * Return: Success or Failure status
221 */
222int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
223 uint32_t len);
Ashish Kumar Dhanotiya02137932019-02-26 21:43:32 +0530224#else
225static inline int wma_mlme_roam_synch_event_handler_cb(void *handle,
226 uint8_t *event,
227 uint32_t len)
228{
229 return 0;
230}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800231#endif
232
Kapil Gupta5cda2252016-12-29 18:44:26 +0530233/**
234 * wma_update_per_roam_config() -per roam config parameter updation to FW
235 * @handle: wma handle
236 * @req_buf: per roam config parameters
237 *
238 * Return: none
239 */
240void wma_update_per_roam_config(WMA_HANDLE handle,
241 struct wmi_per_roam_config_req *req_buf);
242
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530243QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800244 tSirUpdateChanList *chan_list);
245
246#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530247QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
Himanshu Agarwalb56ad2e2016-07-19 15:43:09 +0530248 roam_offload_param *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800249 roam_offload_params,
Jeff Johnsone6da4b02019-02-06 22:22:04 -0800250 struct roam_offload_scan_req *roam_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800251#endif
252
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530253QDF_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800254 wmi_start_scan_cmd_fixed_param *
255 scan_cmd_fp,
Jeff Johnsone6da4b02019-02-06 22:22:04 -0800256 struct roam_offload_scan_req *roam_req,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800257 uint32_t mode, uint32_t vdev_id);
258
Varun Reddy Yeturu061d4d62017-07-20 09:39:32 -0700259/**
260 * wma_roam_scan_mawc_params() - send roam scan mode request to fw
261 * @wma_handle: wma handle
262 * @roam_req: roam request param
263 *
264 * Fill the MAWC roaming parameters and send
265 * WMI_ROAM_CONFIGURE_MAWC_CMDID TLV to firmware.
266 *
267 * Return: QDF status
268 */
269QDF_STATUS wma_roam_scan_mawc_params(tp_wma_handle wma_handle,
Jeff Johnsone6da4b02019-02-06 22:22:04 -0800270 struct roam_offload_scan_req *roam_req);
Varun Reddy Yeturu061d4d62017-07-20 09:39:32 -0700271
Jeff Johnsone6da4b02019-02-06 22:22:04 -0800272/**
273 * wma_roam_scan_offload_rssi_threshold() - set scan offload rssi threashold
274 * @wma_handle: wma handle
275 * @roam_req: Roaming request buffer
276 *
277 * Send WMI_ROAM_SCAN_RSSI_THRESHOLD TLV to firmware
278 *
279 * Return: QDF status
280 */
281QDF_STATUS
282wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
283 struct roam_offload_scan_req *roam_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800284
Pragaspathi Thilagaraj2b8ea352019-04-12 02:23:50 +0530285QDF_STATUS
286wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle,
287 struct roam_offload_scan_req *roam_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800288
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530289QDF_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800290 uint32_t vdev_id,
291 int32_t rssi_change_thresh,
292 uint32_t bcn_rssi_weight,
293 uint32_t hirssi_delay_btw_scans);
294
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530295QDF_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800296 uint8_t chan_count,
Tushnim Bhattacharyya42299b82019-09-01 18:03:54 -0700297 uint32_t *chan_freq_list,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800298 uint8_t list_type, uint32_t vdev_id);
299
Pragaspathi Thilagaraj7a1a08e2019-05-29 01:20:29 +0530300A_UINT32 e_csr_auth_type_to_rsn_authmode(enum csr_akm_type authtype,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800301 eCsrEncryptionType encr);
302
303A_UINT32 e_csr_encryption_type_to_rsn_cipherset(eCsrEncryptionType encr);
304
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800305void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
Jeff Johnson9f18aa72018-12-02 12:05:12 -0800306 struct mac_context *mac,
Jeff Johnsone6da4b02019-02-06 22:22:04 -0800307 struct roam_offload_scan_req *roam_req,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800308 wmi_start_scan_cmd_fixed_param *
309 scan_params);
310
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530311QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800312 A_INT32 first_bcnt,
313 A_UINT32 final_bcnt, uint32_t vdev_id);
314
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530315QDF_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800316 uint32_t command, uint32_t vdev_id);
317
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800318#ifdef WLAN_FEATURE_ROAM_OFFLOAD
319void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts);
320#endif
321
322#ifdef FEATURE_WLAN_EXTSCAN
323
324int wma_extscan_start_stop_event_handler(void *handle,
325 uint8_t *cmd_param_info,
326 uint32_t len);
327
328int wma_extscan_operations_event_handler(void *handle,
329 uint8_t *cmd_param_info,
330 uint32_t len);
331
332int wma_extscan_table_usage_event_handler(void *handle,
333 uint8_t *cmd_param_info,
334 uint32_t len);
335
336int wma_extscan_capabilities_event_handler(void *handle,
337 uint8_t *cmd_param_info,
338 uint32_t len);
339
340int wma_extscan_hotlist_match_event_handler(void *handle,
341 uint8_t *cmd_param_info,
342 uint32_t len);
343
344int wma_extscan_cached_results_event_handler(void *handle,
345 uint8_t *cmd_param_info,
346 uint32_t len);
347
348int wma_extscan_change_results_event_handler(void *handle,
349 uint8_t *cmd_param_info,
350 uint32_t len);
351
352int wma_passpoint_match_event_handler(void *handle,
353 uint8_t *cmd_param_info,
354 uint32_t len);
355
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800356#endif
357
Pragaspathi Thilagaraj30251ec2018-12-18 17:22:57 +0530358int wma_handle_btm_blacklist_event(void *handle, uint8_t *cmd_param_info,
359 uint32_t len);
360
Wen Gong7952fbd2018-04-18 11:27:23 +0800361#ifdef FEATURE_WLAN_EXTSCAN
362int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
363
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800364void wma_register_extscan_event_handler(tp_wma_handle wma_handle);
365
Jeff Johnsondab58602018-07-14 15:30:24 -0700366/**
367 * wma_start_extscan() - start extscan command to fw.
368 * @wma: wma handle
369 * @params: extscan command request params
370 *
371 * This function sends start extscan request to fw.
372 *
373 * Return: QDF Status.
374 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530375QDF_STATUS wma_start_extscan(tp_wma_handle wma,
Jeff Johnsondab58602018-07-14 15:30:24 -0700376 struct wifi_scan_cmd_req_params *pstart);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800377
Jeff Johnson7272ea72018-07-15 17:22:27 -0700378/**
379 * wma_stop_extscan() - stop extscan command to fw.
380 * @wma: wma handle
381 * @params: stop scan command request params
382 *
383 * This function sends stop extscan request to fw.
384 *
385 * Return: QDF Status.
386 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530387QDF_STATUS wma_stop_extscan(tp_wma_handle wma,
Jeff Johnson7272ea72018-07-15 17:22:27 -0700388 struct extscan_stop_req_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800389
Jeff Johnson1148cb02018-07-13 23:14:32 -0700390/**
391 * wma_extscan_start_hotlist_monitor() - start hotlist monitor
392 * @wma: wma handle
393 * @params: hotlist request params
394 *
395 * This function configures hotlist monitor in fw.
396 *
397 * Return: QDF status
398 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530399QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
Jeff Johnson1148cb02018-07-13 23:14:32 -0700400 struct extscan_bssid_hotlist_set_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800401
Jeff Johnson9743eb72018-07-14 10:30:04 -0700402/**
403 * wma_extscan_stop_hotlist_monitor() - stop hotlist monitor
404 * @wma: wma handle
405 * @params: hotlist request params
406 *
407 * This function configures hotlist monitor to stop in fw.
408 *
409 * Return: QDF status
410 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530411QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
Jeff Johnson9743eb72018-07-14 10:30:04 -0700412 struct extscan_bssid_hotlist_reset_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800413
Jeff Johnsonb43ed032018-07-16 06:59:21 -0700414/**
415 * wma_extscan_start_change_monitor() - send start change monitor cmd
416 * @wma: wma handle
417 * @params: change monitor request params
418 *
419 * This function sends start change monitor request to fw.
420 *
421 * Return: QDF status
422 */
423QDF_STATUS
424wma_extscan_start_change_monitor(tp_wma_handle wma,
425 struct extscan_set_sig_changereq_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800426
Jeff Johnson0c8dbc32018-07-16 22:10:48 -0700427/**
428 * wma_extscan_stop_change_monitor() - send stop change monitor cmd
429 * @wma: wma handle
430 * @params: change monitor request params
431 *
432 * This function sends stop change monitor request to fw.
433 *
434 * Return: QDF status
435 */
436QDF_STATUS
437wma_extscan_stop_change_monitor(tp_wma_handle wma,
438 struct extscan_capabilities_reset_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800439
Jeff Johnson2ba60092018-07-17 08:19:37 -0700440/**
441 * wma_extscan_get_cached_results() - extscan get cached results
442 * @wma: wma handle
443 * @params: cached results parameters
444 *
445 * This function send request to fw to get cached results.
446 *
447 * Return: QDF status
448 */
449QDF_STATUS
450wma_extscan_get_cached_results(tp_wma_handle wma,
451 struct extscan_cached_result_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800452
Jeff Johnsonfed9a732018-07-18 12:18:03 -0700453/**
454 * wma_extscan_get_capabilities() - extscan get capabilities
455 * @wma: wma handle
456 * @params: get capabilities params
457 *
458 * This function sends request to fw to get extscan capabilities.
459 *
460 * Return: QDF status
461 */
462QDF_STATUS
463wma_extscan_get_capabilities(tp_wma_handle wma,
464 struct extscan_capabilities_params *params);
465
Jeff Johnson360135b2018-07-18 20:51:47 -0700466/**
467 * wma_set_epno_network_list() - set epno network list
468 * @wma: WMA handle
469 * @req: epno config params request structure
470 *
471 * This function reads the incoming epno config request structure
472 * and constructs the WMI message to the firmware.
473 *
474 * Return: 0 on success, error number otherwise
475 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530476QDF_STATUS wma_set_epno_network_list(tp_wma_handle wma,
Jeff Johnson360135b2018-07-18 20:51:47 -0700477 struct wifi_enhanced_pno_params *req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800478
Jeff Johnson2a7f1012018-07-19 07:21:06 -0700479/**
480 * wma_set_passpoint_network_list() - set passpoint network list
481 * @wma: WMA handle
482 * @params: passpoint network request structure
483 *
484 * This function sends the passpoint configs down to the firmware
485 *
486 * Return: QDF_STATUS enumeration
487 */
488QDF_STATUS
489wma_set_passpoint_network_list(tp_wma_handle wma,
490 struct wifi_passpoint_req_param *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800491
Jeff Johnson2a7f1012018-07-19 07:21:06 -0700492/**
493 * wma_reset_passpoint_network_list() - reset passpoint network list
494 * @wma: WMA handle
495 * @params: passpoint network request structure
496 *
497 * This function sends down WMI command with network id set to wildcard id.
498 * firmware shall clear all the config entries
499 *
500 * Return: QDF_STATUS enumeration
501 */
502QDF_STATUS
503wma_reset_passpoint_network_list(tp_wma_handle wma,
504 struct wifi_passpoint_req_param *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800505#endif
506
Jeff Johnson9d45f332019-01-29 08:42:00 -0800507/**
508 * wma_scan_probe_setoui() - set scan probe OUI
509 * @wma: wma handle
510 * @set_oui: OUI parameters
511 *
512 * set scan probe OUI parameters in firmware
513 *
514 * Return: QDF status
515 */
516QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma,
517 struct scan_mac_oui *set_oui);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800518
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800519void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id);
520
521int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
522 uint32_t len);
523
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800524#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Varun Reddy Yeturud5939f82015-12-24 18:14:02 -0800525void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id);
526static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
527 uint8_t vdev_id)
528{
529 return wma->interfaces[vdev_id].roam_synch_in_progress;
530}
531#else
532static inline bool wma_is_roam_synch_in_progress(tp_wma_handle wma,
533 uint8_t vdev_id)
534{
535 return false;
536}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800537#endif
538
539/*
540 * wma_dev_if.c functions declarations
541 */
542
Abhishek Ambure3ee80882019-09-20 16:32:12 +0530543/**
544 * wma_find_vdev_by_addr() - find vdev_id from mac address
545 * @wma: wma handle
546 * @addr: mac address
547 * @vdev_id: return vdev_id
548 *
549 * Return: Returns vdev handle or NULL if mac address don't match
550 */
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800551struct cdp_vdev *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800552 uint8_t *vdev_id);
553
554/**
555 * wma_find_vdev_by_id() - Returns vdev handle for given vdev id.
556 * @wma - wma handle
557 * @vdev_id - vdev ID
558 *
559 * Return: Returns vdev handle if given vdev id is valid.
560 * Otherwise returns NULL.
561 */
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800562static inline
563struct cdp_vdev *wma_find_vdev_by_id(tp_wma_handle wma, uint8_t vdev_id)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800564{
Naveen Rawatf2bd42d2017-06-29 14:51:43 -0700565 if (vdev_id >= wma->max_bssid)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800566 return NULL;
567
Abhishek Ambure24cff9e2019-10-01 12:09:55 +0530568 if (!wma->interfaces[vdev_id].vdev)
569 return NULL;
570
Abhishek Ambure0b2ea322019-09-23 19:25:39 +0530571 return wlan_vdev_get_dp_handle(wma->interfaces[vdev_id].vdev);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800572}
573
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800574bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id);
575
576#ifdef QCA_IBSS_SUPPORT
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530577/**
578 * wma_is_vdev_in_ibss_mode() - check that vdev is in ibss mode or not
579 * @wma: wma handle
580 * @vdev_id: vdev id
581 *
582 * Helper function to know whether given vdev id
583 * is in IBSS mode or not.
584 *
585 * Return: True/False
586 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800587bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id);
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530588
589/**
590 * wma_adjust_ibss_heart_beat_timer() - set ibss heart beat timer in fw.
591 * @wma: wma handle
592 * @vdev_id: vdev id
593 * @peer_num_delta: peer number delta value
594 *
595 * Return: none
596 */
597void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
598 uint8_t vdev_id,
599 int8_t peer_num_delta);
600
601/**
602 * wma_set_ibss_pwrsave_params() - set ibss power save parameter to fw
603 * @wma: wma handle
604 * @vdev_id: vdev id
605 *
606 * Return: 0 for success or error code.
607 */
608QDF_STATUS
609wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id);
610
611/**
612 * wma_ibss_peer_info_event_handler() - IBSS peer info event handler
613 * @handle: wma handle
614 * @data: event data
615 * @len: length of data
616 *
617 * This function handles IBSS peer info event from FW.
618 *
619 * Return: 0 for success or error code
620 */
621int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
622 uint32_t len);
Houston Hoffman79b4af22015-10-06 12:01:08 -0700623#else
624/**
625 * wma_is_vdev_in_ibss_mode(): dummy function
626 * @wma: wma handle
627 * @vdev_id: vdev id
628 *
629 * Return false since no vdev can be in ibss mode without ibss support
630 */
631static inline
Mahesh Kumar Kalikot Veetil32e4fc72016-09-09 17:05:22 -0700632bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id)
Houston Hoffman79b4af22015-10-06 12:01:08 -0700633{
634 return false;
635}
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530636
637/**
638 * wma_adjust_ibss_heart_beat_timer() - set ibss heart beat timer in fw.
639 * @wma: wma handle
640 * @vdev_id: vdev id
641 * @peer_num_delta: peer number delta value
642 *
643 * This function is dummy
644 *
645 * Return: none
646 */
647static inline void
648wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
649 uint8_t vdev_id,
650 int8_t peer_num_delta)
651{
652}
653
654/**
655 * wma_ibss_peer_info_event_handler() - IBSS peer info event handler
656 * @handle: wma handle
657 * @data: event data
658 * @len: length of data
659 *
660 * This function is dummy
661 *
662 * Return: 0 for success or error code
663 */
664static inline int
665wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
666 uint32_t len)
667{
668 return 0;
669}
Abhishek Ambure27f98302019-09-25 20:00:36 +0530670
671/**
672 * wma_set_ibss_pwrsave_params() - set ibss power save parameter to fw
673 * @wma: wma handle
674 * @vdev_id: vdev id
675 *
676 * This function is dummy
677 *
678 * Return: 0 for success or error code.
679 */
680static inline QDF_STATUS
681wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id)
682{
683 return QDF_STATUS_SUCCESS;
684}
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530685#endif /* QCA_IBSS_SUPPORT */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800686
687/**
Abhishek Ambure3ee80882019-09-20 16:32:12 +0530688 * wma_get_vdev_bssid() - Get BSSID from mlme_obj
689 * @vdev - pointer to vdev
690 *
691 * This API is used to get BSSID stored in vdev mlme object.
692 *
693 * Return: pointer to bssid on success else NULL.
694 */
695uint8_t *wma_get_vdev_bssid(struct wlan_objmgr_vdev *vdev);
696
697/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800698 * wma_find_bssid_by_vdev_id() - Get the BSS ID corresponding to the vdev ID
699 * @wma - wma handle
700 * @vdev_id - vdev ID
701 *
702 * Return: Returns pointer to bssid on success,
703 * otherwise returns NULL.
704 */
705static inline uint8_t *wma_find_bssid_by_vdev_id(tp_wma_handle wma,
706 uint8_t vdev_id)
707{
708 if (vdev_id >= wma->max_bssid)
709 return NULL;
710
Abhishek Ambure3ee80882019-09-20 16:32:12 +0530711 return wma_get_vdev_bssid(wma->interfaces[vdev_id].vdev);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800712}
713
Abhishek Ambure3ee80882019-09-20 16:32:12 +0530714/**
715 * wma_find_vdev_by_bssid() - Get the corresponding vdev_id from BSSID
716 * @wma - wma handle
717 * @vdev_id - vdev ID
718 *
719 * Return: fill vdev_id with appropriate vdev id and return vdev
720 * handle or NULL if not found.
721 */
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800722struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800723 uint8_t *vdev_id);
724
Abhishek Amburecbef1442019-06-10 17:15:00 +0530725/**
726 * wma_vdev_detach() - send vdev delete command to fw
727 * @wma_handle: wma handle
728 * @pdel_vdev_req_param: del vdev params
729 *
730 * Return: QDF status
731 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530732QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
Abhishek Amburecbef1442019-06-10 17:15:00 +0530733 struct del_vdev_params *pdel_vdev_req_param);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800734
Govind Singhd76a5b02016-03-08 15:12:14 +0530735QDF_STATUS wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800736 uint32_t param_id, uint32_t param_value);
Rajeev Kumar Sirasanagandlae5787e22018-10-25 21:10:34 +0530737
738QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
739 uint8_t vdev_id, void *peer,
740 bool roam_synch_in_progress);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800741
Rakshith Suresh Patkar5f9efa32019-02-04 13:26:56 +0530742QDF_STATUS wma_peer_unmap_conf_send(tp_wma_handle wma,
743 struct send_peer_unmap_conf_params *msg);
744
Venkata Sharath Chandra Manchala0d44d452016-11-23 17:48:15 -0800745QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
746 struct cdp_vdev *vdev,
Srinivas Girigowdaa47b45f2019-02-27 12:29:02 -0800747 uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800748 uint32_t peer_type, uint8_t vdev_id,
749 bool roam_synch_in_progress);
750
Abhishek Singh2904a6a2018-08-30 17:45:59 +0530751/**
752 * wma_send_del_bss_response() - send delete bss resp
753 * @wma: wma handle
Abhishek Ambure968f1512019-08-28 18:33:57 +0530754 * @resp: pointer to del bss response
Abhishek Singh2904a6a2018-08-30 17:45:59 +0530755 *
756 * Return: none
757 */
Abhishek Ambure968f1512019-08-28 18:33:57 +0530758void wma_send_del_bss_response(tp_wma_handle wma, struct del_bss_resp *resp);
Abhishek Singhcaa61852018-09-12 15:50:04 +0530759
Abhishek Singh2904a6a2018-08-30 17:45:59 +0530760/**
Abhishek Singhfb5b4d32018-12-06 11:53:08 +0530761 * __wma_handle_vdev_stop_rsp() - vdev stop response handler
Abhishek Ambure09905d72019-08-08 19:45:55 +0530762 * @resp_event: pointer to response received
Abhishek Singh2904a6a2018-08-30 17:45:59 +0530763 *
764 * Return: QDF_STATUS_SUCCESS for success or QDF_ERROR code
765 */
766QDF_STATUS
Abhishek Ambure09905d72019-08-08 19:45:55 +0530767__wma_handle_vdev_stop_rsp(struct vdev_stop_response *resp_event);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800768
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800769void wma_hold_req_timer(void *data);
770struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma,
771 uint8_t vdev_id, uint32_t msg_type,
772 uint8_t type, void *params,
773 uint32_t timeout);
774
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530775/**
776 * wma_add_bss() - Add BSS request to fw as per opmode
777 * @wma: wma handle
778 * @params: add bss params
779 *
780 * Return: none
781 */
Jianmin Zhuf07aa512019-08-09 18:20:17 +0800782void wma_add_bss(tp_wma_handle wma, struct bss_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800783
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530784/**
785 * wma_add_sta() - process add sta request as per opmode
786 * @wma: wma handle
787 * @add_Sta: add sta params
788 *
789 * Return: none
790 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800791void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta);
792
Abhishek Ambure8ed62cb2019-09-11 19:03:57 +0530793/**
794 * wma_delete_sta() - process del sta request as per opmode
795 * @wma: wma handle
796 * @del_sta: delete sta params
797 *
798 * Return: none
799 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800800void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta);
801
Abhishek Ambure968f1512019-08-28 18:33:57 +0530802/**
803 * wma_delete_bss() - process delete bss request from upper layer
804 * @wma: wma handle
805 * @vdev_id: vdev id
806 *
807 * Return: none
808 */
809void wma_delete_bss(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800810
811int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type);
812
Abhishek Ambure0b2ea322019-09-23 19:25:39 +0530813/**
814 * wma_set_vdev_intrabss_fwd() - set intra_fwd value to wni_in.
815 * @wma_handle: wma handle
816 * @pdis_intra_fwd: Pointer to DisableIntraBssFwd struct
817 *
818 * Return: none
819 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800820void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle,
821 tpDisableIntraBssFwd pdis_intra_fwd);
822
Abhishek Ambure968f1512019-08-28 18:33:57 +0530823/**
824 * wma_delete_bss_ho_fail() - process delete bss request for handoff failure
825 * @wma: wma handle
826 * @vdev_id: vdev id
827 *
828 * Delete BSS in case of ROAM_HO_FAIL processing is handled separately in
829 * this routine. It needs to be done without sending any commands to firmware
830 * because firmware has already stopped and deleted peer and vdev is down.
831 * Relevant logic is aggregated from other routines. It changes the host
832 * data structures without sending VDEV_STOP, PEER_FLUSH_TIDS, PEER_DELETE
833 * and VDEV_DOWN commands to firmware.
834 *
835 * Return: none
836 */
837void wma_delete_bss_ho_fail(tp_wma_handle wma, uint8_t vdev_id);
Deepak Dhamdhere2dae1bd2016-10-27 10:58:29 -0700838
Jiachao Wu712d4fd2017-08-23 16:52:34 +0800839uint32_t wma_get_bcn_rate_code(uint16_t rate);
840
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800841/*
842 * wma_mgmt.c functions declarations
843 */
Liangwei Dong03e080c2019-07-02 17:06:39 +0800844#ifdef WLAN_WMI_BCN
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800845int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len);
Harprit Chhabada98225f62018-12-11 15:29:55 -0800846#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800847
Abhishek Ambure3ee80882019-09-20 16:32:12 +0530848/**
849 * wma_peer_sta_kickout_event_handler() - kickout event handler
850 * @handle: wma handle
851 * @event: event data
852 * @len: data length
853 *
854 * Kickout event is received from firmware on observing beacon miss
855 * It handles kickout event for different modes and indicate to
856 * upper layers.
857 *
858 * Return: 0 for success or error code
859 */
Krunal Sonibd7e8932018-10-03 11:14:51 -0700860int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
861 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800862
Abhishek Ambure0b2ea322019-09-23 19:25:39 +0530863/**
864 * wma_unified_bcntx_status_event_handler() - beacon tx status event handler
865 * @handle: wma handle
866 * @cmd_param_info: event data
867 * @len: data length
868 *
869 * WMI Handler for WMI_OFFLOAD_BCN_TX_STATUS_EVENTID event from firmware.
870 * This event is generated by FW when the beacon transmission is offloaded
871 * and the host performs beacon template modification using WMI_BCN_TMPL_CMDID
872 * The FW generates this event when the first successful beacon transmission
873 * after template update
874 *
875 * Return: 0 for success or error code
876 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800877int wma_unified_bcntx_status_event_handler(void *handle,
878 uint8_t *cmd_param_info,
879 uint32_t len);
880
mukul sharma72c8b222015-09-04 17:02:01 +0530881void wma_set_sta_sa_query_param(tp_wma_handle wma,
882 uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800883
884void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
885 uint32_t method, uint32_t timeperiod,
886 uint8_t *hostv4addr, uint8_t *destv4addr,
887 uint8_t *destmac);
888
889int wma_vdev_install_key_complete_event_handler(void *handle,
890 uint8_t *event,
891 uint32_t len);
892
Abhishek Singh8d92ea72019-10-22 12:18:12 +0530893/**
894 * wma_objmgr_set_peer_mlme_phymode() - set phymode to peer object
895 * @wma: wma handle
896 * @mac_addr: mac addr of peer
897 * @phymode: phymode value to set
898 *
899 * Return: None
900 */
901void wma_objmgr_set_peer_mlme_phymode(tp_wma_handle wma, uint8_t *mac_addr,
902 enum wlan_phymode phymode);
903
Govind Singhb30d4c02016-03-24 11:01:23 +0530904QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800905 tSirNwType nw_type,
906 tpAddStaParams params);
907
Himanshu Agarwal009f1572016-03-09 17:26:02 +0530908QDF_STATUS wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle,
909 uint32_t if_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800910 gtx_config_t *gtx_info);
911
912void wma_update_protection_mode(tp_wma_handle wma, uint8_t vdev_id,
913 uint8_t llbcoexist);
914
915void wma_process_update_beacon_params(tp_wma_handle wma,
916 tUpdateBeaconParams *bcn_params);
917
Abhishek Ambure0b2ea322019-09-23 19:25:39 +0530918/**
919 * wma_update_rts_params() - update cfg parameters to target
920 * @wma: wma handle
921 * @value: rts_threshold
922 *
923 * Return: none
924 */
Harprit Chhabadabec6de42018-09-10 10:21:15 -0700925void wma_update_rts_params(tp_wma_handle wma, uint32_t value);
926
Abhishek Ambure0b2ea322019-09-23 19:25:39 +0530927/**
928 * wma_update_frag_params() - update cfg parameters to target
929 * @wma: wma handle
930 * @value: frag_threshold
931 *
932 * Return: none
933 */
Harprit Chhabadabec6de42018-09-10 10:21:15 -0700934void wma_update_frag_params(tp_wma_handle wma, uint32_t value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800935
Kiran Kumar Lokere7d6e4c92018-09-19 13:45:47 -0700936#ifdef CRYPTO_SET_KEY_CONVERGED
937static inline void wma_set_stakey(tp_wma_handle wma_handle,
938 tpSetStaKeyParams key_info)
939{
940}
941
942static inline void wma_set_bsskey(tp_wma_handle wma_handle,
943 tpSetBssKeyParams key_info)
944{
945}
946#else
947/**
948 * wma_set_stakey() - set encryption key
949 * @wma_handle: wma handle
950 * @key_info: station key info
951 *
952 * This function sets encryption key for WEP/WPA/WPA2
953 * encryption mode in firmware and send response to upper layer.
954 *
955 * Return: none
956 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800957void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info);
958
Kiran Kumar Lokere7d6e4c92018-09-19 13:45:47 -0700959/**
960 * wma_set_bsskey() - set encryption key to fw.
961 * @wma_handle: wma handle
962 * @key_info: key info
963 *
964 * Return: none
965 */
966void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info);
967#endif
968
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530969QDF_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800970 tEdcaParams *edca_params);
971
Abhishek Ambure0b2ea322019-09-23 19:25:39 +0530972/**
973 * wma_tbttoffset_update_event_handler() - tbtt offset update handler
974 * @handle: wma handle
975 * @event: event buffer
976 * @len: data length
977 *
978 * Return: 0 for success or error code
979 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800980int wma_tbttoffset_update_event_handler(void *handle, uint8_t *event,
981 uint32_t len);
982
983void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
984 tpSendProbeRespParams probe_rsp_info);
985
Abhishek Singhdfa69c32018-08-30 15:39:34 +0530986/**
987 * wma_set_ap_vdev_up() - send vdev up req
988 * @wma: wma handle
989 * @vdev_id: vdev id
990 *
Abhishek Singh3d30a3b2018-09-12 15:49:18 +0530991 * Return: QDF_STATUS
Abhishek Singhdfa69c32018-08-30 15:39:34 +0530992 */
Abhishek Singh3d30a3b2018-09-12 15:49:18 +0530993QDF_STATUS wma_set_ap_vdev_up(tp_wma_handle wma, uint8_t vdev_id);
Abhishek Singhdfa69c32018-08-30 15:39:34 +0530994
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800995void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info);
996
997void wma_set_keepalive_req(tp_wma_handle wma,
Jeff Johnson562ccad2019-02-06 22:10:24 -0800998 struct keep_alive_req *keepalive);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800999
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301000void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id,
1001 int32_t rssi);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001002
1003void wma_process_update_opmode(tp_wma_handle wma_handle,
1004 tUpdateVHTOpMode *update_vht_opmode);
1005
1006void wma_process_update_rx_nss(tp_wma_handle wma_handle,
1007 tUpdateRxNss *update_rx_nss);
1008
1009void wma_process_update_membership(tp_wma_handle wma_handle,
1010 tUpdateMembership *membership);
1011
1012void wma_process_update_userpos(tp_wma_handle wma_handle,
1013 tUpdateUserPos *userpos);
1014
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001015/*
1016 * wma_power.c functions declarations
1017 */
1018
Abhishek Ambure0b2ea322019-09-23 19:25:39 +05301019/**
1020 * wma_enable_sta_ps_mode() - enable sta powersave params in fw
1021 * @wma: wma handle
1022 * @ps_req: power save request
1023 *
1024 * Return: none
1025 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001026void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req);
1027
Govind Singhd76a5b02016-03-08 15:12:14 +05301028QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001029 uint32_t vdev_id, uint32_t param,
1030 uint32_t value);
1031
Govind Singhd76a5b02016-03-08 15:12:14 +05301032QDF_STATUS wma_set_ap_peer_uapsd(tp_wma_handle wma, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001033 uint8_t *peer_addr, uint8_t uapsd_value,
1034 uint8_t max_sp);
1035
1036void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param,
Kiran Kumar Lokere27026ae2018-03-09 11:38:19 -08001037 struct wmi_host_wme_vparams *wmm_param,
1038 int ac, bool mu_edca_param);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001039
1040void wma_set_tx_power(WMA_HANDLE handle,
1041 tMaxTxPowerParams *tx_pwr_params);
1042
1043void wma_set_max_tx_power(WMA_HANDLE handle,
1044 tMaxTxPowerParams *tx_pwr_params);
1045
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001046void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req);
1047
Abhishek Ambure0b2ea322019-09-23 19:25:39 +05301048/**
1049 * wma_enable_uapsd_mode() - enable uapsd mode in fw
1050 * @wma: wma handle
1051 * @ps_req: power save request
1052 *
1053 * Return: none
1054 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001055void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req);
1056
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -07001057void wma_disable_uapsd_mode(tp_wma_handle wma, tpDisableUapsdParams ps_req);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001058
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301059QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001060
1061int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
1062 uint32_t len);
1063
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301064QDF_STATUS wma_process_tx_power_limits(WMA_HANDLE handle,
Jeff Johnson19ce8d02019-02-08 22:56:23 -08001065 struct tx_power_limit *ptxlim);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001066
1067void wma_update_noa(struct beacon_info *beacon,
1068 struct p2p_sub_element_noa *noa_ie);
1069
1070void wma_update_probe_resp_noa(tp_wma_handle wma_handle,
1071 struct p2p_sub_element_noa *noa_ie);
1072
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001073void wma_process_set_mimops_req(tp_wma_handle wma_handle,
1074 tSetMIMOPS *mimops);
1075
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301076QDF_STATUS wma_set_mimops(tp_wma_handle wma, uint8_t vdev_id, int value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001077
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301078QDF_STATUS wma_notify_modem_power_state(void *wma_ptr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001079 tSirModemPowerStateInd *pReq);
1080
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301081QDF_STATUS wma_set_smps_params(tp_wma_handle wma, uint8_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001082 int value);
1083
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001084/*
1085 * wma_data.c functions declarations
1086 */
Abhishek Ambure0b2ea322019-09-23 19:25:39 +05301087/**
1088 * wma_set_bss_rate_flags() - set rate flags based on BSS capability
1089 * @wma: pointer to wma handle
1090 * @vdev_id: vdev id
1091 * @add_bss: pointer to bss params
1092 *
1093 * Return: none
1094 */
Naveen Rawatfa2a1002018-05-17 16:06:37 -07001095void wma_set_bss_rate_flags(tp_wma_handle wma, uint8_t vdev_id,
Jianmin Zhuf07aa512019-08-09 18:20:17 +08001096 struct bss_params *add_bss);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001097
1098int32_t wmi_unified_send_txbf(tp_wma_handle wma, tpAddStaParams params);
1099
Jiachao Wu08719b02017-07-05 13:05:34 +08001100/**
1101 * wma_check_txrx_chainmask() - check txrx chainmask
1102 * @num_rf_chains: number of rf chains
1103 * @cmd_value: command value
1104 *
1105 * Return: QDF_STATUS_SUCCESS for success or error code
1106 */
1107QDF_STATUS wma_check_txrx_chainmask(int num_rf_chains, int cmd_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001108
1109int wma_peer_state_change_event_handler(void *handle,
1110 uint8_t *event_buff,
1111 uint32_t len);
1112
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301113QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001114 mcc_adaptive_scheduler);
1115
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301116QDF_STATUS wma_set_mcc_channel_time_latency
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001117 (tp_wma_handle wma,
1118 uint32_t mcc_channel, uint32_t mcc_channel_time_latency);
1119
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301120QDF_STATUS wma_set_mcc_channel_time_quota
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001121 (tp_wma_handle wma,
1122 uint32_t adapter_1_chan_number,
1123 uint32_t adapter_1_quota, uint32_t adapter_2_chan_number);
1124
Abhishek Ambure0b2ea322019-09-23 19:25:39 +05301125/**
1126 * wma_process_rate_update_indate() - rate update indication
1127 * @wma: wma handle
1128 * @pRateUpdateParams: Rate update params
1129 *
1130 * This function update rate & short GI interval to fw based on params
1131 * send by SME.
1132 *
1133 * Return: QDF status
1134 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301135QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001136 tSirRateUpdateInd *
1137 pRateUpdateParams);
1138
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301139QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001140
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301141QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001142
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +05301143#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || \
1144 defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(CONFIG_HL_SUPPORT)
1145
Abhishek Ambure0b2ea322019-09-23 19:25:39 +05301146/**
1147 * wma_mcc_vdev_tx_pause_evt_handler() - pause event handler
1148 * @handle: wma handle
1149 * @event: event buffer
1150 * @len: data length
1151 *
1152 * This function handle pause event from fw and pause/unpause
1153 * vdev.
1154 *
1155 * Return: 0 for success or error code.
1156 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001157int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
1158 uint32_t len);
1159#endif
1160
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +05301161#if defined(CONFIG_HL_SUPPORT) && defined(QCA_BAD_PEER_TX_FLOW_CL)
1162QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
1163 struct t_bad_peer_txtcl_config *config);
Mohit Khanna0fe61672016-05-19 16:53:39 -07001164#else
1165static inline QDF_STATUS
1166wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
1167 struct t_bad_peer_txtcl_config *config)
1168{
1169 return QDF_STATUS_E_FAILURE;
1170}
Poddar, Siddarth5a91f5b2016-04-28 12:24:10 +05301171#endif
1172
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301173QDF_STATUS wma_process_init_thermal_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001174 t_thermal_mgmt *pThermalParams);
1175
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301176QDF_STATUS wma_process_set_thermal_level(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001177 uint8_t thermal_level);
1178
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301179QDF_STATUS wma_set_thermal_mgmt(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001180 t_thermal_cmd_params thermal_info);
1181
1182int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event,
1183 uint32_t len);
1184
Rajeev Kumar8e3e2832015-11-06 16:02:54 -08001185int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
1186 uint32_t len);
1187
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001188/*
1189 * wma_utils.c functions declarations
1190 */
1191
1192#ifdef WLAN_FEATURE_STATS_EXT
1193int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf,
1194 uint32_t len);
1195#endif
1196
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -07001197enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode);
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001198int wma_smps_mode_to_force_mode_param(uint8_t smps_mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001199
1200#ifdef WLAN_FEATURE_LINK_LAYER_STATS
1201void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle);
1202
Abhishek Ambure3ee80882019-09-20 16:32:12 +05301203/**
1204 * wma_process_ll_stats_clear_req() - clear link layer stats
1205 * @wma: wma handle
1206 * @clearReq: ll stats clear request command params
1207 *
1208 * Return: QDF_STATUS_SUCCESS for success or error code
1209 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301210QDF_STATUS wma_process_ll_stats_clear_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001211 (tp_wma_handle wma, const tpSirLLStatsClearReq clearReq);
1212
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301213QDF_STATUS wma_process_ll_stats_set_req
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001214 (tp_wma_handle wma, const tpSirLLStatsSetReq setReq);
1215
Abhishek Ambure3ee80882019-09-20 16:32:12 +05301216/**
1217 * wma_process_ll_stats_get_req() - link layer stats get request
1218 * @wma:wma handle
1219 * @getReq:ll stats get request command params
1220 *
1221 * Return: QDF_STATUS_SUCCESS for success or error code
1222 */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301223QDF_STATUS wma_process_ll_stats_get_req
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -07001224 (tp_wma_handle wma, const tpSirLLStatsGetReq getReq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001225
1226int wma_unified_link_iface_stats_event_handler(void *handle,
1227 uint8_t *cmd_param_info,
1228 uint32_t len);
Zhang Qian73c348a2017-03-13 16:15:55 +08001229void wma_config_stats_ext_threshold(tp_wma_handle wma,
1230 struct sir_ll_ext_stats_threshold *thresh);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001231#endif
1232
1233void wma_post_link_status(tAniGetLinkStatus *pGetLinkStatus,
1234 uint8_t link_status);
1235
Abhishek Ambure0b2ea322019-09-23 19:25:39 +05301236/**
1237 * wma_link_status_event_handler() - link status event handler
1238 * @handle: wma handle
1239 * @cmd_param_info: data from event
1240 * @len: length
1241 *
1242 * Return: 0 for success or error code
1243 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001244int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
1245 uint32_t len);
1246
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +05301247/**
1248 * wma_rso_cmd_status_event_handler() - RSO Command status event handler
1249 * @wmi_event: WMI event
1250 *
1251 * This function is used to send RSO command status to upper layer
1252 *
1253 * Return: 0 for success
1254 */
1255int wma_rso_cmd_status_event_handler(wmi_roam_event_fixed_param *wmi_event);
1256
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001257int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
1258 uint32_t len);
1259
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301260QDF_STATUS wma_send_link_speed(uint32_t link_speed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001261
1262int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info,
1263 uint32_t len);
1264
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301265QDF_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001266
1267int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
1268 uint32_t len);
1269
Abhishek Ambure6a2773e2019-10-14 15:15:42 +05301270/**
1271 * wma_peer_phymode() - get phymode
1272 * @nw_type: nw type
1273 * @sta_type: sta type
1274 * @is_ht: is ht supported
1275 * @ch_width: supported channel width
1276 * @is_vht: is vht supported
1277 * @is_he: is HE supported
1278 *
1279 * Return: host phymode
1280 */
1281enum wlan_phymode
1282wma_peer_phymode(tSirNwType nw_type, uint8_t sta_type,
1283 uint8_t is_ht, uint8_t ch_width,
1284 uint8_t is_vht, bool is_he);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001285
1286int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle,
1287 uint8_t vdev_id, uint32_t value);
1288
1289int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
1290 uint8_t vdev_id, uint32_t value);
1291
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001292/*
1293 * wma_features.c functions declarations
1294 */
1295
Jeff Johnsonf0e54b02017-12-18 15:22:25 -08001296/**
1297 * wma_sar_register_event_handlers() - Register SAR event handlers
1298 * @handle: WMA Handle
1299 *
1300 * Function to be called during WMA initialization to register SAR
1301 * event handlers with WMI
1302 *
1303 * Return: QDF_STATUS_SUCCESS if registration is successful, otherwise
1304 * an error enumeration
1305 */
1306QDF_STATUS wma_sar_register_event_handlers(WMA_HANDLE handle);
1307
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001308void wma_process_link_status_req(tp_wma_handle wma,
1309 tAniGetLinkStatus *pGetLinkStatus);
1310
Will Huanga9814592017-05-24 15:47:58 +08001311/**
1312 * wma_get_peer_info_ext() - get peer info
1313 * @handle: wma interface
1314 * @peer_info_req: get peer info request information
1315 *
1316 * This function will send WMI_REQUEST_PEER_STATS_INFO_CMDID to FW
1317 *
1318 * Return: 0 on success, otherwise error value
1319 */
1320QDF_STATUS wma_get_peer_info_ext(WMA_HANDLE handle,
1321 struct sir_peer_info_ext_req *peer_info_req);
1322
1323/**
guangde4853c402019-05-06 15:54:04 +08001324 * wma_get_isolation() - get antenna isolation
1325 * @handle: wma interface
1326 *
1327 * This function will send WMI_COEX_GET_ANTENNA_ISOLATION_CMDID to FW
1328 *
1329 * Return: 0 on success, otherwise error value
1330 */
1331QDF_STATUS wma_get_isolation(tp_wma_handle wma);
1332
1333/**
Will Huanga9814592017-05-24 15:47:58 +08001334 * wma_peer_info_event_handler() - Handler for WMI_PEER_STATS_INFO_EVENTID
1335 * @handle: WMA global handle
1336 * @cmd_param_info: Command event data
1337 * @len: Length of cmd_param_info
1338 *
1339 * This function will handle WMI_PEER_STATS_INFO_EVENTID
1340 *
1341 * Return: 0 on success, error code otherwise
1342 */
1343int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info,
1344 u_int32_t len);
1345
Govind Singha471e5e2015-10-12 17:11:14 +05301346int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf,
1347 uint32_t len);
1348
Govind Singhf25a0f12016-03-08 16:09:48 +05301349QDF_STATUS wma_unified_fw_profiling_cmd(wmi_unified_t wmi_handle,
Govind Singha471e5e2015-10-12 17:11:14 +05301350 uint32_t cmd, uint32_t value1, uint32_t value2);
1351
Govind Singhd76a5b02016-03-08 15:12:14 +05301352int wma_unified_csa_offload_enable(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001353
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001354#ifdef FEATURE_WLAN_TDLS
1355int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len);
1356#endif
1357
1358int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len);
1359
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001360#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajan4e9cf392015-11-20 13:35:05 -08001361int wma_oem_data_response_handler(void *handle, uint8_t *datap,
1362 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001363#endif
1364
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001365#if !defined(REMOVE_PKT_LOG)
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301366QDF_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001367 struct ath_pktlog_wmi_params *params);
1368#endif
1369
1370int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
1371 uint32_t len);
Will Huang3cd2b7c2017-11-17 13:16:56 +08001372
1373int wma_d0_wow_disable_ack_event(void *handle, uint8_t *event, uint32_t len);
1374
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001375int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len);
1376
Jeff Johnson256002f2018-12-22 17:53:19 -08001377void wma_del_ts_req(tp_wma_handle wma, struct del_ts_params *msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001378
Jeff Johnson54024412018-12-22 12:07:06 -08001379/**
1380 * wma_aggr_qos_req() - send aggr qos request to fw
1381 * @wma: handle to wma
1382 * @pAggrQosRspMsg - combined struct for all ADD_TS requests.
1383 *
1384 * A function to handle WMA_AGGR_QOS_REQ. This will send out
1385 * ADD_TS requestes to firmware in loop for all the ACs with
1386 * active flow.
1387 *
1388 * Return: none
1389 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001390void wma_aggr_qos_req(tp_wma_handle wma,
Jeff Johnson54024412018-12-22 12:07:06 -08001391 struct aggr_add_ts_param *pAggrQosRspMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001392
Jeff Johnson9851fcc2018-12-22 17:29:58 -08001393void wma_add_ts_req(tp_wma_handle wma, struct add_ts_param *msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001394
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001395#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301396QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001397 void *pTsmStatsMsg);
Jeff Johnson36583f02019-02-26 08:02:11 -08001398void wma_config_plm(tp_wma_handle wma, struct plm_req_params *plm);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001399#endif
1400
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301401QDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
1402 tSirRcvFltMcAddrList * mcbc_param);
Rajeev Kumar8e3e2832015-11-06 16:02:54 -08001403QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma);
1404
1405QDF_STATUS wma_process_get_peer_info_req
1406 (tp_wma_handle wma, tSirIbssGetPeerInfoReqParams *pReq);
1407
1408QDF_STATUS wma_process_tx_fail_monitor_ind
1409 (tp_wma_handle wma, tAniTXFailMonitorInd *pReq);
1410
Rachit Kankaneee1735c2018-08-02 13:19:34 +05301411#ifdef FEATURE_WLAN_RMC
Rajeev Kumar8e3e2832015-11-06 16:02:54 -08001412QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma);
1413
1414QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma);
1415
1416QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma);
Rachit Kankaneee1735c2018-08-02 13:19:34 +05301417#else
1418static inline
1419QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma)
1420{
1421 return QDF_STATUS_SUCCESS;
1422}
1423
1424static inline
1425QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma)
1426{
1427 return QDF_STATUS_SUCCESS;
1428}
1429
1430static inline
1431QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma)
1432{
1433 return QDF_STATUS_SUCCESS;
1434}
1435#endif
Rajeev Kumar8e3e2832015-11-06 16:02:54 -08001436
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301437QDF_STATUS wma_process_add_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Jeff Johnson6dcb44a2018-12-23 10:17:00 -08001438 tSirAddPeriodicTxPtrn *pattern);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001439
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301440QDF_STATUS wma_process_del_periodic_tx_ptrn_ind(WMA_HANDLE handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001441 tSirDelPeriodicTxPtrn *
1442 pDelPeriodicTxPtrnParams);
1443
1444#ifdef WLAN_FEATURE_STATS_EXT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301445QDF_STATUS wma_stats_ext_req(void *wma_ptr, tpStatsExtRequest preq);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001446#endif
1447
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001448#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Himanshu Agarwal44195412016-03-09 13:03:54 +05301449QDF_STATUS wma_enable_ext_wow(tp_wma_handle wma, tpSirExtWoWParams params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001450
1451int wma_set_app_type1_params_in_fw(tp_wma_handle wma,
1452 tpSirAppType1Params appType1Params);
1453
Himanshu Agarwal44195412016-03-09 13:03:54 +05301454QDF_STATUS wma_set_app_type2_params_in_fw(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001455 tpSirAppType2Params appType2Params);
1456#endif
1457
1458#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
1459int wma_auto_shutdown_event_handler(void *handle, uint8_t *event,
1460 uint32_t len);
1461
Jeff Johnsona9ade7d2019-02-17 10:08:17 -08001462/**
1463 * wma_set_auto_shutdown_timer_req() - sets auto shutdown timer in firmware
1464 * @wma_handle: wma handle
1465 * @auto_sh_cmd: auto shutdown timer params
1466 *
1467 * Return: QDF status
1468 */
1469QDF_STATUS
1470wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle,
1471 struct auto_shutdown_cmd *auto_sh_cmd);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001472#endif
1473
Manikandan Mohan976e7562016-03-15 16:33:31 -07001474#ifdef WLAN_FEATURE_TSF
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001475int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len);
1476QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle, uint32_t vdev_id);
1477QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle, uint32_t vdev_id);
Manikandan Mohan976e7562016-03-15 16:33:31 -07001478QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin);
1479#else
1480static inline QDF_STATUS wma_capture_tsf(tp_wma_handle wma_handle,
1481 uint32_t vdev_id)
1482{
1483 return QDF_STATUS_SUCCESS;
1484}
1485
1486static inline QDF_STATUS wma_reset_tsf_gpio(tp_wma_handle wma_handle,
1487 uint32_t vdev_id)
1488{
1489 return QDF_STATUS_SUCCESS;
1490}
1491
1492static inline int wma_vdev_tsf_handler(void *handle, uint8_t *data,
1493 uint32_t data_len)
1494{
1495 return 0;
1496}
1497
1498static inline QDF_STATUS wma_set_tsf_gpio_pin(WMA_HANDLE handle, uint32_t pin)
1499{
1500 return QDF_STATUS_E_INVAL;
1501}
1502#endif
Manikandan Mohan80dea792016-04-28 16:36:48 -07001503QDF_STATUS wma_set_wisa_params(tp_wma_handle wma, struct sir_wisa_params *wisa);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001504
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001505#ifdef DHCP_SERVER_OFFLOAD
Jeff Johnson8bfc29e2019-02-15 07:58:15 -08001506/**
1507 * wma_process_dhcpserver_offload() - enable DHCP server offload
1508 * @wma_handle: wma handle
1509 * @params: DHCP server offload information
1510 *
1511 * Return: QDF_STATUS_SUCCESS for success or error code
1512 */
1513QDF_STATUS
1514wma_process_dhcpserver_offload(tp_wma_handle wma_handle,
1515 struct dhcp_offload_info_params *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001516#endif
1517
1518#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301519QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
Jeff Johnson5a6b6602017-10-04 14:44:30 -07001520 struct flashing_req_params *flashing);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001521#endif
1522
Kabilan Kannancaa85502018-04-13 18:04:58 -07001523/**
1524 * wma_sar_rsp_evt_handler() - process sar response event from FW.
Kabilan Kannanebe01e72018-06-13 01:13:46 -07001525 * @handle: ol scn handle
Kabilan Kannancaa85502018-04-13 18:04:58 -07001526 * @event: event buffer
1527 * @len: buffer length
1528 *
1529 * Return: 0 for success or error code
1530 */
Kabilan Kannanebe01e72018-06-13 01:13:46 -07001531int wma_sar_rsp_evt_handler(ol_scn_t handle, uint8_t *event, uint32_t len);
Kabilan Kannancaa85502018-04-13 18:04:58 -07001532
Nirav Shaheb017be2018-02-15 11:20:58 +05301533#ifdef FEATURE_WLAN_CH_AVOID
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301534QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001535 tSirChAvoidUpdateReq *
1536 ch_avoid_update_req);
Nirav Shaheb017be2018-02-15 11:20:58 +05301537#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001538
1539#ifdef FEATURE_WLAN_TDLS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001540int wma_update_tdls_peer_state(WMA_HANDLE handle,
Jeff Johnson517ee492019-02-07 11:59:04 -08001541 struct tdls_peer_update_state *peer_state);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001542#endif
1543
Hong Shib90718f2017-02-20 00:57:22 +08001544void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001545void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id);
1546
Qiwei Caie689a262018-07-26 15:50:22 +08001547#ifdef FEATURE_RSSI_MONITOR
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001548int wma_rssi_breached_event_handler(void *handle,
1549 u_int8_t *cmd_param_info, u_int32_t len);
Qiwei Caie689a262018-07-26 15:50:22 +08001550#else /* FEATURE_RSSI_MONITOR */
1551static inline
1552int wma_rssi_breached_event_handler(void *handle,
1553 u_int8_t *cmd_param_info, u_int32_t len)
1554{
1555 return 0;
1556}
1557#endif /* FEATURE_RSSI_MONITOR */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001558
Kiran Kumar Lokereee205772018-09-27 00:27:27 -07001559QDF_STATUS wma_process_cfg_action_frm_tb_ppdu(tp_wma_handle wma,
1560 struct cfg_action_frm_tb_ppdu *cfg_info);
1561
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301562QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001563 struct vdev_ie_info *ie_info);
1564int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
1565 uint32_t len);
1566
Sandeep Puligilla19ddda22016-01-05 12:18:02 -08001567int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
1568 uint32_t len);
1569void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id,
1570 uint8_t type);
Manjeet Singhf82ed072016-07-08 11:40:00 +05301571
1572QDF_STATUS wma_process_hal_pwr_dbg_cmd(WMA_HANDLE handle,
1573 struct sir_mac_pwr_dbg_cmd *
1574 sir_pwr_dbg_params);
1575
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301576/**
1577 * wma_lost_link_info_handler() - collect lost link information and inform SME
1578 * @wma: WMA handle
1579 * @vdev_id: vdev ID
1580 * @rssi: rssi at disconnection time
1581 *
1582 * Return: none
1583 */
1584void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
1585 int32_t rssi);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301586int wma_unified_power_debug_stats_event_handler(void *handle,
1587 uint8_t *cmd_param_info, uint32_t len);
Arunk Khandavallica56d4b2018-11-29 15:46:00 +05301588/**
1589 * wma_unified_beacon_debug_stats_event_handler() - collect beacon debug stats
1590 * @handle: WMA handle
1591 * @cmd_param_info: data from event
1592 * @len: length
1593 *
1594 * Return: 0 for success or error code
1595 */
1596int wma_unified_beacon_debug_stats_event_handler(void *handle,
1597 uint8_t *cmd_param_info,
1598 uint32_t len);
Sen, Devendra154b3c42017-02-13 20:44:15 +05301599
1600#ifdef FEATURE_WLAN_DIAG_SUPPORT
1601/**
1602 * wma_sta_kickout_event()- send sta kickout event
1603 * @kickout_reason - reasoncode for kickout
Srinivas Girigowdaa47b45f2019-02-27 12:29:02 -08001604 * @macaddr[QDF_MAC_ADDR_SIZE]: Peer mac address
Sen, Devendra154b3c42017-02-13 20:44:15 +05301605 * @vdev_id: Unique id for identifying the VDEV
1606 *
1607 * This function sends sta kickout diag event
1608 *
1609 * Return: void.
1610 */
1611void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
1612 uint8_t *macaddr);
1613#else
1614static inline void wma_sta_kickout_event(uint32_t kickout_reason,
1615 uint8_t vdev_id, uint8_t *macaddr)
1616{
1617
1618};
1619#endif /* FEATURE_WLAN_DIAG_SUPPORT */
1620
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001621/**
Rajeev Kumar Sirasanagandla996e5292016-11-22 21:20:33 +05301622 * wma_get_rcpi_req() - get rcpi request
1623 * @handle: wma handle
1624 * @rcpi_request: rcpi params
1625 *
1626 * Return: none
1627 */
1628QDF_STATUS wma_get_rcpi_req(WMA_HANDLE handle,
1629 struct sme_rcpi_req *rcpi_request);
1630
1631/**
1632 * wma_rcpi_event_handler() - rcpi event handler
1633 * @handle: wma handle
1634 * @cmd_param_info: data from event
1635 * @len: length
1636 *
1637 * Return: 0 for success or error code
1638 */
1639int wma_rcpi_event_handler(void *handle, uint8_t *cmd_param_info,
1640 uint32_t len);
1641
1642/**
Dustin Brownec2c92e2017-07-26 11:13:49 -07001643 * wma_acquire_wakelock() - acquire the given wakelock
1644 * @wl: the wakelock to acquire
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001645 * @msec: the wakelock duration in milliseconds
1646 *
Dustin Brownec2c92e2017-07-26 11:13:49 -07001647 * This also acquires the wma runtime pm lock.
1648 *
1649 * Return: None
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001650 */
Dustin Brownec2c92e2017-07-26 11:13:49 -07001651void wma_acquire_wakelock(qdf_wake_lock_t *wl, uint32_t msec);
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001652
1653/**
Dustin Brownec2c92e2017-07-26 11:13:49 -07001654 * wma_release_wakelock() - release the given wakelock
1655 * @wl: the wakelock to release
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001656 *
Dustin Brownec2c92e2017-07-26 11:13:49 -07001657 * This also releases the wma runtime pm lock.
1658 *
1659 * Return: None
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001660 */
Dustin Brownec2c92e2017-07-26 11:13:49 -07001661void wma_release_wakelock(qdf_wake_lock_t *wl);
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001662
1663/**
1664 * wma_send_vdev_stop_to_fw() - send the vdev stop command to firmware
Dustin Brownec2c92e2017-07-26 11:13:49 -07001665 * @wma: a reference to the global WMA handle
1666 * @vdev_id: the Id of the vdev to stop
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001667 *
Dustin Brownec2c92e2017-07-26 11:13:49 -07001668 * Consumers should call wma_release_wakelock() upon receipt of the vdev stop
1669 * response from firmware to avoid power penalties.
Dustin Brownbf6d16b2017-03-03 11:41:05 -08001670 *
1671 * Return: QDF_STATUS
1672 */
1673QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id);
1674
Anurag Chouhan3920c0f2017-09-11 17:10:56 +05301675int wma_get_arp_stats_handler(void *handle, uint8_t *data, uint32_t data_len);
1676
Dustin Brownec2c92e2017-07-26 11:13:49 -07001677/**
Dustin Brownec2c92e2017-07-26 11:13:49 -07001678 * wma_send_vdev_down_to_fw() - send the vdev down command to firmware
1679 * @wma: a reference to the global WMA handle
1680 * @vdev_id: the Id of the vdev to down
1681 *
1682 * This also releases the vdev start wakelock.
1683 *
1684 * Return: QDF_STATUS
1685 */
1686QDF_STATUS wma_send_vdev_down_to_fw(t_wma_handle *wma, uint8_t vdev_id);
1687
lifeng66831662017-05-19 16:01:35 +08001688/*
1689 * wma_rx_aggr_failure_event_handler - event handler to handle rx aggr failure
1690 * @handle: the wma handle
1691 * @event_buf: buffer with event
1692 * @len: buffer length
1693 *
1694 * This function receives rx aggregation failure event and then pass to upper
1695 * layer
1696 *
1697 * Return: 0 on success
1698 */
1699int wma_rx_aggr_failure_event_handler(void *handle, u_int8_t *event_buf,
1700 u_int32_t len);
1701
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05301702/**
1703 * wma_wlan_bt_activity_evt_handler - event handler to handle bt activity
1704 * @handle: the WMA handle
1705 * @event: buffer with the event parameters
1706 * @len: length of the buffer
1707 *
1708 * This function receives BT activity event from firmware and passes the event
1709 * information to upper layers
1710 *
1711 * Return: 0 on success
1712 */
1713int wma_wlan_bt_activity_evt_handler(void *handle, uint8_t *event,
1714 uint32_t len);
lifengd217d192017-05-09 19:44:16 +08001715
1716/**
lifengfe6c3e22018-04-03 12:10:04 +08001717 * wma_pdev_div_info_evt_handler - event handler to handle antenna info
lifengd217d192017-05-09 19:44:16 +08001718 * @handle: the wma handle
lifengfe6c3e22018-04-03 12:10:04 +08001719 * @event_buf: buffer with event
lifengd217d192017-05-09 19:44:16 +08001720 * @len: buffer length
1721 *
1722 * This function receives antenna info from firmware and passes the event
1723 * to upper layer
1724 *
1725 * Return: 0 on success
1726 */
lifengfe6c3e22018-04-03 12:10:04 +08001727int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf,
lifengd217d192017-05-09 19:44:16 +08001728 u_int32_t len);
1729
lifeng7c607dd2017-02-21 21:16:49 +08001730/**
1731 * wma_update_beacon_interval() - update beacon interval in fw
1732 * @wma: wma handle
1733 * @vdev_id: vdev id
1734 * @beaconInterval: becon interval
1735 *
1736 * Return: none
1737 */
1738void
1739wma_update_beacon_interval(tp_wma_handle wma, uint8_t vdev_id,
1740 uint16_t beaconInterval);
1741
1742#define RESET_BEACON_INTERVAL_TIMEOUT 200
1743
1744struct wma_beacon_interval_reset_req {
1745 qdf_timer_t event_timeout;
1746 uint8_t vdev_id;
1747 uint16_t interval;
1748};
1749
1750/**
1751 * wma_fill_beacon_interval_reset_req() - req to reset beacon interval
1752 * @wma: wma handle
1753 * @vdev_id: vdev id
1754 * @beacon_interval: beacon interval
1755 * @timeout: timeout val
1756 *
1757 * Return: status
1758 */
1759int wma_fill_beacon_interval_reset_req(tp_wma_handle wma, uint8_t vdev_id,
1760 uint16_t beacon_interval, uint32_t timeout);
Yeshwanth Sriram Guntukad5aae7f2017-11-27 14:33:51 +05301761/*
1762 * wma_is_vdev_valid() - check the vdev status
1763 * @vdev_id: vdev identifier
1764 *
1765 * This function verifies the vdev validity
1766 *
1767 * Return: 'true' on valid vdev else 'false'
1768 */
1769bool wma_is_vdev_valid(uint32_t vdev_id);
Arif Hussainee10f902017-12-27 16:30:17 -08001770
1771/**
1772 * wma_vdev_obss_detection_info_handler - event handler to handle obss detection
1773 * @handle: the wma handle
1774 * @event: buffer with event
1775 * @len: buffer length
1776 *
1777 * This function receives obss detection info from firmware which is used to
1778 * decide obss protection.
1779 *
1780 * Return: 0 on success
1781 */
1782int wma_vdev_obss_detection_info_handler(void *handle, uint8_t *event,
1783 uint32_t len);
Arif Hussain05fb4872018-01-03 16:02:55 -08001784
1785/**
1786 * wma_vdev_bss_color_collision_info_handler - event handler to
1787 * handle obss color collision detection.
1788 * @handle: the wma handle
1789 * @event: buffer with event
1790 * @len: buffer length
1791 *
1792 * This function receives obss color collision detection info from firmware
1793 * which is used to select new bss color.
1794 *
1795 * Return: 0 on success
1796 */
1797int wma_vdev_bss_color_collision_info_handler(void *handle,
1798 uint8_t *event,
1799 uint32_t len);
1800
Kiran Kumar Lokere54819a32019-10-04 18:30:43 -07001801#ifdef WLAN_SUPPORT_TWT
1802/**
1803 * wma_twt_en_complete_event_handler - TWT enable complete event handler
1804 * @handle: wma handle
1805 * @event: buffer with event
1806 * @len: buffer length
1807 *
1808 * Return: 0 on success
1809 */
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07001810int wma_twt_en_complete_event_handler(void *handle,
1811 uint8_t *event, uint32_t len);
Kiran Kumar Lokere54819a32019-10-04 18:30:43 -07001812
1813/**
1814 * wma_twt_disable_comp_event_handler- TWT disable complete event handler
1815 * @handle: wma handle
1816 * @event: buffer with event
1817 * @len: buffer length
1818 *
1819 * Return: 0 on success
1820 */
1821int wma_twt_disable_comp_event_handler(void *handle, uint8_t *event,
1822 uint32_t len);
1823#else
1824static inline int wma_twt_en_complete_event_handler(void *handle,
1825 uint8_t *event,
1826 uint32_t len)
1827{
1828 return 0;
1829}
1830
1831static inline int wma_twt_disable_comp_event_handler(void *handle,
1832 uint8_t *event,
1833 uint32_t len)
1834{
1835 return 0;
1836}
1837#endif
Abhishek Ambure6a2773e2019-10-14 15:15:42 +05301838
Rajeev Kumar Sirasanagandla4f20b672018-03-12 13:52:50 +05301839/**
1840 * wma_get_roam_scan_stats() - Get roam scan stats request
1841 * @handle: wma handle
1842 * @req: request details
1843 *
1844 * Return: QDF_STATUS
1845 */
1846QDF_STATUS wma_get_roam_scan_stats(WMA_HANDLE handle,
1847 struct sir_roam_scan_stats *req);
1848
1849/**
1850 * wma_roam_scan_stats_event_handler() - roam scan stats event handler
1851 * @handle: wma handle
1852 * @event: event data
1853 * @len: length of data
1854 *
1855 * Return: Success or Failure status
1856 */
1857int wma_roam_scan_stats_event_handler(void *handle, uint8_t *event,
1858 uint32_t len);
1859
Abhishek Singhcaa61852018-09-12 15:50:04 +05301860/**
Abhishek Singhfb5b4d32018-12-06 11:53:08 +05301861 * wma_send_vdev_down() - send del bss req to firmware
Abhishek Singhcaa61852018-09-12 15:50:04 +05301862 * @wma: wma handle.
Abhishek Ambure968f1512019-08-28 18:33:57 +05301863 * @req: pointer to del bss response
Abhishek Singhcaa61852018-09-12 15:50:04 +05301864 *
1865 * This function sends del bss resp to upper layer
1866 *
1867 * Return: none
1868 */
Abhishek Ambure968f1512019-08-28 18:33:57 +05301869void wma_send_vdev_down(tp_wma_handle wma, struct del_bss_resp *req);
Abhishek Singhcaa61852018-09-12 15:50:04 +05301870
Yeshwanth Sriram Guntukafa9f3792019-02-28 18:24:58 +05301871/**
1872 * wma_cold_boot_cal_event_handler() - Cold boot cal event handler
1873 * @wma_ctx: wma handle
1874 * @event_buff: event data
1875 * @len: length of data
1876 *
1877 * Return: Success or Failure status
1878 */
1879int wma_cold_boot_cal_event_handler(void *wma_ctx, uint8_t *event_buff,
1880 uint32_t len);
Srinivas Dasarif4e1b122019-08-22 03:39:48 +05301881
1882/**
1883 * wma_set_roam_triggers() - Send roam trigger bitmap to WMI
1884 * @wma_handle: wma handle
1885 * @triggers: Carries vdev id and roam trigger bitmap.
1886 *
1887 * Return: Success or Failure status
1888 */
1889QDF_STATUS wma_set_roam_triggers(tp_wma_handle wma_handle,
1890 struct roam_triggers *triggers);
Sourav Mohapatra2a67b0e2019-10-15 17:59:59 +05301891
1892/**
1893 * wma_get_ani_level_evt_handler - event handler to fetch ani level
1894 * @handle: the wma handle
1895 * @event_buf: buffer with event
1896 * @len: buffer length
1897 *
1898 * This function receives ani level from firmware and passes the event
1899 * to upper layer
1900 *
1901 * Return: 0 on success
1902 */
1903int wma_get_ani_level_evt_handler(void *handle, uint8_t *event_buf,
1904 uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001905#endif