1 
2 /*
3  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4  * Copyright (c) 2021-2023 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_HOST_MLO_TEARDOWN_REASON_DOWN: Wifi down
49  * @WMI_HOST_MLO_TEARDOWN_REASON_SSR: Wifi Recovery
50  * @WMI_HOST_MLO_TEARDOWN_REASON_MODE1_SSR: Recovery Mode1 SSR teardown
51  * @WMI_HOST_MLO_TEARDOWN_REASON_STANDBY: Network Standby mode teardown
52  */
53 enum wmi_mlo_teardown_reason {
54 	WMI_HOST_MLO_TEARDOWN_REASON_DOWN,
55 	WMI_HOST_MLO_TEARDOWN_REASON_SSR,
56 	WMI_HOST_MLO_TEARDOWN_REASON_MODE1_SSR,
57 	WMI_HOST_MLO_TEARDOWN_REASON_STANDBY,
58 };
59 
60 /** struct wmi_mlo_teardown_params - MLO teardown command params
61  * @pdev_id: pdev id of radio on which this command is sent
62  * @reason: reason code from enum wmi_mlo_teardown_reason
63  * @umac_reset: trigger umac reset for mode1 or not
64  */
65 struct wmi_mlo_teardown_params {
66 	uint32_t pdev_id;
67 	enum wmi_mlo_teardown_reason reason;
68 	bool umac_reset;
69 	bool standby_active;
70 };
71 
72 /** enum wmi_mlo_setup_status - Status code in WMI MLO setup completion event
73  * @WMI_HOST_MLO_SETUP_STATUS_SUCCESS: Success
74  * @WMI_HOST_MLO_SETUP_STATUS_FAILURE: Failure
75  */
76 enum wmi_mlo_setup_status {
77 	WMI_HOST_MLO_SETUP_STATUS_SUCCESS,
78 	WMI_HOST_MLO_SETUP_STATUS_FAILURE,
79 };
80 
81 /** struct wmi_mlo_setup_complete_params - MLO setup complete event params
82  * @pdev_id: pdev id of radio on which this event is received
83  * @status: status code
84  * @max_ml_peer_ids: Maximum ML Peer ID's
85  */
86 struct wmi_mlo_setup_complete_params {
87 	uint32_t pdev_id;
88 	enum wmi_mlo_setup_status status;
89 	uint32_t max_ml_peer_ids;
90 };
91 
92 /** enum wmi_mlo_teardown_status - Status code in WMI MLO teardown completion
93  *                                 event
94  * @WMI_HOST_MLO_TEARDOWN_STATUS_SUCCESS: Success
95  * @WMI_HOST_MLO_TEARDOWN_STATUS_FAILURE: Failure
96  * @WMI_HOST_MLO_TEARDOWN_STATUS_ONGOING: Ongoing
97  */
98 enum wmi_mlo_teardown_status {
99 	WMI_HOST_MLO_TEARDOWN_STATUS_SUCCESS,
100 	WMI_HOST_MLO_TEARDOWN_STATUS_FAILURE,
101 	WMI_HOST_MLO_TEARDOWN_STATUS_ONGOING,
102 };
103 
104 /** struct wmi_mlo_teardown_cmpl_params - MLO setup teardown event params
105  * @pdev_id: pdev id of radio on which this event is received
106  * @status: Teardown status from enum wmi_mlo_teardown_status
107  */
108 struct wmi_mlo_teardown_cmpl_params {
109 	uint32_t pdev_id;
110 	enum wmi_mlo_teardown_status status;
111 };
112 #endif
113 #endif
114