aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-08-27 13:58:06 (GMT)
committerJouni Malinen <j@w1.fi>2010-08-27 13:58:06 (GMT)
commit60a972a68da94de6182b2ca52c9b4184b00afc45 (patch)
tree15ff5137969d4a774202e4aadb68847fad63abe2 /wpa_supplicant
parent9c77ad1889664f85f03ea13b629f3107189fe0cc (diff)
downloadhostap-60a972a68da94de6182b2ca52c9b4184b00afc45.zip
hostap-60a972a68da94de6182b2ca52c9b4184b00afc45.tar.gz
hostap-60a972a68da94de6182b2ca52c9b4184b00afc45.tar.bz2
Add current signal strength into signal quality change events
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/bgscan.c6
-rw-r--r--wpa_supplicant/bgscan.h8
-rw-r--r--wpa_supplicant/bgscan_learn.c5
-rw-r--r--wpa_supplicant/bgscan_simple.c5
-rw-r--r--wpa_supplicant/events.c3
5 files changed, 17 insertions, 10 deletions
diff --git a/wpa_supplicant/bgscan.c b/wpa_supplicant/bgscan.c
index e5fdfc4..e76e954 100644
--- a/wpa_supplicant/bgscan.c
+++ b/wpa_supplicant/bgscan.c
@@ -111,8 +111,10 @@ 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)
{
if (wpa_s->bgscan && wpa_s->bgscan_priv)
- wpa_s->bgscan->notify_signal_change(wpa_s->bgscan_priv, above);
+ wpa_s->bgscan->notify_signal_change(wpa_s->bgscan_priv, above,
+ current_signal);
}
diff --git a/wpa_supplicant/bgscan.h b/wpa_supplicant/bgscan.h
index e0c9eb0..9f2ba2f 100644
--- a/wpa_supplicant/bgscan.h
+++ b/wpa_supplicant/bgscan.h
@@ -27,7 +27,8 @@ struct bgscan_ops {
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);
};
#ifdef CONFIG_BGSCAN
@@ -37,7 +38,8 @@ void bgscan_deinit(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);
#else /* CONFIG_BGSCAN */
@@ -62,7 +64,7 @@ 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)
{
}
diff --git a/wpa_supplicant/bgscan_learn.c b/wpa_supplicant/bgscan_learn.c
index 32305a4..865347b 100644
--- a/wpa_supplicant/bgscan_learn.c
+++ b/wpa_supplicant/bgscan_learn.c
@@ -546,7 +546,8 @@ static void bgscan_learn_notify_beacon_loss(void *priv)
}
-static void bgscan_learn_notify_signal_change(void *priv, int above)
+static void bgscan_learn_notify_signal_change(void *priv, int above,
+ int current_signal)
{
struct bgscan_learn_data *data = priv;
@@ -555,7 +556,7 @@ static void bgscan_learn_notify_signal_change(void *priv, int above)
return;
wpa_printf(MSG_DEBUG, "bgscan learn: signal level changed "
- "(above=%d)", above);
+ "(above=%d current_signal=%d)", above, current_signal);
if (data->scan_interval == data->long_interval && !above) {
wpa_printf(MSG_DEBUG, "bgscan learn: Trigger immediate scan "
"and start using short bgscan interval");
diff --git a/wpa_supplicant/bgscan_simple.c b/wpa_supplicant/bgscan_simple.c
index aeecc01..b58cb76 100644
--- a/wpa_supplicant/bgscan_simple.c
+++ b/wpa_supplicant/bgscan_simple.c
@@ -167,7 +167,8 @@ static void bgscan_simple_notify_beacon_loss(void *priv)
}
-static void bgscan_simple_notify_signal_change(void *priv, int above)
+static void bgscan_simple_notify_signal_change(void *priv, int above,
+ int current_signal)
{
struct bgscan_simple_data *data = priv;
@@ -176,7 +177,7 @@ static void bgscan_simple_notify_signal_change(void *priv, int above)
return;
wpa_printf(MSG_DEBUG, "bgscan simple: signal level changed "
- "(above=%d)", above);
+ "(above=%d current_signal=%d)", above, current_signal);
if (data->scan_interval == data->long_interval && !above) {
wpa_printf(MSG_DEBUG, "bgscan simple: Trigger immediate scan "
"and start using short bgscan interval");
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 2ca55d8..80a9f85 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1752,7 +1752,8 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
break;
case EVENT_SIGNAL_CHANGE:
bgscan_notify_signal_change(
- wpa_s, data->signal_change.above_threshold);
+ wpa_s, data->signal_change.above_threshold,
+ data->signal_change.current_signal);
break;
case EVENT_INTERFACE_ENABLED:
wpa_printf(MSG_DEBUG, "Interface was enabled");