Skip to content

Commit

Permalink
brcm80211: fmac: add USB support for bcm43235/6/8 chipsets
Browse files Browse the repository at this point in the history
This patch extends the use of the brcmfmac driver with support for
chipsets with a USB host interface. The first chipsets supported are
the bcm43235, bcm43236, and bcm43238 for which firmware has been
submitted.

This driver change has been successfully built for x86, x86_64,
ppc64, arm_le, and mips_be.

It has been tested successfully on x86 and x86_64.

Cc: M. Lambert <lambertm@westman.wave.ca>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Kan Yan <kanyan@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Feb 22, 2012
1 parent cf44066 commit 71bb244
Show file tree
Hide file tree
Showing 7 changed files with 1,812 additions and 7 deletions.
17 changes: 13 additions & 4 deletions drivers/net/wireless/brcm80211/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,25 @@ config BRCMFMAC
it'll be called brcmfmac.ko.

config BRCMFMAC_SDIO
bool "SDIO bus interface support for FullMAC"
bool "SDIO bus interface support for FullMAC driver"
depends on MMC
depends on BRCMFMAC
select FW_LOADER
default y
---help---
This option enables the SDIO bus interface support for Broadcom
FullMAC WLAN driver.
Say Y if you want to use brcmfmac for a compatible SDIO interface
wireless card.
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
use the driver for a SDIO wireless card.

config BRCMFMAC_USB
bool "USB bus interface support for FullMAC driver"
depends on USB
depends on BRCMFMAC
select FW_LOADER
---help---
This option enables the USB bus interface support for Broadcom
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
use the driver for an USB wireless card.

config BRCMDBG
bool "Broadcom driver debug functions"
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/brcm80211/brcmfmac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ ccflags-y += \
-Idrivers/net/wireless/brcm80211/brcmfmac \
-Idrivers/net/wireless/brcm80211/include

ccflags-y += -D__CHECK_ENDIAN__

obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
brcmfmac-objs += \
wl_cfg80211.o \
Expand All @@ -30,5 +32,5 @@ brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \
bcmsdh.o \
bcmsdh_sdmmc.o \
sdio_chip.o

ccflags-y += -D__CHECK_ENDIAN__
brcmfmac-$(CONFIG_BRCMFMAC_USB) += \
usb.o
6 changes: 5 additions & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ struct dngl_stats {
struct brcmf_bus {
u8 type; /* bus type */
union {
/* pointer to sdio private structure */
struct brcmf_sdio_dev *sdio;
struct brcmf_usbdev *usb;
} bus_priv;
struct brcmf_pub *drvr; /* pointer to driver pub structure brcmf_pub */
enum brcmf_bus_state state;
Expand Down Expand Up @@ -110,5 +110,9 @@ extern int brcmf_add_if(struct device *dev, int ifidx,
extern void brcmf_sdio_exit(void);
extern int brcmf_sdio_init(void);
#endif
#ifdef CONFIG_BRCMFMAC_USB
extern void brcmf_usb_exit(void);
extern int brcmf_usb_init(void);
#endif

#endif /* _BRCMF_BUS_H_ */
8 changes: 8 additions & 0 deletions drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,11 @@ static int __init brcmfmac_init(void)
if (ret)
goto fail;
#endif
#ifdef CONFIG_BRCMFMAC_USB
ret = brcmf_usb_init();
if (ret)
goto fail;
#endif

fail:
return ret;
Expand All @@ -1200,6 +1205,9 @@ static void __exit brcmfmac_exit(void)
#ifdef CONFIG_BRCMFMAC_SDIO
brcmf_sdio_exit();
#endif
#ifdef CONFIG_BRCMFMAC_USB
brcmf_usb_exit();
#endif
}

module_init(brcmfmac_init);
Expand Down
Loading

0 comments on commit 71bb244

Please sign in to comment.