PD#110330 :update broadcomw wifi driver to 1.201.59.5
authorJiamin Miao <jiamin.miao@amlogic.com>
Fri, 7 Aug 2015 06:49:00 +0000 (14:49 +0800)
committerJiamin Miao <jiamin.miao@amlogic.com>
Fri, 7 Aug 2015 07:20:52 +0000 (15:20 +0800)
Change-Id: I335a10cc9fc7585b933839af2bcf6c2c6604c772

17 files changed:
bcmdhd_1_201_59_x/Makefile
bcmdhd_1_201_59_x/bcmsdh_linux.c
bcmdhd_1_201_59_x/bcmsdh_sdmmc_linux.c
bcmdhd_1_201_59_x/bcmutils.c
bcmdhd_1_201_59_x/dhd_common.c
bcmdhd_1_201_59_x/dhd_config.c
bcmdhd_1_201_59_x/dhd_config.h
bcmdhd_1_201_59_x/dhd_gpio.c
bcmdhd_1_201_59_x/dhd_linux.c
bcmdhd_1_201_59_x/dhd_pcie.c
bcmdhd_1_201_59_x/dhd_sdio.c
bcmdhd_1_201_59_x/dhd_static_buf.c
bcmdhd_1_201_59_x/include/epivers.h
bcmdhd_1_201_59_x/wl_android.c
bcmdhd_1_201_59_x/wl_cfg80211.c
bcmdhd_1_201_59_x/wl_cfgp2p.c
bcmdhd_1_201_59_x/wl_iw.c

index a7065082ceaf8b4d62c289a76b45c34609bde16b..c29a6490989bba3c84e61ce1749988a37ce9b576 100644 (file)
@@ -8,18 +8,13 @@ CONFIG_BCMDHD_SDIO := y
 export CONFIG_BCMDHD = m
 export CONFIG_BCMDHD_OOB = y
 
-DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER                \
+DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER -DSDTEST       \
        -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE            \
-       -DDHDTHREAD -DDHD_DEBUG -DSHOW_EVENTS -DBCMDBG                        \
-       -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT                                \
-       -DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DDHD_USE_IDLECOUNT                 \
-       -DEMBEDDED_PLATFORM -DPNO_SUPPORT -DVSDB                              \
-       -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST                            \
-       -DESCAN_RESULT_PATCH -DSUPPORT_PM2_ONLY -DWLTDLS                      \
+       -DDHDTHREAD -DDHD_DEBUG -DSHOW_EVENTS -DBCMDBG -DGET_OTP_MAC_ENABLE   \
+       -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT -DSUPPORT_PM2_ONLY             \
+       -DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DPNO_SUPPORT -DDHDTCPACK_SUPPRESS  \
        -DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT -DRXFRAME_THREAD          \
-       -DMIRACAST_AMPDU_SIZE=8 -DDHDTCPACK_SUPPRESS                          \
-       -DSDTEST -DBDC -DDHD_BCMEVENTS -DPROP_TXSTATUS_VSDB                   \
-       -DGET_OTP_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP                          \
+       -DSET_RANDOM_MAC_SOFTAP                                               \
        -DENABLE_INSMOD_NO_FW_LOAD                                            \
        -I$(src) -I$(src)/include
 
@@ -31,9 +26,9 @@ DHDOFILES = aiutils.o siutils.o sbutils.o bcmutils.o bcmwifi_channels.o \
 
 ifneq ($(CONFIG_BCMDHD_SDIO),)
 DHDCFLAGS += \
-       -DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DSDIO_CRC_ERROR_FIX          \
-       -DCUSTOM_SDIO_F2_BLKSIZE=128 -DUSE_SDIOFIFO_IOVAR -DBCMSDIOH_TXGLOM   \
-       -DPROP_TXSTATUS
+       -DBCMSDIO -DMMC_SDIO_ABORT -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR          \
+       -DBDC -DPROP_TXSTATUS -DDHD_USE_IDLECOUNT -DBCMSDIOH_TXGLOM           \
+       -DCUSTOM_SDIO_F2_BLKSIZE=128
 
 DHDOFILES += bcmsdh.o bcmsdh_linux.o bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o \
        dhd_sdio.o dhd_cdc.o dhd_wlfc.o
@@ -91,6 +86,9 @@ DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=28000
 DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=7
 DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL
 DHDCFLAGS += -DWL_SUPPORT_BACKPORTED_KPATCHES
+DHDCFLAGS += -DESCAN_RESULT_PATCH
+DHDCFLAGS += -DVSDB -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
+DHDCFLAGS += -DWLTDLS -DMIRACAST_AMPDU_SIZE=8 -DPROP_TXSTATUS_VSDB
 endif
 EXTRA_CFLAGS = $(DHDCFLAGS)
 ifeq ($(CONFIG_BCMDHD),m)
index b4e6a8aef2837cd1f426783ef0791cee53fea97f..54ca0ed22d26c0961d095bd87321af214a9a0d90 100644 (file)
@@ -346,11 +346,7 @@ int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handl
 
 #if defined(DISABLE_WOWLAN)
        SDLX_MSG(("%s: disable_irq_wake\n", __FUNCTION__));
-       err = disable_irq_wake(bcmsdh_osinfo->oob_irq_num);
-       if (err)
-               SDLX_MSG(("%s: disable_irq_wake failed with %d\n", __FUNCTION__, err));
-       else
-               bcmsdh_osinfo->oob_irq_wake_enabled = FALSE;
+       bcmsdh_osinfo->oob_irq_wake_enabled = FALSE;
 #else
        SDLX_MSG(("%s: enable_irq_wake\n", __FUNCTION__));
        err = enable_irq_wake(bcmsdh_osinfo->oob_irq_num);
index 0fe3284586f6ff3d41d1d6f10b56f98f93ad1de1..19e0018bf91103f146c83de66d0096b342d681b3 100644 (file)
@@ -233,14 +233,14 @@ static int bcmsdh_sdmmc_suspend(struct device *pdev)
        struct sdio_func *func = dev_to_sdio_func(pdev);
        mmc_pm_flag_t sdio_flags;
 
-       printk("%s Enter func->num=%d\n", __FUNCTION__, func->num);
+       printf("%s Enter func->num=%d\n", __FUNCTION__, func->num);
        if (func->num != 2)
                return 0;
 
        sdioh = sdio_get_drvdata(func);
        err = bcmsdh_suspend(sdioh->bcmsdh);
        if (err) {
-               printk("%s bcmsdh_suspend err=%d\n", __FUNCTION__, err);
+               printf("%s bcmsdh_suspend err=%d\n", __FUNCTION__, err);
                return err;
        }
 
@@ -262,7 +262,7 @@ static int bcmsdh_sdmmc_suspend(struct device *pdev)
        dhd_mmc_suspend = TRUE;
        smp_mb();
 
-       printk("%s Exit\n", __FUNCTION__);
+       printf("%s Exit\n", __FUNCTION__);
        return 0;
 }
 
@@ -273,7 +273,7 @@ static int bcmsdh_sdmmc_resume(struct device *pdev)
 #endif
        struct sdio_func *func = dev_to_sdio_func(pdev);
 
-       printk("%s Enter func->num=%d\n", __FUNCTION__, func->num);
+       printf("%s Enter func->num=%d\n", __FUNCTION__, func->num);
        if (func->num != 2)
                return 0;
 
@@ -284,7 +284,7 @@ static int bcmsdh_sdmmc_resume(struct device *pdev)
 #endif
 
        smp_mb();
-       printk("%s Exit\n", __FUNCTION__);
+       printf("%s Exit\n", __FUNCTION__);
        return 0;
 }
 
index b0727e3ab40b15e770552e1344c7ff48539f4c0d..148fdee425ff4e073c40f46227fd10dbee59f0cf 100644 (file)
@@ -2003,9 +2003,9 @@ process_nvram_vars(char *varbuf, unsigned int len)
                for (n=1; n<len; n++) {
                        if (varbuf[n] == '\n')
                                break;
-                       printf("%c", varbuf[n]);
+                       printk("%c", varbuf[n]);
                }
-               printf("\n");
+               printk("\n");
        }
 
        for (n = 0; n < len; n++) {
index d04ee68150bb418dc441c6d4e81b32c940617493..eac030625997aa1d9f17a9238592f886ec1320f9 100644 (file)
@@ -434,33 +434,33 @@ dhd_doiovar(dhd_pub_t *dhd_pub, const bcm_iovar_t *vi, uint32 actionid, const ch
                break;
 
        case IOV_GVAL(IOV_WLMSGLEVEL):
-               printk("android_msg_level=0x%x\n", android_msg_level);
-               printk("config_msg_level=0x%x\n", config_msg_level);
+               printf("android_msg_level=0x%x\n", android_msg_level);
+               printf("config_msg_level=0x%x\n", config_msg_level);
 #if defined(WL_WIRELESS_EXT)
                int_val = (int32)iw_msg_level;
                bcopy(&int_val, arg, val_size);
-               printk("iw_msg_level=0x%x\n", iw_msg_level);
+               printf("iw_msg_level=0x%x\n", iw_msg_level);
 #endif
 #ifdef WL_CFG80211
                int_val = (int32)wl_dbg_level;
                bcopy(&int_val, arg, val_size);
-               printk("cfg_msg_level=0x%x\n", wl_dbg_level);
+               printf("cfg_msg_level=0x%x\n", wl_dbg_level);
 #endif
                break;
 
        case IOV_SVAL(IOV_WLMSGLEVEL):
                if (int_val & DHD_ANDROID_VAL) {
                        android_msg_level = (uint)(int_val & 0xFFFF);
-                       printk("android_msg_level=0x%x\n", android_msg_level);
+                       printf("android_msg_level=0x%x\n", android_msg_level);
                }
                if (int_val & DHD_CONFIG_VAL) {
                        config_msg_level = (uint)(int_val & 0xFFFF);
-                       printk("config_msg_level=0x%x\n", config_msg_level);
+                       printf("config_msg_level=0x%x\n", config_msg_level);
                }
 #if defined(WL_WIRELESS_EXT)
                if (int_val & DHD_IW_VAL) {
                        iw_msg_level = (uint)(int_val & 0xFFFF);
-                       printk("iw_msg_level=0x%x\n", iw_msg_level);
+                       printf("iw_msg_level=0x%x\n", iw_msg_level);
                }
 #endif
 #ifdef WL_CFG80211
index 11b142e261392acba0903f33b5bc1229dcd532f7..a68af64f941bdb5dfdce24cea288d385765b45e2 100644 (file)
@@ -171,7 +171,6 @@ dhd_conf_free_mac_list(wl_mac_list_ctrl_t *mac_list)
        int i;
 
        CONFIG_TRACE(("%s called\n", __FUNCTION__));
-
        if (mac_list->m_mac_list_head) {
                for (i = 0; i < mac_list->count; i++) {
                        if (mac_list->m_mac_list_head[i].mac) {
@@ -257,13 +256,13 @@ dhd_conf_get_mac(dhd_pub_t *dhd, bcmsdh_info_t *sdh, uint8 *mac)
                if (config_msg_level & CONFIG_TRACE_LEVEL) {
                        printf("%s: tpl_code=0x%02x, tpl_link=0x%02x, tag=0x%02x\n",
                                __FUNCTION__, tpl_code, tpl_link, *ptr);
-                       printf("%s: value:", __FUNCTION__);
+                       printk("%s: value:", __FUNCTION__);\r
                        for (i=0; i<tpl_link-1; i++) {
-                               printf("%02x ", ptr[i+1]);
+                               printk("%02x ", ptr[i+1]);\r
                                if ((i+1) % 16 == 0)
-                                       printf("\n");
+                                       printk("\n");\r
                        }
-                       printf("\n");
+                       printk("\n");\r
                }
 
                if (tpl_code == 0x80 && tpl_link == 0x07 && *ptr == 0x19)
@@ -501,6 +500,14 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path)
                        else if (chiprev == BCM4356A2_CHIP_REV)
                                strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]);
                        break;
+               case BCM4356_CHIP_ID:\r
+                       if (chiprev == BCM4356A2_CHIP_REV)\r
+                               strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]);\r
+                       break;\r
+               case BCM4371_CHIP_ID:\r
+                       if (chiprev == BCM4356A2_CHIP_REV)\r
+                               strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]);\r
+                       break;\r
 #endif
 #ifdef BCMPCIE
                case BCM4356_CHIP_ID:
