OSDN Git Service
(root)
/
android-x86
/
hardware-libhardware_legacy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b862e1c
)
Fix possible race condition in wlan driver loading
author
Dmitry Shmidt
<dimitrysh@google.com>
Tue, 28 Jul 2009 18:03:31 +0000
(11:03 -0700)
committer
Dmitry Shmidt
<dimitrysh@google.com>
Tue, 28 Jul 2009 18:03:31 +0000
(11:03 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wifi/wifi.c
patch
|
blob
|
history
diff --git
a/wifi/wifi.c
b/wifi/wifi.c
index
ae82efe
..
8719cac
100644
(file)
--- a/
wifi/wifi.c
+++ b/
wifi/wifi.c
@@
-188,12
+188,15
@@
int wifi_load_driver()
if (property_get(DRIVER_PROP_NAME, driver_status, NULL)) {
if (strcmp(driver_status, "ok") == 0)
return 0;
- else if (strcmp(DRIVER_PROP_NAME, "failed") == 0)
+ else if (strcmp(DRIVER_PROP_NAME, "failed") == 0) {
+ wifi_unload_driver();
return -1;
+ }
}
usleep(200000);
}
property_set(DRIVER_PROP_NAME, "timeout");
+ wifi_unload_driver();
return -1;
}