am 709a302e
: wifi: pass interface to wpa_supplicant
Merge commit '709a302e77c44a3e3ee8359be3f2c9361f05d02c' into gingerbread-plus-aosp * commit '709a302e77c44a3e3ee8359be3f2c9361f05d02c': wifi: pass interface to wpa_supplicant
This commit is contained in:
commit
c875bb384f
1 changed files with 4 additions and 3 deletions
|
@ -271,6 +271,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
|
||||
|
@ -306,7 +307,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) {
|
||||
|
@ -370,8 +373,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 {
|
||||
|
|
Loading…
Reference in a new issue