wpa_supplicant / hostapd 2.0

bgscan.h

Go to the documentation of this file.
00001 
00010 #ifndef BGSCAN_H
00011 #define BGSCAN_H
00012 
00013 struct wpa_supplicant;
00014 struct wpa_ssid;
00015 
00016 struct bgscan_ops {
00017         const char *name;
00018 
00019         void * (*init)(struct wpa_supplicant *wpa_s, const char *params,
00020                        const struct wpa_ssid *ssid);
00021         void (*deinit)(void *priv);
00022 
00023         int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
00024         void (*notify_beacon_loss)(void *priv);
00025         void (*notify_signal_change)(void *priv, int above,
00026                                      int current_signal,
00027                                      int current_noise,
00028                                      int current_txrate);
00029 };
00030 
00031 #ifdef CONFIG_BGSCAN
00032 
00033 int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
00034 void bgscan_deinit(struct wpa_supplicant *wpa_s);
00035 int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
00036                        struct wpa_scan_results *scan_res);
00037 void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
00038 void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
00039                                  int current_signal, int current_noise,
00040                                  int current_txrate);
00041 
00042 #else /* CONFIG_BGSCAN */
00043 
00044 static inline int bgscan_init(struct wpa_supplicant *wpa_s,
00045                               struct wpa_ssid *ssid)
00046 {
00047         return 0;
00048 }
00049 
00050 static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
00051 {
00052 }
00053 
00054 static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
00055                                      struct wpa_scan_results *scan_res)
00056 {
00057         return 0;
00058 }
00059 
00060 static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
00061 {
00062 }
00063 
00064 static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
00065                                                int above, int current_signal,
00066                                                int current_noise,
00067                                                int current_txrate)
00068 {
00069 }
00070 
00071 #endif /* CONFIG_BGSCAN */
00072 
00073 #endif /* BGSCAN_H */
00074 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines