]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add CTRL-EVENT-SIGNAL-CHANGE for bgscan signal update events
authorJouni Malinen <j@w1.fi>
Sat, 12 Apr 2014 08:48:05 +0000 (11:48 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 13 Apr 2014 07:26:52 +0000 (10:26 +0300)
This allows external programs to monitor driver signal change events
through wpa_supplicant when bgscan is used.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/wpa_ctrl.h
wpa_supplicant/events.c

index 7f39ccdc325acece9201e5773a6550687d80f2d9..5ef75e8354de424473a2c2465712fb3850a8aec6 100644 (file)
@@ -64,6 +64,8 @@ extern "C" {
 #define WPA_EVENT_BSS_ADDED "CTRL-EVENT-BSS-ADDED "
 /** A BSS entry was removed (followed by BSS entry id and BSSID) */
 #define WPA_EVENT_BSS_REMOVED "CTRL-EVENT-BSS-REMOVED "
+/** Change in the signal level was reported by the driver */
+#define WPA_EVENT_SIGNAL_CHANGE "CTRL-EVENT-SIGNAL-CHANGE "
 
 /** RSN IBSS 4-way handshakes completed with specified peer */
 #define IBSS_RSN_COMPLETED "IBSS-RSN-COMPLETED "
index 3a6d42769b79da0e67dd527df876eb6d284baa04..adcdf01dfc60cc33b5f96043dabdcb7c43f88584 100644 (file)
@@ -3268,6 +3268,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                                        data->eapol_rx.data_len);
                break;
        case EVENT_SIGNAL_CHANGE:
+               wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SIGNAL_CHANGE
+                       "above=%d signal=%d noise=%d txrate=%d",
+                       data->signal_change.above_threshold,
+                       data->signal_change.current_signal,
+                       data->signal_change.current_noise,
+                       data->signal_change.current_txrate);
                bgscan_notify_signal_change(
                        wpa_s, data->signal_change.above_threshold,
                        data->signal_change.current_signal,