xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_concurrency_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 /**
20  * DOC: Implement API's specific to concurrency component.
21  */
22 
23 #ifndef _WMI_UNIFIED_CONCURRENCY_API_H_
24 #define _WMI_UNIFIED_CONCURRENCY_API_H_
25 
26 /**
27  * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
28  * @wmi_handle: wmi handle
29  * @adapter_1_chan_freq: adapter 1 channel number
30  * @adapter_1_quota: adapter 1 quota
31  * @adapter_2_chan_freq: adapter 2 channel number
32  *
33  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
34  */
35 QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(
36 	wmi_unified_t wmi_handle,
37 	uint32_t adapter_1_chan_freq,
38 	uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
39 
40 #ifdef WLAN_FEATURE_MCC_QUOTA
41 /**
42  * wmi_extract_mcc_quota_ev_param() - extract mcc_quota param from wmi event
43  * @wmi_handle: wmi handle
44  * @evt_buf: pointer to event buffer
45  * @param: Pointer to hold mcc_quota param
46  *
47  * Return: QDF_STATUS_SUCCESS on success or error code
48  */
49 QDF_STATUS wmi_extract_mcc_quota_ev_param(wmi_unified_t wmi_handle,
50 					  void *evt_buf,
51 					  struct mcc_quota_info *param);
52 #endif
53 
54 /**
55  * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
56  * @wmi_handle: wmi handle
57  * @mcc_channel_freq: mcc channel freq
58  * @mcc_channel_time_latency: MCC channel time latency.
59  *
60  * Currently used to set time latency for an MCC vdev/adapter using operating
61  * channel of it and channel number. The info is provided run time using
62  * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
63  *
64  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
65  */
66 QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(
67 	wmi_unified_t wmi_handle,
68 	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
69 
70 /**
71  * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc
72  *								 scheduler
73  * @wmi_handle: wmi handle
74  * @mcc_adaptive_scheduler: enable/disable
75  * @pdev_id: pdev id
76  *
77  * This function enable/disable mcc adaptive scheduler in fw.
78  *
79  * Return: QDF_STATUS_SUCCESS for success or error code
80  */
81 QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
82 		wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler,
83 		uint32_t pdev_id);
84 
85 #endif /* _WMI_UNIFIED_CONCURRENCY_API_H_ */
86