From 5a4c8fddba53cb36c4d2d4004ecb849f0cfebfa7 Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Fri, 17 Nov 2017 17:29:05 +0530 Subject: Revert "qcacld-3.0: Add wait during module_init for static driver" This reverts Change I90c8ec8a95e9f98ff420eb0fcf76a631da3ba0ba.Issue with this change was, init.rc where the boot_wlan is triggered would never return until driver probe is called. For the driver probe to happen, cnss-daemon needs to be started (to download BDF etc), but cnss-daemon cannot start as init.rc is stuck at boot_wlan at CLD. Change-Id: I0797377b6a5595ad754eb2980a309c2f49373614 CRs-Fixed: 2151399 --- core/hdd/src/wlan_hdd_main.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index f946090f7cbd..da67fda44a74 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -11585,28 +11585,6 @@ static void wlan_hdd_state_ctrl_param_destroy(void) pr_info("Device node unregistered"); } -#ifndef MODULE -static int hdd_wait_for_probe_complete(void) -{ - unsigned long rc; - - rc = wait_for_completion_timeout(&wlan_start_comp, - msecs_to_jiffies(HDD_WLAN_START_WAIT_TIME)); - - if (!rc) { - hdd_alert("Timed-out waiting for Probe to complete"); - return -ETIMEDOUT; - } - - return 0; -} -#else -static int hdd_wait_for_probe_complete(void) -{ - return 0; -} -#endif - /** * __hdd_module_init - Module init helper * @@ -11648,12 +11626,6 @@ static int __hdd_module_init(void) goto out; } - if (hdd_wait_for_probe_complete()) { - pr_err("%s: probe of the driver failed!", __func__); - wlan_hdd_unregister_driver(); - goto out; - } - pr_info("%s: driver loaded\n", WLAN_MODULE_NAME); return 0; @@ -11713,7 +11685,6 @@ static ssize_t wlan_boot_cb(struct kobject *kobj, return -EALREADY; } - init_completion(&wlan_start_comp); if (__hdd_module_init()) { pr_err("%s: wlan driver initialization failed\n", __func__); return -EIO; @@ -11815,6 +11786,7 @@ static int wlan_deinit_sysfs(void) hdd_sysfs_cleanup(); return 0; } + #endif /* MODULE */ #ifdef MODULE -- cgit v1.2.3