summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-03-17 15:50:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-17 15:50:22 +0000
commitbfad19d2a12d0cc25ad74a58fe6838b0afe45776 (patch)
treed9698b8e14910cc14555b682e9410327050bd33e /wifi
parente5a16307ab7fdee029ea1fe0bfacd856f948b112 (diff)
parenteaf44380422a9d78b0a56a05ab3742dbeee79dd5 (diff)
downloadhardware_libhardware_legacy-bfad19d2a12d0cc25ad74a58fe6838b0afe45776.zip
hardware_libhardware_legacy-bfad19d2a12d0cc25ad74a58fe6838b0afe45776.tar.gz
hardware_libhardware_legacy-bfad19d2a12d0cc25ad74a58fe6838b0afe45776.tar.bz2
am eaf44380: Merge "Wi-Fi HAL: fix supplicant start failed issue"
* commit 'eaf44380422a9d78b0a56a05ab3742dbeee79dd5': Wi-Fi HAL: fix supplicant start failed issue
Diffstat (limited to 'wifi')
-rw-r--r--wifi/wifi.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c
index f11c1ab..25a6fb7 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -556,12 +556,16 @@ int wifi_start_supplicant(int p2p_supported)
pi = __system_property_find(supplicant_prop_name);
}
if (pi != NULL) {
- __system_property_read(pi, NULL, supp_status);
- if (strcmp(supp_status, "running") == 0) {
- return 0;
- } else if (__system_property_serial(pi) != serial &&
- strcmp(supp_status, "stopped") == 0) {
- return -1;
+ /*
+ * property serial updated means that init process is scheduled
+ * after we sched_yield, further property status checking is based on this */
+ if (__system_property_serial(pi) != serial) {
+ __system_property_read(pi, NULL, supp_status);
+ if (strcmp(supp_status, "running") == 0) {
+ return 0;
+ } else if (strcmp(supp_status, "stopped") == 0) {
+ return -1;
+ }
}
}
#else