wifi: fix bcmdhd.100.10.31 make fail issue [1/2]
authorRongjun Chen <rongjun.chen@amlogic.com>
Thu, 29 Nov 2018 11:11:45 +0000 (19:11 +0800)
committerRongjun Chen <rongjun.chen@amlogic.com>
Fri, 30 Nov 2018 05:37:36 +0000 (13:37 +0800)
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 <rongjun.chen@amlogic.com>
bcmdhd.100.10.315.x/Kconfig [changed mode: 0755->0644]
bcmdhd.100.10.315.x/Makefile [changed mode: 0755->0644]
bcmdhd.100.10.315.x/bcmsdh_sdmmc.c
bcmdhd.100.10.315.x/dhd_sdio.c
bcmdhd.100.10.315.x/include/bcmsdh.h
bcmdhd.100.10.315.x/wl_android.c
bcmdhd.100.10.315.x/wl_iw.c

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 1b4fe83..f0839b0
@@ -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
index 7c5e9191ca4c91dd9abec609c0a88186b17e5ee1..04111dc0269c0d95784aebe39833f8ab31f625ea 100644 (file)
@@ -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);
index 77713679348307ed66bdf1d31f0b8f5938b0fd16..3c3b3ba090656008fa2fbec7fe67c30201f67142 100644 (file)
@@ -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
index 82edb27b1f6979235c63912cf70c20bc76ce37e4..0d74a65a4b1acc9185b248f3dd04111e4ef653f8 100644 (file)
@@ -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 */
index 4a1991c7250e3a05b1f7dde3c2950fd47501e28f..4e4b9276cb91dd97265e5d342e54f50508512e30 100644 (file)
@@ -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,
index 8f68ac2a901ff10f2ad9bcd0f2d0088f7f5ea1aa..1556d9c8118eb58f654bf3425deee61980011f55 100644 (file)
@@ -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 { \