From 7465640066ce3215348ab94df8a6cfef8fff90b8 Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Mon, 20 Oct 2014 10:18:47 +0530 Subject: [PATCH] Invoke connect work done for all the connection failure cases This commit fixes couple of connection failure paths where wpas_connect_work_done() was not called, thus enabling the radio work interface to proceed with the other queued actions. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpa_supplicant.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 517917f..6e08256 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1640,6 +1640,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) (ssid->key_mgmt & WPA_KEY_MGMT_WPS)) { /* Use ap_scan==1 style network selection to find the network */ + wpas_connect_work_done(wpa_s); wpa_s->scan_req = MANUAL_SCAN_REQ; wpa_s->reassociate = 1; wpa_supplicant_req_scan(wpa_s, 0, 0); @@ -1690,6 +1691,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) wpa_ie, &wpa_ie_len)) { wpa_msg(wpa_s, MSG_WARNING, "WPA: Failed to set WPA " "key management and encryption suites"); + wpas_connect_work_done(wpa_s); return; } } else if ((ssid->key_mgmt & WPA_KEY_MGMT_IEEE8021X_NO_WPA) && bss && @@ -1709,6 +1711,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) wpa_msg(wpa_s, MSG_WARNING, "WPA: Failed to set WPA " "key management and encryption suites (no " "scan results)"); + wpas_connect_work_done(wpa_s); return; } #ifdef CONFIG_WPS @@ -1994,8 +1997,10 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) "Assoc conflicting freq found (%d != %d)", freq, params.freq.freq); if (wpas_p2p_handle_frequency_conflicts( - wpa_s, params.freq.freq, ssid) < 0) + wpa_s, params.freq.freq, ssid) < 0) { + wpas_connect_work_done(wpa_s); return; + } } } #endif /* CONFIG_P2P */ -- 2.1.4