Commit 7b436991 authored by Dmitry Shmidt's avatar Dmitry Shmidt
Browse files

Fix possible race condition in wlan driver loading

Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
parent b862e1c7
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment