From 21f5fe6e69c2917d31d33bd24df557fc04cb6f93 Mon Sep 17 00:00:00 2001 From: xxh Date: Tue, 25 Aug 2015 09:34:25 +0800 Subject: [PATCH] bcmdhd wifi:update driver 1.201.59.5 --- .../rockchip_wlan/rkwifi/bcmdhd/Makefile | 24 +- .../rkwifi/bcmdhd/bcmsdh_linux.c | 6 +- .../rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c | 10 +- .../rockchip_wlan/rkwifi/bcmdhd/bcmutils.c | 4 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd.h | 2 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd_common.c | 14 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd_config.c | 418 +++++++++++------- .../rockchip_wlan/rkwifi/bcmdhd/dhd_config.h | 6 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c | 22 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c | 39 +- .../rkwifi/bcmdhd/dhd_linux_platdev.c | 4 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c | 11 +- .../rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c | 52 ++- .../rkwifi/bcmdhd/dhd_static_buf.c | 42 +- .../rkwifi/bcmdhd/include/bcmdevs.h | 1 + .../rkwifi/bcmdhd/include/epivers.h | 2 +- .../rockchip_wlan/rkwifi/bcmdhd/wl_android.c | 34 +- .../rockchip_wlan/rkwifi/bcmdhd/wl_cfg80211.c | 76 ++-- .../rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c | 18 +- .../rockchip_wlan/rkwifi/bcmdhd/wl_iw.c | 10 +- 20 files changed, 467 insertions(+), 328 deletions(-) diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile index 81963579c8aa..8078de91f0e1 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile @@ -9,18 +9,13 @@ CONFIG_BCMDHD_OOB = y CONFIG_BCMDHD_SDIO := y #CONFIG_BCMDHD_PCIE := 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 \ -Idrivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd \ -Idrivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include @@ -33,9 +28,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 @@ -90,6 +85,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) diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_linux.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_linux.c index b4e6a8aef283..54ca0ed22d26 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_linux.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_linux.c @@ -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); diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c index f5cb07808d8c..f5621f694639 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c @@ -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; } diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmutils.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmutils.c index 4e61c9f9bafd..aafa451469ba 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmutils.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmutils.c @@ -2003,9 +2003,9 @@ process_nvram_vars(char *varbuf, unsigned int len) for (n=1; n #include +#include #if defined(BCMWDF) #include @@ -61,7 +62,6 @@ struct dhd_bus; struct dhd_prot; struct dhd_info; struct dhd_ioctl; -struct pktq; /* The level of bus communication with the dongle */ enum dhd_bus_state { diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c index 13cdf0267f12..e895a232ab1c 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_common.c @@ -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 diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c index a3aa73dfbeb5..39641e1e5fd7 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c @@ -168,14 +168,17 @@ const static char *bcm4356a2_pcie_ag_fw_name[] = { void dhd_conf_free_mac_list(wl_mac_list_ctrl_t *mac_list) { - CONFIG_TRACE(("%s called\n", __FUNCTION__)); + int i; + CONFIG_TRACE(("%s called\n", __FUNCTION__)); if (mac_list->m_mac_list_head) { - CONFIG_TRACE(("%s Free %p\n", __FUNCTION__, mac_list->m_mac_list_head)); - if (mac_list->m_mac_list_head->mac) { - CONFIG_TRACE(("%s Free %p\n", __FUNCTION__, mac_list->m_mac_list_head->mac)); - kfree(mac_list->m_mac_list_head->mac); + for (i=0; icount; i++) { + if (mac_list->m_mac_list_head[i].mac) { + CONFIG_TRACE(("%s Free mac %p\n", __FUNCTION__, mac_list->m_mac_list_head[i].mac)); + kfree(mac_list->m_mac_list_head[i].mac); + } } + CONFIG_TRACE(("%s Free m_mac_list_head %p\n", __FUNCTION__, mac_list->m_mac_list_head)); kfree(mac_list->m_mac_list_head); } mac_list->count = 0; @@ -253,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__); for (i=0; i0){ + while (i > 0) { if (fw_path[i] == '/') break; i--; } @@ -379,7 +382,7 @@ dhd_conf_set_nv_name_by_mac(dhd_pub_t *dhd, bcmsdh_info_t *sdh, char *nv_path) /* find out the last '/' */ i = strlen(nv_path); - while (i>0){ + while (i > 0) { if (nv_path[i] == '/') break; i--; } @@ -429,15 +432,15 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) /* find out the last '/' */ i = strlen(fw_path); - while (i>0){ + while (i > 0) { if (fw_path[i] == '/') break; i--; } - j = strlen(nv_path); - while (j>0){ - if (nv_path[j] == '/') break; - j--; - } + j = strlen(nv_path); + while (j>0){ + if (nv_path[j] == '/') break; + j--; + } #ifdef BAND_AG ag_type = FW_TYPE_AG; #else @@ -466,7 +469,8 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) strcpy(&fw_path[i+1], bcm43362a0_fw_name[fw_type]); else strcpy(&fw_path[i+1], bcm43362a2_fw_name[fw_type]); - strcpy(&nv_path[j+1], "nvram_AP6210.txt"); + if (strstr(nv_path, "6476") == NULL) + strcpy(&nv_path[j+1], "nvram_AP6210.txt"); break; case BCM43430_CHIP_ID: if (chiprev == BCM43430A0_CHIP_REV) @@ -486,7 +490,7 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) case BCM4324_CHIP_ID: if (chiprev == BCM43241B4_CHIP_REV) strcpy(&fw_path[i+1], bcm43241b4_ag_fw_name[fw_type]); - strcpy(&nv_path[j+1], "nvram_ap62x2.txt"); + strcpy(&nv_path[j+1], "nvram_ap62x2.txt"); break; case BCM4335_CHIP_ID: if (chiprev == BCM4335A0_CHIP_REV) @@ -499,7 +503,7 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) case BCM4339_CHIP_ID: if (chiprev == BCM4339A0_CHIP_REV) strcpy(&fw_path[i+1], bcm4339a0_ag_fw_name[fw_type]); - strcpy(&nv_path[j+1], "nvram_AP6335.txt"); + strcpy(&nv_path[j+1], "nvram_AP6335.txt"); break; case BCM4354_CHIP_ID: if (chiprev == BCM4354A1_CHIP_REV) { @@ -511,6 +515,14 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) strcpy(&nv_path[j+1], "nvram_ap6356.txt"); } break; + case BCM4356_CHIP_ID: + if (chiprev == BCM4356A2_CHIP_REV) + strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]); + break; + case BCM4371_CHIP_ID: + if (chiprev == BCM4356A2_CHIP_REV) + strcpy(&fw_path[i+1], bcm4356a2_ag_fw_name[fw_type]); + break; #endif #ifdef BCMPCIE case BCM4356_CHIP_ID: @@ -520,7 +532,7 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) #endif } - printk("%s: firmware_path=%s,nv_path=%s\n", __FUNCTION__, fw_path, nv_path); + printf("%s: firmware_path=%s\n", __FUNCTION__, fw_path); } void @@ -556,11 +568,11 @@ dhd_conf_set_nv_name_by_chip(dhd_pub_t *dhd, char *nv_path) /* find out the last '/' */ i = strlen(nv_path); - while (i>0){ + while (i > 0) { if (nv_path[i] == '/') break; i--; } - + strcpy(&nv_path[i+1], dhd->conf->nv_by_chip.m_chip_nv_path_head[matched].name); printf("%s: nvram_path=%s\n", __FUNCTION__, nv_path); @@ -585,7 +597,7 @@ dhd_conf_set_conf_path_by_nv_path(dhd_pub_t *dhd, char *conf_path, char *nv_path /* find out the last '/' */ i = strlen(conf_path); - while (i>0){ + while (i > 0) { if (conf_path[i] == '/') break; i--; } @@ -941,9 +953,9 @@ 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 - */ + * All pkt: pkt_filter_add=99 0 0 0 0x000000000000 0x000000000000 + * Netbios pkt: 120 0 0 12 0xFFFF000000000000000000FF000000000000000000000000FFFF 0x0800000000000000000000110000000000000000000000000089 + */ for(i=0; iconf->pkt_filter_add.count; i++) { dhd->pktfilter[i+dhd->pktfilter_count] = dhd->conf->pkt_filter_add.filter[i]; printf("%s: %s\n", __FUNCTION__, dhd->pktfilter[i+dhd->pktfilter_count]); @@ -957,7 +969,7 @@ dhd_conf_del_pkt_filter(dhd_pub_t *dhd, uint32 id) int i; if (dhd && dhd->conf) { - for(i=0; iconf->pkt_filter_del.count; i++) { + for (i=0; iconf->pkt_filter_del.count; i++) { if (id == dhd->conf->pkt_filter_del.id[i]) { printf("%s: %d\n", __FUNCTION__, dhd->conf->pkt_filter_del.id[i]); return true; @@ -1129,21 +1141,27 @@ dhd_conf_set_lpc(dhd_pub_t *dhd) void dhd_conf_set_disable_proptx(dhd_pub_t *dhd) -{ +{ printf("%s: set disable_proptx %d\n", __FUNCTION__, dhd->conf->disable_proptx); disable_proptx = dhd->conf->disable_proptx; } int -dhd_conf_get_pm(void *context) +dhd_conf_get_pm(dhd_pub_t *dhd) { - dhd_pub_t *dhd = context; - if (dhd && dhd->conf) return dhd->conf->pm; return -1; } +int +dhd_conf_get_tcpack_sup_mode(dhd_pub_t *dhd) +{ + if (dhd && dhd->conf) + return dhd->conf->tcpack_sup_mode; + return -1; +} + unsigned int process_config_vars(char *varbuf, unsigned int len, char *pickbuf, char *param) { @@ -1369,13 +1387,172 @@ 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) +{ + uint len_val; + int i, j; + char pick[MAXSZ_BUF]; + char *pch, *pick_tmp; + wl_mac_list_t *mac_list; + wl_mac_range_t *mac_range; + struct dhd_conf *conf = dhd->conf; + + /* Process 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 + */ + 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; ifw_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; jconf; + + /* Process nv_by_mac: + * [nv_by_mac]: The same format as fw_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; inv_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; jconf; + + /* Process nv_by_chip: + * nv_by_chip=[nv_chip_num] \ + * [chip1] [chiprev1] [nv_name1] [chip2] [chiprev2] [nv_name2] \ + * Ex: nv_by_chip=2 \ + * 43430 0 nvram_ap6212.txt 43430 1 nvram_ap6212a.txt \ + */ + 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; inv_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); + } + } +} + void dhd_conf_read_roam_params(dhd_pub_t *dhd, char *bufp, uint len) { uint len_val; char pick[MAXSZ_BUF]; struct dhd_conf *conf = dhd->conf; - + /* Process roam */ memset(pick, 0, MAXSZ_BUF); len_val = process_config_vars(bufp, len, pick, "roam_off="); @@ -1429,34 +1606,15 @@ 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; uint len, len_val; void * image = NULL; char * memblock = NULL; char *bufp, pick[MAXSZ_BUF], *pch, *pick_tmp; 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; conf_file_exists = ((conf_path != NULL) && (conf_path[0] != '\0')); @@ -1492,113 +1650,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); + dhd_conf_read_nv_by_mac(dhd, bufp, len); + dhd_conf_read_nv_by_chip(dhd, bufp, len); - /* 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; ifw_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; jnv_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; inv_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; jnv_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; inv_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: + * band=a for 5GHz only and band=b for 2.4GHz only + */ memset(pick, 0, MAXSZ_BUF); len_val = process_config_vars(bufp, len, pick, "band="); if (len_val) { @@ -1700,7 +1758,10 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path) printf("%s: dhd_master_mode = %d\n", __FUNCTION__, dhd_master_mode); } - /* Process pkt_filter_add */ +#ifdef PKT_FILTER_SUPPORT + /* Process pkt_filter_add: + * All pkt: pkt_filter_add=99 0 0 0 0x000000000000 0x000000000000 + */ memset(pick, 0, MAXSZ_BUF); len_val = process_config_vars(bufp, len, pick, "pkt_filter_add="); pick_tmp = pick; @@ -1734,6 +1795,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path) printf("%d ", conf->pkt_filter_del.id[i]); printf("\n"); } +#endif /* Process srl parameters */ memset(pick, 0, MAXSZ_BUF); @@ -1775,7 +1837,7 @@ dhd_conf_read_config(dhd_pub_t *dhd, char *conf_path) printf("%s: ampdu_ba_wsize = %d\n", __FUNCTION__, conf->ampdu_ba_wsize); } - /* Process kso parameters */ + /* Process kso_enable parameters */ memset(pick, 0, MAXSZ_BUF); len_val = process_config_vars(bufp, len, pick, "kso_enable="); if (len_val) { @@ -1880,6 +1942,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 */ + memset(pick, 0, MAXSZ_BUF); + len_val = process_config_vars(bufp, len, pick, "tcpack_sup_mode="); + if (len_val) { + conf->tcpack_sup_mode = (int)simple_strtol(pick, NULL, 10); + printf("%s: tcpack_sup_mode = %d\n", __FUNCTION__, conf->tcpack_sup_mode); + } + bcmerror = 0; } else { CONFIG_ERROR(("%s: error reading config file: %d\n", __FUNCTION__, len)); @@ -1944,7 +2014,8 @@ dhd_conf_preinit(dhd_pub_t *dhd) strcpy(conf->cspec.ccode, "ALL"); conf->cspec.rev = 0; } else if (conf->chip == BCM4335_CHIP_ID || conf->chip == BCM4339_CHIP_ID || - conf->chip == BCM4354_CHIP_ID) { + conf->chip == BCM4354_CHIP_ID || conf->chip == BCM4356_CHIP_ID || + conf->chip == BCM4345_CHIP_ID || conf->chip == BCM4371_CHIP_ID) { strcpy(conf->cspec.country_abbrev, "CN"); strcpy(conf->cspec.ccode, "CN"); conf->cspec.rev = 38; @@ -2004,9 +2075,14 @@ dhd_conf_preinit(dhd_pub_t *dhd) conf->frameburst = -1; conf->deepsleep = FALSE; conf->pm = -1; + conf->tcpack_sup_mode = TCPACK_SUP_OFF; if ((conf->chip == BCM43362_CHIP_ID) || (conf->chip == BCM4330_CHIP_ID)) { conf->disable_proptx = 1; conf->use_rxchain = 0; + } + if (conf->chip == BCM43430_CHIP_ID) { + conf->bus_rxglom = FALSE; + conf->use_rxchain = 0; } if (conf->chip == BCM4339_CHIP_ID) { conf->txbf = 1; @@ -2020,10 +2096,18 @@ dhd_conf_preinit(dhd_pub_t *dhd) if (conf->chip == BCM4356_CHIP_ID) { conf->txbf = 1; } - if (conf->chip == BCM43430_CHIP_ID) { - conf->bus_rxglom = FALSE; - conf->use_rxchain = 0; - } + if (conf->chip == BCM4371_CHIP_ID) { + conf->txbf = 1; + } +#ifdef BCMSDIO + if (conf->chip == BCM4356_CHIP_ID) { + conf->txbf = 1; + } +#elif defined(BCMPCIE) + if (conf->chip == BCM4356_CHIP_ID) { + conf->txbf = 1; + } +#endif return 0; } diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.h b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.h index 7b948cb1f291..203714af9ffb 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.h +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.h @@ -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 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; } 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); +int dhd_conf_get_tcpack_sup_mode(dhd_pub_t *dhd); int dhd_conf_preinit(dhd_pub_t *dhd); int dhd_conf_reset(dhd_pub_t *dhd); int dhd_conf_attach(dhd_pub_t *dhd); diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c index 0d1fb307ad10..6ae65426ca67 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c @@ -22,7 +22,7 @@ uint bcm_wlan_get_oob_irq(void) host_oob_irq = rockchip_wifi_get_oob_irq(); - printk("host_oob_irq: %d \r\n", host_oob_irq); + printf("host_oob_irq: %d \r\n", host_oob_irq); return host_oob_irq; } @@ -32,7 +32,7 @@ uint bcm_wlan_get_oob_irq_flags(void) uint host_oob_irq_flags = 0; host_oob_irq_flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | IORESOURCE_IRQ_SHAREABLE) & IRQF_TRIGGER_MASK; - 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; } @@ -43,10 +43,10 @@ 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"); rockchip_wifi_power(1); } else { - printk("======== PULL WL_REG_ON LOW! ========\n"); + printf("======== PULL WL_REG_ON LOW! ========\n"); rockchip_wifi_power(0); } @@ -58,10 +58,10 @@ 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"); rockchip_wifi_set_carddetect(1); } else { - printk("======== Card detection to remove SDIO card! ========\n"); + printf("======== Card detection to remove SDIO card! ========\n"); rockchip_wifi_set_carddetect(0); } @@ -71,8 +71,8 @@ int bcm_wlan_set_carddetect(bool present) 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 */ { @@ -92,18 +92,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; diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c index ed276a73bc84..bc5f017d0528 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c @@ -4223,7 +4223,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; } @@ -4286,7 +4286,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; @@ -4332,7 +4332,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) { @@ -4453,7 +4453,7 @@ exit: #endif #endif /* MULTIPLE_SUPPLICANT */ - printk("%s: Exit ret=%d\n", __FUNCTION__, ret); + printf("%s: Exit ret=%d\n", __FUNCTION__, ret); return ret; } @@ -6099,6 +6099,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) || @@ -6119,7 +6121,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; } @@ -6595,7 +6598,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 */ @@ -7600,14 +7603,14 @@ 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(); wl_android_exit(); dhd_wifi_platform_unregister_drv(); - printk("%s: Exit\n", __FUNCTION__); + printf("%s: Exit\n", __FUNCTION__); } static void @@ -7623,7 +7626,7 @@ dhd_module_init(void) int err; int retry = POWERUP_MAX_RETRY; - printk("%s: in\n", __FUNCTION__); + printf("%s: in\n", __FUNCTION__); DHD_PERIM_RADIO_INIT(); @@ -7656,7 +7659,7 @@ dhd_module_init(void) if (err) 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; } @@ -7689,16 +7692,16 @@ int rockchip_wifi_init_module_rkwifi(void) int type = get_wifi_chip_type(); if (type > WIFI_AP6XXX_SERIES) return 0; #endif - printk("=======================================================\n"); - printk("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n"); - printk("=======================================================\n"); - printk("%s WiFi driver (Powered by Rockchip,Ver %s) init.\n", WIFI_MODULE_NAME, RKWIFI_DRV_VERSION); + printf("=======================================================\n"); + printf("==== Launching Wi-Fi driver! (Powered by Rockchip) ====\n"); + printf("=======================================================\n"); + printf("%s WiFi driver (Powered by Rockchip,Ver %s) init.\n", WIFI_MODULE_NAME, RKWIFI_DRV_VERSION); #ifdef CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP { struct task_struct *kthread = kthread_run(wifi_init_thread, NULL, "wifi_init_thread"); if (kthread->pid < 0) - printk("create wifi_init_thread failed.\n"); + printf("create wifi_init_thread failed.\n"); return 0; } #else @@ -7712,9 +7715,9 @@ void rockchip_wifi_exit_module_rkwifi(void) int type = get_wifi_chip_type(); if (type > WIFI_AP6XXX_SERIES) return; #endif - printk("=======================================================\n"); - printk("== Dis-launching Wi-Fi driver! (Powered by Rockchip) ==\n"); - printk("=======================================================\n"); + printf("=======================================================\n"); + printf("== Dis-launching Wi-Fi driver! (Powered by Rockchip) ==\n"); + printf("=======================================================\n"); dhd_module_exit(); } diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_platdev.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_platdev.c index 596dc72301b4..f8efbc402876 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_platdev.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux_platdev.c @@ -53,7 +53,9 @@ extern struct wifi_platform_data dhd_wlan_control; #else static bool dts_enabled = FALSE; struct resource dhd_wlan_resources = {0}; +#ifdef CUSTOMER_HW struct wifi_platform_data dhd_wlan_control = {0}; +#endif #endif /* !defind(DHD_OF_SUPPORT) */ #endif /* !defind(CONFIG_DTS) */ @@ -432,8 +434,8 @@ static int wifi_ctrlfunc_register_drv(void) #if !defined(CONFIG_DTS) if (dts_enabled) { - adapter->wifi_plat_data = (void *)&dhd_wlan_control; #ifdef CUSTOMER_HW + adapter->wifi_plat_data = (void *)&dhd_wlan_control; bcm_wlan_set_plat_data(); #ifdef CUSTOMER_OOB adapter->irq_num = bcm_wlan_get_oob_irq(); diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c index 21a9e735481d..fe98a58cff5e 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c @@ -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; } } diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c index 508bac55ba74..43eb231bf0ee 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c @@ -367,6 +367,8 @@ typedef struct dhd_bus { #ifdef DHDENABLE_TAILPAD void *pad_pkt; #endif /* DHDENABLE_TAILPAD */ + uint txglomframes; /* Number of tx glom frames (superframes) */ + uint txglompkts; /* Number of packets from tx glom frames */ } dhd_bus_t; /* clkstate */ @@ -716,6 +718,7 @@ dhdsdio_sr_cap(dhd_bus_t *bus) (bus->sih->chip == BCM4354_CHIP_ID) || (bus->sih->chip == BCM4356_CHIP_ID) || (bus->sih->chip == BCM4358_CHIP_ID) || + (bus->sih->chip == BCM4371_CHIP_ID) || (BCM4349_CHIP(bus->sih->chip)) || (bus->sih->chip == BCM4350_CHIP_ID)) { core_capext = TRUE; @@ -736,6 +739,7 @@ dhdsdio_sr_cap(dhd_bus_t *bus) (bus->sih->chip == BCM4354_CHIP_ID) || (bus->sih->chip == BCM4356_CHIP_ID) || (bus->sih->chip == BCM4358_CHIP_ID) || + (bus->sih->chip == BCM4371_CHIP_ID) || (bus->sih->chip == BCM4350_CHIP_ID)) { uint32 enabval = 0; addr = SI_ENUM_BASE + OFFSETOF(chipcregs_t, chipcontrol_addr); @@ -747,7 +751,8 @@ dhdsdio_sr_cap(dhd_bus_t *bus) (bus->sih->chip == BCM4345_CHIP_ID) || (bus->sih->chip == BCM4354_CHIP_ID) || (bus->sih->chip == BCM4356_CHIP_ID) || - (bus->sih->chip == BCM4358_CHIP_ID)) + (bus->sih->chip == BCM4358_CHIP_ID) || + (bus->sih->chip == BCM4371_CHIP_ID)) enabval &= CC_CHIPCTRL3_SR_ENG_ENABLE; if (enabval) @@ -2119,8 +2124,11 @@ dhdsdio_sendfromq(dhd_bus_t *bus, uint maxframes) break; if (dhdsdio_txpkt(bus, SDPCM_DATA_CHANNEL, pkts, i, TRUE) != BCME_OK) dhd->tx_errors++; - else + else { dhd->dstats.tx_bytes += datalen; + bus->txglomframes++; + bus->txglompkts += num_pkt; + } cnt += i; /* In poll mode, need to check for other events */ @@ -2620,6 +2628,11 @@ dhd_bus_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf) #endif /* DHD_DEBUG */ bcm_bprintf(strbuf, "clkstate %d activity %d idletime %d idlecount %d sleeping %d\n", bus->clkstate, bus->activity, bus->idletime, bus->idlecount, bus->sleeping); + dhd_dump_pct(strbuf, "Tx: glom pct", (100 * bus->txglompkts), bus->dhd->tx_packets); + dhd_dump_pct(strbuf, ", pkts/glom", bus->txglompkts, bus->txglomframes); + bcm_bprintf(strbuf, "\n"); + bcm_bprintf(strbuf, "txglomframes %u, txglompkts %u\n", bus->txglomframes, bus->txglompkts); + bcm_bprintf(strbuf, "\n"); } void @@ -2636,6 +2649,7 @@ dhd_bus_clearcounts(dhd_pub_t *dhdp) bus->tx_sderrs = bus->fc_rcvd = bus->fc_xoff = bus->fc_xon = 0; bus->rxglomfail = bus->rxglomframes = bus->rxglompkts = 0; bus->f2rxhdrs = bus->f2rxdata = bus->f2txdata = bus->f1regdata = 0; + bus->txglomframes = bus->txglompkts = 0; } #ifdef SDTEST @@ -4300,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 @@ -5649,6 +5663,15 @@ deliver: dhd_os_sdunlock(bus->dhd); dhd_rx_frame(bus->dhd, ifidx, pkt, pkt_count, chan); dhd_os_sdlock(bus->dhd); +#if defined(SDIO_ISR_THREAD) + /* terence 20150615: fix for below error due to bussleep in watchdog after dhd_os_sdunlock here, + * so call BUS_WAKE to wake up bus again + * dhd_bcmsdh_recv_buf: Device asleep + * dhdsdio_readframes: RXHEADER FAILED: -40 + * dhdsdio_rxfail: abort command, terminate frame, send NAK + */ + BUS_WAKE(bus); +#endif } rxcount = maxframes - rxleft; #ifdef DHD_DEBUG @@ -6101,7 +6124,7 @@ dhdsdio_isr(void *arg) #if defined(SDIO_ISR_THREAD) DHD_TRACE(("Calling dhdsdio_dpc() from %s\n", __FUNCTION__)); DHD_OS_WAKE_LOCK(bus->dhd); - /* terence 20150209: dpc should be scheded again if dpc_sched is TRUE or dhd_bus_txdata can + /* terence 20150209: dpc should be scheded again if dpc_sched is TRUE or dhd_bus_txdata can not schedule anymore because dpc_sched is TRUE now. */ if (dhdsdio_dpc(bus)) { @@ -6741,6 +6764,8 @@ dhdsdio_chipmatch(uint16 chipid) return TRUE; if (chipid == BCM4358_CHIP_ID) return TRUE; + if (chipid == BCM4371_CHIP_ID) + return TRUE; if (chipid == BCM43430_CHIP_ID) return TRUE; if (BCM4349_CHIP(chipid)) @@ -7388,6 +7413,7 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva, case BCM4354_CHIP_ID: case BCM4356_CHIP_ID: case BCM4358_CHIP_ID: + case BCM4371_CHIP_ID: bus->dongle_ram_base = CR4_4350_RAM_BASE; break; case BCM4360_CHIP_ID: @@ -7637,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); @@ -7970,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; } @@ -8092,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; } } @@ -8370,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 */ @@ -8426,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 diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_static_buf.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_static_buf.c index b2f848c4a443..52885bbf680c 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_static_buf.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_static_buf.c @@ -1,11 +1,11 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #define CONFIG_BROADCOM_WIFI_RESERVED_MEM @@ -15,7 +15,8 @@ #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 WLAN_STATIC_DHD_WLFC_INFO 8 +#define PREALLOC_WLAN_SEC_NUM 6 #define PREALLOC_WLAN_BUF_NUM 160 #define PREALLOC_WLAN_SECTION_HEADER 24 @@ -24,6 +25,7 @@ #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 WLAN_SECTION_SIZE_8 (PREALLOC_WLAN_BUF_NUM * 512) #define DHD_SKB_HDRSIZE 336 #define DHD_SKB_1PAGE_BUFSIZE ((PAGE_SIZE*1)-DHD_SKB_HDRSIZE) @@ -44,7 +46,8 @@ static struct wlan_mem_prealloc wlan_mem_array[PREALLOC_WLAN_SEC_NUM] = { {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)} + {NULL, (WLAN_SECTION_SIZE_7 + PREALLOC_WLAN_SECTION_HEADER)}, + {NULL, (WLAN_SECTION_SIZE_8 + PREALLOC_WLAN_SECTION_HEADER)} }; void *wlan_static_scan_buf0; @@ -71,17 +74,22 @@ void *bcmdhd_mem_prealloc(int section, unsigned long size) __FUNCTION__, section, wlan_mem_array[4].mem_ptr); return wlan_mem_array[4].mem_ptr; } + if (section == WLAN_STATIC_DHD_WLFC_INFO) { + printk("5 %s: section=%d, wlan_mem_array[5]=%p\n", + __FUNCTION__, section, wlan_mem_array[5].mem_ptr); + return wlan_mem_array[5].mem_ptr; + } if ((section < 0) || (section > PREALLOC_WLAN_SEC_NUM)) { - printk("5 %s: out of section %d\n", __FUNCTION__, section); + printk("6 %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", + printk("7 %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", + printk("8 %s: wlan_mem_array[section].mem_ptr=%p, size=%lu\n", __FUNCTION__, &wlan_mem_array[section], size); return wlan_mem_array[section].mem_ptr; @@ -89,7 +97,7 @@ void *bcmdhd_mem_prealloc(int section, unsigned long size) EXPORT_SYMBOL(bcmdhd_mem_prealloc); -int bcmdhd_init_wlan_mem(void) +int bcmdhd_init_wlan_mem(void) { int i; int j; @@ -97,7 +105,7 @@ int bcmdhd_init_wlan_mem(void) for (i=0; i<8; i++) { wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_1PAGE_BUFSIZE); if (!wlan_static_skb[i]) - goto err_skb_alloc; + 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); } @@ -105,14 +113,14 @@ int bcmdhd_init_wlan_mem(void) for (; i<16; i++) { wlan_static_skb[i] = dev_alloc_skb(DHD_SKB_2PAGE_BUFSIZE); if (!wlan_static_skb[i]) - goto err_skb_alloc; + 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]) - goto err_skb_alloc; + 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); @@ -127,13 +135,13 @@ int bcmdhd_init_wlan_mem(void) } wlan_static_scan_buf0 = kmalloc (65536, GFP_KERNEL); - if(!wlan_static_scan_buf0) + 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); - if(!wlan_static_scan_buf1) + 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); diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/bcmdevs.h b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/bcmdevs.h index b7c386ef0e84..1c17045eb5be 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/bcmdevs.h +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/bcmdevs.h @@ -352,6 +352,7 @@ #define BCM43569_CHIP_ID 0xAA31 /* 43569 chipcommon chipid */ #define BCM43570_CHIP_ID 0xAA32 /* 43570 chipcommon chipid */ #define BCM4358_CHIP_ID 0x4358 /* 4358 chipcommon chipid */ +#define BCM4371_CHIP_ID 0x4371 /* 4371 chipcommon chipid */ #define BCM4350_CHIP(chipid) ((CHIPID(chipid) == BCM4350_CHIP_ID) || \ (CHIPID(chipid) == BCM4354_CHIP_ID) || \ (CHIPID(chipid) == BCM4356_CHIP_ID) || \ diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/epivers.h b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/epivers.h index a33ded17c646..92be066ca0d0 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/epivers.h +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include/epivers.h @@ -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_ */ diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c index b6ad0cbff06f..f8eb18e7fef9 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c @@ -117,7 +117,7 @@ uint android_msg_level = ANDROID_ERROR_LEVEL; #define CMD_MIRACAST "MIRACAST" #define CMD_NAN "NAN_" #define CMD_GET_CHANNEL "GET_CHANNEL" -#define CMD_SET_ROAM "SET_ROAM_TRIGGER" +#define CMD_SET_ROAM "SET_ROAM_TRIGGER" #define CMD_GET_ROAM "GET_ROAM_TRIGGER" #define CMD_GET_KEEP_ALIVE "GET_KEEP_ALIVE" #define CMD_GET_PM "GET_PM" @@ -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; @@ -2312,7 +2312,7 @@ struct net_device *dev, char* command, int total_len) sscanf(command, "%*s %10d", &roam_trigger[0]); roam_trigger[1] = WLC_BAND_ALL; - + ret = wldev_ioctl(dev, WLC_SET_ROAM_TRIGGER, roam_trigger, sizeof(roam_trigger), 1); if (ret) ANDROID_ERROR(("WLC_SET_ROAM_TRIGGER ERROR %d ret=%d\n", roam_trigger[0], ret)); @@ -2328,21 +2328,21 @@ struct net_device *dev, char *command, int total_len) int bytes_written; int roam_trigger[2] = {0, 0}; int trigger[2]= {0, 0}; - + roam_trigger[1] = WLC_BAND_2G; ret = wldev_ioctl(dev, WLC_GET_ROAM_TRIGGER, roam_trigger, sizeof(roam_trigger), 0); if (!ret) trigger[0] = roam_trigger[0]; - else + else ANDROID_ERROR(("2G WLC_GET_ROAM_TRIGGER ERROR %d ret=%d\n", roam_trigger[0], ret)); roam_trigger[1] = WLC_BAND_5G; ret = wldev_ioctl(dev, WLC_GET_ROAM_TRIGGER, roam_trigger, sizeof(roam_trigger), 0); if (!ret) trigger[1] = roam_trigger[0]; - else + else ANDROID_ERROR(("5G WLC_GET_ROAM_TRIGGER ERROR %d ret=%d\n", roam_trigger[0], ret)); - + ANDROID_TRACE(("roam_trigger %d %d\n", trigger[0], trigger[1])); bytes_written = snprintf(command, total_len, "%d %d", trigger[0], trigger[1]); @@ -3309,7 +3309,7 @@ wl_update_connected_rssi_cache(struct net_device *net, wl_rssi_cache_ctrl_t *rss if (!memcmp(&node->BSSID, &bssid, ETHER_ADDR_LEN)) { ANDROID_INFO(("%s: Update %d with BSSID %pM, RSSI=%d\n", __FUNCTION__, k, &bssid, rssi)); - for(j=0; jRSSI[j] = node->RSSI[j+1]; node->RSSI[j] = rssi; node->dirty = 0; @@ -3382,7 +3382,7 @@ wl_update_rssi_cache(wl_rssi_cache_ctrl_t *rssi_cache_ctrl, wl_scan_results_t *s if (!memcmp(&node->BSSID, &bi->BSSID, ETHER_ADDR_LEN)) { ANDROID_INFO(("%s: Update %d with BSSID %pM, RSSI=%d, SSID \"%s\"\n", __FUNCTION__, k, &bi->BSSID, dtoh16(bi->RSSI), bi->SSID)); - for(j=0; jRSSI[j] = node->RSSI[j+1]; node->RSSI[j] = dtoh16(bi->RSSI); node->dirty = 0; @@ -3619,10 +3619,10 @@ wl_update_bss_cache(wl_bss_cache_ctrl_t *bss_cache_ctrl, wl_scan_results_t *ss_l node = *bss_head; prev = NULL; bi = bi ? (wl_bss_info_t *)((uintptr)bi + dtoh32(bi->length)) : ss_list->bss_info; - + for (;node;) { if (!memcmp(&node->results.bss_info->BSSID, &bi->BSSID, ETHER_ADDR_LEN)) { - tmp = node; + tmp = node; leaf = kmalloc(dtoh32(bi->length) + WLC_IW_SS_CACHE_CTRL_FIELD_MAXLEN, GFP_KERNEL); if (!leaf) { ANDROID_ERROR(("%s: Memory alloc failure %d and keep old BSS info\n", diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfg80211.c index cb4fc5eefa84..f453cf87689a 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfg80211.c @@ -366,7 +366,7 @@ static s32 wl_cfg80211_del_station(struct wiphy *wiphy, static s32 wl_cfg80211_change_station(struct wiphy *wiphy, struct net_device *dev, u8 *mac, struct station_parameters *params); #endif /* WL_SUPPORT_BACKPORTED_KPATCHES || KERNEL_VER >= KERNEL_VERSION(3, 2, 0)) */ -static s32 +static s32 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) || defined(WL_COMPAT_WIRELESS) wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow); #else @@ -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) { @@ -9364,7 +9364,9 @@ wl_notify_connect_status_ap(struct bcm_cfg80211 *cfg, struct net_device *ndev, isfree = true; if (event == WLC_E_ASSOC_IND && reason == DOT11_SC_SUCCESS) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) + cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \ defined(WL_COMPAT_WIRELESS) @@ -9373,7 +9375,9 @@ wl_notify_connect_status_ap(struct bcm_cfg80211 *cfg, struct net_device *ndev, cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC); #endif /* LINUX_VERSION >= VERSION(3, 12, 0) */ } else if (event == WLC_E_DISASSOC_IND) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) + cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \ defined(WL_COMPAT_WIRELESS) @@ -9382,7 +9386,9 @@ wl_notify_connect_status_ap(struct bcm_cfg80211 *cfg, struct net_device *ndev, cfg80211_rx_mgmt(ndev, freq, mgmt_frame, len, GFP_ATOMIC); #endif /* LINUX_VERSION >= VERSION(3, 12, 0) */ } else if ((event == WLC_E_DEAUTH_IND) || (event == WLC_E_DEAUTH)) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) + cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) cfg80211_rx_mgmt(ndev, freq, 0, mgmt_frame, len, 0, GFP_ATOMIC); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \ defined(WL_COMPAT_WIRELESS) @@ -9408,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 */ @@ -9553,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); @@ -9585,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))); @@ -9622,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) || @@ -9638,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) @@ -10001,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); @@ -10545,7 +10551,9 @@ wl_notify_rx_mgmt_frame(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, WL_DBG((" device name is ndev %s \n", ndev->name)); #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) + retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) retval = cfg80211_rx_mgmt(cfgdev, freq, 0, mgmt_frame, mgmt_frame_len, 0, GFP_ATOMIC); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)) || \ defined(WL_COMPAT_WIRELESS) @@ -10943,9 +10951,14 @@ static void wl_scan_timeout(unsigned long data) static s32 wl_cfg80211_netdev_notifier_call(struct notifier_block * nb, unsigned long state, - void *ndev) + void *ptr) { - struct net_device *dev = ndev; +#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; struct bcm_cfg80211 *cfg = g_bcm_cfg; @@ -10993,7 +11006,7 @@ wl_cfg80211_netdev_notifier_call(struct notifier_block * nb, case NETDEV_UNREGISTER: /* after calling list_del_rcu(&wdev->list) */ - wl_dealloc_netinfo(cfg, ndev); + wl_dealloc_netinfo(cfg, dev); break; case NETDEV_GOING_DOWN: /* At NETDEV_DOWN state, wdev_cleanup_work work will be called. @@ -11616,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; } @@ -11951,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 { @@ -12188,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(); @@ -12258,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; } @@ -14251,7 +14264,10 @@ wl_tdls_event_handler(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, dhd_tdls_update_peer_info(ndev, TRUE, (uint8 *)&e->addr.octet[0]); #endif /* PCIE_FULL_DONGLE */ if (cfg->tdls_mgmt_frame) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) + cfg80211_rx_mgmt(cfgdev, cfg->tdls_mgmt_freq, 0, + cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) cfg80211_rx_mgmt(cfgdev, cfg->tdls_mgmt_freq, 0, cfg->tdls_mgmt_frame, cfg->tdls_mgmt_frame_len, 0, GFP_ATOMIC); @@ -15045,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, \ diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c index 1e3a32aac2e5..a9c894c0b4b2 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_cfgp2p.c @@ -57,8 +57,8 @@ int wl_cfgp2p_if_stop(struct net_device *net); #if defined(WL_ENABLE_P2P_IF) static int wl_cfgp2p_start_xmit(struct sk_buff *skb, struct net_device *ndev); static int wl_cfgp2p_do_ioctl(struct net_device *net, struct ifreq *ifr, int cmd); -static int wl_cfgp2p_if_open(struct net_device *net); -static int wl_cfgp2p_if_stop(struct net_device *net); +int wl_cfgp2p_if_open(struct net_device *net); +int wl_cfgp2p_if_stop(struct net_device *net); static const struct net_device_ops wl_cfgp2p_if_ops = { .ndo_open = wl_cfgp2p_if_open, @@ -783,7 +783,7 @@ wl_cfgp2p_disable_discovery(struct bcm_cfg80211 *cfg) CFGP2P_DBG((" enter\n")); wl_clr_p2p_status(cfg, DISCOVERY_ON); - if(!cfg->p2p) { // terence 20130113: Fix for p2p NULL pointer + if (!cfg->p2p) { // terence 20130113: Fix for p2p NULL pointer ret = BCME_ERROR; CFGP2P_ERR(("wl->p2p is NULL\n")); goto exit; @@ -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; } @@ -2719,10 +2719,11 @@ static int wl_cfgp2p_do_ioctl(struct net_device *net, struct ifreq *ifr, int cmd #endif /* WL_ENABLE_P2P_IF || WL_NEWCFG_PRIVCMD_SUPPORT || defined(P2PONEINT) */ #if defined(WL_ENABLE_P2P_IF) || defined(P2PONEINT) +int #ifdef P2PONEINT -int wl_cfgp2p_if_open(struct net_device *net) +wl_cfgp2p_if_open(struct net_device *net) #else -static int wl_cfgp2p_if_open(struct net_device *net) +wl_cfgp2p_if_open(struct net_device *net) #endif { struct wireless_dev *wdev = net->ieee80211_ptr; @@ -2745,10 +2746,11 @@ static int wl_cfgp2p_if_open(struct net_device *net) return 0; } +int #ifdef P2PONEINT -int wl_cfgp2p_if_stop(struct net_device *net) +wl_cfgp2p_if_stop(struct net_device *net) #else -static int wl_cfgp2p_if_stop(struct net_device *net) +wl_cfgp2p_if_stop(struct net_device *net) #endif { struct wireless_dev *wdev = net->ieee80211_ptr; diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c index 219c1df03211..2f826a541c38 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_iw.c @@ -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; -- 2.34.1