Add CTRL-EVENT-SCAN-FAILED notification in case of scan failure
This is needed since the SCAN command with radio work returns before the actual driver operation to trigger a scan has been executed and as such, cannot return result of that operation. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
9f6a7cddc4
commit
d10792199e
2 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,8 @@ extern "C" {
|
||||||
#define WPA_EVENT_SCAN_STARTED "CTRL-EVENT-SCAN-STARTED "
|
#define WPA_EVENT_SCAN_STARTED "CTRL-EVENT-SCAN-STARTED "
|
||||||
/** New scan results available */
|
/** New scan results available */
|
||||||
#define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS "
|
#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 */
|
/** wpa_supplicant state change */
|
||||||
#define WPA_EVENT_STATE_CHANGE "CTRL-EVENT-STATE-CHANGE "
|
#define WPA_EVENT_STATE_CHANGE "CTRL-EVENT-STATE-CHANGE "
|
||||||
/** A new BSS entry was added (followed by BSS entry id and BSSID) */
|
/** A new BSS entry was added (followed by BSS entry id and BSSID) */
|
||||||
|
|
|
@ -176,6 +176,8 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
wpa_supplicant_notify_scanning(wpa_s, 0);
|
wpa_supplicant_notify_scanning(wpa_s, 0);
|
||||||
wpas_notify_scan_done(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);
|
radio_work_done(work);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue