X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=wpa_supplicant%2Fbgscan.h;h=3df1550a97dda529cdcec209c1bb5bffd8d16408;hb=f465c32dc282627b447a2f137cc089c64a3a594c;hp=69e99b614cb2397fba27cd0640b79e8f5d69474f;hpb=e2f74005f548d90014cdf080802d455382e37cb9;p=mech_eap.git diff --git a/wpa_supplicant/bgscan.h b/wpa_supplicant/bgscan.h index 69e99b6..3df1550 100644 --- a/wpa_supplicant/bgscan.h +++ b/wpa_supplicant/bgscan.h @@ -2,14 +2,8 @@ * WPA Supplicant - background scan and roaming interface * Copyright (c) 2009-2010, Jouni Malinen * - * 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. + * This software may be distributed under the terms of the BSD license. + * See README for more details. */ #ifndef BGSCAN_H @@ -25,23 +19,39 @@ struct bgscan_ops { const struct wpa_ssid *ssid); void (*deinit)(void *priv); - int (*notify_scan)(void *priv); + int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res); void (*notify_beacon_loss)(void *priv); - void (*notify_signal_change)(void *priv, int above); + void (*notify_signal_change)(void *priv, int above, + int current_signal, + int current_noise, + int current_txrate); }; #ifdef CONFIG_BGSCAN -int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid); +int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, + const char *name); void bgscan_deinit(struct wpa_supplicant *wpa_s); -int bgscan_notify_scan(struct wpa_supplicant *wpa_s); +int bgscan_notify_scan(struct wpa_supplicant *wpa_s, + struct wpa_scan_results *scan_res); void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s); -void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above); +void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above, + int current_signal, int current_noise, + int current_txrate); + +/* 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 */ #else /* CONFIG_BGSCAN */ static inline int bgscan_init(struct wpa_supplicant *wpa_s, - struct wpa_ssid *ssid) + struct wpa_ssid *ssid, const char name) { return 0; } @@ -50,7 +60,8 @@ static inline void bgscan_deinit(struct wpa_supplicant *wpa_s) { } -static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s) +static inline int bgscan_notify_scan(struct wpa_supplicant *wpa_s, + struct wpa_scan_results *scan_res) { return 0; } @@ -60,7 +71,9 @@ static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s) } static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, - int above) + int above, int current_signal, + int current_noise, + int current_txrate) { }