xref: /wlan-dirver/qca-wifi-host-cmn/umac/cmn_services/interface_mgr/inc/wlan_if_mgr_public_struct.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /*
18  * DOC: contains interface manager structure definations
19  */
20 #ifndef __IF_MGR_PUBLIC_STRUCTS_H
21 #define __IF_MGR_PUBLIC_STRUCTS_H
22 
23 #include <scheduler_api.h>
24 #include <wlan_objmgr_psoc_obj.h>
25 #include <wlan_objmgr_pdev_obj.h>
26 #include <wlan_objmgr_vdev_obj.h>
27 #include <qdf_time.h>
28 #include <qdf_list.h>
29 #include <qdf_atomic.h>
30 
31 /**
32  * enum wlan_if_mgr_evt: interface manager events
33  * @WLAN_IF_MGR_EV_CONNECT_START:Event to handle connect start request
34  * @WLAN_IF_MGR_EV_CONNECT_COMPLETE:Event to handle connect start complete
35  * @WLAN_IF_MGR_EV_DISCONNECT_START:Event to handle disconnect start request
36  * @WLAN_IF_MGR_EV_DISCONNECT_COMPLETE:Event to handle disconnect start complete
37  * @WLAN_IF_MGR_EV_VALIDATE_CANDIDATE:Event to validate candidate
38  * @WLAN_IF_MGR_EV_AP_START_BSS:Event to handle start bss request
39  * @WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE:Event to handle start bss complete
40  * @WLAN_IF_MGR_EV_AP_STOP_BSS:Event to handle stop bss request
41  * @WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE:Event to stop bss complete
42  * WLAN_IF_MGR_EV_AP_START_ACS: Event to handle ACS start
43  * WLAN_IF_MGR_EV_AP_STOP_ACS: Event to handle ACS stop
44  * WLAN_IF_MGR_EV_AP_DONE_ACS: Event to handle ACS completion
45  * WLAN_IF_MGR_EV_AP_CANCEL_ACS: Event to handle ACS cancel
46  * WLAN_IF_MGR_EV_AP_START_HT40: Event to handle HT40 scan start
47  * WLAN_IF_MGR_EV_AP_STOP_HT40: Event to handle HT40 scan stop
48  * WLAN_IF_MGR_EV_AP_DONE_HT40: Event to handle HT40 scan completion
49  * WLAN_IF_MGR_EV_AP_CANCEL_HT40: Event to handle HT40 scan cancel
50  */
51 enum wlan_if_mgr_evt {
52 	WLAN_IF_MGR_EV_CONNECT_START = 0,
53 	WLAN_IF_MGR_EV_CONNECT_COMPLETE = 1,
54 	WLAN_IF_MGR_EV_DISCONNECT_START = 2,
55 	WLAN_IF_MGR_EV_DISCONNECT_COMPLETE = 3,
56 	WLAN_IF_MGR_EV_VALIDATE_CANDIDATE = 4,
57 	WLAN_IF_MGR_EV_AP_START_BSS = 5,
58 	WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE = 6,
59 	WLAN_IF_MGR_EV_AP_STOP_BSS = 7,
60 	WLAN_IF_MGR_EV_AP_STOP_BSS_COMPLETE = 8,
61 	WLAN_IF_MGR_EV_AP_START_ACS = 9,
62 	WLAN_IF_MGR_EV_AP_STOP_ACS = 10,
63 	WLAN_IF_MGR_EV_AP_DONE_ACS = 11,
64 	WLAN_IF_MGR_EV_AP_CANCEL_ACS = 12,
65 	WLAN_IF_MGR_EV_AP_START_HT40 = 13,
66 	WLAN_IF_MGR_EV_AP_STOP_HT40 = 14,
67 	WLAN_IF_MGR_EV_AP_DONE_HT40 = 15,
68 	WLAN_IF_MGR_EV_AP_CANCEL_HT40 = 16,
69 	WLAN_IF_MGR_EV_MAX = 17,
70 };
71 
72 /**
73  * struct validate_bss_data - interface manager validate candidate data
74  * @peer_addr: MAC address of the BSS
75  * @chan_freq: Frequency of the potential BSS connection
76  * @beacon_interval: beacon interval of BSS
77  */
78 struct validate_bss_data {
79 	struct qdf_mac_addr peer_addr;
80 	qdf_freq_t chan_freq;
81 	uint16_t beacon_interval;
82 };
83 
84 /**
85  * struct if_mgr_event_data - interface manager event data
86  * @status: qdf status used to indicate if connect,disconnect,
87  *	    start bss,stop bss event is success/failure.
88  * @validate_bss_info: struct to hold the validate candidate information
89  * @data: event data
90  */
91 struct if_mgr_event_data {
92 	QDF_STATUS status;
93 	struct validate_bss_data validate_bss_info;
94 	void *data;
95 };
96 
97 #endif
98