summaryrefslogtreecommitdiffstats
path: root/libwifi_system
diff options
context:
space:
mode:
authorChristopher Wiley <wiley@google.com>2016-08-10 09:33:20 -0700
committerChristopher Wiley <wiley@google.com>2016-08-12 15:00:09 -0700
commit8249dec7f00e21218bcff6e16cf584ef37d87686 (patch)
tree65d026ad2ac97e48bdd0753ec35cbfec5c2f4399 /libwifi_system
parent8812ab2ce5def57a6abe55719ee69892d27c70d7 (diff)
downloadandroid_frameworks_opt_net_wifi-8249dec7f00e21218bcff6e16cf584ef37d87686.tar.gz
android_frameworks_opt_net_wifi-8249dec7f00e21218bcff6e16cf584ef37d87686.tar.bz2
android_frameworks_opt_net_wifi-8249dec7f00e21218bcff6e16cf584ef37d87686.zip
Rely on wificond to start/stop supplicant
Bug: 30666540 Test: Still able to connect via WiFi Change-Id: Ia8a706db70be18b2d4b4687400d9a06d0819690e
Diffstat (limited to 'libwifi_system')
-rw-r--r--libwifi_system/wifi.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libwifi_system/wifi.cpp b/libwifi_system/wifi.cpp
index 4406affc0..da00ba5b1 100644
--- a/libwifi_system/wifi.cpp
+++ b/libwifi_system/wifi.cpp
@@ -214,9 +214,6 @@ int wifi_start_supplicant() {
/* Clear out any stale socket files that might be left over. */
wpa_ctrl_cleanup();
- /* Reset sockets used for exiting from hung state */
- exit_sockets[0] = exit_sockets[1] = -1;
-
/*
* Get a reference to the status property, so we can distinguish
* the case where it goes stopped => running => stopped (i.e.,
@@ -228,7 +225,6 @@ int wifi_start_supplicant() {
if (pi != NULL) {
serial = __system_property_serial(pi);
}
- property_get("wifi.interface", primary_iface, WIFI_TEST_INTERFACE);
property_set("ctl.start", SUPPLICANT_SERVICE_NAME);
sched_yield();
@@ -466,6 +462,8 @@ int wifi_wait_on_socket(char* buf, size_t buflen) {
int wifi_connect_to_supplicant() {
static char path[PATH_MAX];
+ property_get("wifi.interface", primary_iface, WIFI_TEST_INTERFACE);
+
if (access(IFACE_DIR, F_OK) == 0) {
snprintf(path, sizeof(path), "%s/%s", IFACE_DIR, primary_iface);
} else {