summaryrefslogtreecommitdiffstats
path: root/libwifi_hal
diff options
context:
space:
mode:
authorKumar Anand <kumaranand@google.com>2017-02-27 13:24:13 -0800
committerKumar Anand <kumaranand@google.com>2017-02-27 13:42:12 -0800
commit278ed48124665c6285f9fae66649bfc3cc0a21c1 (patch)
tree75934dc38324d06242ae41ba40a3cd3796aa71fd /libwifi_hal
parentb3c9eaca7b767aa9d5e9c550087436db4b2fa610 (diff)
downloadandroid_frameworks_opt_net_wifi-278ed48124665c6285f9fae66649bfc3cc0a21c1.tar.gz
android_frameworks_opt_net_wifi-278ed48124665c6285f9fae66649bfc3cc0a21c1.tar.bz2
android_frameworks_opt_net_wifi-278ed48124665c6285f9fae66649bfc3cc0a21c1.zip
wifi: WIFI_DRIVER_STATE_CTRL_PARAM
Allow WIFI_DRIVER_STATE_CTRL_PARAM to be defined even for DLKM cases. A return from insmod (during case of DLKM) does not imply always that driver initialization is complete. During insmod, a driver could merely register the device probe functions and driver operations and return immediately. The real driver initialization can follow later when the device is probed back and firmware is ready. This change allows WIFI_DRIVER_STATE_CTRL_PARAM to be defined even for DLKM case and allows it to block until device is ready for wifi operations. Bug: 35692204 Test: Build success Change-Id: I9b39594178574a76782704aa154bf9df75146949
Diffstat (limited to 'libwifi_hal')
-rw-r--r--libwifi_hal/wifi_hal_common.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libwifi_hal/wifi_hal_common.cpp b/libwifi_hal/wifi_hal_common.cpp
index e06703315..04e592595 100644
--- a/libwifi_hal/wifi_hal_common.cpp
+++ b/libwifi_hal/wifi_hal_common.cpp
@@ -148,8 +148,9 @@ int wifi_load_driver() {
}
if (insmod(DRIVER_MODULE_PATH, DRIVER_MODULE_ARG) < 0) return -1;
+#endif
-#elif defined WIFI_DRIVER_STATE_CTRL_PARAM
+#ifdef WIFI_DRIVER_STATE_CTRL_PARAM
if (is_wifi_driver_loaded()) {
return 0;
}