wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
bgscan.h
Go to the documentation of this file.
1 
5 #ifndef BGSCAN_H
6 #define BGSCAN_H
7 
8 struct wpa_supplicant;
9 struct wpa_ssid;
10 
11 struct bgscan_ops {
12  const char *name;
13 
14  void * (*init)(struct wpa_supplicant *wpa_s, const char *params,
15  const struct wpa_ssid *ssid);
16  void (*deinit)(void *priv);
17 
18  int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
19  void (*notify_beacon_loss)(void *priv);
20  void (*notify_signal_change)(void *priv, int above,
21  int current_signal,
22  int current_noise,
23  int current_txrate);
24 };
25 
26 #ifdef CONFIG_BGSCAN
27 
28 int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
29  const char *name);
30 void bgscan_deinit(struct wpa_supplicant *wpa_s);
31 int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
32  struct wpa_scan_results *scan_res);
33 void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
34 void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
35  int current_signal, int current_noise,
36  int current_txrate);
37 
38 #else /* CONFIG_BGSCAN */
39 
40 static inline int bgscan_init(struct wpa_supplicant *wpa_s,
41  struct wpa_ssid *ssid, const char name)
42 {
43  return 0;
44 }
45 
46 static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
47 {
48 }
49 
50 static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
51  struct wpa_scan_results *scan_res)
52 {
53  return 0;
54 }
55 
56 static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
57 {
58 }
59 
60 static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
61  int above, int current_signal,
62  int current_noise,
63  int current_txrate)
64 {
65 }
66 
67 #endif /* CONFIG_BGSCAN */
68 
69 #endif /* BGSCAN_H */
Definition: bgscan.h:11
u8 * ssid
Service set identifier (network name)
Definition: config_ssid.h:115
Scan results.
Definition: driver.h:277
Internal data for wpa_supplicant interface.
Definition: wpa_supplicant_i.h:451
Network configuration data.
Definition: config_ssid.h:52