summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRongjun Chen <rongjun.chen@amlogic.com>2018-08-23 17:24:31 +0800
committerRongjun Chen <rongjun.chen@amlogic.com>2018-08-23 18:55:44 +0800
commit565fad4ddba722a2b99c208c0c7ee2c15a530011 (patch)
tree97e9355b713c952c547cb597e578a260e9ac113c
parent45f8cd0afa1d35303926ad5a15e1bfcef4ba7bb9 (diff)
downloaddhd-driver-565fad4ddba722a2b99c208c0c7ee2c15a530011.tar.gz
wifi: fix vmap let wifi open fail issue
PD# 172294 fix vmap let wifi open fail issue Change-Id: I08642cabeca6a890f013c25e45e7c930dac9521d Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
-rw-r--r--bcmdhd.1.579.77.41.1.cn/dhd_sdio.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/bcmdhd.1.579.77.41.1.cn/dhd_sdio.c b/bcmdhd.1.579.77.41.1.cn/dhd_sdio.c
index 5078ffb..e091724 100644
--- a/bcmdhd.1.579.77.41.1.cn/dhd_sdio.c
+++ b/bcmdhd.1.579.77.41.1.cn/dhd_sdio.c
@@ -4703,20 +4703,46 @@ dhdsdio_download_state(dhd_bus_t *bus, bool enter)
(uint8 *)&bus->resetinstr, sizeof(bus->resetinstr));
if (bcmerror == BCME_OK) {
+#ifdef CONFIG_VMAP_STACK
+ char *tmp;
+ tmp = kmalloc(4, GFP_KERNEL);
+ if (!tmp)
+ goto fail;
+#else
uint32 tmp;
-
+#endif
/* verify write */
+#ifdef CONFIG_VMAP_STACK
bcmerror = dhdsdio_membytes(bus, FALSE, 0,
- (uint8 *)&tmp, sizeof(tmp));
-
- if (bcmerror == BCME_OK && tmp != bus->resetinstr) {
- DHD_ERROR(("%s: Failed to write 0x%08x to addr 0\n",
+ (uint8 *)tmp, 4);
+#else
+ bcmerror = dhdsdio_membytes(bus, FALSE, 0,
+ (uint8 *)&tmp, sizeof(tmp));
+#endif
+#ifdef CONFIG_VMAP_STACK
+ if (bcmerror == BCME_OK && *(uint32*)tmp != bus->resetinstr)
+#else
+ if (bcmerror == BCME_OK && tmp != bus->resetinstr)
+#endif
+ {
+ DHD_ERROR(("%s: Filed to write 0x%08x to addr 0\n",
__FUNCTION__, bus->resetinstr));
+#ifdef CONFIG_VMAP_STACK
+ DHD_ERROR(("%s: contents of addr 0 is 0x%08x\n",
+ __FUNCTION__, *(uint32*)tmp));
+#else
DHD_ERROR(("%s: contents of addr 0 is 0x%08x\n",
- __FUNCTION__, tmp));
+ __FUNCTION__, tmp));
+#endif
bcmerror = BCME_SDIO_ERROR;
+#ifdef CONFIG_VMAP_STACK
+ kfree(tmp);
+#endif
goto fail;
}
+#ifdef CONFIG_VMAP_STACK
+ kfree(tmp);
+#endif
}
/* now remove reset and halt and continue to run CR4 */