summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorChih-Wei Huang <cwhuang@linux.org.tw>2010-09-02 16:11:14 +0800
committerChih-Wei Huang <cwhuang@linux.org.tw>2010-09-03 11:28:57 +0800
commit709a302e77c44a3e3ee8359be3f2c9361f05d02c (patch)
tree9b7ef6dc361f8dbcb6b075a65d80ff5cb50c584c /wifi
parentedfaa7eca961176bee1ff46b50a4fc1330199278 (diff)
downloadhardware_libhardware_legacy-709a302e77c44a3e3ee8359be3f2c9361f05d02c.zip
hardware_libhardware_legacy-709a302e77c44a3e3ee8359be3f2c9361f05d02c.tar.gz
hardware_libhardware_legacy-709a302e77c44a3e3ee8359be3f2c9361f05d02c.tar.bz2
wifi: pass interface to wpa_supplicant
Change-Id: I577d0e7a0c6cbf7c1ddb025c01519a30bb7997b3
Diffstat (limited to 'wifi')
-rw-r--r--wifi/wifi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c
index 5fdf99b..b9365a4 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -244,6 +244,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
@@ -279,7 +280,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) {
@@ -343,8 +346,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 {