@@ -931,10 +938,10 @@ dhd_conf_add_pkt_filter(dhd_pub_t *dhd)
        int i;
 
        /*
-       All pkt: pkt_filter_add=99 0 0 0 0x000000000000 0x000000000000
-       Netbios pkt: 120 0 0 12 0xFFFF000000000000000000FF000000000000000000000000FFFF 0x0800000000000000000000110000000000000000000000000089
-       */
-       for (i = 0; i < dhd->conf->pkt_filter_add.count; i++) {
+        * All pkt: pkt_filter_add=99 0 0 0 0x000000000000 0x000000000000\r
+        * Netbios pkt: 120 0 0 12 0xFFFF000000000000000000FF000000000000000000000000FFFF 0x0800000000000000000000110000000000000000000000000089\r
+        */\r
+       for(i=0; i<dhd->conf->pkt_filter_add.count; i++) {\r
                dhd->pktfilter[i+dhd->pktfilter_count] = dhd->conf->pkt_filter_add.filter[i];
                printf("%s: %s\n", __FUNCTION__, dhd->pktfilter[i+dhd->pktfilter_count]);
        }
@@ -1125,15 +1132,21 @@ dhd_conf_set_disable_proptx(dhd_pub_t *dhd)
 }
 
 int
-dhd_conf_get_pm(void *context)
+dhd_conf_get_pm(dhd_pub_t *dhd)\r
 {
-       dhd_pub_t *dhd = context;
-
        if (dhd && dhd->conf)
                return dhd->conf->pm;
        return -1;
 }
 
+int\r
+dhd_conf_get_tcpack_sup_mode(dhd_pub_t *dhd)\r
+{\r
+       if (dhd && dhd->conf)\r
+               return dhd->conf->tcpack_sup_mode;\r
+       return -1;\r
+}\r
+\r
 unsigned int
 process_config_vars(char *varbuf, unsigned int len, char *pickbuf, char *param)
 {
@@ -1360,6 +1373,165 @@ dhd_conf_read_wme_ac_params(dhd_pub_t *dhd, char *bufp, uint len)
 }
 
 void
+dhd_conf_read_fw_by_mac(dhd_pub_t *dhd, char *bufp, uint len)\r
+{\r
+       uint len_val;\r
+       int i, j;\r
+       char pick[MAXSZ_BUF];\r
+       char *pch, *pick_tmp;\r
+       wl_mac_list_t *mac_list;\r
+       wl_mac_range_t *mac_range;\r
+       struct dhd_conf *conf = dhd->conf;\r
+\r
+       /* Process fw_by_mac:\r
+        * fw_by_mac=[fw_mac_num] \\r
+        *  [fw_name1] [mac_num1] [oui1-1] [nic_start1-1] [nic_end1-1] \\r
+        *                                    [oui1-1] [nic_start1-1] [nic_end1-1]... \\r
+        *                                    [oui1-n] [nic_start1-n] [nic_end1-n] \\r
+        *  [fw_name2] [mac_num2] [oui2-1] [nic_start2-1] [nic_end2-1] \\r
+        *                                    [oui2-1] [nic_start2-1] [nic_end2-1]... \\r
+        *                                    [oui2-n] [nic_start2-n] [nic_end2-n] \\r
+        * Ex: fw_by_mac=2 \\r
+        *  fw_bcmdhd1.bin 2 0x0022F4 0xE85408 0xE8549D 0x983B16 0x3557A9 0x35582A \\r
+        *  fw_bcmdhd2.bin 3 0x0022F4 0xE85408 0xE8549D 0x983B16 0x3557A9 0x35582A \\r
+        *                           0x983B16 0x916157 0x916487\r
+        */\r
+       memset(pick, 0, MAXSZ_BUF);\r
+       len_val = process_config_vars(bufp, len, pick, "fw_by_mac=");\r
+       if (len_val) {\r
+               pick_tmp = pick;\r
+               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+               conf->fw_by_mac.count = (uint32)simple_strtol(pch, NULL, 0);\r
+               if (!(mac_list = kmalloc(sizeof(wl_mac_list_t)*conf->fw_by_mac.count, GFP_KERNEL))) {\r
+                       conf->fw_by_mac.count = 0;\r
+                       CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));\r
+               }\r
+               printf("%s: fw_count=%d\n", __FUNCTION__, conf->fw_by_mac.count);\r
+               conf->fw_by_mac.m_mac_list_head = mac_list;\r
+               for (i=0; i<conf->fw_by_mac.count; i++) {\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       strcpy(mac_list[i].name, pch);\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       mac_list[i].count = (uint32)simple_strtol(pch, NULL, 0);\r
+                       printf("%s: name=%s, mac_count=%d\n", __FUNCTION__,\r
+                               mac_list[i].name, mac_list[i].count);\r
+                       if (!(mac_range = kmalloc(sizeof(wl_mac_range_t)*mac_list[i].count, GFP_KERNEL))) {\r
+                               mac_list[i].count = 0;\r
+                               CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));\r
+                               break;\r
+                       }\r
+                       mac_list[i].mac = mac_range;\r
+                       for (j=0; j<mac_list[i].count; j++) {\r
+                               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                               mac_range[j].oui = (uint32)simple_strtol(pch, NULL, 0);\r
+                               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                               mac_range[j].nic_start = (uint32)simple_strtol(pch, NULL, 0);\r
+                               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                               mac_range[j].nic_end = (uint32)simple_strtol(pch, NULL, 0);\r
+                               printf("%s: oui=0x%06X, nic_start=0x%06X, nic_end=0x%06X\n",\r
+                                       __FUNCTION__, mac_range[j].oui,\r
+                                       mac_range[j].nic_start, mac_range[j].nic_end);\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+void\r
+dhd_conf_read_nv_by_mac(dhd_pub_t *dhd, char *bufp, uint len)\r
+{\r
+       uint len_val;\r
+       int i, j;\r
+       char pick[MAXSZ_BUF];\r
+       char *pch, *pick_tmp;\r
+       wl_mac_list_t *mac_list;\r
+       wl_mac_range_t *mac_range;\r
+       struct dhd_conf *conf = dhd->conf;\r
+\r
+       /* Process nv_by_mac:\r
+        * [nv_by_mac]: The same format as fw_by_mac\r
+        */\r
+       memset(pick, 0, MAXSZ_BUF);\r
+       len_val = process_config_vars(bufp, len, pick, "nv_by_mac=");\r
+       if (len_val) {\r
+               pick_tmp = pick;\r
+               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+               conf->nv_by_mac.count = (uint32)simple_strtol(pch, NULL, 0);\r
+               if (!(mac_list = kmalloc(sizeof(wl_mac_list_t)*conf->nv_by_mac.count, GFP_KERNEL))) {\r
+                       conf->nv_by_mac.count = 0;\r
+                       CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));\r
+               }\r
+               printf("%s: nv_count=%d\n", __FUNCTION__, conf->nv_by_mac.count);\r
+               conf->nv_by_mac.m_mac_list_head = mac_list;\r
+               for (i=0; i<conf->nv_by_mac.count; i++) {\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       strcpy(mac_list[i].name, pch);\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       mac_list[i].count = (uint32)simple_strtol(pch, NULL, 0);\r
+                       printf("%s: name=%s, mac_count=%d\n", __FUNCTION__,\r
+                               mac_list[i].name, mac_list[i].count);\r
+                       if (!(mac_range = kmalloc(sizeof(wl_mac_range_t)*mac_list[i].count, GFP_KERNEL))) {\r
+                               mac_list[i].count = 0;\r
+                               CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));\r
+                               break;\r
+                       }\r
+                       mac_list[i].mac = mac_range;\r
+                       for (j=0; j<mac_list[i].count; j++) {\r
+                               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                               mac_range[j].oui = (uint32)simple_strtol(pch, NULL, 0);\r
+                               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                               mac_range[j].nic_start = (uint32)simple_strtol(pch, NULL, 0);\r
+                               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                               mac_range[j].nic_end = (uint32)simple_strtol(pch, NULL, 0);\r
+                               printf("%s: oui=0x%06X, nic_start=0x%06X, nic_end=0x%06X\n",\r
+                                       __FUNCTION__, mac_range[j].oui,\r
+                                       mac_range[j].nic_start, mac_range[j].nic_end);\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+void\r
+dhd_conf_read_nv_by_chip(dhd_pub_t *dhd, char *bufp, uint len)\r
+{\r
+       uint len_val;\r
+       int i;\r
+       char pick[MAXSZ_BUF];\r
+       char *pch, *pick_tmp;\r
+       wl_chip_nv_path_t *chip_nv_path;\r
+       struct dhd_conf *conf = dhd->conf;\r
+\r
+       /* Process nv_by_chip:\r
+        * nv_by_chip=[nv_chip_num] \\r
+        *  [chip1] [chiprev1] [nv_name1] [chip2] [chiprev2] [nv_name2] \\r
+        * Ex: nv_by_chip=2 \\r
+        *  43430 0 nvram_ap6212.txt 43430 1 nvram_ap6212a.txt \\r
+        */\r
+       memset(pick, 0, MAXSZ_BUF);\r
+       len_val = process_config_vars(bufp, len, pick, "nv_by_chip=");\r
+       if (len_val) {\r
+               pick_tmp = pick;\r
+               pch = bcmstrtok(&pick_tmp, " ", 0);\r
+               conf->nv_by_chip.count = (uint32)simple_strtol(pch, NULL, 0);\r
+               if (!(chip_nv_path = kmalloc(sizeof(wl_mac_list_t)*conf->nv_by_chip.count, GFP_KERNEL))) {\r
+                       conf->nv_by_chip.count = 0;\r
+                       CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));\r
+               }\r
+               printf("%s: nv_by_chip_count=%d\n", __FUNCTION__, conf->nv_by_chip.count);\r
+               conf->nv_by_chip.m_chip_nv_path_head = chip_nv_path;\r
+               for (i=0; i<conf->nv_by_chip.count; i++) {\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       chip_nv_path[i].chip = (uint32)simple_strtol(pch, NULL, 0);\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       chip_nv_path[i].chiprev = (uint32)simple_strtol(pch, NULL, 0);\r
+                       pch = bcmstrtok(&pick_tmp, " ", 0);\r
+                       strcpy(chip_nv_path[i].name, pch);\r
+                       printf("%s: chip=0x%x, chiprev=%d, name=%s\n", __FUNCTION__,\r
+                               chip_nv_path[i].chip, chip_nv_path[i].chiprev, chip_nv_path[i].name);\r
+               }\r
+       }\r
+}\r
+\r
+void\r
 dhd_conf_read_roam_params(dhd_pub_t *dhd, char *bufp, uint len)
 {
        uint len_val;
@@ -1419,47 +1591,21 @@ dhd_conf_read_roam_params(dhd_pub_t *dhd, char *bufp, uint len)
 
 }
 
