Disable AP PIN on all interfaces controlled by the same process
[libeap.git] / wpa_supplicant / bgscan.h
1 /*
2  * WPA Supplicant - background scan and roaming interface
3  * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * Alternatively, this software may be distributed under the terms of BSD
10  * license.
11  *
12  * See README and COPYING for more details.
13  */
14
15 #ifndef BGSCAN_H
16 #define BGSCAN_H
17
18 struct wpa_supplicant;
19 struct wpa_ssid;
20
21 struct bgscan_ops {
22         const char *name;
23
24         void * (*init)(struct wpa_supplicant *wpa_s, const char *params,
25                        const struct wpa_ssid *ssid);
26         void (*deinit)(void *priv);
27
28         int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
29         void (*notify_beacon_loss)(void *priv);
30         void (*notify_signal_change)(void *priv, int above,
31                                      int current_signal);
32 };
33
34 #ifdef CONFIG_BGSCAN
35
36 int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
37 void bgscan_deinit(struct wpa_supplicant *wpa_s);
38 int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
39                        struct wpa_scan_results *scan_res);
40 void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
41 void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
42                                  int current_signal);
43
44 #else /* CONFIG_BGSCAN */
45
46 static inline int bgscan_init(struct wpa_supplicant *wpa_s,
47                               struct wpa_ssid *ssid)
48 {
49         return 0;
50 }
51
52 static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
53 {
54 }
55
56 static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
57                                      struct wpa_scan_results *scan_res)
58 {
59         return 0;
60 }
61
62 static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
63 {
64 }
65
66 static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
67                                                int above, int current_signal)
68 {
69 }
70
71 #endif /* CONFIG_BGSCAN */
72
73 #endif /* BGSCAN_H */