Skip to content

Commit db153c1

Browse files
xiaoyao888888Caesar-github
authored andcommitted
net: wireless: update bcmdhd driver to "1.579.77.41.9 (r)"
Change-Id: I5b5a30393157192fd8c1c033169931e7d5b03df0 Signed-off-by: Yao Xiao <[email protected]>
1 parent 8dbb6e8 commit db153c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+14258
-3360
lines changed

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ config BCMDHD_SDIO
3838
config BCMDHD_PCIE
3939
bool "PCIe bus interface support"
4040
depends on BCMDHD && PCI
41+
config BCMDHD_USB
42+
bool "USB bus interface support"
43+
depends on BCMDHD && USB
4144
endchoice
4245

4346
choice

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile

Lines changed: 107 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -6,122 +6,165 @@
66
MODULE_NAME = bcmdhd
77
CONFIG_BCMDHD_SDIO := y
88
#CONFIG_BCMDHD_PCIE := y
9+
#CONFIG_BCMDHD_USB := y
910
CONFIG_BCMDHD_OOB := y
1011
CONFIG_BCMDHD_PROPTXSTATUS := y
1112
CONFIG_BCMDHD_AG := y
1213
#CONFIG_DHD_USE_STATIC_BUF := y
1314
CONFIG_VTS_SUPPORT := y
15+
#CONFIG_LOGTRACE := y
1416

15-
DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER -DSDTEST \
17+
CONFIG_MACH_PLATFORM := y
18+
#CONFIG_BCMDHD_DTS := y
19+
20+
DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \
1621
-DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \
1722
-DDHDTHREAD -DDHD_DEBUG -DSHOW_EVENTS -DBCMDBG -DGET_OTP_MAC_ENABLE \
1823
-DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT -DSUPPORT_PM2_ONLY \
1924
-DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DPNO_SUPPORT -DDHDTCPACK_SUPPRESS \
20-
-DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT -DRXFRAME_THREAD \
21-
-DTSQ_MULTIPLIER -DMFP -DWL_EXT_IAPSTA \
25+
-DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT \
26+
-DMULTIPLE_SUPPLICANT -DTSQ_MULTIPLIER -DMFP \
27+
-DWL_EXT_IAPSTA \
2228
-DENABLE_INSMOD_NO_FW_LOAD -DDHD_UNSUPPORT_IF_CNTS \
2329
-Idrivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd \
2430
-Idrivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include
2531

26-
DHDOFILES = aiutils.o siutils.o sbutils.o bcmutils.o bcmwifi_channels.o \
27-
dhd_linux.o dhd_linux_platdev.o dhd_linux_sched.o dhd_pno.o \
28-
dhd_common.o dhd_ip.o dhd_linux_wq.o dhd_custom_gpio.o \
29-
bcmevent.o hndpmu.o linux_osl.o wldev_common.o wl_android.o \
32+
DHDOFILES = aiutils.o siutils.o sbutils.o bcmutils.o bcmwifi_channels.o \
33+
dhd_linux.o dhd_linux_platdev.o dhd_linux_sched.o dhd_pno.o \
34+
dhd_common.o dhd_ip.o dhd_linux_wq.o dhd_custom_gpio.o \
35+
bcmevent.o hndpmu.o linux_osl.o wldev_common.o wl_android.o \
3036
hnd_pktq.o hnd_pktpool.o dhd_config.o wl_android_ext.o
3137

