blob: 5e9e1be3c19b143fbcbd79e37147d85433a68593 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Nachiket Kukade2c73ade2017-12-20 17:30:36 +05302 * Copyright (c) 2012-2018 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_API_H
20#define WMA_API_H
21
22#include "osdep.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080023#include "ani_global.h"
24#include "a_types.h"
Govind Singh5b486202016-06-09 18:29:42 +053025#include "osapi_linux.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080026#include "wmi_unified.h"
27#ifdef NOT_YET
28#include "htc_api.h"
29#endif
30#include "lim_global.h"
Krunal Soni0193b6f2016-08-15 15:53:43 -070031#include "cds_utils.h"
Krunal Sonid32c6bc2016-10-18 18:00:21 -070032#include "scheduler_api.h"
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -080033#include "wlan_policy_mgr_api.h"
Jeff Johnsonf0e54b02017-12-18 15:22:25 -080034#include "wma_sar_public_structs.h"
Tushnim Bhattacharyya45ed04f2017-03-15 10:15:05 -070035#include <cdp_txrx_ops.h>
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080036
37typedef void *WMA_HANDLE;
38
39/**
40 * enum GEN_PARAM - general parameters
41 * @GEN_VDEV_PARAM_AMPDU: Set ampdu size
42 * @GEN_VDEV_PARAM_AMSDU: Set amsdu size
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080043 * @GEN_PARAM_CRASH_INJECT: inject crash
Rajeev Kumarf4390fa2016-12-22 13:17:33 -080044 * @GEN_PARAM_MODULATED_DTIM: moduled dtim
45 * @GEN_PARAM_CAPTURE_TSF: read tsf
46 * @GEN_PARAM_RESET_TSF_GPIO: reset tsf gpio
47 * @GEN_VDEV_ROAM_SYNCH_DELAY: roam sync delay
Mukul Sharma6398b252017-05-01 17:58:12 +053048 * @GEN_PARAM_LISTEN_INTERVAL: listen interval
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080049 */
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -070050enum GEN_PARAM {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080051 GEN_VDEV_PARAM_AMPDU = 0x1,
52 GEN_VDEV_PARAM_AMSDU,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080053 GEN_PARAM_CRASH_INJECT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080054 GEN_PARAM_MODULATED_DTIM,
Manikandan Mohandcc21ba2016-03-15 14:31:56 -070055 GEN_PARAM_CAPTURE_TSF,
56 GEN_PARAM_RESET_TSF_GPIO,
Varun Reddy Yeturu5ab47462016-05-08 18:08:11 -070057 GEN_VDEV_ROAM_SYNCH_DELAY,
Mukul Sharma6398b252017-05-01 17:58:12 +053058 GEN_PARAM_LISTEN_INTERVAL,
Manikandan Mohan1dd8b5d2017-04-18 15:54:09 -070059};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080060
Krunal Soni0193b6f2016-08-15 15:53:43 -070061/**
62 * struct wma_caps_per_phy - various caps per phy
63 * @ht_2g: entire HT cap for 2G band in terms of 32 bit flag
64 * @ht_5g: entire HT cap for 5G band in terms of 32 bit flag
65 * @vht_2g: entire VHT cap for 2G band in terms of 32 bit flag
66 * @vht_5g: entire VHT cap for 5G band in terms of 32 bit flag
67 * @he_2g: entire HE cap for 2G band in terms of 32 bit flag
68 * @he_5g: entire HE cap for 5G band in terms of 32 bit flag
Naveen Rawat98322472018-03-06 10:29:42 -080069 * @tx_chain_mask_2G: tx chain mask for 2g
70 * @rx_chain_mask_2G: rx chain mask for 2g
71 * @tx_chain_mask_5G: tx chain mask for 5g
72 * @rx_chain_mask_5G: rx chain mask for 5g
Krunal Soni0193b6f2016-08-15 15:53:43 -070073 */
74struct wma_caps_per_phy {
75 uint32_t ht_2g;
76 uint32_t ht_5g;
77 uint32_t vht_2g;
78 uint32_t vht_5g;
79 uint32_t he_2g;
80 uint32_t he_5g;
Naveen Rawat98322472018-03-06 10:29:42 -080081 uint32_t tx_chain_mask_2G;
82 uint32_t rx_chain_mask_2G;
83 uint32_t tx_chain_mask_5G;
84 uint32_t rx_chain_mask_5G;
Krunal Soni0193b6f2016-08-15 15:53:43 -070085};
86
87
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080088#define VDEV_CMD 1
89#define PDEV_CMD 2
90#define GEN_CMD 3
91#define DBG_CMD 4
92#define PPS_CMD 5
93#define QPOWER_CMD 6
94#define GTX_CMD 7
95
96typedef void (*wma_peer_authorized_fp) (uint32_t vdev_id);
97
98
Jeff Johnson8ad89c62017-09-13 08:55:55 -070099QDF_STATUS wma_pre_start(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800100
Krunal Sonid32c6bc2016-10-18 18:00:21 -0700101QDF_STATUS wma_mc_process_handler(struct scheduler_msg *msg);
Krunal Sonid32c6bc2016-10-18 18:00:21 -0700102
Jeff Johnsond4892552017-09-13 08:41:31 -0700103QDF_STATUS wma_start(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800104
Jeff Johnson62cd6802018-07-20 12:38:25 -0700105/**
106 * wma_stop() - wma stop function.
107 *
108 * Performs all of the operations required to stop the WMA layer
109 *
110 * Return: QDF_STATUS_SUCCESS on success, QDF Error on failure
111 */
112QDF_STATUS wma_stop(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800113
Jeff Johnson542da352017-09-13 09:17:28 -0700114QDF_STATUS wma_close(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800115
Jeff Johnson7b3ddc22017-09-13 09:42:44 -0700116QDF_STATUS wma_wmi_service_close(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800117
Jeff Johnson6b8473d2017-09-13 09:20:53 -0700118QDF_STATUS wma_wmi_work_close(void);
Xun Luoa858a472015-11-10 08:24:45 -0800119
Govind Singhd76a5b02016-03-08 15:12:14 +0530120int wma_rx_ready_event(void *handle, uint8_t *ev, uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800121
Govind Singhd76a5b02016-03-08 15:12:14 +0530122int wma_rx_service_ready_event(void *handle, uint8_t *ev, uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800123
Govind Singhd76a5b02016-03-08 15:12:14 +0530124int wma_rx_service_ready_ext_event(void *handle, uint8_t *ev, uint32_t len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800125
Jeff Johnson1f8d0a02017-09-13 08:09:05 -0700126void wma_setneedshutdown(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800127
Jeff Johnson1b5404e2017-09-13 08:04:46 -0700128bool wma_needshutdown(void);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800129
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530130QDF_STATUS wma_wait_for_ready_event(WMA_HANDLE handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800131
132uint8_t wma_map_channel(uint8_t mapChannel);
133
134int wma_cli_get_command(int vdev_id, int param_id, int vpdev);
135int wma_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
136int wma_cli_set2_command(int vdev_id, int param_id, int sval1,
137 int sval2, int vpdev);
138
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530139QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800140
Jeff Johnsonabb74042017-08-31 11:44:55 -0700141/**
142 * wma_get_wcnss_software_version() - get wcnss software version
143 * @version: version pointer
144 * @version_buffer_size: buffer size
145 *
146 * Return: QDF_STATUS_SUCCESS for success or error code
147 */
148QDF_STATUS wma_get_wcnss_software_version(uint8_t *version,
149 uint32_t version_buffer_size);
150
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800151void wma_set_peer_authorized_cb(void *wma_ctx, wma_peer_authorized_fp auth_cb);
Govind Singhd76a5b02016-03-08 15:12:14 +0530152QDF_STATUS wma_set_peer_param(void *wma_ctx, uint8_t *peer_addr,
153 uint32_t param_id,
154 uint32_t param_value, uint32_t vdev_id);
Mukul Sharmac3886aa2017-05-04 17:53:22 +0530155QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800156#ifdef NOT_YET
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530157QDF_STATUS wma_update_channel_list(WMA_HANDLE handle, void *scan_chan_info);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800158#endif
159
160uint8_t *wma_get_vdev_address_by_vdev_id(uint8_t vdev_id);
161struct wma_txrx_node *wma_get_interface_by_vdev_id(uint8_t vdev_id);
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -0800162QDF_STATUS wma_get_connection_info(uint8_t vdev_id,
163 struct policy_mgr_vdev_entry_info *conn_table_entry);
164
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800165bool wma_is_vdev_up(uint8_t vdev_id);
166
167void *wma_get_beacon_buffer_by_vdev_id(uint8_t vdev_id, uint32_t *buffer_size);
168
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700169bool wma_get_fw_wlan_feat_caps(enum cap_bitmap feature);
170void wma_set_fw_wlan_feat_caps(enum cap_bitmap feature);
Jeff Johnsone88dd752018-06-07 22:57:54 -0700171
172QDF_STATUS wma_post_ctrl_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800173
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800174void wma_register_wow_wakeup_events(WMA_HANDLE handle, uint8_t vdev_id,
175 uint8_t vdev_type, uint8_t sub_type);
176void wma_register_wow_default_patterns(WMA_HANDLE handle, uint8_t vdev_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800177int8_t wma_get_mac_id_of_vdev(uint32_t vdev_id);
178void wma_update_intf_hw_mode_params(uint32_t vdev_id, uint32_t mac_id,
179 uint32_t cfgd_hw_mode_index);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800180void wma_set_dbs_capability_ut(uint32_t dbs);
Krunal Soni0193b6f2016-08-15 15:53:43 -0700181QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
182 enum hw_mode_dbs_capab hw_mode, enum cds_band_type band);
183bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel);
Qiwei Cai3719efe2018-06-11 21:09:29 +0800184
185#ifdef WLAN_FEATURE_LINK_LAYER_STATS
yeshwanth sriram guntuka584c2332017-07-29 12:50:25 +0530186int wma_unified_radio_tx_mem_free(void *handle);
Qiwei Cai3719efe2018-06-11 21:09:29 +0800187#else /* WLAN_FEATURE_LINK_LAYER_STATS */
188static inline int wma_unified_radio_tx_mem_free(void *handle)
189{
190 return 0;
191}
192#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
193
Krunal Soniaadaa272017-10-04 16:42:55 -0700194/**
195 * wma_form_unit_test_cmd_and_send() - to form a wma command and send it to FW
196 * @session_id: wma session id to be filled while forming the command
197 * @module_id: module id given by user to be filled in the command
198 * @arg_count: number of argument count
199 * @arg: pointer to argument list
200 *
201 * This API exposed to HDD layer which takes the argument from user and forms
202 * the wma unit test command to be sent down to firmware
203 *
204 * Return: QDF_STATUS based on overall success
205 */
206QDF_STATUS wma_form_unit_test_cmd_and_send(uint32_t vdev_id,
207 uint32_t module_id, uint32_t arg_count, uint32_t *arg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800208
Manjunathappa Prakash7b0ad462018-04-15 00:37:16 -0700209/**
210 * wma_lro_init() - sends LRO configuration to FW
211 * @lro_config: pointer to the config parameters
212 *
213 * This function ends LRO configuration to FW.
214 *
215 * Return: 0 for success or reasons for failure
216 */
Dhanashri Atre09828f12016-11-13 10:36:58 -0800217int wma_lro_init(struct cdp_lro_hash_config *lro_config);
Ryan Hsu3c8f79f2015-12-02 16:45:09 -0800218
Gupta, Kapil4cb1d7d2016-04-16 18:16:25 -0700219QDF_STATUS wma_remove_beacon_filter(WMA_HANDLE wma,
220 struct beacon_filter_param *filter_params);
221
222QDF_STATUS wma_add_beacon_filter(WMA_HANDLE wma,
223 struct beacon_filter_param *filter_params);
Gupta, Kapil96c7f2f2016-04-25 19:13:41 +0530224QDF_STATUS wma_send_adapt_dwelltime_params(WMA_HANDLE handle,
225 struct adaptive_dwelltime_params *dwelltime_params);
Nitesh Shahf9a09ff2017-05-22 15:46:25 +0530226
227/**
228 * wma_send_dbs_scan_selection_params() - send DBS scan selection configuration
229 * params to firmware
230 * @handle: wma handler
231 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
232 *
233 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
234 */
235QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle,
236 struct wmi_dbs_scan_sel_params *dbs_scan_params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530237QDF_STATUS wma_set_tx_power_scale(uint8_t vdev_id, int value);
238QDF_STATUS wma_set_tx_power_scale_decr_db(uint8_t vdev_id, int value);
Naveen Rawat0fc3f692016-06-22 14:30:54 -0700239
Kiran Kumar Lokered0fad462017-06-13 18:23:48 -0700240bool wma_is_csa_offload_enabled(void);
Rachit Kankane026e77a2018-07-31 16:21:09 +0530241#ifdef FEATURE_P2P_LISTEN_OFFLOAD
Peng Xu8fdaa492016-06-22 10:20:47 -0700242bool wma_is_p2p_lo_capable(void);
243QDF_STATUS wma_p2p_lo_start(struct sir_p2p_lo_start *params);
244QDF_STATUS wma_p2p_lo_stop(u_int32_t vdev_id);
Rachit Kankane026e77a2018-07-31 16:21:09 +0530245#else
246static inline bool wma_is_p2p_lo_capable(void)
247{
248 return 0;
249}
250#endif
251bool wma_capability_enhanced_mcast_filter(void);
Naveen Rawat3ff5cff2018-01-29 14:31:16 -0800252#ifndef QCA_SUPPORT_CP_STATS
Padma, Santhosh Kumar5e33beb2016-08-08 19:07:06 +0530253QDF_STATUS wma_get_wakelock_stats(struct sir_wake_lock_stats *wake_lock_stats);
Naveen Rawat3ff5cff2018-01-29 14:31:16 -0800254#endif
Naveen Rawat8cc23b02016-07-14 12:22:56 -0700255void wma_process_pdev_hw_mode_trans_ind(void *wma,
256 wmi_pdev_hw_mode_transition_event_fixed_param *fixed_param,
257 wmi_pdev_set_hw_mode_response_vdev_mac_entry *vdev_mac_entry,
258 struct sir_hw_mode_trans_ind *hw_mode_trans_ind);
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +0530259
Agrawal Ashishb2d1a452016-05-05 12:23:58 +0530260/**
261 * wma_set_cts2self_for_p2p_go() - set CTS2SELF command for P2P GO.
262 * @wma_handle: pointer to wma handle.
263 * @cts2self_for_p2p_go: value needs to set to firmware.
264 *
265 * At the time of driver startup, inform about ini parma to FW that
266 * if legacy client connects to P2P GO, stop using NOA for P2P GO.
267 *
268 * Return: QDF_STATUS.
269 */
270QDF_STATUS wma_set_cts2self_for_p2p_go(void *wma_handle,
271 uint32_t cts2self_for_p2p_go);
Padma, Santhosh Kumara7119672016-08-16 16:05:14 +0530272QDF_STATUS wma_set_tx_rx_aggregation_size
273 (struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size);
Jeff Johnsonf0e54b02017-12-18 15:22:25 -0800274
275/**
Paul Zhangee09f8e2018-04-23 16:11:32 +0800276 * wma_set_tx_rx_aggregation_size_per_ac() - set aggregation size per ac
277 * @tx_rx_aggregation_size: the parameter for aggregation size
278 *
279 * This function try to set the aggregation size per AC.
280 *
281 * Return: QDF_STATUS enumeration
282 */
283QDF_STATUS wma_set_tx_rx_aggregation_size_per_ac
284 (struct sir_set_tx_rx_aggregation_size *tx_rx_aggregation_size);
285/**
Paul Zhang33fae272018-04-23 16:19:00 +0800286 * wma_set_sw_retry_threshold() - set sw retry threshold per AC for tx
287 * @tx_rx_aggregation_size: value needs to set to firmware
288 *
289 * This function sends WMI command to set the sw retry threshold per AC
290 * for Tx.
291 *
292 * Return: QDF_STATUS.
293 */
294QDF_STATUS wma_set_sw_retry_threshold
295 (struct sir_set_tx_aggr_sw_retry_threshold *tx_rx_aggregation_size);
296/**
Jeff Johnsonf0e54b02017-12-18 15:22:25 -0800297 * wma_get_sar_limit() - get SAR limits from the target
298 * @handle: wma handle
299 * @callback: Callback function to invoke with the results
300 * @context: Opaque context to pass back to caller in the callback
301 *
302 * This function sends WMI command to get SAR limits.
303 *
304 * Return: QDF_STATUS enumeration
305 */
306QDF_STATUS wma_get_sar_limit(WMA_HANDLE handle,
307 wma_sar_cb callback, void *context);
308
Kabilan Kannan3c0a7352016-12-02 18:49:38 -0800309/**
310 * wma_set_sar_limit() - set sar limits in the target
311 * @handle: wma handle
312 * @sar_limit_cmd_params: sar limit cmd params
313 *
314 * This function sends WMI command to set SAR limits.
315 *
316 * Return: QDF_STATUS enumeration
317 */
318QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle,
319 struct sar_limit_cmd_params *sar_limit_params);
Jeff Johnsonf0e54b02017-12-18 15:22:25 -0800320
Dustin Brown10a7b712016-10-07 10:31:16 -0700321/**
322 * wma_set_qpower_config() - update qpower config in wma
323 * @vdev_id: the Id of the vdev to configure
324 * @qpower: new qpower value
325 *
326 * Return: QDF_STATUS_SUCCESS on success, error number otherwise
327 */
328QDF_STATUS wma_set_qpower_config(uint8_t vdev_id, uint8_t qpower);
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800329
Will Huang3cd2b7c2017-11-17 13:16:56 +0800330#ifdef FEATURE_WLAN_D0WOW
331static inline bool wma_d0_wow_is_supported(void)
332{
Will Huang67ce1e32018-04-25 17:57:24 +0800333 return true;
Will Huang3cd2b7c2017-11-17 13:16:56 +0800334}
335#else
336static inline bool wma_d0_wow_is_supported(void)
337{
338 return false;
339}
340#endif
341
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -0700342/**
343 * wma_store_pdev() - store pdev
344 * @wma_ctx: wma context
345 * @pdev: pdev context
346 *
347 * Return: void
348 */
349void wma_store_pdev(void *wma_ctx, struct wlan_objmgr_pdev *pdev);
350
Qiwei Cai3719efe2018-06-11 21:09:29 +0800351#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Krishna Kumaar Natarajanc7e2bb72017-03-10 10:38:46 -0800352/**
353 * wmi_to_sir_peer_type() - convert peer type from WMI to SIR enum
354 * @type: enum wmi_peer_type
355 *
356 * Return: tSirWifiPeerType
357 */
358tSirWifiPeerType wmi_to_sir_peer_type(enum wmi_peer_type type);
Qiwei Cai3719efe2018-06-11 21:09:29 +0800359#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Yu Wang46082dc2017-09-19 12:25:38 +0800360
361QDF_STATUS wma_crash_inject(WMA_HANDLE wma_handle, uint32_t type,
362 uint32_t delay_time_ms);
Nachiket Kukade8983cf62017-10-12 18:14:48 +0530363
364/**
Dustin Brown05557182017-10-12 14:44:49 -0700365 * wma_critical_events_in_flight() - get the number of critical events in flight
366 *
367 * This API gets the number of events in flight which should prevent power
368 * collapse.
369 *
370 * Return: the number of critical events in flight
371 */
372uint32_t wma_critical_events_in_flight(void);
373
Rachit Kankanef6834c42018-08-02 18:47:50 +0530374#ifdef FEATURE_WLAN_DYNAMIC_CVM
Dustin Brown05557182017-10-12 14:44:49 -0700375/**
Nachiket Kukade8983cf62017-10-12 18:14:48 +0530376 * wma_set_vc_mode_config() - set voltage corner mode config to FW.
377 * @wma_handle: pointer to wma handle.
378 * @vc_bitmap: value needs to set to firmware.
379 *
380 * At the time of driver startup, set operating voltage corner mode
381 * for differenet phymode and bw configurations.
382 *
383 * Return: QDF_STATUS.
384 */
385QDF_STATUS wma_set_vc_mode_config(void *wma_handle,
386 uint32_t vc_bitmap);
Rachit Kankanef6834c42018-08-02 18:47:50 +0530387#endif
Nachiket Kukade8983cf62017-10-12 18:14:48 +0530388
Yun Parkc3e35562018-03-08 12:05:52 -0800389QDF_STATUS wma_process_dhcp_ind(WMA_HANDLE wma_handle,
390 tAniDHCPInd *ta_dhcp_ind);
391
Kabilan Kannanfc3a8c02018-02-21 13:36:29 -0800392/**
393 * wma_wmi_stop() - send wmi stop cmd
394 *
395 * Return: None
396 */
397void wma_wmi_stop(void);
398
Naveen Rawatfa2a1002018-05-17 16:06:37 -0700399/**
400 * wma_get_mcs_idx() - get mcs index
401 * @max_rate: max rate
402 * @rate_flags: rate flags
403 * @nss: nss
404 * @mcs_rate_flag: mcs rate flags
405 *
406 * Return: mcs index
407 */
408uint8_t wma_get_mcs_idx(uint16_t max_rate, uint8_t rate_flags,
Hanumanth Reddy Pothula834f9432018-05-30 14:20:32 +0530409 uint8_t *nss, uint8_t *mcs_rate_flag);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800410#endif