summaryrefslogtreecommitdiff
path: root/plugins/wifi.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2011-12-02 13:55:36 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-12-12 10:44:39 +0100
commitb0cb897fe9fc4d29b07eb1356d61f641cbe594a1 (patch)
tree2859929e9a1bbd529ffac7f6be8c4e5cc3e01c3c /plugins/wifi.c
parentd8ef78d83a0dbce1427638054d14c66dc3747343 (diff)
downloadconnman-b0cb897fe9fc4d29b07eb1356d61f641cbe594a1.tar.gz
connman-b0cb897fe9fc4d29b07eb1356d61f641cbe594a1.tar.bz2
connman-b0cb897fe9fc4d29b07eb1356d61f641cbe594a1.zip
wifi: Disable network in disconnected state
Disable WiFi network when it ends up in disconnected state in order to prevent wpa_supplicant looping forever retrying. Fixes BMC#23973
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r--plugins/wifi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 745c2cbc..538230a0 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -912,12 +912,6 @@ static connman_bool_t handle_4way_handshake_failure(GSupplicantInterface *interf
if (wifi->retries < MAXIMUM_RETRIES)
return TRUE;
- /* We disable the selected network, if not then
- * wpa_supplicant will loop retrying */
- if (g_supplicant_interface_enable_selected_network(interface,
- FALSE) != 0)
- DBG("Could not disables selected network");
-
connman_network_set_error(network, CONNMAN_NETWORK_ERROR_INVALID_KEY);
return FALSE;
@@ -987,6 +981,12 @@ static void interface_state(GSupplicantInterface *interface)
network, wifi) == TRUE)
break;
+ /* We disable the selected network, if not then
+ * wpa_supplicant will loop retrying */
+ if (g_supplicant_interface_enable_selected_network(interface,
+ FALSE) != 0)
+ DBG("Could not disables selected network");
+
connman_network_set_associating(network, FALSE);
connman_network_set_connected(network, FALSE);
break;