38+
#BCMDHD_SDIO
3239
ifneq ($(CONFIG_BCMDHD_SDIO),)
33-
DHDCFLAGS += \
34-
-DBCMSDIO -DMMC_SDIO_ABORT -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR \
35-
-DBDC -DDHD_USE_IDLECOUNT -DBCMSDIOH_TXGLOM -DBCMSDIOH_TXGLOM_EXT \
36-
-DCUSTOM_SDIO_F2_BLKSIZE=256
37-
38-
DHDOFILES += bcmsdh.o bcmsdh_linux.o bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o \
39-
dhd_sdio.o dhd_cdc.o dhd_wlfc.o
40-
40+
DHDCFLAGS += -DBCMSDIO -DMMC_SDIO_ABORT -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR \
41+
-DSDTEST -DBDC -DDHD_USE_IDLECOUNT -DCUSTOM_SDIO_F2_BLKSIZE=256 \
42+
-DBCMSDIOH_TXGLOM -DBCMSDIOH_TXGLOM_EXT -DRXFRAME_THREAD
4143
ifeq ($(CONFIG_BCMDHD_OOB),y)
42-
DHDCFLAGS += -DOOB_INTR_ONLY -DCUSTOMER_OOB -DHW_OOB
44+
DHDCFLAGS += -DOOB_INTR_ONLY -DCUSTOMER_OOB -DHW_OOB
4345
ifeq ($(CONFIG_BCMDHD_DISABLE_WOWLAN),y)
44-
DHDCFLAGS += -DDISABLE_WOWLAN
46+
DHDCFLAGS += -DDISABLE_WOWLAN
4547
endif
4648
else
47-
DHDCFLAGS += -DSDIO_ISR_THREAD
48-
endif
49+
DHDCFLAGS += -DSDIO_ISR_THREAD
4950
endif
5051

51-
ifeq ($(CONFIG_BCMDHD_PROPTXSTATUS),y)
52-
ifneq ($(CONFIG_BCMDHD_SDIO),)
53-
DHDCFLAGS += -DPROP_TXSTATUS
54-
endif
55-
ifneq ($(CONFIG_CFG80211),)
56-
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
57-
endif
52+
DHDOFILES += bcmsdh.o bcmsdh_linux.o bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o \
53+
dhd_sdio.o dhd_cdc.o dhd_wlfc.o
5854
endif
5955

56+
#BCMDHD_PCIE
6057
ifneq ($(CONFIG_BCMDHD_PCIE),)
61-
DHDCFLAGS += \
62-
-DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1
58+
DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1 \
59+
-DDONGLE_ENABLE_ISOLATION
60+
ifneq ($(CONFIG_PCI_MSI),)
61+
DHDCFLAGS += -DDHD_USE_MSI
62+
endif
6363
ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
64-
DHDCFLAGS += -DDHD_USE_STATIC_CTRLBUF
64+
DHDCFLAGS += -DDHD_USE_STATIC_CTRLBUF
6565
endif
6666

67-
DHDOFILES += dhd_pcie.o dhd_pcie_linux.o pcie_core.o dhd_flowring.o \
67+
DHDOFILES += dhd_pcie.o dhd_pcie_linux.o pcie_core.o dhd_flowring.o \
6868
dhd_msgbuf.o
6969
endif
7070

71+
#BCMDHD_USB
72+
ifneq ($(CONFIG_BCMDHD_USB),)
73+
DHDCFLAGS += -DUSBOS_TX_THREAD -DBCMDBUS -DBCMTRXV2 -DDBUS_USB_LOOPBACK \
74+
-DBDC
75+
DHDCFLAGS += -DBCM_REQUEST_FW -DEXTERNAL_FW_PATH
76+
#DHDCFLAGS :=$(filter-out -DENABLE_INSMOD_NO_FW_LOAD,$(DHDCFLAGS))
77+
78+
DHDOFILES += dbus.o dbus_usb.o dbus_usb_linux.o dhd_cdc.o dhd_wlfc.o
79+
endif
80+
81+
ifeq ($(CONFIG_BCMDHD_PROPTXSTATUS),y)
82+
ifneq ($(CONFIG_BCMDHD_USB),)
83+
DHDCFLAGS += -DPROP_TXSTATUS
84+
endif
85+
ifneq ($(CONFIG_BCMDHD_SDIO),)
86+
DHDCFLAGS += -DPROP_TXSTATUS
87+
endif
88+
ifneq ($(CONFIG_CFG80211),)
89+
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
90+
endif
91+
endif
92+
93+
#VTS_SUPPORT
7194
ifeq ($(CONFIG_VTS_SUPPORT),y)
72-
DHDCFLAGS += \
73-
-DGSCAN_SUPPORT -DRTT_SUPPORT -DCUSTOM_FORCE_NODFS_FLAG \
74-
-DLINKSTAT_SUPPORT -DDEBUGABILITY -DDBG_PKT_MON -DKEEP_ALIVE -DPKT_FILTER_SUPPORT \
75-
-DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT -DDHDTCPACK_SUPPRESS -DDHD_WAKE_STATUS \
95+
ifneq ($(CONFIG_CFG80211),)
96+
DHDCFLAGS += -DGSCAN_SUPPORT -DRTT_SUPPORT -DCUSTOM_FORCE_NODFS_FLAG \
97+
-DLINKSTAT_SUPPORT -DDEBUGABILITY -DDBG_PKT_MON -DPKT_FILTER_SUPPORT \
98+
-DAPF -DNDO_CONFIG_SUPPORT -DRSSI_MONITOR_SUPPORT -DDHD_WAKE_STATUS \
7699
-DCUSTOM_COUNTRY_CODE -DDHD_FW_COREDUMP -DEXPLICIT_DISCIF_CLEANUP
77100

