xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_11be_param.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 
2 /*
3  * Copyright (c) 2021, The Linux Foundation. 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 #ifndef _WMI_UNIFIED_11BE_PARAM_H_
19 #define _WMI_UNIFIED_11BE_PARAM_H_
20 
21 #include <wmi_unified_param.h>
22 
23 #ifdef WLAN_FEATURE_11BE_MLO
24 
25 #define MAX_LINK_IN_MLO 6
26 /** struct wmi_mlo_setup_params - MLO setup command params
27  * @mld_grp_id: Unique ID to FW for MLD group
28  * @pdev_id: pdev id of radio on which this command is sent
29  * @num_valid_hw_links: Num of valid links in partner_links array
30  * @partner_links[MAX_LINK_IN_MLO]: Partner link IDs
31  */
32 struct wmi_mlo_setup_params {
33 	uint32_t mld_grp_id;
34 	uint32_t pdev_id;
35 	uint8_t num_valid_hw_links;
36 	uint32_t partner_links[MAX_LINK_IN_MLO];
37 };
38 
39 /** struct wmi_mlo_ready_params - MLO ready command params
40  * @pdev_id: pdev id of radio on which this command is sent
41  */
42 struct wmi_mlo_ready_params {
43 	uint32_t pdev_id;
44 };
45 
46 /** enum wmi_mlo_teardown_reason - Reason code in WMI MLO teardown command
47  * @WMI_MLO_TEARDOWN_REASON_DOWN: Wifi down
48  * @WMI_MLO_TEARDOWN_REASON_SSR: Wifi Recovery
49  */
50 enum wmi_mlo_teardown_reason {
51 	WMI_MLO_TEARDOWN_REASON_DOWN,
52 	WMI_MLO_TEARDOWN_REASON_SSR,
53 };
54 
55 /** struct wmi_mlo_teardown_params - MLO teardown command params
56  * @pdev_id: pdev id of radio on which this command is sent
57  * @reason: reason code from enum wmi_mlo_teardown_reason
58  */
59 struct wmi_mlo_teardown_params {
60 	uint32_t pdev_id;
61 	enum wmi_mlo_teardown_reason reason;
62 };
63 
64 /** enum wmi_mlo_setup_status - Status code in WMI MLO setup completion event
65  * @WMI_MLO_SETUP_STATUS_SUCCESS: Success
66  * @WMI_MLO_SETUP_STATUS_FAILURE: Failure
67  */
68 enum wmi_mlo_setup_status {
69 	WMI_MLO_SETUP_STATUS_SUCCESS,
70 	WMI_MLO_SETUP_STATUS_FAILURE,
71 };
72 
73 /** struct wmi_mlo_setup_complete_params - MLO setup complete event params
74  * @pdev_id: pdev id of radio on which this event is received
75  * @status: status code
76  */
77 struct wmi_mlo_setup_complete_params {
78 	uint32_t pdev_id;
79 	enum wmi_mlo_setup_status status;
80 };
81 
82 /** enum wmi_mlo_teardown_status - Status code in WMI MLO teardown completion
83  *                                 event
84  * @WMI_MLO_TEARDOWN_STATUS_SUCCESS: Success
85  * @WMI_MLO_TEARDOWN_STATUS_FAILURE: Failure
86  */
87 enum wmi_mlo_teardown_status {
88 	WMI_MLO_TEARDOWN_STATUS_SUCCESS,
89 	WMI_MLO_TEARDOWN_STATUS_FAILURE,
90 };
91 
92 /** struct wmi_mlo_teardown_cmpl_params - MLO setup teardown event params
93  * @pdev_id: pdev id of radio on which this event is received
94  * @status: Teardown status from enum wmi_mlo_teardown_status
95  */
96 struct wmi_mlo_teardown_cmpl_params {
97 	uint32_t pdev_id;
98 	enum wmi_mlo_teardown_status status;
99 };
100 #endif
101 #endif
102