xref: /wlan-driver/qca-wifi-host-cmn/umac/cmn_services/interface_mgr/inc/wlan_if_mgr_public_struct.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 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 /**
19  * DOC: contains interface manager structure definitions
20  */
21 #ifndef __IF_MGR_PUBLIC_STRUCTS_H
22 #define __IF_MGR_PUBLIC_STRUCTS_H
23 
24 #include <scheduler_api.h>
25 #include <wlan_objmgr_psoc_obj.h>
26 #include <wlan_objmgr_pdev_obj.h>
27 #include <wlan_objmgr_vdev_obj.h>
28 #include <qdf_time.h>
29 #include <qdf_list.h>
30 #include <qdf_atomic.h>
31 
32 /**
33  * enum wlan_if_mgr_evt: interface manager events
34  * @WLAN_IF_MGR_EV_CONNECT_START:Event to handle connect start request
35  * @WLAN_IF_MGR_EV_CONNECT_COMPLETE:Event to handle connect start complete
36  * @WLAN_IF_MGR_EV_DISCONNECT_START:Event to handle disconnect start request
37  * @WLAN_IF_MGR_EV_DISCONNECT_COMPLETE:Event to handle disconnect start complete
38  * @WLAN_IF_MGR_EV_VALIDATE_CANDIDATE:Event to validate candidate
39  * @WLAN_IF_MGR_EV_AP_START_BSS:Event to handle start bss request
40  * @WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE:Event to handle start bss complete
41  * @WLAN_IF_MGR_EV_AP_STOP_BSS:Event to handle stop bss request
42  * @WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE:Event to stop bss complete
43  * @WLAN_IF_MGR_EV_AP_START_ACS: Event to handle ACS start
44  * @WLAN_IF_MGR_EV_AP_STOP_ACS: Event to handle ACS stop
45  * @WLAN_IF_MGR_EV_AP_DONE_ACS: Event to handle ACS completion
46  * @WLAN_IF_MGR_EV_AP_CANCEL_ACS: Event to handle ACS cancel
47  * @WLAN_IF_MGR_EV_AP_START_HT40: Event to handle HT40 scan start
48  * @WLAN_IF_MGR_EV_AP_STOP_HT40: Event to handle HT40 scan stop
49  * @WLAN_IF_MGR_EV_AP_DONE_HT40: Event to handle HT40 scan completion
50  * @WLAN_IF_MGR_EV_AP_CANCEL_HT40: Event to handle HT40 scan cancel
51  * @WLAN_IF_MGR_EV_AP_CSA_START: Event to handle CSA start
52  * @WLAN_IF_MGR_EV_AP_CSA_COMPLETE: Event to handle csa complete
53  * @WLAN_IF_MGR_EV_STA_CSA_COMPLETE: Event to handle STA/P2P_CLI CSA completion
54  * @WLAN_IF_MGR_EV_CONNECT_ACTIVE:Event to handle connect active request
55  * @WLAN_IF_MGR_EV_MAX: Max event
56  */
57 enum wlan_if_mgr_evt {
58 	WLAN_IF_MGR_EV_CONNECT_START = 0,
59 	WLAN_IF_MGR_EV_CONNECT_COMPLETE = 1,
60 	WLAN_IF_MGR_EV_DISCONNECT_START = 2,
61 	WLAN_IF_MGR_EV_DISCONNECT_COMPLETE = 3,
62 	WLAN_IF_MGR_EV_VALIDATE_CANDIDATE = 4,
63 	WLAN_IF_MGR_EV_AP_START_BSS = 5,
64 	WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE = 6,
65 	WLAN_IF_MGR_EV_AP_STOP_BSS = 7,
66 	WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE = 8,
67 	WLAN_IF_MGR_EV_AP_START_ACS = 9,
68 	WLAN_IF_MGR_EV_AP_STOP_ACS = 10,
69 	WLAN_IF_MGR_EV_AP_DONE_ACS = 11,
70 	WLAN_IF_MGR_EV_AP_CANCEL_ACS = 12,
71 	WLAN_IF_MGR_EV_AP_START_HT40 = 13,
72 	WLAN_IF_MGR_EV_AP_STOP_HT40 = 14,
73 	WLAN_IF_MGR_EV_AP_DONE_HT40 = 15,
74 	WLAN_IF_MGR_EV_AP_CANCEL_HT40 = 16,
75 	WLAN_IF_MGR_EV_AP_CSA_START = 17,
76 	WLAN_IF_MGR_EV_AP_CSA_COMPLETE = 18,
77 	WLAN_IF_MGR_EV_STA_CSA_COMPLETE = 19,
78 	WLAN_IF_MGR_EV_CONNECT_ACTIVE = 20,
79 	WLAN_IF_MGR_EV_MAX = 21,
80 };
81 
82 /**
83  * struct validate_bss_data - interface manager validate candidate data
84  * @peer_addr: MAC address of the BSS
85  * @chan_freq: Frequency of the potential BSS connection
86  * @beacon_interval: beacon interval of BSS
87  * @is_mlo: indicate whether MLO is supported by the BSS or not
88  * @scan_entry: scan entry data
89  */
90 struct validate_bss_data {
91 	struct qdf_mac_addr peer_addr;
92 	qdf_freq_t chan_freq;
93 	uint16_t beacon_interval;
94 #ifdef WLAN_FEATURE_11BE_MLO
95 	bool is_mlo;
96 	struct scan_cache_entry *scan_entry;
97 #endif
98 };
99 
100 /**
101  * struct if_mgr_event_data - interface manager event data
102  * @status: qdf status used to indicate if connect,disconnect,
103  *	    start bss,stop bss event is success/failure.
104  * @validate_bss_info: struct to hold the validate candidate information
105  * @data: event data
106  */
107 struct if_mgr_event_data {
108 	QDF_STATUS status;
109 	struct validate_bss_data validate_bss_info;
110 	void *data;
111 };
112 
113 #endif
114