summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-03-17 15:56:17 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-17 15:56:17 +0000
commitd6a4fa9c08d3994d3efa3d0a8ff3040e65e20b35 (patch)
tree583c5fc6428a6b7038117ef4a57117fad1fbb313 /wifi
parent9df8ecc68bdaa90aaac86b9218d728f84586660e (diff)
parentbfad19d2a12d0cc25ad74a58fe6838b0afe45776 (diff)
downloadhardware_libhardware_legacy-d6a4fa9c08d3994d3efa3d0a8ff3040e65e20b35.zip
hardware_libhardware_legacy-d6a4fa9c08d3994d3efa3d0a8ff3040e65e20b35.tar.gz
hardware_libhardware_legacy-d6a4fa9c08d3994d3efa3d0a8ff3040e65e20b35.tar.bz2
am bfad19d2: am eaf44380: Merge "Wi-Fi HAL: fix supplicant start failed issue"
* commit 'bfad19d2a12d0cc25ad74a58fe6838b0afe45776': 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 8783df2..3bcc8be 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -471,12 +471,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