wifi: update driver to fix vts crash issue [1/1]
authorRongjun Chen <rongjun.chen@amlogic.com>
Tue, 17 Sep 2019 02:44:18 +0000 (10:44 +0800)
committerRongjun Chen <rongjun.chen@amlogic.com>
Wed, 18 Sep 2019 06:39:57 +0000 (14:39 +0800)
PD#SWPL-13921

Problem:
vts test crash

Solution:
update driver to fix it

Verify:
ampere

Change-Id: I2049e3ccc950126f1b5f921ee0927029c3198070

bcmdhd.100.10.315.x/Makefile
bcmdhd.100.10.315.x/bcmsdh_sdmmc.c
bcmdhd.100.10.315.x/dhd_linux.c
bcmdhd.100.10.315.x/dhd_linux_platdev.c
bcmdhd.100.10.315.x/include/epivers.h
bcmdhd.100.10.315.x/wl_cfg80211.c
bcmdhd.100.10.315.x/wl_cfgscan.c
bcmdhd.100.10.315.x/wl_cfgvendor.c

index 580df9c15f45178d17eb45832b7deb6799b84f9f..af14ef263aba1857742b7f128d28d518126a845e 100644 (file)
@@ -47,7 +47,7 @@ DHDOFILES = aiutils.o siutils.o sbutils.o bcmutils.o bcmwifi_channels.o   \
        dhd_debug_linux.o dhd_debug.o dhd_mschdbg.o dhd_dbg_ring.o            \
        hnd_pktq.o hnd_pktpool.o bcmxtlv.o linux_pkt.o bcmstdlib_s.o frag.o   \
        dhd_linux_exportfs.o dhd_linux_pktdump.o \
-       dhd_config.o wl_event.o wl_android_ext.o  wl_escan.o
+       dhd_config.o wl_event.o wl_android_ext.o wl_escan.o
 
 #BCMDHD_SDIO
 ifneq ($(CONFIG_BCMDHD_SDIO),)
index f87dbec425923dc8732a13e2a215e64299f8a2c5..89b2c9f9a77f192d5ea906b37108557cb3e623d2 100644 (file)
@@ -1180,9 +1180,6 @@ sdioh_request_packet_chain(sdioh_info_t *sd, uint fix_inc, uint write, uint func
                         * a restriction on max tx/glom count (based on host->max_segs).
                         */
                        if (sg_count >= ARRAYSIZE(sd->sg_list)) {
-                               sd_err(("%s: sg list entries(%u) exceed limit(%zu),"
-                                       " sd blk_size=%u\n",
-                                       __FUNCTION__, sg_count, (size_t)ARRAYSIZE(sd->sg_list), blk_size));
                                return (SDIOH_API_RC_FAIL);
                        }
                        pdata += pkt_offset;
index 53952ce0a7b236bdca336e2c959f2b423a4cc094..7d858fd28530e1c0281c5ec4409a6767456d186e 100644 (file)
@@ -2644,7 +2644,6 @@ _dhd_set_mac_address(dhd_info_t *dhd, int ifidx, uint8 *addr)
                memcpy(dhd->iflist[ifidx]->net->dev_addr, addr, ETHER_ADDR_LEN);
                if (ifidx == 0)
                        memcpy(dhd->pub.mac.octet, addr, ETHER_ADDR_LEN);
-               DHD_ERROR(("%s: MACID is overwritten ifidx=%d, mac=%pM\n", __FUNCTION__, ifidx, addr));
        }
 
        return ret;
@@ -7957,7 +7956,7 @@ dhd_remove_if(dhd_pub_t *dhdpub, int ifidx, bool need_rtnl_lock)
                                        unregister_netdev(ifp->net);
                                else
                                        unregister_netdevice(ifp->net);
-#if defined(WL_EXT_IAPSTA) || defined(USE_IW)  || defined(WL_ESCAN)
+#if defined(WL_EXT_IAPSTA) || defined(USE_IW) || defined(WL_ESCAN)
 #ifdef WL_EXT_IAPSTA
                                wl_ext_iapsta_dettach_netdev(ifp->net, ifidx);
 #endif /* WL_EXT_IAPSTA */
@@ -8614,7 +8613,7 @@ dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen
        if (wl_ext_iapsta_attach(&dhd->pub) != 0) {
                DHD_ERROR(("wl_ext_iapsta_attach failed\n"));
                goto fail;
-}
+       }
 #endif /* WL_EXT_IAPSTA */
 #endif /* WL_EXT_IAPSTA || USE_IW || WL_ESCAN */
 #if defined(WL_WIRELESS_EXT)
@@ -17102,7 +17101,7 @@ dhd_mem_dump(void *handle, void *event_info, u8 event)
 #endif /* SHOW_LOGTRACE */
 
                DHD_ERROR(("%s: call BUG_ON \n", __FUNCTION__));
-               //BUG_ON(1);
+               BUG_ON(1);
        }
        DHD_ERROR(("%s: No BUG ON, memdump type %u \n", __FUNCTION__, dhd->pub.memdump_type));
 
@@ -17364,7 +17363,6 @@ void dhd_schedule_log_dump(dhd_pub_t *dhdp, void *type)
 static void
 dhd_print_buf_addr(dhd_pub_t *dhdp, char *name, void *buf, unsigned int size)
 {
-#if 0
 #ifdef DHD_FW_COREDUMP
        if ((dhdp->memdump_enabled == DUMP_MEMONLY) ||
                (dhdp->memdump_enabled == DUMP_MEMFILE_BUGON) ||
@@ -17381,7 +17379,6 @@ dhd_print_buf_addr(dhd_pub_t *dhdp, char *name, void *buf, unsigned int size)
                        name, (uint32)buf, (uint32)__virt_to_phys((ulong)buf), size));
 #endif /* __ARM_ARCH_7A__ */
        }