-/*
- * [fw_by_mac]:
- * fw_by_mac=[fw_mac_num] \
- *  [fw_name1] [mac_num1] [oui1-1] [nic_start1-1] [nic_end1-1] \
- *                                    [oui1-1] [nic_start1-1] [nic_end1-1]... \
- *                                    [oui1-n] [nic_start1-n] [nic_end1-n] \
- *  [fw_name2] [mac_num2] [oui2-1] [nic_start2-1] [nic_end2-1] \
- *                                    [oui2-1] [nic_start2-1] [nic_end2-1]... \
- *                                    [oui2-n] [nic_start2-n] [nic_end2-n] \
- * Ex: fw_by_mac=2 \
- *  fw_bcmdhd1.bin 2 0x0022F4 0xE85408 0xE8549D 0x983B16 0x3557A9 0x35582A \
- *  fw_bcmdhd2.bin 3 0x0022F4 0xE85408 0xE8549D 0x983B16 0x3557A9 0x35582A \
- *                           0x983B16 0x916157 0x916487
- * [nv_by_mac]: The same format as fw_by_mac
- *
-*/
 int
 dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)
 {
-       int bcmerror = -1, i, j;
+       int bcmerror = -1, i;\r
        uint len, len_val;
        void * image = NULL;
        char * memblock = NULL;
-       char *bufp, *pick=NULL, *pch, *pick_tmp;
+       char *bufp, pick[MAXSZ_BUF], *pch, *pick_tmp;\r
        bool conf_file_exists;
-       wl_mac_list_t *mac_list;
-       wl_mac_range_t *mac_range;
-       wl_chip_nv_path_t *chip_nv_path;
        struct dhd_conf *conf = dhd->conf;
 
-       pick = kmalloc(MAXSZ_BUF, GFP_KERNEL);
-       if (!pick) {
-               printk("kmalloc pick error \n");
-               goto err;
-       }
-       memset(pick, 0, MAXSZ_BUF);
-
        conf_file_exists = ((conf_path != NULL) && (conf_path[0] != '\0'));
        if (!conf_file_exists) {
                printk("%s: config path %s\n", __FUNCTION__, conf_path);
-               goto err;
+               return (0);\r
        }
 
        if (conf_file_exists) {
@@ -1489,113 +1635,13 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)
                dhd_conf_read_log_level(dhd, bufp, len);
                dhd_conf_read_roam_params(dhd, bufp, len);
                dhd_conf_read_wme_ac_params(dhd, bufp, len);
+               dhd_conf_read_fw_by_mac(dhd, bufp, len);\r
+               dhd_conf_read_nv_by_mac(dhd, bufp, len);\r
+               dhd_conf_read_nv_by_chip(dhd, bufp, len);\r
 
-               /* Process fw_by_mac */
-               memset(pick, 0, MAXSZ_BUF);
-               len_val = process_config_vars(bufp, len, pick, "fw_by_mac=");
-               if (len_val) {
-                       pick_tmp = pick;
-                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                       conf->fw_by_mac.count = (uint32)simple_strtol(pch, NULL, 0);
-                       if (!(mac_list = kmalloc(sizeof(wl_mac_list_t)*conf->fw_by_mac.count, GFP_KERNEL))) {
-                               conf->fw_by_mac.count = 0;
-                               CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));
-                       }
-                       printf("%s: fw_count=%d\n", __FUNCTION__, conf->fw_by_mac.count);
-                       conf->fw_by_mac.m_mac_list_head = mac_list;
-                       for (i=0; i<conf->fw_by_mac.count; i++) {
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               strcpy(mac_list[i].name, pch);
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               mac_list[i].count = (uint32)simple_strtol(pch, NULL, 0);
-                               printf("%s: name=%s, mac_count=%d\n", __FUNCTION__,
-                                       mac_list[i].name, mac_list[i].count);
-                               if (!(mac_range = kmalloc(sizeof(wl_mac_range_t)*mac_list[i].count, GFP_KERNEL))) {
-                                       mac_list[i].count = 0;
-                                       CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));
-                                       break;
-                               }
-                               mac_list[i].mac = mac_range;
-                               for (j=0; j<mac_list[i].count; j++) {
-                                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                                       mac_range[j].oui = (uint32)simple_strtol(pch, NULL, 0);
-                                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                                       mac_range[j].nic_start = (uint32)simple_strtol(pch, NULL, 0);
-                                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                                       mac_range[j].nic_end = (uint32)simple_strtol(pch, NULL, 0);
-                                       printf("%s: oui=0x%06X, nic_start=0x%06X, nic_end=0x%06X\n",
-                                               __FUNCTION__, mac_range[j].oui,
-                                               mac_range[j].nic_start, mac_range[j].nic_end);
-                               }
-                       }
-               }
-
-               /* Process nv_by_mac */
-               memset(pick, 0, MAXSZ_BUF);
-               len_val = process_config_vars(bufp, len, pick, "nv_by_mac=");
-               if (len_val) {
-                       pick_tmp = pick;
-                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                       conf->nv_by_mac.count = (uint32)simple_strtol(pch, NULL, 0);
-                       if (!(mac_list = kmalloc(sizeof(wl_mac_list_t)*conf->nv_by_mac.count, GFP_KERNEL))) {
-                               conf->nv_by_mac.count = 0;
-                               CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));
-                       }
-                       printf("%s: nv_count=%d\n", __FUNCTION__, conf->nv_by_mac.count);
-                       conf->nv_by_mac.m_mac_list_head = mac_list;
-                       for (i=0; i<conf->nv_by_mac.count; i++) {
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               strcpy(mac_list[i].name, pch);
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               mac_list[i].count = (uint32)simple_strtol(pch, NULL, 0);
-                               printf("%s: name=%s, mac_count=%d\n", __FUNCTION__,
-                                       mac_list[i].name, mac_list[i].count);
-                               if (!(mac_range = kmalloc(sizeof(wl_mac_range_t)*mac_list[i].count, GFP_KERNEL))) {
-                                       mac_list[i].count = 0;
-                                       CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));
-                                       break;
-                               }
-                               mac_list[i].mac = mac_range;
-                               for (j=0; j<mac_list[i].count; j++) {
-                                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                                       mac_range[j].oui = (uint32)simple_strtol(pch, NULL, 0);
-                                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                                       mac_range[j].nic_start = (uint32)simple_strtol(pch, NULL, 0);
-                                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                                       mac_range[j].nic_end = (uint32)simple_strtol(pch, NULL, 0);
-                                       printf("%s: oui=0x%06X, nic_start=0x%06X, nic_end=0x%06X\n",
-                                               __FUNCTION__, mac_range[j].oui,
-                                               mac_range[j].nic_start, mac_range[j].nic_end);
-                               }
-                       }
-               }
-
-               /* Process nv_by_chip */
-               memset(pick, 0, MAXSZ_BUF);
-               len_val = process_config_vars(bufp, len, pick, "nv_by_chip=");
-               if (len_val) {
-                       pick_tmp = pick;
-                       pch = bcmstrtok(&pick_tmp, " ", 0);
-                       conf->nv_by_chip.count = (uint32)simple_strtol(pch, NULL, 0);
-                       if (!(chip_nv_path = kmalloc(sizeof(wl_mac_list_t)*conf->nv_by_chip.count, GFP_KERNEL))) {
-                               conf->nv_by_chip.count = 0;
-                               CONFIG_ERROR(("%s: kmalloc failed\n", __FUNCTION__));
-                       }
-                       printf("%s: nv_by_chip_count=%d\n", __FUNCTION__, conf->nv_by_chip.count);
-                       conf->nv_by_chip.m_chip_nv_path_head = chip_nv_path;
-                       for (i=0; i<conf->nv_by_chip.count; i++) {
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               chip_nv_path[i].chip = (uint32)simple_strtol(pch, NULL, 0);
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               chip_nv_path[i].chiprev = (uint32)simple_strtol(pch, NULL, 0);
-                               pch = bcmstrtok(&pick_tmp, " ", 0);
-                               strcpy(chip_nv_path[i].name, pch);
-                               printf("%s: chip=0x%x, chiprev=%d, name=%s\n", __FUNCTION__,
-                                       chip_nv_path[i].chip, chip_nv_path[i].chiprev, chip_nv_path[i].name);
-                       }
-               }
-
-               /* Process band */
+               /* Process band:\r
+                * band=a for 5GHz only and band=b for 2.4GHz only\r
+                */\r
                memset(pick, 0, MAXSZ_BUF);
                len_val = process_config_vars(bufp, len, pick, "band=");
                if (len_val) {
@@ -1697,6 +1743,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)
                        printf("%s: dhd_master_mode = %d\n", __FUNCTION__, dhd_master_mode);
                }
 
+#ifdef PKT_FILTER_SUPPORT\r
                /* Process pkt_filter_add:\r
                 * All pkt: pkt_filter_add=99 0 0 0 0x000000000000 0x000000000000\r
                 */\r