78-
DHDOFILES += dhd_debug_linux.o dhd_debug.o bcmxtlv.o \
79-
dhd_rtt.o bcm_app_utils.o
101+
DHDOFILES += bcmxtlv.o dhd_rtt.o bcm_app_utils.o
102+
CONFIG_LOGTRACE := y
103+
endif
104+
endif
105+
106+
#LOGTRACE
107+
ifeq ($(CONFIG_LOGTRACE),y)
108+
DHDCFLAGS += -DSHOW_LOGTRACE
109+
DHDOFILES += dhd_debug_linux.o dhd_debug.o dhd_mschdbg.o
80110
endif
81111

112+
# MESH support for kernel 3.10 later
113+
ifeq ($(CONFIG_WL_MESH),y)
114+
DHDCFLAGS += -DWLMESH
115+
ifneq ($(CONFIG_BCMDHD_PCIE),)
116+
DHDCFLAGS += -DBCM_HOST_BUF -DDMA_HOST_BUFFER_LEN=0x80000
117+
endif
118+
DHDCFLAGS += -DDHD_UPDATE_INTF_MAC
119+
DHDCFLAGS :=$(filter-out -DDHD_FW_COREDUMP,$(DHDCFLAGS))
120+
DHDCFLAGS :=$(filter-out -DSET_RANDOM_MAC_SOFTAP,$(DHDCFLAGS))
121+
endif
122+
123+
#obj-$(CONFIG_RKWIFI) += bcmdhd.o
82124
obj-$(CONFIG_AP6XXX) += bcmdhd.o
83125
bcmdhd-objs += $(DHDOFILES)
84126

85-
#ifeq ($(CONFIG_MACH_PLATFORM),y)
86-
DHDOFILES += dhd_gpio.o
87-
DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT
88-
#DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
89-
#endif
127+
ifeq ($(CONFIG_MACH_PLATFORM),y)
128+
DHDOFILES += dhd_gpio.o
129+
ifeq ($(CONFIG_BCMDHD_DTS),y)
130+
DHDCFLAGS += -DCONFIG_DTS
131+
else
132+
DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT
133+
endif
134+
# DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
135+
endif
90136

91137
ifeq ($(CONFIG_BCMDHD_AG),y)
92-
DHDCFLAGS += -DBAND_AG
138+
DHDCFLAGS += -DBAND_AG
93139
endif
94140

95141
ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
96-
obj-m += dhd_static_buf.o
97-
DHDCFLAGS += -DSTATIC_WL_PRIV_STRUCT -DENHANCED_STATIC_BUF
98-
DHDCFLAGS += -DDHD_USE_STATIC_MEMDUMP -DCONFIG_DHD_USE_STATIC_BUF
142+
obj-m += dhd_static_buf.o
143+
DHDCFLAGS += -DSTATIC_WL_PRIV_STRUCT -DENHANCED_STATIC_BUF
144+
DHDCFLAGS += -DDHD_USE_STATIC_MEMDUMP -DCONFIG_DHD_USE_STATIC_BUF
99145
endif
100146

