Skip to content

Commit 1c40aba

Browse files
committed
Update bcmdhd to that found in codeaurora's ics-chocolate branch
Change-Id: I5da8bb54af15930dc485529dedd849dce49b8540
1 parent 5269853 commit 1c40aba

Some content is hidden

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

105 files changed

+4940
-10701
lines changed

arch/arm/configs/vigor_aosp_defconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ CONFIG_LIBRA_SDIOIF=m
12341234
# CONFIG_ATH_COMMON is not set
12351235
# CONFIG_BCM4329 is not set
12361236
CONFIG_BCMDHD=m
1237-
CONFIG_BCMDHD_FW_PATH="/system/etc/firmware/fw_bcm4330.bin"
1237+
CONFIG_BCMDHD_FW_PATH="/system/vendor/firmware/fw_bcmdhd.bin"
12381238
CONFIG_BCMDHD_NVRAM_PATH="/proc/calibration"
12391239
# CONFIG_HOSTAP is not set
12401240
# CONFIG_IWM is not set

drivers/net/wireless/bcmdhd/Kconfig

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
config BCMDHD
22
tristate "Broadcom 4329/30 wireless cards support"
33
depends on MMC
4-
select WIRELESS_EXT
5-
select WEXT_PRIV
64
---help---
75
This module adds support for wireless adapters based on
86
Broadcom 4329/30 chipset.
@@ -22,6 +20,14 @@ config BCMDHD_FW_PATH
2220
config BCMDHD_NVRAM_PATH
2321
depends on BCMDHD
2422
string "NVRAM path"
25-
default "/proc/calibration"
23+
default "/system/etc/wifi/bcmdhd.cal"
2624
---help---
2725
Path to the calibration file.
26+
27+
config BCMDHD_WEXT
28+
bool "Enable WEXT support"
29+
depends on BCMDHD && CFG80211 = n
30+
select WIRELESS_EXT
31+
select WEXT_PRIV
32+
help
33+
Enables WEXT support

drivers/net/wireless/bcmdhd/Makefile