@@ -1733,6 +1780,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)
                                printf("%d ", conf->pkt_filter_del.id[i]);
                        printf("\n");
                }
+#endif\r
 
                /* Process srl parameters */
                memset(pick, 0, MAXSZ_BUF);
@@ -1879,6 +1927,14 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path)
                        printf("%s: PM = %d\n", __FUNCTION__, conf->pm);
                }
 
+               /* Process tcpack_sup_mode parameters */\r
+               memset(pick, 0, MAXSZ_BUF);\r
+               len_val = process_config_vars(bufp, len, pick, "tcpack_sup_mode=");\r
+               if (len_val) {\r
+                       conf->tcpack_sup_mode = (int)simple_strtol(pick, NULL, 10);\r
+                       printf("%s: tcpack_sup_mode = %d\n", __FUNCTION__, conf->tcpack_sup_mode);\r
+               }\r
+\r
                bcmerror = 0;
        } else {
                CONFIG_ERROR(("%s: error reading config file: %d\n", __FUNCTION__, len));
@@ -1891,8 +1947,6 @@ err:
 
        if (image)
                dhd_os_close_image(image);
-       if (pick)
-               kfree(pick);
 
        return bcmerror;
 }
@@ -1946,7 +2000,7 @@ dhd_conf_preinit(dhd_pub_t *dhd)
                conf->cspec.rev = 0;
        } else if (conf->chip == BCM4335_CHIP_ID || conf->chip == BCM4339_CHIP_ID ||
                        conf->chip == BCM4354_CHIP_ID || conf->chip == BCM4356_CHIP_ID ||\r
-                       conf->chip == BCM4345_CHIP_ID) {\r
+                       conf->chip == BCM4345_CHIP_ID || conf->chip == BCM4371_CHIP_ID) {\r
                strcpy(conf->cspec.country_abbrev, "CN");
                strcpy(conf->cspec.ccode, "CN");
                conf->cspec.rev = 38;
@@ -2006,6 +2060,7 @@ dhd_conf_preinit(dhd_pub_t *dhd)
        conf->frameburst = -1;
        conf->deepsleep = FALSE;
        conf->pm = -1;
+       conf->tcpack_sup_mode = TCPACK_SUP_OFF;\r
        if ((conf->chip == BCM43362_CHIP_ID) || (conf->chip == BCM4330_CHIP_ID)) {
                conf->disable_proptx = 1;
                conf->use_rxchain = 0;\r
@@ -2026,6 +2081,18 @@ dhd_conf_preinit(dhd_pub_t *dhd)
        if (conf->chip == BCM4356_CHIP_ID) {
                conf->txbf = 1;
        }
+       if (conf->chip == BCM4371_CHIP_ID) {\r
+               conf->txbf = 1;\r
+       }\r
+#ifdef BCMSDIO\r
+       if (conf->chip == BCM4356_CHIP_ID) {\r
+               conf->txbf = 1;\r
+       }\r
+#elif defined(BCMPCIE)\r
+       if (conf->chip == BCM4356_CHIP_ID) {\r
+               conf->txbf = 1;\r
+       }\r
+#endif\r
 
        return 0;
 }
index af318e2093d9afed9db4b2b03a0756780bb29059..b2fe0121bcb523c16d7b3d5d430acad3ea979aab 100644 (file)
@@ -65,7 +65,7 @@ typedef struct wmes_param {
 #ifdef PKT_FILTER_SUPPORT
 #define DHD_CONF_FILTER_MAX    8
 /* filter list */
-#define PKT_FILTER_LEN 150
+#define PKT_FILTER_LEN 300\r
 typedef struct conf_pkt_filter_add {
        /* in - # of channels, out - # of entries */
        uint32 count;
@@ -124,6 +124,7 @@ typedef struct dhd_conf {
        int frameburst;
        bool deepsleep;
        int pm;
+       uint8 tcpack_sup_mode;\r
 } dhd_conf_t;
 
 #ifdef BCMSDIO
@@ -166,7 +167,8 @@ int dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path);
 int dhd_conf_set_chiprev(dhd_pub_t *dhd, uint chip, uint chiprev);
 uint dhd_conf_get_chip(void *context);
 uint dhd_conf_get_chiprev(void *context);
-int dhd_conf_get_pm(void *context);
+int dhd_conf_get_pm(dhd_pub_t *dhd);\r
+int dhd_conf_get_tcpack_sup_mode(dhd_pub_t *dhd);\r
 int dhd_conf_preinit(dhd_pub_t *dhd);
 int dhd_conf_reset(dhd_pub_t *dhd);
 int dhd_conf_attach(dhd_pub_t *dhd);
index ea0be94a6f20876d10f0ffb53602ebd52b6c6dc8..6955fe80ecbc092ee6c289a56f83e48a559d2a1e 100644 (file)
@@ -27,7 +27,7 @@ uint bcm_wlan_get_oob_irq(void)
        uint host_oob_irq = 0;
 
 #ifdef CONFIG_MACH_ODROID_4210
-       printk("GPIO(WL_HOST_WAKE) = EXYNOS4_GPX0(7) = %d\n", EXYNOS4_GPX0(7));
+       printf("GPIO(WL_HOST_WAKE) = EXYNOS4_GPX0(7) = %d\n", EXYNOS4_GPX0(7));
        host_oob_irq = gpio_to_irq(EXYNOS4_GPX0(7));
        gpio_direction_input(EXYNOS4_GPX0(7));
 #endif
@@ -38,7 +38,7 @@ uint bcm_wlan_get_oob_irq(void)
        host_oob_irq = wifi_irq_num();
 #endif
 #endif
-       printk("host_oob_irq: %d \r\n", host_oob_irq);
+       printf("host_oob_irq: %d \r\n", host_oob_irq);
 
        return host_oob_irq;
 }
@@ -52,7 +52,7 @@ uint bcm_wlan_get_oob_irq_flags(void)
 #else
        host_oob_irq_flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_SHAREABLE;
 #endif
-       printk("host_oob_irq_flags=%d\n", host_oob_irq_flags);
+       printf("host_oob_irq_flags=%d\n", host_oob_irq_flags);
 
        return host_oob_irq_flags;
 }
@@ -63,7 +63,7 @@ int bcm_wlan_set_power(bool on)
        int err = 0;
 
        if (on) {
-               printk("======== PULL WL_REG_ON HIGH! ========\n");
+               printf("======== PULL WL_REG_ON HIGH! ========\n");
 #ifdef CONFIG_MACH_ODROID_4210
                err = gpio_set_value(EXYNOS4_GPK1(0), 1);
 #endif
@@ -77,7 +77,7 @@ int bcm_wlan_set_power(bool on)
                /* Lets customer power to get stable */
                mdelay(100);
        } else {
-               printk("======== PULL WL_REG_ON LOW! ========\n");
+               printf("======== PULL WL_REG_ON LOW! ========\n");
 #ifdef CONFIG_MACH_ODROID_4210
                err = gpio_set_value(EXYNOS4_GPK1(0), 0);
 #endif
@@ -95,7 +95,7 @@ int bcm_wlan_set_carddetect(bool present)
        int err = 0;
 
        if (present) {
-               printk("======== Card detection to detect SDIO card! ========\n");
+               printf("======== Card detection to detect SDIO card! ========\n");
 #ifdef CONFIG_MACH_ODROID_4210
                err = sdhci_s3c_force_presence_change(&sdmmc_channel, 1);
 #endif
@@ -103,7 +103,7 @@ int bcm_wlan_set_carddetect(bool present)
                sdio_reinit();
 #endif
        } else {
-               printk("======== Card detection to remove SDIO card! ========\n");
+               printf("======== Card detection to remove SDIO card! ========\n");
 #ifdef CONFIG_MACH_ODROID_4210
                err = sdhci_s3c_force_presence_change(&sdmmc_channel, 0);
 #endif
@@ -120,7 +120,7 @@ int bcm_wlan_get_mac_address(unsigned char *buf)
 {
        int err = 0;
 
-       printk("======== %s ========\n", __FUNCTION__);
+       printf("======== %s ========\n", __FUNCTION__);
 #ifdef EXAMPLE_GET_MAC
        /* EXAMPLE code */
        {
@@ -139,18 +139,18 @@ void* bcm_wlan_prealloc(int section, unsigned long size)
        void *alloc_ptr = NULL;
        alloc_ptr = bcmdhd_mem_prealloc(section, size);
        if (alloc_ptr) {
-               printk("success alloc section %d, size %ld\n", section, size);
+               printf("success alloc section %d, size %ld\n", section, size);
                if (size != 0L)
                        bzero(alloc_ptr, size);
                return alloc_ptr;
        }
-       printk("can't alloc section %d\n", section);
+       printf("can't alloc section %d\n", section);
        return NULL;
 }
 #endif
 
 int bcm_wlan_set_plat_data(void) {
-       printk("======== %s ========\n", __FUNCTION__);
+       printf("======== %s ========\n", __FUNCTION__);
        dhd_wlan_control.set_power = bcm_wlan_set_power;
        dhd_wlan_control.set_carddetect = bcm_wlan_set_carddetect;
        dhd_wlan_control.get_mac_addr = bcm_wlan_get_mac_address;
index 3933f1471cce1601003a99f5718b0231a222115e..8e08ce8b839b560c00574f5e48b324e6111302f1 100644 (file)
@@ -4227,7 +4227,7 @@ dhd_stop(struct net_device *net)
        dhd_info_t *dhd = DHD_DEV_INFO(net);
        DHD_OS_WAKE_LOCK(&dhd->pub);
        DHD_PERIM_LOCK(&dhd->pub);
-       printk("%s: Enter %p\n", __FUNCTION__, net);
+       printf("%s: Enter %p\n", __FUNCTION__, net);
        if (dhd->pub.up == 0) {
                goto exit;
        }
@@ -4290,7 +4290,7 @@ exit:
                dhd->pub.dhd_cspec.ccode[0] = 0x00;
        }
 
-       printk("%s: Exit\n", __FUNCTION__);
+       printf("%s: Exit\n", __FUNCTION__);
        DHD_PERIM_UNLOCK(&dhd->pub);
        DHD_OS_WAKE_UNLOCK(&dhd->pub);
        return 0;
@@ -4336,7 +4336,7 @@ dhd_open(struct net_device *net)
        int ifidx;
        int32 ret = 0;
 
-       printk("%s: Enter %p\n", __FUNCTION__, net);
+       printf("%s: Enter %p\n", __FUNCTION__, net);
 #if defined(MULTIPLE_SUPPLICANT)
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)) && 1
        if (mutex_is_locked(&_dhd_sdio_mutex_lock_) != 0) {
@@ -4457,7 +4457,7 @@ exit:
 #endif
 #endif /* MULTIPLE_SUPPLICANT */
 
-       printk("%s: Exit ret=%d\n", __FUNCTION__, ret);
+       printf("%s: Exit ret=%d\n", __FUNCTION__, ret);
        return ret;
 }
 
@@ -6094,6 +6094,8 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        DHD_TRACE(("Enter %s\n", __FUNCTION__));
 
        dhd_conf_set_band(dhd);
+       printf("%s: Set tcpack_sup_mode %d\n", __FUNCTION__, dhd->conf->tcpack_sup_mode);
+       dhd_tcpack_suppress_set(dhd, dhd->conf->tcpack_sup_mode);
 
        dhd->op_mode = 0;
        if ((!op_mode && dhd_get_fw_mode(dhd->info) == DHD_FLAG_MFG_MODE) ||
@@ -6114,7 +6116,8 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
                bcm_mkiovar("cur_etheraddr", (void *)&ea_addr, ETHER_ADDR_LEN, buf, sizeof(buf));
                ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, buf, sizeof(buf), TRUE, 0);
                if (ret < 0) {
-                       DHD_ERROR(("%s: can't set MAC address , error=%d\n", __FUNCTION__, ret));
+                       DHD_ERROR(("%s: can't set MAC address MAC="MACDBG", error=%d\n",
+                               __FUNCTION__, MAC2STRDBG(ea_addr.octet), ret));
                        ret = BCME_NOTUP;
                        goto done;
                }
@@ -6590,7 +6593,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        setbit(eventmask, WLC_E_TXFAIL);
 #endif
        setbit(eventmask, WLC_E_JOIN_START);
-       setbit(eventmask, WLC_E_SCAN_COMPLETE);
+//     setbit(eventmask, WLC_E_SCAN_COMPLETE); // terence 20150628: remove redundant event
 #ifdef WLMEDIA_HTSF
        setbit(eventmask, WLC_E_HTSFSYNC);
 #endif /* WLMEDIA_HTSF */
@@ -7595,7 +7598,7 @@ dhd_clear(dhd_pub_t *dhdp)
 static void
 dhd_module_cleanup(void)
 {
-       printk("%s: Enter\n", __FUNCTION__);
+       printf("%s: Enter\n", __FUNCTION__);
 
        dhd_bus_unregister();
 
@@ -7605,7 +7608,7 @@ dhd_module_cleanup(void)
 #ifdef CUSTOMER_HW_AMLOGIC
        wifi_teardown_dt();
 #endif
-       printk("%s: Exit\n", __FUNCTION__);
+       printf("%s: Exit\n", __FUNCTION__);
 }
 
 static void __exit
@@ -7621,10 +7624,10 @@ dhd_module_init(void)
        int err;
        int retry = POWERUP_MAX_RETRY;
 
-       printk("%s: in\n", __FUNCTION__);
+       printf("%s: in\n", __FUNCTION__);
 #ifdef CUSTOMER_HW_AMLOGIC
        if (wifi_setup_dt()) {
-               printk("wifi_dt : fail to setup dt\n");
+               printf("wifi_dt : fail to setup dt\n");
        }
 #endif
 
@@ -7663,7 +7666,7 @@ dhd_module_init(void)
                DHD_ERROR(("%s: Failed to load driver max retry reached**\n", __FUNCTION__));
        }
 
-       printk("%s: Exit err=%d\n", __FUNCTION__, err);
+       printf("%s: Exit err=%d\n", __FUNCTION__, err);
        return err;
 }
 
index ed41c818670603c1c9d8d220ef4061d812311c81..0d5ce7ef0103b0a412271beb0aa2b9a76a9d4de0 100644 (file)
@@ -857,10 +857,11 @@ dhdpcie_download_firmware(struct dhd_bus *bus, osl_t *osh)
        dhd_conf_preinit(bus->dhd);
        dhd_conf_read_config(bus->dhd, bus->dhd->conf_path);
        dhd_conf_set_fw_name_by_chip(bus->dhd, bus->fw_path);
+       dhd_conf_set_nv_name_by_chip(bus->dhd, bus->nv_path);
 
-       printk("Final fw_path=%s\n", bus->fw_path);
-       printk("Final nv_path=%s\n", bus->nv_path);
-       printk("Final conf_path=%s\n", bus->dhd->conf_path);
+       printf("Final fw_path=%s\n", bus->fw_path);
+       printf("Final nv_path=%s\n", bus->nv_path);
+       printf("Final conf_path=%s\n", bus->dhd->conf_path);
 
        ret = _dhdpcie_download_firmware(bus);
 
@@ -884,7 +885,7 @@ dhdpcie_download_code_file(struct dhd_bus *bus, char *pfw_path)
         */
        image = dhd_os_open_image(pfw_path);
        if (image == NULL) {
-               printk("%s: Open firmware file failed %s\n", __FUNCTION__, pfw_path);
+               printf("%s: Open firmware file failed %s\n", __FUNCTION__, pfw_path);
                goto err;
        }
 
@@ -955,7 +956,7 @@ dhdpcie_download_nvram(struct dhd_bus *bus)
        if (nvram_file_exists) {
                image = dhd_os_open_image(pnv_path);
                if (image == NULL) {
-                       printk("%s: Open nvram file failed %s\n", __FUNCTION__, pnv_path);
+                       printf("%s: Open nvram file failed %s\n", __FUNCTION__, pnv_path);
                        goto err;
                }
        }
index 7b4476cce021ee5c2ad52940e98ae1c9e24d9253..1efa3f8eb15607b8e74d9fdf3200de2ba66d0de5 100644 (file)
@@ -4314,7 +4314,7 @@ dhd_txglom_enable(dhd_pub_t *dhdp, bool enable)
        } else
 #endif /* BCMSDIOH_TXGLOM */
                bus->txglom_enable = FALSE;
-       printk("%s: enable %d\n",  __FUNCTION__, bus->txglom_enable);
+       printf("%s: enable %d\n",  __FUNCTION__, bus->txglom_enable);
 }
 
 int
@@ -7663,9 +7663,9 @@ dhdsdio_download_firmware(struct dhd_bus *bus, osl_t *osh, void *sdh)
        dhd_conf_set_fw_name_by_mac(bus->dhd, bus->sdh, bus->fw_path);
        dhd_conf_set_nv_name_by_mac(bus->dhd, bus->sdh, bus->nv_path);
 
-       printk("Final fw_path=%s\n", bus->fw_path);
-       printk("Final nv_path=%s\n", bus->nv_path);
-       printk("Final conf_path=%s\n", bus->dhd->conf_path);
+       printf("Final fw_path=%s\n", bus->fw_path);
+       printf("Final nv_path=%s\n", bus->nv_path);
+       printf("Final conf_path=%s\n", bus->dhd->conf_path);
 
        ret = _dhdsdio_download_firmware(bus);
 
@@ -7996,7 +7996,7 @@ dhdsdio_download_code_file(struct dhd_bus *bus, char *pfw_path)
 
        image = dhd_os_open_image(pfw_path);
        if (image == NULL) {
-               printk("%s: Open firmware file failed %s\n", __FUNCTION__, pfw_path);
+               printf("%s: Open firmware file failed %s\n", __FUNCTION__, pfw_path);
                goto err;
        }
 
@@ -8118,7 +8118,7 @@ dhdsdio_download_nvram(struct dhd_bus *bus)
        if (nvram_file_exists) {
                image = dhd_os_open_image(pnv_path);
                if (image == NULL) {
-                       printk("%s: Open nvram file failed %s\n", __FUNCTION__, pnv_path);
+                       printf("%s: Open nvram file failed %s\n", __FUNCTION__, pnv_path);
                        goto err;
                }
        }
@@ -8396,14 +8396,14 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
                        dhd_txglom_enable(dhdp, FALSE);
                        dhd_os_sdunlock(dhdp);
 
-                       printk("%s:  WLAN OFF DONE\n", __FUNCTION__);
+                       printf("%s:  WLAN OFF DONE\n", __FUNCTION__);
                        /* App can now remove power from device */
                } else
                        bcmerror = BCME_SDIO_ERROR;
        } else {
                /* App must have restored power to device before calling */
 
-               printk("\n\n%s: == WLAN ON ==\n", __FUNCTION__);
+               printf("\n\n%s: == WLAN ON ==\n", __FUNCTION__);
 
                if (bus->dhd->dongle_reset) {
                        /* Turn on WLAN */
@@ -8452,9 +8452,9 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
                                dhd_os_sdunlock(dhdp);
                } else {
                        bcmerror = BCME_SDIO_ERROR;
-                       printk("%s called when dongle is not in reset\n",
+                       printf("%s called when dongle is not in reset\n",
                                __FUNCTION__);
-                       printk("Will call dhd_bus_start instead\n");
+                       printf("Will call dhd_bus_start instead\n");
                        dhd_bus_resume(dhdp, 1);
 #if defined(HW_OOB)
                        dhd_conf_set_hw_oob_intr(bus->sdh, bus->sih->chip); // terence 20120615: fix for OOB initial issue
index 131a808418f990723b00617fc0bc5098039d2b8d..1ebd3ee93ae709aaad168acd39f67864d74a852f 100644 (file)
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/err.h>
-#include <linux/skbuff.h>
-#include <linux/wlan_plat.h>
-
-#define CONFIG_BROADCOM_WIFI_RESERVED_MEM
-
-#ifdef CONFIG_BROADCOM_WIFI_RESERVED_MEM
-
-#define WLAN_STATIC_PKT_BUF                    4
-#define WLAN_STATIC_SCAN_BUF0          5
-#define WLAN_STATIC_SCAN_BUF1          6
-#define WLAN_STATIC_DHD_INFO           7
-#define PREALLOC_WLAN_SEC_NUM          5
-#define PREALLOC_WLAN_BUF_NUM          160
-#define PREALLOC_WLAN_SECTION_HEADER   24
-
-#define WLAN_SECTION_SIZE_0    (PREALLOC_WLAN_BUF_NUM * 128)
-#define WLAN_SECTION_SIZE_1    (PREALLOC_WLAN_BUF_NUM * 128)
-#define WLAN_SECTION_SIZE_2    (PREALLOC_WLAN_BUF_NUM * 512)
-#define WLAN_SECTION_SIZE_3    (PREALLOC_WLAN_BUF_NUM * 1024)
-#define WLAN_SECTION_SIZE_7    (PREALLOC_WLAN_BUF_NUM * 128)
-
-#define DHD_SKB_HDRSIZE                        336
-#define DHD_SKB_1PAGE_BUFSIZE  ((PAGE_SIZE*1)-DHD_SKB_HDRSIZE)
-#define DHD_SKB_2PAGE_BUFSIZE  ((PAGE_SIZE*2)-DHD_SKB_HDRSIZE)
-#define DHD_SKB_4PAGE_BUFSIZE  ((PAGE_SIZE*4)-DHD_SKB_HDRSIZE)
-
-#define WLAN_SKB_BUF_NUM       17
-
-static struct sk_buff *wlan_static_skb[WLAN_SKB_BUF_NUM];
-
-struct wlan_mem_prealloc {
-       void *mem_ptr;
-       unsigned long size;
-};
-
-static struct wlan_mem_prealloc wlan_mem_array[PREALLOC_WLAN_SEC_NUM] = {
-       {NULL, (WLAN_SECTION_SIZE_0 + PREALLOC_WLAN_SECTION_HEADER)},
-       {NULL, (WLAN_SECTION_SIZE_1 + PREALLOC_WLAN_SECTION_HEADER)},
-       {NULL, (WLAN_SECTION_SIZE_2 + PREALLOC_WLAN_SECTION_HEADER)},
-       {NULL, (WLAN_SECTION_SIZE_3 + PREALLOC_WLAN_SECTION_HEADER)},
-       {NULL, (WLAN_SECTION_SIZE_7 + PREALLOC_WLAN_SECTION_HEADER)}
-};
-
-void *wlan_static_scan_buf0;
-void *wlan_static_scan_buf1;
-void *bcmdhd_mem_prealloc(int section, unsigned long size)
-{
-       if (section == WLAN_STATIC_PKT_BUF) {
-               printk("1 %s: section=%d, wlan_static_skb=%p\n",
-                       __FUNCTION__, section, wlan_static_skb);
-               return wlan_static_skb;
-       }
-       if (section == WLAN_STATIC_SCAN_BUF0) {
-               printk("2 %s: section=%d, wlan_static_scan_buf0=%p\n",
-                       __FUNCTION__, section, wlan_static_scan_buf0);
-               return wlan_static_scan_buf0;
-       }
-       if (section == WLAN_STATIC_SCAN_BUF1) {
-               printk("3 %s: section=%d, wlan_static_scan_buf1=%p\n",
-                       __FUNCTION__, section, wlan_static_scan_buf1);
-               return wlan_static_scan_buf1;
-       }
-       if (section == WLAN_STATIC_DHD_INFO) {
-               printk("4 %s: section=%d, wlan_mem_array[4]=%p\n",
-                       __FUNCTION__, section, wlan_mem_array[4].mem_ptr);
-               return wlan_mem_array[4].mem_ptr;
-       }
-       if ((section < 0) || (section > PREALLOC_WLAN_SEC_NUM)) {
-               printk("5 %s: out of section %d\n", __FUNCTION__, section);
-               return NULL;
-       }
-
-       if (wlan_mem_array[section].size < size) {
-               printk("6 %s: wlan_mem_array[section].size=%lu, size=%lu\n",
-                       __FUNCTION__, wlan_mem_array[section].size, size);
-               return NULL;
-       }
-       printk("7 %s: wlan_mem_array[section].mem_ptr=%p, size=%lu\n",
-               __FUNCTION__, &wlan_mem_array[section], size);
-
-       return wlan_mem_array[section].mem_ptr;
-}
-
-EXPORT_SYMBOL(bcmdhd_mem_prealloc);
-
+#include <linux/module.h>\r
+#include <linux/kernel.h>\r
+#include <linux/init.h>\r
+#include <linux/platform_device.h>\r
+#include <linux/delay.h>\r
+#include <linux/err.h>\r
+#include <linux/skbuff.h>\r
+#include <linux/wlan_plat.h>\r
+\r
+#define CONFIG_BROADCOM_WIFI_RESERVED_MEM\r
+\r
+#ifdef CONFIG_BROADCOM_WIFI_RESERVED_MEM\r
+\r
+#define WLAN_STATIC_PKT_BUF                    4\r
+#define WLAN_STATIC_SCAN_BUF0          5\r
+#define WLAN_STATIC_SCAN_BUF1          6\r
+#define WLAN_STATIC_DHD_INFO           7\r
+#define WLAN_STATIC_DHD_WLFC_INFO              8\r
+#define PREALLOC_WLAN_SEC_NUM          6\r
+#define PREALLOC_WLAN_BUF_NUM          160\r
+#define PREALLOC_WLAN_SECTION_HEADER   24\r
+\r
+#define WLAN_SECTION_SIZE_0    (PREALLOC_WLAN_BUF_NUM * 128)\r
+#define WLAN_SECTION_SIZE_1    (PREALLOC_WLAN_BUF_NUM * 128)\r
+#define WLAN_SECTION_SIZE_2    (PREALLOC_WLAN_BUF_NUM * 512)\r
+#define WLAN_SECTION_SIZE_3    (PREALLOC_WLAN_BUF_NUM * 1024)\r
+#define WLAN_SECTION_SIZE_7    (PREALLOC_WLAN_BUF_NUM * 128)\r
+#define WLAN_SECTION_SIZE_8    (PREALLOC_WLAN_BUF_NUM * 512)\r
+\r
+#define DHD_SKB_HDRSIZE                        336\r
+#define DHD_SKB_1PAGE_BUFSIZE  ((PAGE_SIZE*1)-DHD_SKB_HDRSIZE)\r
+#define DHD_SKB_2PAGE_BUFSIZE  ((PAGE_SIZE*2)-DHD_SKB_HDRSIZE)\r
+#define DHD_SKB_4PAGE_BUFSIZE  ((PAGE_SIZE*4)-DHD_SKB_HDRSIZE)\r
+\r
+#define WLAN_SKB_BUF_NUM       17\r
+\r
+static struct sk_buff *wlan_static_skb[WLAN_SKB_BUF_NUM];\r
+\r
+struct wlan_mem_prealloc {\r
+       void *mem_ptr;\r
+       unsigned long size;\r
+};\r
+\r
+static struct wlan_mem_prealloc wlan_mem_array[PREALLOC_WLAN_SEC_NUM] = {\r
+       {NULL, (WLAN_SECTION_SIZE_0 + PREALLOC_WLAN_SECTION_HEADER)},\r
+       {NULL, (WLAN_SECTION_SIZE_1 + PREALLOC_WLAN_SECTION_HEADER)},\r
+       {NULL, (WLAN_SECTION_SIZE_2 + PREALLOC_WLAN_SECTION_HEADER)},\r
+       {NULL, (WLAN_SECTION_SIZE_3 + PREALLOC_WLAN_SECTION_HEADER)},\r
+       {NULL, (WLAN_SECTION_SIZE_7 + PREALLOC_WLAN_SECTION_HEADER)},\r
+       {NULL, (WLAN_SECTION_SIZE_8 + PREALLOC_WLAN_SECTION_HEADER)}\r
+};\r
+\r
+void *wlan_static_scan_buf0;\r
+void *wlan_static_scan_buf1;\r
+void *bcmdhd_mem_prealloc(int section, unsigned long size)\r
+{\r
+       if (section == WLAN_STATIC_PKT_BUF) {\r
+               printk("1 %s: section=%d, wlan_static_skb=%p\n",\r
+                       __FUNCTION__, section, wlan_static_skb);\r
+               return wlan_static_skb;\r
+       }\r
+       if (section == WLAN_STATIC_SCAN_BUF0) {\r
+               printk("2 %s: section=%d, wlan_static_scan_buf0=%p\n",\r
+                       __FUNCTION__, section, wlan_static_scan_buf0);\r
+               return wlan_static_scan_buf0;\r
+       }\r
+       if (section == WLAN_STATIC_SCAN_BUF1) {\r
+               printk("3 %s: section=%d, wlan_static_scan_buf1=%p\n",\r
+                       __FUNCTION__, section, wlan_static_scan_buf1);\r
+               return wlan_static_scan_buf1;\r
+       }\r
+       if (section == WLAN_STATIC_DHD_INFO) {\r
+               printk("4 %s: section=%d, wlan_mem_array[4]=%p\n",\r
+                       __FUNCTION__, section, wlan_mem_array[4].mem_ptr);\r
+               return wlan_mem_array[4].mem_ptr;\r
+       }\r
+       if (section == WLAN_STATIC_DHD_WLFC_INFO) {\r
+               printk("5 %s: section=%d, wlan_mem_array[5]=%p\n",\r
+                       __FUNCTION__, section, wlan_mem_array[5].mem_ptr);\r
+               return wlan_mem_array[5].mem_ptr;\r
+       }\r
+       if ((section < 0) || (section > PREALLOC_WLAN_SEC_NUM)) {\r
+               printk("6 %s: out of section %d\n", __FUNCTION__, section);\r
+               return NULL;\r
+       }\r
+\r
+       if (wlan_mem_array[section].size < size) {\r
+               printk("7 %s: wlan_mem_array[section].size=%lu, size=%lu\n",\r
+                       __FUNCTION__, wlan_mem_array[section].size, size);\r
+               return NULL;\r
+       }\r
+       printk("8 %s: wlan_mem_array[section].mem_ptr=%p, size=%lu\n",\r
+               __FUNCTION__, &wlan_mem_array[section], size);\r
+\r
+       return wlan_mem_array[section].mem_ptr;\r
+}\r
+\r
+EXPORT_SYMBOL(bcmdhd_mem_prealloc);\r
+\r
 int bcmdhd_init_wlan_mem(void)
-{
-       int i;
-       int j;
-
-       for (i=0; i<8; i++) {
-               wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_1PAGE_BUFSIZE);
-               if (!wlan_static_skb[i])
+{\r
+       int i;\r
+       int j;\r
+\r
+       for (i=0; i<8; i++) {\r
+               wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_1PAGE_BUFSIZE);\r
+               if (!wlan_static_skb[i])\r
                        goto err_skb_alloc;
-               printk("1 %s: wlan_static_skb[%d]=%p, size=%lu\n",
-                       __FUNCTION__, i, wlan_static_skb[i], DHD_SKB_1PAGE_BUFSIZE);
-       }
-
-       for (; i<16; i++) {
-               wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_2PAGE_BUFSIZE);
-               if (!wlan_static_skb[i])
+               printk("1 %s: wlan_static_skb[%d]=%p, size=%lu\n",\r
+                       __FUNCTION__, i, wlan_static_skb[i], DHD_SKB_1PAGE_BUFSIZE);\r
+       }\r
+\r
+       for (; i<16; i++) {\r
+               wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_2PAGE_BUFSIZE);\r
+               if (!wlan_static_skb[i])\r
                        goto err_skb_alloc;
-               printk("2 %s: wlan_static_skb[%d]=%p, size=%lu\n",
-                       __FUNCTION__, i, wlan_static_skb[i], DHD_SKB_2PAGE_BUFSIZE);
-       }
-
-       wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_4PAGE_BUFSIZE);
-       if (!wlan_static_skb[i])
+               printk("2 %s: wlan_static_skb[%d]=%p, size=%lu\n",\r
+                       __FUNCTION__, i, wlan_static_skb[i], DHD_SKB_2PAGE_BUFSIZE);\r
+       }\r
+\r
+       wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_4PAGE_BUFSIZE);\r
+       if (!wlan_static_skb[i])\r
                goto err_skb_alloc;
