From: Dmitry Shmidt Date: Fri, 19 Jun 2015 17:33:50 +0000 (-0700) Subject: Send CTRL-EVENT-NETWORK-NOT-FOUND if no suitable network was found X-Git-Tag: hostap_2_5~512 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f39908b60eacacfb932fd071e8f63c0479b51a5;p=thirdparty%2Fhostap.git Send CTRL-EVENT-NETWORK-NOT-FOUND if no suitable network was found This provides more information to upper layer programs on what happens with connection attempts in cases where the enabled networks are not found in scan results. Signed-off-by: Dmitry Shmidt --- diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index e3a816f29..e7005232c 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -68,6 +68,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 " +/** No suitable network was found */ +#define WPA_EVENT_NETWORK_NOT_FOUND "CTRL-EVENT-NETWORK-NOT-FOUND " /** Change in the signal level was reported by the driver */ #define WPA_EVENT_SIGNAL_CHANGE "CTRL-EVENT-SIGNAL-CHANGE " /** Regulatory domain channel */ diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 601ddb3d3..aa171eff4 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1628,6 +1628,9 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s, if (wpa_supplicant_req_sched_scan(wpa_s)) wpa_supplicant_req_new_scan(wpa_s, timeout_sec, timeout_usec); + + wpa_msg_ctrl(wpa_s, MSG_INFO, + WPA_EVENT_NETWORK_NOT_FOUND); } } return 0;