author | Rongjun Chen <rongjun.chen@amlogic.com> | 2017-09-15 11:04:50 (GMT) |
---|---|---|
committer | Rongjun Chen <rongjun.chen@amlogic.com> | 2017-09-21 02:55:50 (GMT) |
commit | 8d40fb598bc9d227c5edcce1df7dc982e9b03e46 (patch) | |
tree | 7eb53b6f0084a4b5a6b614ec8c46b72d24e9c4f9 | |
parent | a506106525e657f5aafd8d45ea88095789ca80ea (diff) | |
download | ap6xxx-8d40fb598bc9d227c5edcce1df7dc982e9b03e46.zip ap6xxx-8d40fb598bc9d227c5edcce1df7dc982e9b03e46.tar.gz ap6xxx-8d40fb598bc9d227c5edcce1df7dc982e9b03e46.tar.bz2 |
wifi: fix vts test panic issue[1/2]
PD# NONE
fix wifi vts test panic issue
Change-Id: I059d168dd0aadfd797ab64c38ee5af5e44baa1b2
Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
-rw-r--r-- | bcmdhd-usb.1.363.110.17.x/Makefile | 1 | ||||
-rw-r--r-- | bcmdhd-usb.1.363.110.17.x/dhd.h | 11 | ||||
-rw-r--r-- | bcmdhd-usb.1.363.110.17.x/dhd_debug.c | 18 | ||||
-rw-r--r-- | bcmdhd-usb.1.363.110.17.x/include/osl.h | 4 | ||||
-rw-r--r-- | bcmdhd-usb.1.363.110.17.x/linux_osl.c | 4 | ||||
-rw-r--r-- | bcmdhd-usb.1.363.110.17.x/wl_escan.c | 8 | ||||
-rw-r--r-- | bcmdhd.1.579.77.41.1.cn/dhd_linux.c | 4 | ||||
-rw-r--r-- | bcmdhd.1.579.77.41.1.cn/wl_cfg80211.c | 15 |
8 files changed, 45 insertions, 20 deletions
diff --git a/bcmdhd-usb.1.363.110.17.x/Makefile b/bcmdhd-usb.1.363.110.17.x/Makefile index 7d93a11..5e5c406 100644 --- a/bcmdhd-usb.1.363.110.17.x/Makefile +++ b/bcmdhd-usb.1.363.110.17.x/Makefile @@ -3,6 +3,7 @@ # otherwise please remove it. CONFIG_BCMDHD := m +CONFIG_DHD_USE_STATIC_BUF := y DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \ -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \ diff --git a/bcmdhd-usb.1.363.110.17.x/dhd.h b/bcmdhd-usb.1.363.110.17.x/dhd.h index 179bed3..6481713 100644 --- a/bcmdhd-usb.1.363.110.17.x/dhd.h +++ b/bcmdhd-usb.1.363.110.17.x/dhd.h @@ -181,7 +181,16 @@ enum dhd_prealloc_index { DHD_PREALLOC_MEMDUMP_RAM = 11, DHD_PREALLOC_DHD_WLFC_HANGER = 12, DHD_PREALLOC_PKTID_MAP = 13, - DHD_PREALLOC_PKTID_MAP_IOCTL = 14 + DHD_PREALLOC_PKTID_MAP_IOCTL = 14, + DHD_PREALLOC_DHD_LOG_DUMP_BUF = 15, + DHD_PREALLOC_DHD_LOG_DUMP_BUF_EX = 16, + DHD_PREALLOC_DHD_PKTLOG_DUMP_BUF = 17, + DHD_PREALLOC_STAT_REPORT_BUF = 18, + DHD_PREALLOC_WL_ESCAN_INFO = 19, + DHD_PREALLOC_FW_VERBOSE_RING = 20, + DHD_PREALLOC_FW_EVENT_RING = 21, + DHD_PREALLOC_DHD_EVENT_RING = 22, + DHD_PREALLOC_NAN_EVENT_RING = 23 }; enum dhd_dongledump_mode { diff --git a/bcmdhd-usb.1.363.110.17.x/dhd_debug.c b/bcmdhd-usb.1.363.110.17.x/dhd_debug.c index e957c87..e707144 100644 --- a/bcmdhd-usb.1.363.110.17.x/dhd_debug.c +++ b/bcmdhd-usb.1.363.110.17.x/dhd_debug.c @@ -433,12 +433,15 @@ dhd_dbg_trace_evnt_handler(dhd_pub_t *dhdp, void *event_data, static int dhd_dbg_ring_init(dhd_pub_t *dhdp, dhd_dbg_ring_t *ring, uint16 id, uint8 *name, - uint32 ring_sz) + uint32 ring_sz, int section) { void *buf; unsigned long flags; - +#ifdef CONFIG_DHD_USE_STATIC_BUF + buf = dhd_wlan_mem_prealloc(section, ring_sz); +#else buf = MALLOCZ(dhdp->osh, ring_sz); +#endif if (!buf) return BCME_NOMEM; @@ -482,8 +485,9 @@ dhd_dbg_ring_deinit(dhd_pub_t *dhdp, dhd_dbg_ring_t *ring) dhd_os_spin_unlock(ring->lock, flags); dhd_os_spin_lock_deinit(dhdp->osh, ring->lock); - +#ifndef CONFIG_DHD_USE_STATIC_BUF MFREE(dhdp->osh, buf, ring_sz); +#endif } /* @@ -706,22 +710,22 @@ dhd_dbg_attach(dhd_pub_t *dhdp, dbg_pullreq_t os_pullreq, return BCME_NOMEM; ret = dhd_dbg_ring_init(dhdp, &dbg->dbg_rings[FW_VERBOSE_RING_ID], FW_VERBOSE_RING_ID, - FW_VERBOSE_RING_NAME, FW_VERBOSE_RING_SIZE); + (uint8 *)FW_VERBOSE_RING_NAME, FW_VERBOSE_RING_SIZE, DHD_PREALLOC_FW_VERBOSE_RING); if (ret) goto error; ret = dhd_dbg_ring_init(dhdp, &dbg->dbg_rings[FW_EVENT_RING_ID], FW_EVENT_RING_ID, - FW_EVENT_RING_NAME, FW_EVENT_RING_SIZE); + (uint8 *)FW_EVENT_RING_NAME, FW_EVENT_RING_SIZE, DHD_PREALLOC_FW_EVENT_RING); if (ret) goto error; ret = dhd_dbg_ring_init(dhdp, &dbg->dbg_rings[DHD_EVENT_RING_ID], DHD_EVENT_RING_ID, - DHD_EVENT_RING_NAME, DHD_EVENT_RING_SIZE); + (uint8 *)DHD_EVENT_RING_NAME, DHD_EVENT_RING_SIZE, DHD_PREALLOC_DHD_EVENT_RING); if (ret) goto error; ret = dhd_dbg_ring_init(dhdp, &dbg->dbg_rings[NAN_EVENT_RING_ID], NAN_EVENT_RING_ID, - NAN_EVENT_RING_NAME, NAN_EVENT_RING_SIZE); + (uint8 *)NAN_EVENT_RING_NAME, NAN_EVENT_RING_SIZE, DHD_PREALLOC_NAN_EVENT_RING); if (ret) goto error; diff --git a/bcmdhd-usb.1.363.110.17.x/include/osl.h b/bcmdhd-usb.1.363.110.17.x/include/osl.h index 6145982..1a45fb3 100644 --- a/bcmdhd-usb.1.363.110.17.x/include/osl.h +++ b/bcmdhd-usb.1.363.110.17.x/include/osl.h @@ -112,7 +112,9 @@ MAKE_PREFETCH_RANGE_FN(PREF_STORE_RETAINED) #ifndef OR_REG #define OR_REG(osh, r, v) W_REG(osh, (r), R_REG(osh, r) | (v)) #endif /* !OR_REG */ - +#ifdef CONFIG_DHD_USE_STATIC_BUF +void* dhd_wlan_mem_prealloc(int section, unsigned long size); +#endif #if !defined(OSL_SYSUPTIME) #define OSL_SYSUPTIME() (0) #define OSL_SYSUPTIME_SUPPORT FALSE diff --git a/bcmdhd-usb.1.363.110.17.x/linux_osl.c b/bcmdhd-usb.1.363.110.17.x/linux_osl.c index 9092979..d35b4fb 100644 --- a/bcmdhd-usb.1.363.110.17.x/linux_osl.c +++ b/bcmdhd-usb.1.363.110.17.x/linux_osl.c @@ -33,7 +33,6 @@ #include <bcmendian.h> #include <linuxver.h> #include <bcmdefs.h> -#include <asm-generic/pci-dma-compat.h> #ifdef mips #include <asm/paccess.h> #include <asm/cache.h> @@ -53,6 +52,9 @@ #include <bcmutils.h> #include <linux/delay.h> #include <pcicfg.h> +#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 8, 0)) +#include <asm-generic/pci-dma-compat.h> +#endif #ifdef BCM_SECURE_DMA diff --git a/bcmdhd-usb.1.363.110.17.x/wl_escan.c b/bcmdhd-usb.1.363.110.17.x/wl_escan.c index 2f749e6..25d5d98 100644 --- a/bcmdhd-usb.1.363.110.17.x/wl_escan.c +++ b/bcmdhd-usb.1.363.110.17.x/wl_escan.c @@ -1411,8 +1411,9 @@ void wl_escan_detach(void) kfree(escan->escan_ioctl_buf); escan->escan_ioctl_buf = NULL; } - +#ifndef CONFIG_DHD_USE_STATIC_BUF kfree(escan); +#endif g_escan = NULL; } @@ -1425,8 +1426,11 @@ wl_escan_attach(struct net_device *dev, void * dhdp) if (!dev) return 0; - +#ifdef CONFIG_DHD_USE_STATIC_BUF + escan = dhd_wlan_mem_prealloc(DHD_PREALLOC_WL_ESCAN_INFO, sizeof(struct wl_escan_info)); +#else escan = kmalloc(sizeof(struct wl_escan_info), GFP_KERNEL); +#endif if (!escan) return -ENOMEM; memset(escan, 0, sizeof(struct wl_escan_info)); diff --git a/bcmdhd.1.579.77.41.1.cn/dhd_linux.c b/bcmdhd.1.579.77.41.1.cn/dhd_linux.c index 0992860..7d08eb2 100644 --- a/bcmdhd.1.579.77.41.1.cn/dhd_linux.c +++ b/bcmdhd.1.579.77.41.1.cn/dhd_linux.c @@ -5028,8 +5028,8 @@ dhd_start_xmit(struct sk_buff *skb, struct net_device *net) DHD_GENERAL_LOCK(&dhd->pub, flags); if (DHD_BUS_CHECK_SUSPEND_OR_SUSPEND_IN_PROGRESS(&dhd->pub)) { - DHD_ERROR(("%s: bus is in suspend(%d) or suspending(0x%x) state!!\n", - __FUNCTION__, dhd->pub.busstate, dhd->pub.dhd_bus_busy_state)); + // DHD_ERROR(("%s: bus is in suspend(%d) or suspending(0x%x) state!!\n", + // __FUNCTION__, dhd->pub.busstate, dhd->pub.dhd_bus_busy_state)); DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); #ifdef PCIE_FULL_DONGLE /* Stop tx queues if suspend is in progress */ diff --git a/bcmdhd.1.579.77.41.1.cn/wl_cfg80211.c b/bcmdhd.1.579.77.41.1.cn/wl_cfg80211.c index 725d2db..ac7c19b 100644 --- a/bcmdhd.1.579.77.41.1.cn/wl_cfg80211.c +++ b/bcmdhd.1.579.77.41.1.cn/wl_cfg80211.c @@ -14085,10 +14085,10 @@ static void wl_scan_timeout(unsigned long data) struct wl_bss_info *bi = NULL; s32 i; u32 channel; -#if defined(DHD_DEBUG) && defined(DHD_FW_COREDUMP) +/*#if defined(DHD_DEBUG) && defined(DHD_FW_COREDUMP) dhd_pub_t *dhdp = (dhd_pub_t *)(cfg->pub); uint32 prev_memdump_mode = dhdp->memdump_enabled; -#endif /* DHD_DEBUG && DHD_FW_COREDUMP */ +#endif*/ /* DHD_DEBUG && DHD_FW_COREDUMP */ if (!(cfg->scan_request)) { WL_ERR(("timer expired but no scan request\n")); @@ -14122,14 +14122,15 @@ static void wl_scan_timeout(unsigned long data) bzero(&msg, sizeof(wl_event_msg_t)); WL_ERR(("timer expired\n")); -#if defined(DHD_DEBUG) && defined(DHD_FW_COREDUMP) +/*#if defined(DHD_DEBUG) && defined(DHD_FW_COREDUMP) if (dhdp->memdump_enabled) { dhdp->memdump_enabled = DUMP_MEMFILE; dhdp->memdump_type = DUMP_TYPE_SCAN_TIMEOUT; dhd_bus_mem_dump(dhdp); dhdp->memdump_enabled = prev_memdump_mode; } -#endif /* DHD_DEBUG && DHD_FW_COREDUMP */ +#endif*/ + /* DHD_DEBUG && DHD_FW_COREDUMP */ msg.event_type = hton32(WLC_E_ESCAN_RESULT); msg.status = hton32(WLC_E_STATUS_TIMEOUT); msg.reason = 0xFFFFFFFF; @@ -16931,8 +16932,10 @@ static void wl_link_down(struct bcm_cfg80211 *cfg) WL_DBG(("In\n")); cfg->link_up = false; - conn_info->req_ie_len = 0; - conn_info->resp_ie_len = 0; + if (conn_info) { + conn_info->req_ie_len = 0; + conn_info->resp_ie_len = 0; + } } static unsigned long wl_lock_eq(struct bcm_cfg80211 *cfg) |