-       printk("3 %s: wlan_static_skb[%d]=%p, size=%lu\n",
-               __FUNCTION__, i, wlan_static_skb[i], DHD_SKB_4PAGE_BUFSIZE);
-
-       for (i=0; i<PREALLOC_WLAN_SEC_NUM; i++) {
-               wlan_mem_array[i].mem_ptr =
-                               kmalloc(wlan_mem_array[i].size, GFP_KERNEL);
-
-               if (!wlan_mem_array[i].mem_ptr)
-                       goto err_mem_alloc;
-               printk("4 %s: wlan_mem_array[%d]=%p, size=%lu\n",
-                       __FUNCTION__, i, wlan_static_skb[i], wlan_mem_array[i].size);
-       }
-
-       wlan_static_scan_buf0 = kmalloc (65536, GFP_KERNEL);
+       printk("3 %s: wlan_static_skb[%d]=%p, size=%lu\n",\r
+               __FUNCTION__, i, wlan_static_skb[i], DHD_SKB_4PAGE_BUFSIZE);\r
+\r
+       for (i=0; i<PREALLOC_WLAN_SEC_NUM; i++) {\r
+               wlan_mem_array[i].mem_ptr =\r
+                               kmalloc(wlan_mem_array[i].size, GFP_KERNEL);\r
+\r
+               if (!wlan_mem_array[i].mem_ptr)\r
+                       goto err_mem_alloc;\r
+               printk("4 %s: wlan_mem_array[%d]=%p, size=%lu\n",\r
+                       __FUNCTION__, i, wlan_static_skb[i], wlan_mem_array[i].size);\r
+       }\r
+\r
+       wlan_static_scan_buf0 = kmalloc (65536, GFP_KERNEL);\r
        if (!wlan_static_scan_buf0)
-               goto err_mem_alloc;
-       printk("5 %s: wlan_static_scan_buf0=%p, size=%d\n",
-               __FUNCTION__, wlan_static_scan_buf0, 65536);
-
-       wlan_static_scan_buf1 = kmalloc (65536, GFP_KERNEL);
+               goto err_mem_alloc;\r
+       printk("5 %s: wlan_static_scan_buf0=%p, size=%d\n",\r
+               __FUNCTION__, wlan_static_scan_buf0, 65536);\r
+\r
+       wlan_static_scan_buf1 = kmalloc (65536, GFP_KERNEL);\r
        if (!wlan_static_scan_buf1)
-               goto err_mem_alloc;
-       printk("6 %s: wlan_static_scan_buf1=%p, size=%d\n",
-               __FUNCTION__, wlan_static_scan_buf1, 65536);
-
-       printk("%s: WIFI MEM Allocated\n", __FUNCTION__);
-       return 0;
-
-err_mem_alloc:
-       pr_err("Failed to mem_alloc for WLAN\n");
-       for (j=0; j<i; j++)
-               kfree(wlan_mem_array[j].mem_ptr);
-
-       i = WLAN_SKB_BUF_NUM;
-
-err_skb_alloc:
-       pr_err("Failed to skb_alloc for WLAN\n");
-       for (j=0; j<i; j++)
-               dev_kfree_skb(wlan_static_skb[j]);
-
-       return -ENOMEM;
-}
-#endif /* CONFIG_BROADCOM_WIFI_RESERVED_MEM */
-
-static int __init bcmdhd_wlan_init(void)
-{
-       printk("%s()\n", __FUNCTION__);
-
-#ifdef CONFIG_BROADCOM_WIFI_RESERVED_MEM
-       bcmdhd_init_wlan_mem();
-#endif
-
-       return 0;
-}
-
-__initcall(bcmdhd_wlan_init);
+               goto err_mem_alloc;\r
+       printk("6 %s: wlan_static_scan_buf1=%p, size=%d\n",\r
+               __FUNCTION__, wlan_static_scan_buf1, 65536);\r
+\r
+       printk("%s: WIFI MEM Allocated\n", __FUNCTION__);\r
+       return 0;\r
+\r
+err_mem_alloc:\r
+       pr_err("Failed to mem_alloc for WLAN\n");\r
+       for (j=0; j<i; j++)\r
+               kfree(wlan_mem_array[j].mem_ptr);\r
+\r
+       i = WLAN_SKB_BUF_NUM;\r
+\r
+err_skb_alloc:\r
+       pr_err("Failed to skb_alloc for WLAN\n");\r
+       for (j=0; j<i; j++)\r
+               dev_kfree_skb(wlan_static_skb[j]);\r
+\r
+       return -ENOMEM;\r
+}\r
+#endif /* CONFIG_BROADCOM_WIFI_RESERVED_MEM */\r
+\r
+static int __init bcmdhd_wlan_init(void)\r
+{\r
+       printk("%s()\n", __FUNCTION__);\r
+\r
+#ifdef CONFIG_BROADCOM_WIFI_RESERVED_MEM\r
+       bcmdhd_init_wlan_mem();\r
+#endif\r
+\r
+       return 0;\r
+}\r
+\r
+__initcall(bcmdhd_wlan_init);\r
index a33ded17c646950ddccde6bca8ed6c0f724b2c8f..92be066ca0d0637483b58a55ddd867a41d82647b 100644 (file)
@@ -25,6 +25,6 @@
 #define EPI_VERSION_DEV                1.201.59
 
 /* Driver Version String, ASCII, 32 chars max */
-#define        EPI_VERSION_STR         "1.201.59.4 (r506368)"
+#define        EPI_VERSION_STR         "1.201.59.5 (r506368)"
 
 #endif /* _epivers_h_ */
index 5729fc4814184e178a957c39dca60629b66feedb..23bafaf57d5e39211aaef75ec5c19e7f4ec07a5b 100644 (file)
@@ -924,9 +924,9 @@ int wl_android_wifi_on(struct net_device *dev)
                return -EINVAL;
        }
 
-       printk("%s in 1\n", __FUNCTION__);
+       printf("%s in 1\n", __FUNCTION__);
        dhd_net_if_lock(dev);
-       printk("%s in 2: g_wifi_on=%d\n", __FUNCTION__, g_wifi_on);
+       printf("%s in 2: g_wifi_on=%d\n", __FUNCTION__, g_wifi_on);
        if (!g_wifi_on) {
                do {
                        dhd_net_wifi_platform_set_power(dev, TRUE, WIFI_TURNON_DELAY);
@@ -968,7 +968,7 @@ int wl_android_wifi_on(struct net_device *dev)
        }
 
 exit:
-       printk("%s: Success\n", __FUNCTION__);
+       printf("%s: Success\n", __FUNCTION__);
        dhd_net_if_unlock(dev);
        return ret;
 
@@ -977,7 +977,7 @@ err:
        dhd_net_bus_devreset(dev, TRUE);
        dhd_net_bus_suspend(dev);
        dhd_net_wifi_platform_set_power(dev, FALSE, WIFI_TURNOFF_DELAY);
-       printk("%s: Failed\n", __FUNCTION__);
+       printf("%s: Failed\n", __FUNCTION__);
        dhd_net_if_unlock(dev);
        return ret;
 #endif
@@ -992,9 +992,9 @@ int wl_android_wifi_off(struct net_device *dev)
                return -EINVAL;
        }
 
-       printk("%s in 1\n", __FUNCTION__);
+       printf("%s in 1\n", __FUNCTION__);
        dhd_net_if_lock(dev);
-       printk("%s in 2: g_wifi_on=%d\n", __FUNCTION__, g_wifi_on);
+       printf("%s in 2: g_wifi_on=%d\n", __FUNCTION__, g_wifi_on);
        if (g_wifi_on) {
 #if defined(BCMSDIO) || defined(BCMPCIE)
                ret = dhd_net_bus_devreset(dev, TRUE);
@@ -1005,7 +1005,7 @@ int wl_android_wifi_off(struct net_device *dev)
                dhd_net_wifi_platform_set_power(dev, FALSE, WIFI_TURNOFF_DELAY);
                g_wifi_on = FALSE;
        }
-       printk("%s out\n", __FUNCTION__);
+       printf("%s out\n", __FUNCTION__);
        dhd_net_if_unlock(dev);
 
        return ret;
