Skip to content

Commit 76bd764

Browse files
authored
Merge pull request #152 from Radxa-Alvin/linux-5.10-gen-rkr4.1
Update broadcom drivers from Infineon. Signed-off-by: Stephen Chen <stephen@radxa.com>
2 parents 19f5008 + 0388493 commit 76bd764

Some content is hidden

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

55 files changed

+6458
-767
lines changed

drivers/net/wireless/broadcom/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ obj-$(CONFIG_B43) += b43/
33
obj-$(CONFIG_B43LEGACY) += b43legacy/
44

55
obj-$(CONFIG_BRCMFMAC) += brcm80211/
6-
obj-$(CONFIG_BRCMSMAC) += brcm80211/
6+
#obj-$(CONFIG_BRCMSMAC) += brcm80211/

drivers/net/wireless/broadcom/brcm80211/Kconfig

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config BRCMUTIL
33
tristate
4+
depends on m
45

56
config BRCMSMAC
7+
depends on n
68
tristate "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver"
9+
depends on m
710
depends on MAC80211
811
depends on BCMA_POSSIBLE
9-
select BCMA
12+
depends on BCMA
1013
select NEW_LEDS if BCMA_DRIVER_GPIO
1114
select LEDS_CLASS if BCMA_DRIVER_GPIO
1215
select BRCMUTIL
1316
select FW_LOADER
14-
select CORDIC
17+
select BPAUTO_CORDIC
1518
help
1619
This module adds support for PCIe wireless adapters based on Broadcom
1720
IEEE802.11n SoftMAC chipsets. It also has WLAN led support, which will
@@ -34,6 +37,26 @@ config BRCM_TRACING
3437
config BRCMDBG
3538
bool "Broadcom driver debug functions"
3639
depends on BRCMSMAC || BRCMFMAC
37-
select WANT_DEV_COREDUMP if BRCMFMAC
40+
select BPAUTO_WANT_DEV_COREDUMP
3841
help
3942
Selecting this enables additional code for debug purposes.
43+
44+
config BRCMFMAC_PCIE_BARWIN_SZ
45+
bool "Custom PCIE BAR window size support for FullMAC driver"
46+
depends on BRCMFMAC
47+
depends on PCI
48+
default n
49+
help
50+
If you say Y here, the FMAC driver will use custom PCIE BAR
51+
window size. Say Y to allow developers to use custom PCIE
52+
BAR window size when HOST PCIE IP can support less then 4MB
53+
BAR window.
54+
55+
config BRCMFMAC_BT_SHARED_SDIO
56+
bool "FMAC shares SDIO bus to Bluetooth"
57+
depends on BRCMFMAC
58+
depends on BRCMFMAC_SDIO
59+
default n
60+
help
61+
Selecting this to enables sharing the SDIO bus interface between
62+
Cypress BT and WiFi host drivers.

drivers/net/wireless/broadcom/brcm80211/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ subdir-ccflags-$(CONFIG_BRCMDBG) += -DDEBUG
1010

1111
obj-$(CONFIG_BRCMUTIL) += brcmutil/
1212
obj-$(CONFIG_BRCMFMAC) += brcmfmac/
13-
obj-$(CONFIG_BRCMSMAC) += brcmsmac/
13+
#obj-$(CONFIG_BRCMSMAC) += brcmsmac/

drivers/net/wireless/broadcom/brcm80211/brcmfmac/Kconfig

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
config BRCMFMAC
22
tristate "Broadcom FullMAC WLAN driver"
3+
depends on m
34
depends on CFG80211
45
select BRCMUTIL
56
help
@@ -19,7 +20,7 @@ config BRCMFMAC_SDIO
1920
depends on (MMC = y || MMC = BRCMFMAC)
2021
depends on BRCMFMAC
2122
select BRCMFMAC_PROTO_BCDC
22-
select FW_LOADER
23+
depends on FW_LOADER
2324
default y
2425
help
2526
This option enables the SDIO bus interface support for Broadcom
@@ -31,7 +32,7 @@ config BRCMFMAC_USB
3132
depends on (USB = y || USB = BRCMFMAC)
3233
depends on BRCMFMAC
3334
select BRCMFMAC_PROTO_BCDC
34-
select FW_LOADER
35+
depends on FW_LOADER
3536
help
3637
This option enables the USB bus interface support for Broadcom
3738
IEEE802.11n embedded FullMAC WLAN driver. Say Y if you want to
@@ -42,9 +43,16 @@ config BRCMFMAC_PCIE
4243
depends on BRCMFMAC
4344
depends on PCI
4445
select BRCMFMAC_PROTO_MSGBUF
45-
select FW_LOADER
46+
depends on FW_LOADER
4647
help
4748
This option enables the PCIE bus interface support for Broadcom
4849
IEEE802.11ac embedded FullMAC WLAN driver. Say Y if you want to
4950
use the driver for an PCIE wireless card.
5051

52+
config BRCMFMAC_BT_SHARED_SDIO
53+
bool "FMAC shares SDIO bus to Bluetooth"
54+
depends on BRCMFMAC_SDIO
55+
default n
56+
help
57+
This option enables the feautre of sharing the SDIO bus interface
58+
between Cypress BT and WiFi host drivers.

drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#
77

88
ccflags-y += \
9-
-I $(srctree)/$(src) \
10-
-I $(srctree)/$(src)/../include
9+
-I$(src) \
10+
-I$(src)/../include
1111

1212
obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
1313
brcmfmac-objs += \
@@ -46,3 +46,5 @@ brcmfmac-$(CONFIG_OF) += \
4646
of.o
4747
brcmfmac-$(CONFIG_DMI) += \
4848
dmi.o
49+
brcmfmac-${CONFIG_BRCMFMAC_BT_SHARED_SDIO} += \
50+
bt_shared_sdio.o

drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ struct brcmf_proto_bcdc_header {
8787
* plus any space that might be needed
8888
* for bus alignment padding.
8989
*/
90+
#define ROUND_UP_MARGIN 2048
91+
9092
struct brcmf_bcdc {
9193
u16 reqid;
9294
u8 bus_header[BUS_HEADER_LEN];
@@ -368,8 +370,7 @@ brcmf_proto_bcdc_txcomplete(struct device *dev, struct sk_buff *txp,
368370

369371
/* await txstatus signal for firmware if active */
370372
if (brcmf_fws_fc_active(bcdc->fws)) {
371-
if (!success)
372-
brcmf_fws_bustxfail(bcdc->fws, txp);
373+
brcmf_fws_bustxcomplete(bcdc->fws, txp, success);
373374
} else {
374375
if (brcmf_proto_bcdc_hdrpull(bus_if->drvr, false, txp, &ifp))
375376
brcmu_pkt_buf_free_skb(txp);
@@ -471,7 +472,7 @@ int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr)
471472

472473
drvr->hdrlen += BCDC_HEADER_LEN + BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES;
473474
drvr->bus_if->maxctl = BRCMF_DCMD_MAXLEN +
474-
sizeof(struct brcmf_proto_bcdc_dcmd);
475+
sizeof(struct brcmf_proto_bcdc_dcmd) + ROUND_UP_MARGIN;
475476
return 0;
476477

477478
fail:

0 commit comments

Comments
 (0)