diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-08-23 15:44:23 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2011-08-23 15:44:23 -0700 |
commit | 953c1140659ae935e4718d4fd48662db178814f6 (patch) | |
tree | 982d0eec830751f7b04194fb416a2804d8d4ae34 | |
parent | 5a8a2d2b130644f0f4abad8586f0a245e4c15be8 (diff) | |
download | hardware_libhardware_legacy-953c1140659ae935e4718d4fd48662db178814f6.zip hardware_libhardware_legacy-953c1140659ae935e4718d4fd48662db178814f6.tar.gz hardware_libhardware_legacy-953c1140659ae935e4718d4fd48662db178814f6.tar.bz2 |
wifi: Increase wait for card removal
Change-Id: Ia9f5bf2a905c89126535a6c01c3af67189df6c32
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r-- | wifi/wifi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c index d455a0b..5afefdc 100644 --- a/wifi/wifi.c +++ b/wifi/wifi.c @@ -232,17 +232,16 @@ int wifi_load_driver() int wifi_unload_driver() { -#ifdef WIFI_DRIVER_MODULE_PATH - int count = 20; /* wait at most 10 seconds for completion */ - usleep(200000); /* allow to finish interface down */ +#ifdef WIFI_DRIVER_MODULE_PATH if (rmmod(DRIVER_MODULE_NAME) == 0) { + int count = 20; /* wait at most 10 seconds for completion */ while (count-- > 0) { if (!is_wifi_driver_loaded()) break; usleep(500000); } - usleep(300000); /* allow card removal */ + usleep(500000); /* allow card removal */ if (count) { return 0; } |