xref: /wlan-dirver/qca-wifi-host-cmn/wmi/src/wmi_unified_11be_api.c (revision d0c05845839e5f2ba5a8dcebe0cd3e4cd4e8dfcf)
1 /*
2  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 /**
18  * DOC: Implement API's specific to 11be.
19  */
20 
21 #include "wmi_unified_11be_api.h"
22 
23 /**
24  * wmi_extract_mlo_link_set_active_resp() - extract mlo link set active resp
25  *  from event
26  * @wmi: WMI handle for this pdev
27  * @evt_buf: pointer to event buffer
28  * @resp: Pointer to hold mlo link set active resp
29  *
30  * Return: QDF_STATUS code
31  */
32 QDF_STATUS
33 wmi_extract_mlo_link_set_active_resp(wmi_unified_t wmi,
34 				     void *evt_buf,
35 				     struct mlo_link_set_active_resp *resp)
36 {
37 	if (wmi->ops->extract_mlo_link_set_active_resp) {
38 		return wmi->ops->extract_mlo_link_set_active_resp(wmi,
39 								  evt_buf,
40 								  resp);
41 	}
42 	return QDF_STATUS_E_FAILURE;
43 }
44 
45 /**
46  * wmi_send_mlo_link_set_active_cmd() - send mlo link set active command
47  * @wmi: WMI handle for this pdev
48  * @param: Pointer to mlo link set active param
49  *
50  * Return: QDF_STATUS code
51  */
52 QDF_STATUS
53 wmi_send_mlo_link_set_active_cmd(wmi_unified_t wmi,
54 				 struct mlo_link_set_active_param *param)
55 {
56 	if (wmi->ops->send_mlo_link_set_active_cmd)
57 		return wmi->ops->send_mlo_link_set_active_cmd(wmi, param);
58 
59 	return QDF_STATUS_E_FAILURE;
60 }
61 
62 #ifdef WLAN_FEATURE_11BE
63 QDF_STATUS wmi_send_mlo_peer_tid_to_link_map_cmd(
64 		wmi_unified_t wmi,
65 		struct wmi_host_tid_to_link_map_params *params)
66 {
67 	if (wmi->ops->send_mlo_peer_tid_to_link_map)
68 		return wmi->ops->send_mlo_peer_tid_to_link_map(wmi, params);
69 
70 	return QDF_STATUS_E_FAILURE;
71 }
72 #endif /* WLAN_FEATURE_11BE */
73