+20-48
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,31 @@
1-
2-
#bcm4330
3-
4-
#DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 \
5-
-DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 \
6-
-DDHD_FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS \
7-
-DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS \
8-
-Wall -Wstrict-prototypes -Werror -DSDIO_ISR_THREAD \
9-
-DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT \
10-
-DKEEP_ALIVE -DCONFIG_FIRST_SCAN -DAP_ONLY -DCUSTOM_OOB_GPIO_NUM=299 \
11-
-DOOB_INTR_ONLY -DMMC_SDIO_ABORT \
12-
-I/home/takara/work/HTC/bcm4330b1 -I/home/takara/work/HTC/bcm4330b1/include
13-
#-DPNO_SUPPORT -DCSCAN -DSET_RANDOM_MAC_SOFTAP -DGET_CUSTOM_MAC_ENABLE
14-
15-
16-
DHDCFLAGS = -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 \
17-
-DBCMFILEIMAGE -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 \
18-
-DDHD_FIRSTREAD=64 -DDHDTHREAD -DDHD_GPL -DDHD_SCHED -DBDC \
19-
-DTOE -DDHD_BCMEVENTS -DSHOW_EVENTS -DDONGLEOVERLAYS -DOEM_ANDROID \
20-
-DBCMDBG -DDHD_USE_STATIC_BUF -DCONFIG_FIRST_SCAN -DAP_ONLY \
21-
-DCUSTOM_OOB_GPIO_NUM=46 -DOOB_INTR_ONLY -DMMC_SDIO_ABORT -DEMBEDDED_PLATFORM -DCUSTOMER_HW2 -DDHD_PRINT_DEBUG \
22-
-DPNO_SUPPORT -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -DWIFI_ACT_FRAME -DKEEP_ALIVE \
23-
-DCSCAN -DBCM4329_LOW_POWER -DBCMWAPI_WAI -DBCMWAPI_WPI -DHTC_KlocWork -DWL_CFG80211 -DWLP2P -DWL_COMPAT_WIRELESS\
24-
-Wall -Wstrict-prototypes -Werror \
1+
# bcmdhd
2+
DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \
3+
-DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DWLBTAMP -DBCMFILEIMAGE \
4+
-DDHDTHREAD -DDHD_GPL -DDHD_SCHED -DDHD_DEBUG -DSDTEST -DBDC -DTOE \
5+
-DDHD_BCMEVENTS -DSHOW_EVENTS -DDONGLEOVERLAYS -DBCMDBG \
6+
-DCUSTOMER_HW2 -DCUSTOM_OOB_GPIO_NUM=2 -DOOB_INTR_ONLY -DHW_OOB \
7+
-DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DBCMPLATFORM_BUS -DWLP2P \
8+
-DNEW_COMPAT_WIRELESS -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT \
9+
-DKEEP_ALIVE -DCSCAN -DGET_CUSTOM_MAC_ENABLE -DPKT_FILTER_SUPPORT \
10+
-DEMBEDDED_PLATFORM -DENABLE_INSMOD_NO_FW_LOAD -DPNO_SUPPORT \
2511
-Idrivers/net/wireless/bcmdhd -Idrivers/net/wireless/bcmdhd/include
26-
#-I$(M) -I$(M)/include
27-
# CFG 80211 and P2P compile flag
28-
#-DWL_CFG80211 -DWLP2P -DWL_COMPAT_WIRELESS \
29-
30-
#ifdef P2P
31-
DHDCFLAGS += -DWL_CFG80211 -DWLP2P -DWL_COMPAT_WIRELESS
32-
#endif
33-
34-
ifdef COMPAT_WIRELESS
35-
NOSTDINC_FLAGS := -I$(COMPAT_WIRELESS)/include/ \
36-
-include $(COMPAT_WIRELESS)/include/linux/compat-2.6.h
37-
endif
38-
39-
DHDOFILES = dhd_linux.o linux_osl.o bcmutils.o dhd_common.o dhd_custom_gpio.o \
40-
siutils.o sbutils.o aiutils.o hndpmu.o bcmwifi.o dhd_sdio.o \
41-
dhd_linux_sched.o dhd_cdc.o bcmsdh_sdmmc.o bcmsdh.o bcmsdh_linux.o \
42-
bcmsdh_sdmmc_linux.o bcmevent.o dhd_bta.o wl_android.o wldev_common.o wl_linux_mon.o wl_cfg80211.o wl_cfgp2p.o dhd_cfg80211.o
43-
44-
#ifdef P2P
45-
DHDOFILES += wl_linux_mon.o wl_cfg80211.o wl_cfgp2p.o
46-
#endif
47-
48-
49-
5012

13+
DHDOFILES = aiutils.o bcmsdh_sdmmc_linux.o dhd_linux.o siutils.o bcmutils.o \
14+
dhd_linux_sched.o bcmwifi.o dhd_sdio.o bcmevent.o dhd_bta.o hndpmu.o \
15+
bcmsdh.o dhd_cdc.o bcmsdh_linux.o dhd_common.o linux_osl.o \
16+
bcmsdh_sdmmc.o dhd_custom_gpio.o sbutils.o wldev_common.o wl_android.o
5117

5218
obj-$(CONFIG_BCMDHD) += bcmdhd.o
5319
bcmdhd-objs += $(DHDOFILES)
5420
ifneq ($(CONFIG_WIRELESS_EXT),)
5521
bcmdhd-objs += wl_iw.o
5622
DHDCFLAGS += -DSOFTAP
5723
endif
24+
ifneq ($(CONFIG_CFG80211),)
25+
bcmdhd-objs += wl_cfg80211.o wl_cfgp2p.o dhd_linux_mon.o
26+
DHDCFLAGS += -DWL_CFG80211
27+
endif
5828
EXTRA_CFLAGS = $(DHDCFLAGS)
29+
ifeq ($(CONFIG_BCMDHD),m)
5930
EXTRA_LDFLAGS += --strip-debug
31+
endif

