2009-09-14 23:08:24 +02:00
|
|
|
/*
|
|
|
|
* WPA Supplicant - background scan and roaming interface
|
2010-03-29 00:32:34 +02:00
|
|
|
* Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
|
2009-09-14 23:08:24 +02:00
|
|
|
*
|
2012-02-11 15:46:35 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2009-09-14 23:08:24 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BGSCAN_H
|
|
|
|
#define BGSCAN_H
|
|
|
|
|
|
|
|
struct wpa_supplicant;
|
|
|
|
struct wpa_ssid;
|
|
|
|
|
|
|
|
struct bgscan_ops {
|
|
|
|
const char *name;
|
|
|
|
|
|
|
|
void * (*init)(struct wpa_supplicant *wpa_s, const char *params,
|
|
|
|
const struct wpa_ssid *ssid);
|
|
|
|
void (*deinit)(void *priv);
|
|
|
|
|
2010-07-11 00:43:44 +02:00
|
|
|
int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
|
2009-09-14 23:08:24 +02:00
|
|
|
void (*notify_beacon_loss)(void *priv);
|
2010-08-27 15:58:06 +02:00
|
|
|
void (*notify_signal_change)(void *priv, int above,
|
2010-10-12 19:03:36 +02:00
|
|
|
int current_signal,
|
|
|
|
int current_noise,
|
|
|
|
int current_txrate);
|
2009-09-14 23:08:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef CONFIG_BGSCAN
|
|
|
|
|
2013-11-03 14:19:59 +01:00
|
|
|
int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
|
|
|
const char *name);
|
2009-09-14 23:08:24 +02:00
|
|
|
void bgscan_deinit(struct wpa_supplicant *wpa_s);
|
2010-07-11 00:43:44 +02:00
|
|
|
int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_scan_results *scan_res);
|
2009-09-14 23:08:24 +02:00
|
|
|
void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
|
2010-08-27 15:58:06 +02:00
|
|
|
void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
|
2010-10-12 19:03:36 +02:00
|
|
|
int current_signal, int current_noise,
|
|
|
|
int current_txrate);
|
2009-09-14 23:08:24 +02:00
|
|
|
|
2016-06-24 16:27:12 +02:00
|
|
|
/* Available bgscan modules */
|
|
|
|
|
|
|
|
#ifdef CONFIG_BGSCAN_SIMPLE
|
|
|
|
extern const struct bgscan_ops bgscan_simple_ops;
|
|
|
|
#endif /* CONFIG_BGSCAN_SIMPLE */
|
|
|
|
#ifdef CONFIG_BGSCAN_LEARN
|
|
|
|
extern const struct bgscan_ops bgscan_learn_ops;
|
|
|
|
#endif /* CONFIG_BGSCAN_LEARN */
|
|
|
|
|
2009-09-14 23:08:24 +02:00
|
|
|
#else /* CONFIG_BGSCAN */
|
|
|
|
|
|
|
|
static inline int bgscan_init(struct wpa_supplicant *wpa_s,
|
2013-11-03 14:19:59 +01:00
|
|
|
struct wpa_ssid *ssid, const char name)
|
2009-09-14 23:08:24 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void bgscan_deinit(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-07-11 00:43:44 +02:00
|
|
|
static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_scan_results *scan_res)
|
2009-09-14 23:08:24 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-03-29 00:32:34 +02:00
|
|
|
static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
|
2010-10-12 19:03:36 +02:00
|
|
|
int above, int current_signal,
|
|
|
|
int current_noise,
|
|
|
|
int current_txrate)
|
2009-09-14 23:08:24 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_BGSCAN */
|
|
|
|
|
|
|
|
#endif /* BGSCAN_H */
|