xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_11be_param.h (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
1 
2 /*
3  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
5  *
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _WMI_UNIFIED_11BE_PARAM_H_
20 #define _WMI_UNIFIED_11BE_PARAM_H_
21 
22 #include <wmi_unified_param.h>
23 
24 #ifdef WLAN_FEATURE_11BE_MLO
25 
26 #define MAX_LINK_IN_MLO 6
27 /** struct wmi_mlo_setup_params - MLO setup command params
28  * @mld_grp_id: Unique ID to FW for MLD group
29  * @pdev_id: pdev id of radio on which this command is sent
30  * @num_valid_hw_links: Num of valid links in partner_links array
31  * @partner_links[MAX_LINK_IN_MLO]: Partner link IDs
32  */
33 struct wmi_mlo_setup_params {
34 	uint32_t mld_grp_id;
35 	uint32_t pdev_id;
36 	uint8_t num_valid_hw_links;
37 	uint32_t partner_links[MAX_LINK_IN_MLO];
38 };
39 
40 /** struct wmi_mlo_ready_params - MLO ready command params
41  * @pdev_id: pdev id of radio on which this command is sent
42  */
43 struct wmi_mlo_ready_params {
44 	uint32_t pdev_id;
45 };
46 
47 /** enum wmi_mlo_teardown_reason - Reason code in WMI MLO teardown command
48  * @WMI_MLO_TEARDOWN_REASON_DOWN: Wifi down
49  * @WMI_MLO_TEARDOWN_REASON_SSR: Wifi Recovery
50  * @WMI_MLO_TEARDOWN_REASON_CLEANUP_DONE: SSR related cleanup done
51  */
52 enum wmi_mlo_teardown_reason {
53 	WMI_MLO_TEARDOWN_REASON_DOWN,
54 	WMI_MLO_TEARDOWN_REASON_SSR,
55 	WMI_MLO_TEARDOWN_REASON_CLEANUP_DONE,
56 };
57 
58 /** struct wmi_mlo_teardown_params - MLO teardown command params
59  * @pdev_id: pdev id of radio on which this command is sent
60  * @reason: reason code from enum wmi_mlo_teardown_reason
61  */
62 struct wmi_mlo_teardown_params {
63 	uint32_t pdev_id;
64 	enum wmi_mlo_teardown_reason reason;
65 };
66 
67 /** enum wmi_mlo_setup_status - Status code in WMI MLO setup completion event
68  * @WMI_MLO_SETUP_STATUS_SUCCESS: Success
69  * @WMI_MLO_SETUP_STATUS_FAILURE: Failure
70  */
71 enum wmi_mlo_setup_status {
72 	WMI_MLO_SETUP_STATUS_SUCCESS,
73 	WMI_MLO_SETUP_STATUS_FAILURE,
74 };
75 
76 /** struct wmi_mlo_setup_complete_params - MLO setup complete event params
77  * @pdev_id: pdev id of radio on which this event is received
78  * @status: status code
79  */
80 struct wmi_mlo_setup_complete_params {
81 	uint32_t pdev_id;
82 	enum wmi_mlo_setup_status status;
83 };
84 
85 /** enum wmi_mlo_teardown_status - Status code in WMI MLO teardown completion
86  *                                 event
87  * @WMI_MLO_TEARDOWN_STATUS_SUCCESS: Success
88  * @WMI_MLO_TEARDOWN_STATUS_FAILURE: Failure
89  * @WMI_MLO_TEARDOWN_STATUS_ONGOING: Ongoing
90  */
91 enum wmi_mlo_teardown_status {
92 	WMI_MLO_TEARDOWN_STATUS_SUCCESS,
93 	WMI_MLO_TEARDOWN_STATUS_FAILURE,
94 	WMI_MLO_TEARDOWN_STATUS_ONGOING,
95 };
96 
97 /** struct wmi_mlo_teardown_cmpl_params - MLO setup teardown event params
98  * @pdev_id: pdev id of radio on which this event is received
99  * @status: Teardown status from enum wmi_mlo_teardown_status
100  */
101 struct wmi_mlo_teardown_cmpl_params {
102 	uint32_t pdev_id;
103 	enum wmi_mlo_teardown_status status;
104 };
105 #endif
106 #endif
107