xref: /wlan-dirver/qca-wifi-host-cmn/wmi/src/wmi_unified_concurrency_api.c (revision 27d564647e9b50e713c60b0d7e5ea2a9b0a3ae74)
1 /*
2  * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
3  *
4  * 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 /**
19  * DOC: Implement API's specific to concurrency component.
20  */
21 
22 #include <wmi_unified_priv.h>
23 #include <wmi_unified_concurrency_api.h>
24 
25 QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
26 		void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
27 		uint32_t pdev_id)
28 {
29 	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
30 
31 	if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
32 		return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
33 					mcc_adaptive_scheduler, pdev_id);
34 
35 	return QDF_STATUS_E_FAILURE;
36 }
37 
38 QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
39 	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
40 {
41 	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
42 
43 	if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
44 		return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
45 					mcc_channel_freq,
46 					mcc_channel_time_latency);
47 
48 	return QDF_STATUS_E_FAILURE;
49 }
50 
51 QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
52 			 uint32_t adapter_1_chan_freq,
53 			 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
54 {
55 	wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
56 
57 	if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
58 		return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
59 						adapter_1_chan_freq,
60 						adapter_1_quota,
61 						adapter_2_chan_freq);
62 
63 	return QDF_STATUS_E_FAILURE;
64 }
65 
66