#define DHD_SCAN_PASSIVE_TIME 130 /* ms: Embedded default Passive setting from DHD */
#ifndef POWERUP_MAX_RETRY
-#define POWERUP_MAX_RETRY 3 /* how many times we retry to power up the chip */
+#define POWERUP_MAX_RETRY 1 /* how many times we retry to power up the chip */
#endif
#ifndef POWERUP_WAIT_MS
#define POWERUP_WAIT_MS 2000 /* ms: time out in waiting wifi to come up */
printf("%s: Exit\n", __FUNCTION__);
}
-static void __exit
+static void
dhd_module_exit(void)
{
dhd_buzzz_detach();
unregister_reboot_notifier(&dhd_reboot_notifier);
}
-static int __init
+static int
dhd_module_init(void)
{
int err;
- int retry = POWERUP_MAX_RETRY;
+ int retry = 0;
printf("%s: in\n", __FUNCTION__);
return NOTIFY_DONE;
}
+static int wifi_init_thread(void *data)
+{
+ dhd_module_init();
+
+ return 0;
+}
+
+int __init rockchip_wifi_init_module_rkwifi(void)
+{
+ struct task_struct *kthread = NULL;
+
+ kthread = kthread_run(wifi_init_thread, NULL, "wifi_init_thread");
+ if (IS_ERR(kthread))
+ pr_err("create wifi_init_thread failed.\n");
+
+ return 0;
+}
+
+void __exit rockchip_wifi_exit_module_rkwifi(void)
+{
+ dhd_module_exit();
+}
+
+late_initcall(rockchip_wifi_init_module_rkwifi);
+module_exit(rockchip_wifi_exit_module_rkwifi);
+#if 0
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
#if defined(CONFIG_DEFERRED_INITCALLS)
#if defined(CONFIG_MACH_UNIVERSAL7420) || defined(CONFIG_SOC_EXYNOS8890) || \
module_exit(dhd_module_exit);
+#endif
/*
* OS specific functions required to implement DHD driver in OS independent way
*/