]> git.ipfire.org Git - thirdparty/hostap.git/blob - wpa_supplicant/bgscan.h
Remove the GPL notification from files contributed by Jouni Malinen
[thirdparty/hostap.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 software may be distributed under the terms of the BSD license.
6 * See README for more details.
7 */
8
9 #ifndef BGSCAN_H
10 #define BGSCAN_H
11
12 struct wpa_supplicant;
13 struct wpa_ssid;
14
15 struct bgscan_ops {
16 const char *name;
17
18 void * (*init)(struct wpa_supplicant *wpa_s, const char *params,
19 const struct wpa_ssid *ssid);
20 void (*deinit)(void *priv);
21
22 int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
23 void (*notify_beacon_loss)(void *priv);
24 void (*notify_signal_change)(void *priv, int above,
25 int current_signal,
26 int current_noise,
27 int current_txrate);
28 };
29
30 #ifdef CONFIG_BGSCAN
31
32 int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
33 void bgscan_deinit(struct wpa_supplicant *wpa_s);
34 int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
35 struct wpa_scan_results *scan_res);
36 void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
37 void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
38 int current_signal, int current_noise,
39 int current_txrate);
40
41 #else /* CONFIG_BGSCAN */
42
43 static inline int bgscan_init(struct wpa_supplicant *wpa_s,
44 struct wpa_ssid *ssid)
45 {
46 return 0;
47 }
48
49 static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
50 {
51 }
52
53 static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
54 struct wpa_scan_results *scan_res)
55 {
56 return 0;
57 }
58
59 static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
60 {
61 }
62
63 static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
64 int above, int current_signal,
65 int current_noise,
66 int current_txrate)
67 {
68 }
69
70 #endif /* CONFIG_BGSCAN */
71
72 #endif /* BGSCAN_H */