]> git.ipfire.org Git - thirdparty/hostap.git/blame - wpa_supplicant/bgscan.h
Add a test framework for various wpa_supplicant failure cases
[thirdparty/hostap.git] / wpa_supplicant / bgscan.h
CommitLineData
60b94c98
JM
1/*
2 * WPA Supplicant - background scan and roaming interface
e2f74005 3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
60b94c98 4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
60b94c98
JM
7 */
8
9#ifndef BGSCAN_H
10#define BGSCAN_H
11
12struct wpa_supplicant;
13struct wpa_ssid;
14
15struct 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
c2594c36 22 int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
60b94c98 23 void (*notify_beacon_loss)(void *priv);
60a972a6 24 void (*notify_signal_change)(void *priv, int above,
174fa789
PS
25 int current_signal,
26 int current_noise,
27 int current_txrate);
60b94c98
JM
28};
29
30#ifdef CONFIG_BGSCAN
31
31392709
HD
32int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
33 const char *name);
60b94c98 34void bgscan_deinit(struct wpa_supplicant *wpa_s);
c2594c36
JM
35int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
36 struct wpa_scan_results *scan_res);
60b94c98 37void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
60a972a6 38void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
174fa789
PS
39 int current_signal, int current_noise,
40 int current_txrate);
60b94c98
JM
41
42#else /* CONFIG_BGSCAN */
43
44static inline int bgscan_init(struct wpa_supplicant *wpa_s,
31392709 45 struct wpa_ssid *ssid, const char name)
60b94c98
JM
46{
47 return 0;
48}
49
50static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
51{
52}
53
c2594c36
JM
54static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
55 struct wpa_scan_results *scan_res)
60b94c98
JM
56{
57 return 0;
58}
59
60static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
61{
62}
63
e2f74005 64static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
174fa789
PS
65 int above, int current_signal,
66 int current_noise,
67 int current_txrate)
60b94c98
JM
68{
69}
70
71#endif /* CONFIG_BGSCAN */
72
73#endif /* BGSCAN_H */