summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wifi/Android.mk3
-rw-r--r--wifi/wifi.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/wifi/Android.mk b/wifi/Android.mk
index d9225bd..387f9ce 100644
--- a/wifi/Android.mk
+++ b/wifi/Android.mk
@@ -15,6 +15,9 @@ endif
ifdef WIFI_FIRMWARE_LOADER
LOCAL_CFLAGS += -DWIFI_FIRMWARE_LOADER=\"$(WIFI_FIRMWARE_LOADER)\"
endif
+ifdef WIFI_DRIVER_LOADER_DELAY
+LOCAL_CFLAGS += -DWIFI_DRIVER_LOADER_DELAY=$(WIFI_DRIVER_LOADER_DELAY)
+endif
ifdef WIFI_DRIVER_FW_PATH_STA
LOCAL_CFLAGS += -DWIFI_DRIVER_FW_PATH_STA=\"$(WIFI_DRIVER_FW_PATH_STA)\"
endif
diff --git a/wifi/wifi.c b/wifi/wifi.c
index 68e51ca..1231a99 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -105,8 +105,6 @@ struct genl_family *nl80211;
#define WIFI_DRIVER_FW_PATH_PARAM "/sys/module/wlan/parameters/fwpath"
#endif
-#define WIFI_DRIVER_LOADER_DELAY 1000000
-
static const char IFACE_DIR[] = "/data/system/wpa_supplicant";
#ifdef WIFI_DRIVER_MODULE_PATH
static const char DRIVER_MODULE_NAME[] = WIFI_DRIVER_MODULE_NAME;
@@ -290,7 +288,9 @@ int wifi_load_driver()
}
if (strcmp(FIRMWARE_LOADER,"") == 0) {
- /* usleep(WIFI_DRIVER_LOADER_DELAY); */
+#ifdef WIFI_DRIVER_LOADER_DELAY
+ usleep(WIFI_DRIVER_LOADER_DELAY);
+#endif
property_set(DRIVER_PROP_NAME, "ok");
}
else {