drivers/net/wireless/bcmdhd/aiutils.c

+3-31
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* software in any way with any other Broadcom software provided under a license
2323
* other than the GPL, without Broadcom's express prior written consent.
2424
*
25-
* $Id: aiutils.c 275693 2011-08-04 19:59:34Z $
25+
* $Id: aiutils.c,v 1.26.2.1 2010-03-09 18:41:21 Exp $
2626
*/
2727

2828

@@ -37,7 +37,7 @@
3737

3838
#include "siutils_priv.h"
3939

40-
#define BCM47162_DMP() (0)
40+
4141

4242

4343

@@ -417,10 +417,6 @@ ai_flag(si_t *sih)
417417
aidmp_t *ai;
418418

419419
sii = SI_INFO(sih);
420-
if (BCM47162_DMP()) {
421-
SI_ERROR(("%s: Attempting to read MIPS DMP registers on 47162a0", __FUNCTION__));
422-
return sii->curidx;
423-
}
424420
ai = sii->curwrap;
425421

426422
return (R_REG(sii->osh, &ai->oobselouta30) & 0x1f);
@@ -544,12 +540,7 @@ ai_corereg(si_t *sih, uint coreidx, uint regoff, uint mask, uint val)
544540
r = (uint32*) ((uchar*) ai_setcoreidx(&sii->pub, coreidx) + regoff);
545541
}
546542
ASSERT(r != NULL);
547-
#ifdef HTC_KlocWork
548-
if(r == NULL) {
549-
printf("[HTCKW] r is NULL at ai_corereg\n");
550-
return 0;
551-
}
552-
#endif
543+
553544

