Invoke connect work done for all the connection failure cases
authorSunil Dutt <usdutt@qti.qualcomm.com>
Mon, 20 Oct 2014 04:48:47 +0000 (10:18 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 27 Oct 2014 18:19:35 +0000 (20:19 +0200)
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 <jouni@qca.qualcomm.com>
wpa_supplicant/wpa_supplicant.c

index 517917f..6e08256 100644 (file)
@@ -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 */