index bb1ac3a1043090b99bcdc1d9391afec99ae85a78..dc29e088b8aec381bc845379f6eae4c6d2f18d56 100644 (file)
@@ -1827,7 +1827,7 @@ wl_cfg80211_change_virtual_iface(struct wiphy *wiphy, struct net_device *ndev,
                        chspec = wl_cfg80211_get_shared_freq(wiphy);
 
                        wlif_type = WL_P2P_IF_GO;
-                       printk("%s : ap (%d), infra (%d), iftype: (%d)\n",
+                       printf("%s : ap (%d), infra (%d), iftype: (%d)\n",
                                ndev->name, ap, infra, type);
                        wl_set_p2p_status(cfg, IF_CHANGING);
                        wl_clr_p2p_status(cfg, IF_CHANGED);
@@ -4507,7 +4507,7 @@ wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
        err = wldev_iovar_setbuf_bsscfg(dev, "join", ext_join_params, join_params_size,
                cfg->ioctl_buf, WLC_IOCTL_MAXLEN, bssidx, &cfg->ioctl_buf_sync);
 
-       printk("Connectting with " MACDBG " channel (%d) ssid \"%s\", len (%d)\n\n",
+       printf("Connectting with " MACDBG " channel (%d) ssid \"%s\", len (%d)\n\n",
                MAC2STRDBG((u8*)(&ext_join_params->assoc.bssid)), cfg->channel,
                ext_join_params->ssid.SSID, ext_join_params->ssid.SSID_len);
 
@@ -6615,7 +6615,7 @@ wl_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
        dev = ndev_to_wlc_ndev(dev, cfg);
 #endif
        _chan = ieee80211_frequency_to_channel(chan->center_freq);
-       printk("netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
+       printf("netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
                dev->ifindex, channel_type, _chan);
 
 #ifdef CUSTOM_PLATFORM_NV_TEGRA
@@ -7887,7 +7887,7 @@ wl_cfg80211_del_station(
                sizeof(scb_val_t), true);
        if (err < 0)
                WL_ERR(("WLC_SCB_DEAUTHENTICATE_FOR_REASON err %d\n", err));
-       printk("Disconnect STA : %s scb_val.val %d\n",
+       printf("Disconnect STA : %s scb_val.val %d\n",
                bcm_ether_ntoa((const struct ether_addr *)mac_addr, eabuf),
                scb_val.val);
 
@@ -9135,16 +9135,16 @@ static s32 wl_inform_single_bss(struct bcm_cfg80211 *cfg, struct wl_bss_info *bi
                return -EINVAL;
        }
        channel = ieee80211_get_channel(wiphy, freq);
+       WL_SCAN(("BSSID %pM, channel %d, rssi %d, capa 0x04%x, mgmt_type %d, "
+               "frame_len %d, SSID \"%s\"\n", &bi->BSSID, notif_bss_info->channel,
+               notif_bss_info->rssi, mgmt->u.beacon.capab_info, mgmt_type,
+               notif_bss_info->frame_len, bi->SSID));
        if (unlikely(!channel)) {
                WL_ERR(("ieee80211_get_channel error, freq=%d, channel=%d\n",
                        freq, notif_bss_info->channel));
                kfree(notif_bss_info);
                return -EINVAL;
        }
-       WL_SCAN(("BSSID %pM, channel %d, rssi %d, capa 0x04%x, mgmt_type %d, "
-               "frame_len %d, SSID \"%s\"\n", &bi->BSSID, notif_bss_info->channel,
-               notif_bss_info->rssi, mgmt->u.beacon.capab_info, mgmt_type,
-               notif_bss_info->frame_len, bi->SSID));
 
        signal = notif_bss_info->rssi * 100;
        if (!mgmt->u.probe_resp.timestamp) {
@@ -9414,13 +9414,13 @@ exit:
                }
                sinfo.assoc_req_ies = data;
                sinfo.assoc_req_ies_len = len;
-               printk("%s: connected device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
+               printf("%s: connected device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
                cfg80211_new_sta(ndev, e->addr.octet, &sinfo, GFP_ATOMIC);
        } else if (event == WLC_E_DISASSOC_IND) {
-               printk("%s: disassociated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
+               printf("%s: disassociated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
                cfg80211_del_sta(ndev, e->addr.octet, GFP_ATOMIC);
        } else if ((event == WLC_E_DEAUTH_IND) || (event == WLC_E_DEAUTH)) {
-               printk("%s: deauthenticated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
+               printf("%s: deauthenticated device "MACDBG"\n", __FUNCTION__, MAC2STRDBG(e->addr.octet));
                cfg80211_del_sta(ndev, e->addr.octet, GFP_ATOMIC);
        }
 #endif /* LINUX_VERSION < VERSION(3,2,0) && !WL_CFG80211_STA_EVENT && !WL_COMPAT_WIRELESS */
@@ -9559,7 +9559,7 @@ wl_notify_connect_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
                        wl_link_up(cfg);
                        act = true;
                        if (!wl_get_drv_status(cfg, DISCONNECTING, ndev)) {
-                                       printk("wl_bss_connect_done succeeded with " MACDBG "\n",
+                                       printf("wl_bss_connect_done succeeded with " MACDBG "\n",
                                                MAC2STRDBG((u8*)(&e->addr)));
                                        wl_bss_connect_done(cfg, ndev, e, data, true);
                                        dhd_conf_set_phyoclscdenable((dhd_pub_t *)cfg->pub);
@@ -9591,7 +9591,7 @@ wl_notify_connect_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
                                /* WLAN_REASON_UNSPECIFIED is used for hang up event in Android */
                                reason = (reason == WLAN_REASON_UNSPECIFIED)? 0 : reason;
 
-                               printk("link down if %s may call cfg80211_disconnected. "
+                               printf("link down if %s may call cfg80211_disconnected. "
                                        "event : %d, reason=%d from " MACDBG "\n",
                                        ndev->name, event, ntoh32(e->reason),
                                        MAC2STRDBG((u8*)(&e->addr)));
@@ -9628,7 +9628,7 @@ wl_notify_connect_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
                                }
                        }
                        else if (wl_get_drv_status(cfg, CONNECTING, ndev)) {
-                               printk("link down, during connecting\n");
+                               printf("link down, during connecting\n");
 #ifdef ESCAN_RESULT_PATCH
                                if ((memcmp(connect_req_bssid, broad_bssid, ETHER_ADDR_LEN) == 0) ||
                                        (memcmp(&e->addr, broad_bssid, ETHER_ADDR_LEN) == 0) ||
@@ -9644,7 +9644,7 @@ wl_notify_connect_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev,
                                complete(&cfg->iface_disable);
 
                } else if (wl_is_nonetwork(cfg, e)) {
-                       printk("connect failed event=%d e->status %d e->reason %d \n",
+                       printf("connect failed event=%d e->status %d e->reason %d \n",
                                event, (int)ntoh32(e->status), (int)ntoh32(e->reason));
                        /* Clean up any pending scan request */
                        if (cfg->scan_request)
@@ -10007,7 +10007,7 @@ wl_bss_roaming_done(struct bcm_cfg80211 *cfg, struct net_device *ndev,
                memcpy(cfg->fbt_key, data, FBT_KEYLEN);
        }
 #endif /* WLFBT */
-       printk("wl_bss_roaming_done succeeded to " MACDBG "\n",
+       printf("wl_bss_roaming_done succeeded to " MACDBG "\n",
                MAC2STRDBG((u8*)(&e->addr)));
        dhd_conf_set_wme((dhd_pub_t *)cfg->pub);
 
@@ -10956,6 +10956,7 @@ wl_cfg80211_netdev_notifier_call(struct notifier_block * nb,
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0))
        struct net_device *dev = ptr;
 #else
+       // terence 20150701: fix for p2p connection issue
        struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 #endif
        struct wireless_dev *wdev = dev->ieee80211_ptr;
@@ -11628,7 +11629,7 @@ static void wl_cfg80211_determine_vsdb_mode(struct bcm_cfg80211 *cfg)
                        }
                }
        }
-       printk("%s concurrency is enabled\n", cfg->vsdb_mode ? "Multi Channel" : "Same Channel");
+       printf("%s concurrency is enabled\n", cfg->vsdb_mode ? "Multi Channel" : "Same Channel");
        return;
 }
 
@@ -11963,7 +11964,7 @@ s32 wl_cfg80211_attach_post(struct net_device *ndev)
                                        /* Update MAC addr for p2p0 interface here. */
                                        memcpy(cfg->p2p_net->dev_addr, ndev->dev_addr, ETH_ALEN);
                                        cfg->p2p_net->dev_addr[0] |= 0x02;
-                                       printk("%s: p2p_dev_addr="MACDBG "\n",
+                                       printf("%s: p2p_dev_addr="MACDBG "\n",
                                                cfg->p2p_net->name,
                                                MAC2STRDBG(cfg->p2p_net->dev_addr));
                                } else {
@@ -12200,7 +12201,7 @@ static s32 wl_event_handler(void *data)
 
        cfg = (struct bcm_cfg80211 *)tsk->parent;
 
-       printk("tsk Enter, tsk = 0x%p\n", tsk);
+       printf("tsk Enter, tsk = 0x%p\n", tsk);
 
        while (down_interruptible (&tsk->sema) == 0) {
                SMP_RD_BARRIER_DEPENDS();
@@ -12270,7 +12271,7 @@ static s32 wl_event_handler(void *data)
                }
                DHD_OS_WAKE_UNLOCK(cfg->pub);
        }
-       printk("%s: was terminated\n", __FUNCTION__);
+       printf("%s: was terminated\n", __FUNCTION__);
        complete_and_exit(&tsk->completed, 0);
        return 0;
 }
@@ -15060,7 +15061,7 @@ int wl_cfg80211_do_driver_init(struct net_device *net)
 void wl_cfg80211_enable_trace(u32 level)
 {
        wl_dbg_level = level;
-       printk("%s: wl_dbg_level = 0x%x\n", __FUNCTION__, wl_dbg_level);
+       printf("%s: wl_dbg_level = 0x%x\n", __FUNCTION__, wl_dbg_level);
 }
 
 #if defined(WL_SUPPORT_BACKPORTED_KPATCHES) || (LINUX_VERSION_CODE >= KERNEL_VERSION(3, \
index 58235410fbb4442999a4cc86d81f3911b940cb2f..f2133d1d55395a20caff7f2d1815005e3f2eeaad 100644 (file)
@@ -2659,7 +2659,7 @@ wl_cfgp2p_register_ndev(struct bcm_cfg80211 *cfg)
 #endif /* WL_NEWCFG_PRIVCMD_SUPPORT */
        cfg->p2p_net = net;
 
-       printk("%s: P2P Interface Registered\n", net->name);
+       printf("%s: P2P Interface Registered\n", net->name);
 
        return ret;
 }
index 219c1df032111829298aec2dfeb8de1e4ef5351a..2f826a541c38de481355d7c99011511e0bc2c6a0 100644 (file)
@@ -3418,12 +3418,12 @@ wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void* data)
                cmd = SIOCGIWAP;
                wrqu.data.length = strlen(extra);
                if (!(flags & WLC_EVENT_MSG_LINK)) {
-                       printk("%s: Link Down with BSSID="MACSTR"\n", __FUNCTION__,
+                       printf("%s: Link Down with BSSID="MACSTR"\n", __FUNCTION__,
                                MAC2STR((u8 *)wrqu.addr.sa_data));
                        bzero(wrqu.addr.sa_data, ETHER_ADDR_LEN);
                        bzero(&extra, ETHER_ADDR_LEN);
                } else {
-                       printk("%s: Link UP with BSSID="MACSTR"\n", __FUNCTION__,
+                       printf("%s: Link UP with BSSID="MACSTR"\n", __FUNCTION__,
                                MAC2STR((u8 *)wrqu.addr.sa_data));
                }
                break;
@@ -3783,7 +3783,7 @@ _iscan_sysioc_thread(void *data)
        uint32 status;
        iscan_info_t *iscan = (iscan_info_t *)data;
 
-       printk("%s: thread Enter\n", __FUNCTION__);
+       printf("%s: thread Enter\n", __FUNCTION__);
        DAEMONIZE("iscan_sysioc");
 
        status = WL_SCAN_RESULTS_PARTIAL;
@@ -3839,7 +3839,7 @@ _iscan_sysioc_thread(void *data)
                                break;
                 }
        }
-       printk("%s: was terminated\n", __FUNCTION__);
+       printf("%s: was terminated\n", __FUNCTION__);
        complete_and_exit(&iscan->sysioc_exited, 0);
 }
 
@@ -3848,7 +3848,7 @@ wl_iw_attach(struct net_device *dev, void * dhdp)
 {
        iscan_info_t *iscan = NULL;
 
-       printk("%s: Enter\n", __FUNCTION__);
+       printf("%s: Enter\n", __FUNCTION__);
 
        if (!dev)
                return 0;