xref: /wlan-dirver/qca-wifi-host-cmn/umac/cmn_services/interface_mgr/inc/wlan_if_mgr_public_struct.h (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
1 /*
2  * Copyright (c) 2020-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 /*
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_CSA_COMPLETE: Event to handle csa complete
52  */
53 enum wlan_if_mgr_evt {
54 	WLAN_IF_MGR_EV_CONNECT_START = 0,
55 	WLAN_IF_MGR_EV_CONNECT_COMPLETE = 1,
56 	WLAN_IF_MGR_EV_DISCONNECT_START = 2,
57 	WLAN_IF_MGR_EV_DISCONNECT_COMPLETE = 3,
58 	WLAN_IF_MGR_EV_VALIDATE_CANDIDATE = 4,
59 	WLAN_IF_MGR_EV_AP_START_BSS = 5,
60 	WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE = 6,
61 	WLAN_IF_MGR_EV_AP_STOP_BSS = 7,
62 	WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE = 8,
63 	WLAN_IF_MGR_EV_AP_START_ACS = 9,
64 	WLAN_IF_MGR_EV_AP_STOP_ACS = 10,
65 	WLAN_IF_MGR_EV_AP_DONE_ACS = 11,
66 	WLAN_IF_MGR_EV_AP_CANCEL_ACS = 12,
67 	WLAN_IF_MGR_EV_AP_START_HT40 = 13,
68 	WLAN_IF_MGR_EV_AP_STOP_HT40 = 14,
69 	WLAN_IF_MGR_EV_AP_DONE_HT40 = 15,
70 	WLAN_IF_MGR_EV_AP_CANCEL_HT40 = 16,
71 	WLAN_IF_MGR_EV_CSA_COMPLETE = 17,
72 	WLAN_IF_MGR_EV_MAX = 18,
73 };
74 
75 /**
76  * struct validate_bss_data - interface manager validate candidate data
77  * @peer_addr: MAC address of the BSS
78  * @chan_freq: Frequency of the potential BSS connection
79  * @beacon_interval: beacon interval of BSS
80  * @is_mlo: indicate whether MLO is supported by the BSS or not
81  * @scan_entry: scan entry data
82  */
83 struct validate_bss_data {
84 	struct qdf_mac_addr peer_addr;
85 	qdf_freq_t chan_freq;
86 	uint16_t beacon_interval;
87 #ifdef WLAN_FEATURE_11BE_MLO
88 	bool is_mlo;
89 	struct scan_cache_entry *scan_entry;
90 #endif
91 };
92 
93 /**
94  * struct if_mgr_event_data - interface manager event data
95  * @status: qdf status used to indicate if connect,disconnect,
96  *	    start bss,stop bss event is success/failure.
97  * @validate_bss_info: struct to hold the validate candidate information
98  * @data: event data
99  */
100 struct if_mgr_event_data {
101 	QDF_STATUS status;
102 	struct validate_bss_data validate_bss_info;
103 	void *data;
104 };
105 
106 #endif
107