summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-11-17 20:26:57 -0800
committerSteve Kondik <shade@chemlab.org>2013-11-17 20:26:57 -0800
commite3167c611b0fd79de1b17a7c5010cbe1cdad43fb (patch)
treea61592365752b0a9181dfe5e4668cdc60d643c17
parent531060a5cf67e1fb85461bed2dc3bdac1ac75efa (diff)
downloadandroid_hardware_libhardware_legacy-stable/cm-10.2.tar.gz
android_hardware_libhardware_legacy-stable/cm-10.2.tar.bz2
android_hardware_libhardware_legacy-stable/cm-10.2.zip
libhardware_legacy: Add support for oneshot WiFi setupcm-10.2.1cm-10.2.0stable/cm-10.2cm-10.2
* For a certain device, we need to wait for the RIL to dump out the NV items which contain the WiFi MAC address. This is done by starting a service and waiting for it to set a property indicating completion. The existing module loader already works like this, so we can just use that. * Reorder the ifdefs so this works when the driver is not built as a module. Change-Id: Ic69dd5c1087122b3b7d939a8647785bf97b95a0c
-rw-r--r--wifi/wifi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/wifi/wifi.c b/wifi/wifi.c
index c05a16c..dacef5e 100644
--- a/wifi/wifi.c
+++ b/wifi/wifi.c
@@ -290,9 +290,10 @@ int is_wifi_driver_loaded() {
int wifi_load_driver()
{
-#ifdef WIFI_DRIVER_MODULE_PATH
- char driver_status[PROPERTY_VALUE_MAX];
int count = 100; /* wait at most 20 seconds for completion */
+ char driver_status[PROPERTY_VALUE_MAX];
+
+#ifdef WIFI_DRIVER_MODULE_PATH
char module_arg2[256];
#ifdef SAMSUNG_WIFI
char* type = get_samsung_wifi_type();
@@ -323,6 +324,9 @@ int wifi_load_driver()
return -1;
}
+#endif
+
+#if defined(WIFI_FIRMWARE_LOADER) || defined(WIFI_DRIVER_MODULE_PATH)
if (strcmp(FIRMWARE_LOADER,"") == 0) {
#ifdef WIFI_DRIVER_LOADER_DELAY
usleep(WIFI_DRIVER_LOADER_DELAY);