554545
if (mask || val) {
555546
w = (R_REG(sii->osh, r) & ~mask) | val;
@@ -629,13 +620,6 @@ ai_core_cflags_wo(si_t *sih, uint32 mask, uint32 val)
629620
uint32 w;
630621

631622
sii = SI_INFO(sih);
632-
633-
if (BCM47162_DMP()) {
634-
SI_ERROR(("%s: Accessing MIPS DMP register (ioctrl) on 47162a0",
635-
__FUNCTION__));
636-
return;
637-
}
638-
639623
ASSERT(GOODREGS(sii->curwrap));
640624
ai = sii->curwrap;
641625

@@ -655,12 +639,6 @@ ai_core_cflags(si_t *sih, uint32 mask, uint32 val)
655639
uint32 w;
656640

657641
sii = SI_INFO(sih);
658-
if (BCM47162_DMP()) {
659-
SI_ERROR(("%s: Accessing MIPS DMP register (ioctrl) on 47162a0",
660-
__FUNCTION__));
661-
return 0;
662-
}
663-
664642
ASSERT(GOODREGS(sii->curwrap));
665643
ai = sii->curwrap;
666644

@@ -682,12 +660,6 @@ ai_core_sflags(si_t *sih, uint32 mask, uint32 val)
682660
uint32 w;
683661

684662
sii = SI_INFO(sih);
685-
if (BCM47162_DMP()) {
686-
SI_ERROR(("%s: Accessing MIPS DMP register (iostatus) on 47162a0",
687-
__FUNCTION__));
688-
return 0;
689-
}
690-
691663
ASSERT(GOODREGS(sii->curwrap));
692664
ai = sii->curwrap;
693665

drivers/net/wireless/bcmdhd/bcmevent.c

+3-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* Notwithstanding the above, under no circumstances may you combine this
2121
* software in any way with any other Broadcom software provided under a license
2222
* other than the GPL, without Broadcom's express prior written consent.
23-
* $Id: bcmevent.c 275693 2011-08-04 19:59:34Z $
23+
* $Id: bcmevent.c,v 1.8.2.7 2011-02-01 06:23:39 Exp $
2424
*/
2525

2626
#include <typedefs.h>
@@ -29,7 +29,7 @@
2929
#include <proto/bcmeth.h>
3030
#include <proto/bcmevent.h>
3131

32-
#if WLC_E_LAST != 90
32+
#if WLC_E_LAST != 85
3333
#error "You need to add an entry to bcmevent_names[] for the new event"
3434
#endif
3535

@@ -96,10 +96,6 @@ const bcmevent_name_t bcmevent_names[] = {
9696
{ WLC_E_ACTION_FRAME_RX, "ACTION_FRAME_RX" },
9797
{ WLC_E_ACTION_FRAME_COMPLETE, "ACTION_FRAME_COMPLETE" },
9898
#endif
99-
#ifdef BCMWAPI_WAI
100-
{ WLC_E_WAI_STA_EVENT, "WAI_STA_EVENT" },
101-
{ WLC_E_WAI_MSG, "WAI_MSG" },
102-
#endif /* BCMWAPI_WAI */
10399
{ WLC_E_ESCAN_RESULT, "WLC_E_ESCAN_RESULT" },
104100
{ WLC_E_ACTION_FRAME_OFF_CHAN_COMPLETE, "WLC_E_AF_OFF_CHAN_COMPLETE" },
105101
#ifdef WLP2P
@@ -121,11 +117,8 @@ const bcmevent_name_t bcmevent_names[] = {
121117
{ WLC_E_PFN_SCAN_NONE, "PFN_SCAN_NONE" },
122118
{ WLC_E_PFN_SCAN_ALLGONE, "PFN_SCAN_ALLGONE" },
123119
#ifdef SOFTAP
124-
{ WLC_E_GTK_PLUMBED, "GTK_PLUMBED" },
120+
{ WLC_E_GTK_PLUMBED, "GTK_PLUMBED" }
125121
#endif
126-
{ WLC_E_RELOAD, "RELOAD_EVENT" },
127-
{ WLC_E_RSSI_LOW, "RSSI_LOW_EVENT" },
128-
{ WLC_E_ASSOCREQ_IE, "ASSOC_REQ_EVENT" }
129122
};
130123

131124

drivers/net/wireless/bcmdhd/bcmsdh.c

-37
Original file line numberDiff line numberDiff line change
@@ -688,40 +688,3 @@ bcmsdh_sleep(void *sdh, bool enab)
688688
return BCME_UNSUPPORTED;
689689
#endif
690690
}
691-
692-
int
693-
bcmsdh_gpio_init(void *sdh)
694-
{
695-
bcmsdh_info_t *p = (bcmsdh_info_t *)sdh;
696-
sdioh_info_t *sd = (sdioh_info_t *)(p->sdioh);
697-
698-
return sdioh_gpio_init(sd);
699-
}
700-
701-
bool
702-
bcmsdh_gpioin(void *sdh, uint32 gpio)
703-
{
704-
bcmsdh_info_t *p = (bcmsdh_info_t *)sdh;
705-
sdioh_info_t *sd = (sdioh_info_t *)(p->sdioh);
706-
707-
return sdioh_gpioin(sd, gpio);
708-
}
709-
710-
int
711-
bcmsdh_gpioouten(void *sdh, uint32 gpio)
712-
{
713-
bcmsdh_info_t *p = (bcmsdh_info_t *)sdh;
714-
sdioh_info_t *sd = (sdioh_info_t *)(p->sdioh);
715-
716-
return sdioh_gpioouten(sd, gpio);
717-
}
718-
719-
int
720-
bcmsdh_gpioout(void *sdh, uint32 gpio, bool enab)
721-
{
722-
bcmsdh_info_t *p = (bcmsdh_info_t *)sdh;
723-
sdioh_info_t *sd = (sdioh_info_t *)(p->sdioh);
724-
725-
return sdioh_gpioout(sd, gpio, enab);
726-
}
727-

drivers/net/wireless/bcmdhd/bcmsdh_linux.c

+10-19
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* software in any way with any other Broadcom software provided under a license
2222
* other than the GPL, without Broadcom's express prior written consent.
2323
*
24-
* $Id: bcmsdh_linux.c 281719 2011-09-02 23:50:57Z $
24+
* $Id: bcmsdh_linux.c,v 1.72.6.5 2010-12-23 01:13:15 Exp $
2525
*/
2626

2727
/**
@@ -238,9 +238,9 @@ int bcmsdh_probe(struct device *dev)
238238
/* chain SDIO Host Controller info together */
239239
sdhc->next = sdhcinfo;
240240
sdhcinfo = sdhc;
241-
242241
/* Read the vendor/device ID from the CIS */
243242
vendevid = bcmsdh_query_device(sdh);
243+
244244
/* try to attach to the target device */
245245
if (!(sdhc->ch = drvinfo.attach((vendevid >> 16),
246246
(vendevid & 0xFFFF), 0, 0, 0, 0,
@@ -274,7 +274,6 @@ int bcmsdh_remove(struct device *dev)
274274
sdhc = sdhcinfo;
275275
drvinfo.detach(sdhc->ch);
276276
bcmsdh_detach(sdhc->osh, sdhc->sdh);
277-
278277
/* find the SDIO Host Controller state for this pdev and take it out from the list */
279278
for (sdhc = sdhcinfo, prev = NULL; sdhc; sdhc = sdhc->next) {
280279
if (sdhc->dev == (void *)dev) {
@@ -291,6 +290,7 @@ int bcmsdh_remove(struct device *dev)
291290
return 0;
292291
}
293292

293+
294294
/* release SDIO Host Controller info */
295295
osh = sdhc->osh;
296296
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
@@ -599,14 +599,9 @@ static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
599599

600600
dhdp = (dhd_pub_t *)dev_get_drvdata(sdhcinfo->dev);
601601

602-
#ifdef HW_OOB
603602
bcmsdh_oob_intr_set(0);
604-
#endif
605603

606604
if (dhdp == NULL) {
607-
#ifndef HW_OOB
608-
bcmsdh_oob_intr_set(0);
609-
#endif
610605
SDLX_MSG(("Out of band GPIO interrupt fired way too early\n"));
611606
return IRQ_HANDLED;
612607
}
@@ -616,6 +611,13 @@ static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
616611
return IRQ_HANDLED;
617612
}
618613

614+
void *bcmsdh_get_drvdata(void)
615+
{
616+
if (!sdhcinfo)
617+
return NULL;
618+
return dev_get_drvdata(sdhcinfo->dev);
619+
}
620+
619621
int bcmsdh_register_oob_intr(void * dhdp)
620622
{
621623
int error = 0;
@@ -643,13 +645,6 @@ int bcmsdh_register_oob_intr(void * dhdp)
643645
return 0;
644646
}
645647

646-
void *bcmsdh_get_drvdata(void)
647-
{
648-
if (!sdhcinfo)
649-
return NULL;
650-
return dev_get_drvdata(sdhcinfo->dev);
651-
}
652-
653648
void bcmsdh_set_irq(int flag)
654649
{
655650
if (sdhcinfo->oob_irq_registered && sdhcinfo->oob_irq_enable_flag != flag) {
@@ -676,7 +671,6 @@ void bcmsdh_unregister_oob_intr(void)
676671
}
677672
}
678673
#endif /* defined(OOB_INTR_ONLY) */
679-
680674
/* Module parameters specific to each host-controller driver */
681675

682676
extern uint sd_msglevel; /* Debug message level */
@@ -700,9 +694,6 @@ module_param(sd_hiok, uint, 0);
700694
extern uint sd_f2_blocksize;
701695
module_param(sd_f2_blocksize, int, 0);
702696

703-
#ifdef BCMSDIOH_STD
704-
module_param(sd_uhsimode, int, 0);
705-
#endif
706697

707698
#ifdef BCMSDH_MODULE
708699
EXPORT_SYMBOL(bcmsdh_attach);

0 commit comments

Comments
 (0)