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