diff mbox

Add CTRL-EVENT-SCAN-FAILED notification in case of scan failure

Message ID 20141107000721.5701F163B36@ushik.mtv.corp.google.com
State Accepted
Headers show

Commit Message

Dmitry Shmidt Nov. 5, 2014, 9:22 p.m. UTC
Change-Id: I00e9d8230d945eda49df47aedabf0974713d8017
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 src/common/wpa_ctrl.h | 2 ++
 wpa_supplicant/scan.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Jouni Malinen Nov. 15, 2014, 2:03 p.m. UTC | #1
Thanks, applied.
diff mbox

Patch

diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index d91594e..1da38a3 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -58,6 +58,8 @@  extern "C" {
 #define WPA_EVENT_SCAN_STARTED "CTRL-EVENT-SCAN-STARTED "
 /** New scan results available */
 #define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS "
+/** Scan command failed */
+#define WPA_EVENT_SCAN_FAILED "CTRL-EVENT-SCAN-FAILED "
 /** wpa_supplicant state change */
 #define WPA_EVENT_STATE_CHANGE "CTRL-EVENT-STATE-CHANGE "
 /** A new BSS entry was added (followed by BSS entry id and BSSID) */
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 40eb8d8..be31e4b 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -168,6 +168,8 @@  static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit)
 	if (ret) {
 		wpa_supplicant_notify_scanning(wpa_s, 0);
 		wpas_notify_scan_done(wpa_s, 0);
+		wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_FAILED "ret=%d",
+			     ret);
 		radio_work_done(work);
 		return;
 	}