[PATCH 2/3] wpa_supplicant: add function that enables one network
david.spinadel at intel.com
david.spinadel
Mon Oct 29 02:13:40 PDT 2012
From: David Spinadel <david.spinadel at intel.com>
This function enables one network, clears temp_disabled, notifies
About changing status and toggles reassociate if we are disconnected.
Change-Id: I4de07241b982cb64cc17424d8ee504f4edcd5dad
Signed-off-by: David Spinadel <david.spinadel at intel.com>
---
wpa_supplicant/wpa_supplicant.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 1e6a93f..358917f 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1791,6 +1791,23 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
wpa_supplicant_clear_connection(wpa_s, addr);
}
+static void wpa_supplicant_enable_one_network(struct wpa_supplicant *wpa_s,
+ struct wpa_ssid *ssid)
+{
+ if (!ssid || !ssid->disabled || ssid->disabled == 2)
+ return;
+
+ ssid->disabled = 0;
+ wpas_clear_temp_disabled(wpa_s, ssid, 1);
+ wpas_notify_network_enabled_changed(wpa_s, ssid);
+
+ /*
+ *Try to reassociate since there is no current configuration and a new
+ * network was made available.
+ */
+ if (!wpa_s->current_ssid)
+ wpa_s->reassociate = 1;
+}
/**
* wpa_supplicant_enable_network - Mark a configured network as enabled
--
1.7.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Hostap
mailing list