From 1baf4936508f985fea73243a1d08295cb6bc456f Mon Sep 17 00:00:00 2001 From: Rongjun Chen Date: Thu, 29 Nov 2018 19:11:45 +0800 Subject: [PATCH] wifi: fix bcmdhd.100.10.31 make fail issue [1/2] PD#SWPL-2210 Problem: bcmdhd.100.10.31 driver make fail Solution: fix driver make fail issue Verify: ampere Change-Id: Idf451428580966c78c58e040c7a5f7d3d78b0d86 Signed-off-by: Rongjun Chen --- bcmdhd.100.10.315.x/Kconfig | 0 bcmdhd.100.10.315.x/Makefile | 5 +++-- bcmdhd.100.10.315.x/bcmsdh_sdmmc.c | 2 +- bcmdhd.100.10.315.x/dhd_sdio.c | 10 +++++++++- bcmdhd.100.10.315.x/include/bcmsdh.h | 4 ++++ bcmdhd.100.10.315.x/wl_android.c | 14 -------------- bcmdhd.100.10.315.x/wl_iw.c | 1 + 7 files changed, 18 insertions(+), 18 deletions(-) mode change 100755 => 100644 bcmdhd.100.10.315.x/Kconfig mode change 100755 => 100644 bcmdhd.100.10.315.x/Makefile diff --git a/bcmdhd.100.10.315.x/Kconfig b/bcmdhd.100.10.315.x/Kconfig old mode 100755 new mode 100644 diff --git a/bcmdhd.100.10.315.x/Makefile b/bcmdhd.100.10.315.x/Makefile old mode 100755 new mode 100644 index 1b4fe83..f0839b0 --- a/bcmdhd.100.10.315.x/Makefile +++ b/bcmdhd.100.10.315.x/Makefile @@ -20,6 +20,7 @@ export CONFIG_BCMDHD_OOB = y export CONFIG_VTS_SUPPORT = y DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \ + -Wno-maybe-uninitialized -Werror \ -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \ -DDHDTHREAD -DDHD_DEBUG -DSHOW_EVENTS -DBCMDBG -DGET_OTP_MAC_ENABLE \ -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT -DSUPPORT_PM2_ONLY \ @@ -59,7 +60,7 @@ endif #BCMDHD_PCIE ifneq ($(CONFIG_BCMDHD_PCIE),) DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1 \ - -DDONGLE_ENABLE_ISOLATION -DDHD_WAKE_STATUS + -DDONGLE_ENABLE_ISOLATION ifneq ($(CONFIG_PCI_MSI),) DHDCFLAGS += -DDHD_USE_MSI endif @@ -100,7 +101,7 @@ ifeq ($(CONFIG_VTS_SUPPORT),y) ifneq ($(CONFIG_CFG80211),) DHDCFLAGS += -DGSCAN_SUPPORT -DRTT_SUPPORT -DCUSTOM_FORCE_NODFS_FLAG \ -DLINKSTAT_SUPPORT -DDEBUGABILITY -DDBG_PKT_MON -DPKT_FILTER_SUPPORT \ - -DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT \ + -DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT -DDHD_WAKE_STATUS \ -DCUSTOM_COUNTRY_CODE -DDHD_FW_COREDUMP -DEXPLICIT_DISCIF_CLEANUP DHDOFILES += dhd_rtt.o bcm_app_utils.o diff --git a/bcmdhd.100.10.315.x/bcmsdh_sdmmc.c b/bcmdhd.100.10.315.x/bcmsdh_sdmmc.c index 7c5e919..04111dc 100644 --- a/bcmdhd.100.10.315.x/bcmsdh_sdmmc.c +++ b/bcmdhd.100.10.315.x/bcmsdh_sdmmc.c @@ -1163,7 +1163,7 @@ 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(%lu)," + sd_err(("%s: sg list entries(%u) exceed limit(%zu)," " sd blk_size=%u\n", __FUNCTION__, sg_count, ARRAYSIZE(sd->sg_list), blk_size)); return (SDIOH_API_RC_FAIL); diff --git a/bcmdhd.100.10.315.x/dhd_sdio.c b/bcmdhd.100.10.315.x/dhd_sdio.c index 7771367..3c3b3ba 100644 --- a/bcmdhd.100.10.315.x/dhd_sdio.c +++ b/bcmdhd.100.10.315.x/dhd_sdio.c @@ -786,6 +786,11 @@ static int _dhdsdio_download_btfw(struct dhd_bus *bus); static int dhd_bus_ulp_reinit_fw(dhd_bus_t *bus); #endif /* DHD_ULP */ +#ifdef DHD_WAKE_STATUS +int bcmsdh_get_total_wake(bcmsdh_info_t *bcmsdh); +int bcmsdh_set_get_wake(bcmsdh_info_t *bcmsdh, int flag); +#endif /* DHD_WAKE_STATUS */ + static void dhdsdio_tune_fifoparam(struct dhd_bus *bus) { @@ -7022,7 +7027,7 @@ clkwait: } else if (bus->clkstate == CLK_PENDING) { /* Awaiting I_CHIPACTIVE; don't resched */ } else if (bus->intstatus || bus->ipend || - (!bus->fcstate && pktq_mlen(&bus->txq, ~bus->flowcontrol) && DATAOK(bus)) || + (!bus->fcstate && pktq_mlen(&bus->txq, ~bus->flowcontrol) && DATAOK(bus)) || PKT_AVAILABLE(bus, bus->intstatus)) { /* Read multiple frames */ resched = TRUE; } @@ -10343,6 +10348,9 @@ int dhd_get_idletime(dhd_pub_t *dhd) wake_counts_t* dhd_bus_get_wakecount(dhd_pub_t *dhd) { + if (!dhd->bus) { + return NULL; + } return &dhd->bus->wake_counts; } int diff --git a/bcmdhd.100.10.315.x/include/bcmsdh.h b/bcmdhd.100.10.315.x/include/bcmsdh.h index 82edb27..0d74a65 100644 --- a/bcmdhd.100.10.315.x/include/bcmsdh.h +++ b/bcmdhd.100.10.315.x/include/bcmsdh.h @@ -74,6 +74,10 @@ struct bcmsdh_info uint32 sbwad; /* Save backplane window address */ void *os_cxt; /* Pointer to per-OS private data */ bool force_sbwad_calc; /* forces calculation of sbwad instead of using cached value */ +#ifdef DHD_WAKE_STATUS + unsigned int total_wake_count; + int pkt_wake; +#endif /* DHD_WAKE_STATUS */ }; /* Detach - freeup resources allocated in attach */ diff --git a/bcmdhd.100.10.315.x/wl_android.c b/bcmdhd.100.10.315.x/wl_android.c index 4a1991c..4e4b927 100644 --- a/bcmdhd.100.10.315.x/wl_android.c +++ b/bcmdhd.100.10.315.x/wl_android.c @@ -112,10 +112,6 @@ uint android_msg_level = ANDROID_ERROR_LEVEL; #define CMD_SETBAND "SETBAND" #define CMD_GETBAND "GETBAND" #define CMD_COUNTRY "COUNTRY" -#ifdef WLMESH -#define CMD_SAE_SET_PASSWORD "SAE_SET_PASSWORD" -#define CMD_SET_RSDB_MODE "RSDB_MODE" -#endif #define CMD_P2P_SET_NOA "P2P_SET_NOA" #define CMD_P2P_GET_NOA "P2P_GET_NOA" #define CMD_P2P_SD_OFFLOAD "P2P_SD_" @@ -4981,16 +4977,6 @@ wl_handle_private_cmd(struct net_device *net, char *command, u32 cmd_len) else if (strnicmp(command, CMD_P2P_DEV_ADDR, strlen(CMD_P2P_DEV_ADDR)) == 0) { bytes_written = wl_android_get_p2p_dev_addr(net, command, priv_cmd.total_len); } -#ifdef WLMESH - else if (strnicmp(command, CMD_SAE_SET_PASSWORD, strlen(CMD_SAE_SET_PASSWORD)) == 0) { - int skip = strlen(CMD_SAE_SET_PASSWORD) + 1; - bytes_written = wl_cfg80211_set_sae_password(net, command + skip, - priv_cmd.total_len - skip); - } - else if (strnicmp(command, CMD_SET_RSDB_MODE, strlen(CMD_SET_RSDB_MODE)) == 0) { - bytes_written = wl_android_set_rsdb_mode(net, command, priv_cmd.total_len); - } -#endif else if (strnicmp(command, CMD_P2P_SET_NOA, strlen(CMD_P2P_SET_NOA)) == 0) { int skip = strlen(CMD_P2P_SET_NOA) + 1; bytes_written = wl_cfg80211_set_p2p_noa(net, command + skip, diff --git a/bcmdhd.100.10.315.x/wl_iw.c b/bcmdhd.100.10.315.x/wl_iw.c index 8f68ac2..1556d9c 100644 --- a/bcmdhd.100.10.315.x/wl_iw.c +++ b/bcmdhd.100.10.315.x/wl_iw.c @@ -128,6 +128,7 @@ extern int dhd_wait_pend8021x(struct net_device *dev); #define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST) #endif /* WIRELESS_EXT < 19 */ + #ifndef WL_ESCAN #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) #define DAEMONIZE(a) do { \ -- 2.20.1