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
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of BSD
|
|
|
|
* license.
|
|
|
|
*
|
|
|
|
* See README and COPYING for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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,
|
|
|
|
int current_signal);
|
2009-09-14 23:08:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef CONFIG_BGSCAN
|
|
|
|
|
|
|
|
int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
|
|
|
|
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,
|
|
|
|
int current_signal);
|
2009-09-14 23:08:24 +02:00
|
|
|
|
|
|
|
#else /* CONFIG_BGSCAN */
|
|
|
|
|
|
|
|
static inline int bgscan_init(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid)
|
|
|
|
{
|
|
|
|
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-08-27 15:58:06 +02:00
|
|
|
int above, int current_signal)
|
2009-09-14 23:08:24 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_BGSCAN */
|
|
|
|
|
|
|
|
#endif /* BGSCAN_H */
|