wifi: add wifi power to bcmdhd-usb.1.363.110.17.x
authorRongjun Chen <rongjun.chen@amlogic.com>
Tue, 23 Jan 2018 02:14:30 +0000 (10:14 +0800)
committerRongjun Chen <rongjun.chen@amlogic.com>
Tue, 23 Jan 2018 02:14:30 +0000 (10:14 +0800)
Change-Id: I0f2888d7ec8e7a20f5b688b96e358ce27b8f2099

bcmdhd-usb.1.363.110.17.x/dhd_linux.c

index 0b734f5200edddc40588fa6baa1322c6d5ad6562..744e18b2df923771425914f467dcd725664fd3a3 100644 (file)
@@ -174,6 +174,8 @@ typedef struct histo_ {
 static histo_t vi_d1, vi_d2, vi_d3, vi_d4;
 #endif /* WLMEDIA_HTSF */
 
+extern void extern_wifi_set_enable(int is_on);
+
 #ifdef STBLINUX
 #ifdef quote_str
 #undef quote_str
@@ -9026,6 +9028,7 @@ dhd_module_exit(void)
 {
        dhd_module_cleanup();
        unregister_reboot_notifier(&dhd_reboot_notifier);
+       extern_wifi_set_enable(0);
 }
 
 static int __init
@@ -9036,7 +9039,9 @@ dhd_module_init(void)
 
        printf("%s: in\n", __FUNCTION__);
        DHD_PERIM_RADIO_INIT();
-
+       extern_wifi_set_enable(0);
+       mdelay(200);
+       extern_wifi_set_enable(1);
 
        if (firmware_path[0] != '\0') {
                strncpy(fw_bak_path, firmware_path, MOD_PARAM_PATHLEN);