diff options
author | Chih-Wei Huang <cwhuang@linux.org.tw> | 2010-09-09 15:53:02 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-09 15:53:02 -0700 |
commit | a738e38d44cf143a80ae6a15f118fb3f8e432532 (patch) | |
tree | d9b5588726afbb3bd5982788c1c703e9508eacc7 /wifi | |
parent | 7a25fd7138dd87e1d697e12ea9a69aee7c3ae814 (diff) | |
parent | c875bb384f1c17aa198262acd72b18825f7d8152 (diff) | |
download | hardware_libhardware_legacy-a738e38d44cf143a80ae6a15f118fb3f8e432532.zip hardware_libhardware_legacy-a738e38d44cf143a80ae6a15f118fb3f8e432532.tar.gz hardware_libhardware_legacy-a738e38d44cf143a80ae6a15f118fb3f8e432532.tar.bz2 |
am c875bb38: am 709a302e: wifi: pass interface to wpa_supplicant
Merge commit 'c875bb384f1c17aa198262acd72b18825f7d8152'
* commit 'c875bb384f1c17aa198262acd72b18825f7d8152':
wifi: pass interface to wpa_supplicant
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/wifi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c index 4ff9350..885f3ec 100644 --- a/wifi/wifi.c +++ b/wifi/wifi.c @@ -279,6 +279,7 @@ int ensure_config_file_exists() int wifi_start_supplicant() { + char daemon_cmd[PROPERTY_VALUE_MAX]; char supp_status[PROPERTY_VALUE_MAX] = {'\0'}; int count = 200; /* wait at most 20 seconds for completion */ #ifdef HAVE_LIBC_SYSTEM_PROPERTIES @@ -314,7 +315,9 @@ int wifi_start_supplicant() serial = pi->serial; } #endif - property_set("ctl.start", SUPPLICANT_NAME); + property_get("wifi.interface", iface, WIFI_TEST_INTERFACE); + snprintf(daemon_cmd, PROPERTY_VALUE_MAX, "%s:-i%s", SUPPLICANT_NAME, iface); + property_set("ctl.start", daemon_cmd); sched_yield(); while (count-- > 0) { @@ -378,8 +381,6 @@ int wifi_connect_to_supplicant() return -1; } - property_get("wifi.interface", iface, WIFI_TEST_INTERFACE); - if (access(IFACE_DIR, F_OK) == 0) { snprintf(ifname, sizeof(ifname), "%s/%s", IFACE_DIR, iface); } else { |