101147
ifneq ($(CONFIG_WIRELESS_EXT),)
102-
DHDOFILES += wl_iw.o wl_escan.o
103-
DHDCFLAGS += -DSOFTAP -DWL_WIRELESS_EXT -DUSE_IW -DWL_ESCAN
148+
DHDOFILES += wl_iw.o wl_escan.o
149+
DHDCFLAGS += -DSOFTAP -DWL_WIRELESS_EXT -DUSE_IW -DWL_ESCAN
104150
endif
105151
ifneq ($(CONFIG_CFG80211),)
106-
DHDOFILES += wl_cfg80211.o wl_cfgp2p.o wl_linux_mon.o wl_cfg_btcoex.o wl_cfgvendor.o
107-
DHDOFILES += dhd_cfg80211.o
108-
DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_CFG80211_STA_EVENT -DWL_ENABLE_P2P_IF
109-
#DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
110-
DHDCFLAGS += -DCUSTOM_ROAM_TRIGGER_SETTING=-65
111-
DHDCFLAGS += -DCUSTOM_ROAM_DELTA_SETTING=15
112-
DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=28000
113-
DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=7
114-
DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL
115-
DHDCFLAGS += -DWL_SUPPORT_BACKPORTED_KPATCHES
116-
DHDCFLAGS += -DESCAN_RESULT_PATCH
117-
DHDCFLAGS += -DVSDB -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
118-
DHDCFLAGS += -DWLTDLS -DMIRACAST_AMPDU_SIZE=8
119-
DHDCFLAGS += -DWL_VIRTUAL_APSTA
152+
DHDOFILES += wl_cfg80211.o wl_cfgp2p.o wl_linux_mon.o wl_cfg_btcoex.o wl_cfgvendor.o
153+
DHDOFILES += dhd_cfg80211.o
154+
DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_CFG80211_STA_EVENT -DWL_ENABLE_P2P_IF
155+
# DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
156+
DHDCFLAGS += -DCUSTOM_ROAM_TRIGGER_SETTING=-65
157+
DHDCFLAGS += -DCUSTOM_ROAM_DELTA_SETTING=15
158+
DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=28000
159+
DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=7
160+
DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL
161+
DHDCFLAGS += -DWL_SUPPORT_BACKPORTED_KPATCHES
162+
DHDCFLAGS += -DESCAN_RESULT_PATCH -DESCAN_BUF_OVERFLOW_MGMT
163+
DHDCFLAGS += -DVSDB -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
164+
DHDCFLAGS += -DWLTDLS -DMIRACAST_AMPDU_SIZE=8
165+
DHDCFLAGS += -DWL_VIRTUAL_APSTA
120166
endif
121167
EXTRA_CFLAGS = $(DHDCFLAGS)
122168
ifeq ($(CONFIG_BCMDHD),m)
123-
DHDCFLAGS += -DMULTIPLE_SUPPLICANT
124169
EXTRA_LDFLAGS += --strip-debug
125-
else
126-
DHDCFLAGS += -DBUILD_IN_KERNEL
127170
endif

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_linux.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ extern void dhdsdio_isr(void * args);
5252
#endif /* defined(CONFIG_ARCH_ODIN) */
5353
#include <dhd_linux.h>
5454

55-
5655
/* driver info, initialized when bcmsdh_register is called */
5756
static bcmsdh_driver_t drvinfo = {NULL, NULL, NULL, NULL};
5857

