xref: /aosp_15_r20/external/wpa_supplicant_8/wpa_supplicant/autoscan.h (revision 03f9172ca588f91df233974f4258bab95191f931)
1*03f9172cSAndroid Build Coastguard Worker /*
2*03f9172cSAndroid Build Coastguard Worker  * WPA Supplicant - auto scan
3*03f9172cSAndroid Build Coastguard Worker  * Copyright (c) 2012, Intel Corporation. All rights reserved.
4*03f9172cSAndroid Build Coastguard Worker  *
5*03f9172cSAndroid Build Coastguard Worker  * This software may be distributed under the terms of the BSD license.
6*03f9172cSAndroid Build Coastguard Worker  * See README for more details.
7*03f9172cSAndroid Build Coastguard Worker  */
8*03f9172cSAndroid Build Coastguard Worker 
9*03f9172cSAndroid Build Coastguard Worker #ifndef AUTOSCAN_H
10*03f9172cSAndroid Build Coastguard Worker #define AUTOSCAN_H
11*03f9172cSAndroid Build Coastguard Worker 
12*03f9172cSAndroid Build Coastguard Worker struct wpa_supplicant;
13*03f9172cSAndroid Build Coastguard Worker 
14*03f9172cSAndroid Build Coastguard Worker struct autoscan_ops {
15*03f9172cSAndroid Build Coastguard Worker 	const char *name;
16*03f9172cSAndroid Build Coastguard Worker 
17*03f9172cSAndroid Build Coastguard Worker 	void * (*init)(struct wpa_supplicant *wpa_s, const char *params);
18*03f9172cSAndroid Build Coastguard Worker 	void (*deinit)(void *priv);
19*03f9172cSAndroid Build Coastguard Worker 
20*03f9172cSAndroid Build Coastguard Worker 	int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
21*03f9172cSAndroid Build Coastguard Worker };
22*03f9172cSAndroid Build Coastguard Worker 
23*03f9172cSAndroid Build Coastguard Worker #ifdef CONFIG_AUTOSCAN
24*03f9172cSAndroid Build Coastguard Worker 
25*03f9172cSAndroid Build Coastguard Worker int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan);
26*03f9172cSAndroid Build Coastguard Worker void autoscan_deinit(struct wpa_supplicant *wpa_s);
27*03f9172cSAndroid Build Coastguard Worker int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
28*03f9172cSAndroid Build Coastguard Worker 			 struct wpa_scan_results *scan_res);
29*03f9172cSAndroid Build Coastguard Worker 
30*03f9172cSAndroid Build Coastguard Worker /* Available autoscan modules */
31*03f9172cSAndroid Build Coastguard Worker 
32*03f9172cSAndroid Build Coastguard Worker #ifdef CONFIG_AUTOSCAN_EXPONENTIAL
33*03f9172cSAndroid Build Coastguard Worker extern const struct autoscan_ops autoscan_exponential_ops;
34*03f9172cSAndroid Build Coastguard Worker #endif /* CONFIG_AUTOSCAN_EXPONENTIAL */
35*03f9172cSAndroid Build Coastguard Worker 
36*03f9172cSAndroid Build Coastguard Worker #ifdef CONFIG_AUTOSCAN_PERIODIC
37*03f9172cSAndroid Build Coastguard Worker extern const struct autoscan_ops autoscan_periodic_ops;
38*03f9172cSAndroid Build Coastguard Worker #endif /* CONFIG_AUTOSCAN_PERIODIC */
39*03f9172cSAndroid Build Coastguard Worker 
40*03f9172cSAndroid Build Coastguard Worker #else /* CONFIG_AUTOSCAN */
41*03f9172cSAndroid Build Coastguard Worker 
autoscan_init(struct wpa_supplicant * wpa_s,int req_scan)42*03f9172cSAndroid Build Coastguard Worker static inline int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan)
43*03f9172cSAndroid Build Coastguard Worker {
44*03f9172cSAndroid Build Coastguard Worker 	return 0;
45*03f9172cSAndroid Build Coastguard Worker }
46*03f9172cSAndroid Build Coastguard Worker 
autoscan_deinit(struct wpa_supplicant * wpa_s)47*03f9172cSAndroid Build Coastguard Worker static inline void autoscan_deinit(struct wpa_supplicant *wpa_s)
48*03f9172cSAndroid Build Coastguard Worker {
49*03f9172cSAndroid Build Coastguard Worker }
50*03f9172cSAndroid Build Coastguard Worker 
autoscan_notify_scan(struct wpa_supplicant * wpa_s,struct wpa_scan_results * scan_res)51*03f9172cSAndroid Build Coastguard Worker static inline int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
52*03f9172cSAndroid Build Coastguard Worker 				       struct wpa_scan_results *scan_res)
53*03f9172cSAndroid Build Coastguard Worker {
54*03f9172cSAndroid Build Coastguard Worker 	return 0;
55*03f9172cSAndroid Build Coastguard Worker }
56*03f9172cSAndroid Build Coastguard Worker 
57*03f9172cSAndroid Build Coastguard Worker #endif /* CONFIG_AUTOSCAN */
58*03f9172cSAndroid Build Coastguard Worker 
59*03f9172cSAndroid Build Coastguard Worker #endif /* AUTOSCAN_H */
60