summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRongjun Chen <rongjun.chen@amlogic.com>2018-12-20 16:21:30 +0800
committerRongjun Chen <rongjun.chen@amlogic.com>2018-12-21 13:12:57 +0800
commitce3b8cf9f02c0b37f6acd7d8b8422c096c2dd3a9 (patch)
tree89cd3afac8b2db5d1d6b914ab1172b01b486a2ad
parent8accf4e6193840c2b9f0dd524f5c88c2e08b52c7 (diff)
downloaddhd-driver-ce3b8cf9f02c0b37f6acd7d8b8422c096c2dd3a9.tar.gz
wifi: change usb wifi fw load [1/1]
PD#SWPL-3082 Problem: dumpsys usb fail with ap62x8 Solution: change the usb fw load Verify: verify by r311 Change-Id: I36785ea060ec0e4abcc9e19fc58796188760b906 Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
-rw-r--r--bcmdhd.1.579.77.41.1.cn/Makefile2
-rw-r--r--bcmdhd.1.579.77.41.1.cn/dbus.c6
-rw-r--r--bcmdhd.1.579.77.41.1.cn/dhd_gpio.c15
-rw-r--r--bcmdhd.100.10.315.x/Makefile2
-rw-r--r--bcmdhd.100.10.315.x/dbus.c4
-rw-r--r--bcmdhd.100.10.315.x/dhd_gpio.c17
6 files changed, 38 insertions, 8 deletions
diff --git a/bcmdhd.1.579.77.41.1.cn/Makefile b/bcmdhd.1.579.77.41.1.cn/Makefile
index 5669d5c..352b9ad 100644
--- a/bcmdhd.1.579.77.41.1.cn/Makefile
+++ b/bcmdhd.1.579.77.41.1.cn/Makefile
@@ -77,7 +77,7 @@ ifneq ($(CONFIG_BCMDHD_USB),)
DHDCFLAGS += -DUSBOS_TX_THREAD -DBCMDBUS -DBCMTRXV2 -DDBUS_USB_LOOPBACK \
-DBDC
DHDCFLAGS += -DBCM_REQUEST_FW -DEXTERNAL_FW_PATH
-#DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
+DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
ifneq ($(CONFIG_BCMDHD_CUSB),)
DHDCFLAGS += -DBCMUSBDEV_COMPOSITE
DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
diff --git a/bcmdhd.1.579.77.41.1.cn/dbus.c b/bcmdhd.1.579.77.41.1.cn/dbus.c
index 7c77bbe..beeecd7 100644
--- a/bcmdhd.1.579.77.41.1.cn/dbus.c
+++ b/bcmdhd.1.579.77.41.1.cn/dbus.c
@@ -644,10 +644,10 @@ dbus_get_fw_nvram(dhd_bus_t *dhd_bus, char *pfw_path, char *pnv_path)
bcmerror = DBUS_ERR_NVRAM;
goto err;
}
- if (nv_image)
+ if (nv_image) {
dhd_os_close_image(nv_image);
-
- nv_image = NULL;
+ nv_image = NULL;
+ }
/* For Get first block of fw to calculate total_len */
file_exists = ((pfw_path != NULL) && (pfw_path[0] != '\0'));
diff --git a/bcmdhd.1.579.77.41.1.cn/dhd_gpio.c b/bcmdhd.1.579.77.41.1.cn/dhd_gpio.c
index d2b53b1..a120bd3 100644
--- a/bcmdhd.1.579.77.41.1.cn/dhd_gpio.c
+++ b/bcmdhd.1.579.77.41.1.cn/dhd_gpio.c
@@ -30,6 +30,7 @@ static int gpio_wl_host_wake = -1; // WL_HOST_WAKE is output pin of WLAN module
extern int wifi_irq_trigger_level(void);
extern u8 *wifi_get_mac(void);
#endif
+extern void set_usb_bt_power(int is_power);
extern void sdio_reinit(void);
extern void extern_wifi_set_enable(int is_on);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
@@ -56,12 +57,20 @@ dhd_wlan_set_power(int on
}
}
#ifdef CUSTOMER_HW_AMLOGIC
+#ifdef BCMSDIO
extern_wifi_set_enable(0);
mdelay(200);
extern_wifi_set_enable(1);
mdelay(200);
// sdio_reinit();
#endif
+#ifdef BCMDBUS
+ set_usb_bt_power(0);
+ mdelay(200);
+ set_usb_bt_power(1);
+ mdelay(200);
+#endif
+#endif
#if defined(BUS_POWER_RESTORE)
#if defined(BCMSDIO)
if (adapter->sdio_func && adapter->sdio_func->card && adapter->sdio_func->card->host) {
@@ -112,9 +121,15 @@ dhd_wlan_set_power(int on
}
}
#ifdef CUSTOMER_HW_AMLOGIC
+#ifdef BCMSDIO
extern_wifi_set_enable(0);
mdelay(200);
#endif
+#ifdef BCMDBUS
+ set_usb_bt_power(0);
+ mdelay(200);
+#endif
+#endif
}
return err;
diff --git a/bcmdhd.100.10.315.x/Makefile b/bcmdhd.100.10.315.x/Makefile
index f0839b0..3c964b1 100644
--- a/bcmdhd.100.10.315.x/Makefile
+++ b/bcmdhd.100.10.315.x/Makefile
@@ -74,7 +74,7 @@ ifneq ($(CONFIG_BCMDHD_USB),)
DHDCFLAGS += -DUSBOS_TX_THREAD -DBCMDBUS -DBCMTRXV2 -DDBUS_USB_LOOPBACK \
-DBDC
DHDCFLAGS += -DBCM_REQUEST_FW -DEXTERNAL_FW_PATH
-#DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
+DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
ifneq ($(CONFIG_BCMDHD_CUSB),)
DHDCFLAGS += -DBCMUSBDEV_COMPOSITE
DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
diff --git a/bcmdhd.100.10.315.x/dbus.c b/bcmdhd.100.10.315.x/dbus.c
index 39feab3..4777a5b 100644
--- a/bcmdhd.100.10.315.x/dbus.c
+++ b/bcmdhd.100.10.315.x/dbus.c
@@ -644,8 +644,10 @@ dbus_get_fw_nvram(dhd_bus_t *dhd_bus, char *pfw_path, char *pnv_path)
bcmerror = DBUS_ERR_NVRAM;
goto err;
}
- if (nv_image)
+ if (nv_image) {
dhd_os_close_image1(dhd_bus->dhd, nv_image);
+ nv_image = NULL;
+ }
/* For Get first block of fw to calculate total_len */
file_exists = ((pfw_path != NULL) && (pfw_path[0] != '\0'));
diff --git a/bcmdhd.100.10.315.x/dhd_gpio.c b/bcmdhd.100.10.315.x/dhd_gpio.c
index 54d02d4..3bd8c59 100644
--- a/bcmdhd.100.10.315.x/dhd_gpio.c
+++ b/bcmdhd.100.10.315.x/dhd_gpio.c
@@ -31,6 +31,7 @@ extern int wifi_irq_trigger_level(void);
extern u8 *wifi_get_mac(void);
#endif
extern void sdio_reinit(void);
+extern void set_usb_bt_power(int is_power);
extern void extern_wifi_set_enable(int is_on);
extern void pci_remove_reinit(unsigned int vid, unsigned int pid, int delBus);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
@@ -64,6 +65,12 @@ dhd_wlan_set_power(int on
mdelay(200);
// sdio_reinit();
#endif
+#ifdef BCMDBUS
+ set_usb_bt_power(0);
+ mdelay(200);
+ set_usb_bt_power(1);
+ mdelay(200);
+#endif
#endif
#if defined(BUS_POWER_RESTORE)
#if defined(BCMSDIO)
@@ -115,8 +122,14 @@ dhd_wlan_set_power(int on
}
}
#ifdef CUSTOMER_HW_AMLOGIC
-// extern_wifi_set_enable(0);
-// mdelay(200);
+#ifdef BCMSIDO
+ extern_wifi_set_enable(0);
+ mdelay(200);
+#endif
+#ifdef BCMDBUS
+ set_usb_bt_power(0);
+ mdelay(200);
+#endif
#endif
}