-#endif
 }
 
 static void
index e68732b5c6ba742ba4e23f9dfc6740241191c698..b4839119057c87d5beee61441b4dcf45140717ee 100644 (file)
@@ -317,7 +317,7 @@ wifi_platform_get_country_code(wifi_adapter_info_t *adapter, char *ccode)
                return plat_data->get_country_code(ccode, flags);
 #else
                return plat_data->get_country_code(ccode);
-#endif /* CUSTOM_FORCE_NODFS_FLAG */
+#endif /* CUSTOM_COUNTRY_CODE */
        }
 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) */
 
index abaa5a79502f6f941b99fba8a815faf6de739997..88c63db2302c6d5298897c7b6a419e87d05914df 100644 (file)
@@ -46,6 +46,6 @@
 #define EPI_VERSION_DEV                100.10.545
 
 /* Driver Version String, ASCII, 32 chars max */
-#define        EPI_VERSION_STR         "100.10.545.4 (r826445-20190826-1) (amlogic-dbg-20190830-1)"
+#define        EPI_VERSION_STR         "100.10.545.4 (r826445-20190826-1) (amlogic-20190916-1)"
 
 #endif /* _epivers_h_ */
index 0d86ce6195e594cd2f1a4fddbbee4da0ab0d36e6..886ba04cfa98664f2d58b3c1c616055741b01a3b 100644 (file)
@@ -4022,7 +4022,6 @@ wl_cfg80211_interface_ops(struct bcm_cfg80211 *cfg,
                        WL_ERR(("Interface remove failed!! ret %d\n", ret));
                return ret;
        }
-       printf("%s: mac=%pM\n", __FUNCTION__, addr);
 
        /* Interface create */
        bzero(&iface, sizeof(iface));
@@ -10723,17 +10722,21 @@ wl_cfg80211_bcn_validate_sec(
                if (bss->rsn_ie) {
                        MFREE(cfg->osh, bss->rsn_ie, bss->rsn_ie[1]
                                + WPA_RSN_IE_TAG_FIXED_LEN);
+                       bss->rsn_ie = NULL;
                }
                if (bss->wpa_ie) {
                        MFREE(cfg->osh, bss->wpa_ie, bss->wpa_ie[1]
                                + WPA_RSN_IE_TAG_FIXED_LEN);
+                       bss->wpa_ie = NULL;
                }
                if (bss->wps_ie) {
                        MFREE(cfg->osh, bss->wps_ie, bss->wps_ie[1] + 2);
+                       bss->wps_ie = NULL;
                }
                if (bss->fils_ind_ie) {
                        MFREE(cfg->osh, bss->fils_ind_ie, bss->fils_ind_ie[1]
                                + FILS_INDICATION_IE_TAG_FIXED_LEN);
+                       bss->fils_ind_ie = NULL;
                }
                if (ies->wpa_ie != NULL) {
                        /* WPAIE */
@@ -11490,6 +11493,7 @@ static s32 wl_cfg80211_hostapd_sec(
                                        update_bss = true;
                                        MFREE(cfg->osh, bss->rsn_ie,
                                                bss->rsn_ie[1] + WPA_RSN_IE_TAG_FIXED_LEN);
+                                       bss->rsn_ie = NULL;
                                        bss->wpa_ie = MALLOCZ(cfg->osh,
                                                ies->wpa_ie->length + WPA_RSN_IE_TAG_FIXED_LEN);
                                        if (bss->wpa_ie) {
index d89c98ff944f13edbef157eb278f08bc6b87ccad..dcaebe5d10b1df4b9dc2f45bb88de79ee1a5398b 100644 (file)
@@ -2735,7 +2735,7 @@ static void wl_scan_timeout(unsigned long data)
         * Keeping it TRUE causes the sequential private cmd error
         */
        dhdp->scan_timeout_occurred = FALSE;
-#endif
+#endif /* DHD_FW_COREDUMP */
        msg.event_type = hton32(WLC_E_ESCAN_RESULT);
        msg.status = hton32(WLC_E_STATUS_TIMEOUT);
        msg.reason = 0xFFFFFFFF;
index feee249e52021c2ad68a8b0966dd123538f6b1ee..1cafa0696ba36826192796e06a5a447cdba26cb9 100644 (file)
@@ -6685,12 +6685,6 @@ wl_cfgvendor_dbg_get_mem_dump(struct wiphy *wiphy,
                }
        }
        if (buf_len > 0 && user_buf) {
-               mem_buf = vmalloc(buf_len);
-               if (!mem_buf) {
-                       WL_ERR(("failed to allocate mem_buf with size : %d\n", buf_len));
-                       ret = BCME_NOMEM;
-                       goto exit;
-               }
                ret = dhd_os_get_socram_dump(bcmcfg_to_prmry_ndev(cfg), &mem_buf, &buf_len);
                if (ret) {
                        WL_ERR(("failed to get_socram_dump : %d\n", ret));
@@ -6742,7 +6736,6 @@ wl_cfgvendor_dbg_get_mem_dump(struct wiphy *wiphy,
        }
 
 free_mem:
-       vfree(mem_buf);
        /* Free skb memory */
        if (skb) {
                kfree_skb(skb);