@@ -363,13 +362,13 @@ int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handl
363362
SDLX_MSG(("%s: irq is already registered\n", __FUNCTION__));
364363
return -EBUSY;
365364
}
366-
SDLX_MSG(("%s %s irq=%d flags=0x%X\n", __FUNCTION__,
367365
#ifdef HW_OOB
368-
"HW_OOB",
366+
printf("%s: HW_OOB irq=%d flags=0x%X\n", __FUNCTION__,
367+
(int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags);
369368
#else
370-
"SW_OOB",
369+
printf("%s: SW_OOB irq=%d flags=0x%X\n", __FUNCTION__,
370+
(int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags);
371371
#endif
372-
(int)bcmsdh_osinfo->oob_irq_num, (int)bcmsdh_osinfo->oob_irq_flags));
373372
bcmsdh_osinfo->oob_irq_handler = oob_irq_handler;
374373
bcmsdh_osinfo->oob_irq_handler_context = oob_irq_handler_context;
375374
bcmsdh_osinfo->oob_irq_enabled = TRUE;
@@ -398,6 +397,7 @@ int bcmsdh_oob_intr_register(bcmsdh_info_t *bcmsdh, bcmsdh_cb_fn_t oob_irq_handl
398397
else
399398
bcmsdh_osinfo->oob_irq_wake_enabled = TRUE;
400399
#endif
400+
401401
return 0;
402402
}
403403

@@ -423,7 +423,7 @@ void bcmsdh_oob_intr_unregister(bcmsdh_info_t *bcmsdh)
423423
free_irq(bcmsdh_osinfo->oob_irq_num, bcmsdh);
424424
bcmsdh_osinfo->oob_irq_registered = FALSE;
425425
}
426-
#endif
426+
#endif
427427

428428
/* Module parameters specific to each host-controller driver */
429429

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,6 @@ sdioh_set_mode(sdioh_info_t *sd, uint mode)
995995
sd->txglom_mode = mode;
996996
else if (mode == SDPCM_TXGLOM_MDESC)
997997
sd->txglom_mode = mode;
998-
printf("%s: set txglom_mode to %s\n", __FUNCTION__, mode==SDPCM_TXGLOM_MDESC?"multi-desc":"copy");
999998

1000999
return (sd->txglom_mode);
10011000
}
@@ -1288,8 +1287,8 @@ sdioh_request_packet_chain(sdioh_info_t *sd, uint fix_inc, uint write, uint func
12881287

12891288
if (sd_msglevel & SDH_COST_VAL) {
12901289
getnstimeofday(&now);
1291-
sd_cost(("%s: rw=%d, cost=%lds %luus\n", __FUNCTION__,
1292-
write, now.tv_sec-before.tv_sec, now.tv_nsec/1000-before.tv_nsec/1000));
1290+
sd_cost(("%s: rw=%d, ttl_len=%d, cost=%lds %luus\n", __FUNCTION__,
1291+
write, ttl_len, now.tv_sec-before.tv_sec, now.tv_nsec/1000-before.tv_nsec/1000));
12931292
}
12941293

12951294
sd_trace(("%s: Exit\n", __FUNCTION__));

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c

100755100644
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
232232

233233
MODULE_DEVICE_TABLE(sdio, bcmsdh_sdmmc_ids);
234234

235-
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
235+
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
236236
static int bcmsdh_sdmmc_suspend(struct device *pdev)
237237
{
238238
int err;
@@ -275,20 +275,16 @@ static int bcmsdh_sdmmc_suspend(struct device *pdev)
275275

276276
static int bcmsdh_sdmmc_resume(struct device *pdev)
277277
{
278-
#if defined(OOB_INTR_ONLY)
279278
sdioh_info_t *sdioh;
280-
#endif
281279
struct sdio_func *func = dev_to_sdio_func(pdev);
282280

283281
printf("%s Enter func->num=%d\n", __FUNCTION__, func->num);
284282
if (func->num != 2)
285283
return 0;
286284

287285
dhd_mmc_suspend = FALSE;
288-
#if defined(OOB_INTR_ONLY)
289286
sdioh = sdio_get_drvdata(func);
290287
bcmsdh_resume(sdioh->bcmsdh);
291-
#endif
292288

293289
smp_mb();
294290
printf("%s Exit\n", __FUNCTION__);
@@ -346,7 +342,7 @@ static struct sdio_driver bcmsdh_sdmmc_driver = {
346342
.remove = bcmsdh_sdmmc_remove,
347343
.name = "bcmsdh_sdmmc",
348344
.id_table = bcmsdh_sdmmc_ids,
349-
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM_SLEEP)
345+
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
350346
.drv = {
351347
.pm = &bcmsdh_sdmmc_pm_ops,
352348
},

0 commit comments

Comments
 (0)