2010-02-16 01:44:14 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-03-04 10:10:17 +00:00
|
|
|
.PATH: ${SRCTOP}/sys/dev/bwn
|
2010-02-16 01:44:14 +00:00
|
|
|
|
|
|
|
KMOD= if_bwn
|
|
|
|
SRCS= if_bwn.c if_bwnreg.h if_bwnvar.h
|
2018-02-05 23:38:15 +00:00
|
|
|
SRCS+= if_bwn_pci.c
|
2016-05-14 23:08:34 +00:00
|
|
|
SRCS+= if_bwn_util.c
|
|
|
|
|
|
|
|
# PHY
|
|
|
|
SRCS+= if_bwn_phy_common.c
|
2016-05-02 22:58:11 +00:00
|
|
|
SRCS+= if_bwn_phy_g.c if_bwn_phy_lp.c
|
2016-05-17 07:15:25 +00:00
|
|
|
SRCS+= if_bwn_phy_n.c
|
2016-05-14 23:08:34 +00:00
|
|
|
|
Introduce bwn(4) support for the bhnd(4) bus.
Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support
for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi
adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect
found in post-2009 Broadcom Wi-Fi hardware, are not supported by
siba_bwn(4).
The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port)
provides a unified kernel interface to a superset of the hardware supported
by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern
PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as
Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their
SSB or BCMA backplane.
This diff introduces opt-in bwn(4) support for bhnd(4) by providing:
- A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via
bhnd(4) instead of siba_bwn(4).
- A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally
probes at a higher priority than the siba_bwn(4) PCI driver.
- A set of compatibility shims that perform translation of bwn(4)'s
siba_bwn function calls into their bhnd(9) API equivalents when bwn(4)
is attached via a bhnd(4) bus parent. When bwn(4) is attached via
siba_bwn(4), all siba_bwn function calls are simply passed through to
their original implementations.
To test bwn(4) with bhnd(4), place the following lines in loader.conf(5):
hw.bwn_pci.preferred="1"
if_bwn_pci_load="YES
bwn_v4_ucode_load="YES"
bwn_v4_lp_ucode_load="YES"
To verify that bwn(4) is using bhnd(4), you can check dmesg:
bwn0: <Broadcom 802.11 MAC/PHY/Radio, rev 15> ... on bhnd0
... or devinfo(8):
pcib2
pci2
bwn_pci0
bhndb0
bhnd0
bwn0
...
bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently
supported by bwn(4), including:
- BCM4312
- BCM4318
- BCM4321
With minimal changes to the DMA code (not included in this commit), I was
also able to test support for newer BCMA devices by bringing up basic
working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets:
- BCM43224
- BCM43225
Approved by: adrian (mentor, implicit)
Sponsored by: The FreeBSD Foundation & Plausible Labs
Differential Revision: https://reviews.freebsd.org/D13041
2017-12-02 02:21:27 +00:00
|
|
|
# BHND
|
|
|
|
SRCS+= bhnd_bus_if.h \
|
|
|
|
bhnd_chipc_if.h \
|
|
|
|
bhnd_pmu_if.h \
|
|
|
|
bhnd_pwrctl_if.h
|
|
|
|
SRCS+= bhnd_nvram_map.h
|
|
|
|
|
2018-02-05 23:38:15 +00:00
|
|
|
# BHNDB
|
|
|
|
SRCS+= bhndb_bus_if.h \
|
|
|
|
bhndb_if.h
|
|
|
|
|
2016-05-14 23:08:34 +00:00
|
|
|
# Other
|
Introduce bwn(4) support for the bhnd(4) bus.
Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support
for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi
adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect
found in post-2009 Broadcom Wi-Fi hardware, are not supported by
siba_bwn(4).
The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port)
provides a unified kernel interface to a superset of the hardware supported
by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern
PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as
Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their
SSB or BCMA backplane.
This diff introduces opt-in bwn(4) support for bhnd(4) by providing:
- A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via
bhnd(4) instead of siba_bwn(4).
- A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally
probes at a higher priority than the siba_bwn(4) PCI driver.
- A set of compatibility shims that perform translation of bwn(4)'s
siba_bwn function calls into their bhnd(9) API equivalents when bwn(4)
is attached via a bhnd(4) bus parent. When bwn(4) is attached via
siba_bwn(4), all siba_bwn function calls are simply passed through to
their original implementations.
To test bwn(4) with bhnd(4), place the following lines in loader.conf(5):
hw.bwn_pci.preferred="1"
if_bwn_pci_load="YES
bwn_v4_ucode_load="YES"
bwn_v4_lp_ucode_load="YES"
To verify that bwn(4) is using bhnd(4), you can check dmesg:
bwn0: <Broadcom 802.11 MAC/PHY/Radio, rev 15> ... on bhnd0
... or devinfo(8):
pcib2
pci2
bwn_pci0
bhndb0
bhnd0
bwn0
...
bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently
supported by bwn(4), including:
- BCM4312
- BCM4318
- BCM4321
With minimal changes to the DMA code (not included in this commit), I was
also able to test support for newer BCMA devices by bringing up basic
working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets:
- BCM43224
- BCM43225
Approved by: adrian (mentor, implicit)
Sponsored by: The FreeBSD Foundation & Plausible Labs
Differential Revision: https://reviews.freebsd.org/D13041
2017-12-02 02:21:27 +00:00
|
|
|
SRCS+= device_if.h bus_if.h gpio_if.h pci_if.h opt_bwn.h opt_wlan.h
|
2010-02-16 01:44:14 +00:00
|
|
|
|
2016-10-11 22:32:12 +00:00
|
|
|
# The following need the BWN_GPL_PHY kenrel option to opt-in
|
|
|
|
# to the GPL'd 802.11n PHY support for this driver.
|
2017-03-04 10:10:17 +00:00
|
|
|
.PATH: ${SRCTOP}/sys/gnu/dev/bwn/phy_n
|
2016-10-11 22:32:12 +00:00
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_radio_2055.c
|
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_radio_2056.c
|
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_radio_2057.c
|
2018-02-05 23:38:15 +00:00
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_phy_n_sprom.c
|
2016-10-11 22:32:12 +00:00
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_phy_n_tables.c
|
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_phy_n_ppr.c
|
|
|
|
SRCS.BWN_GPL_PHY+= if_bwn_phy_n_core.c
|
2016-05-17 07:15:25 +00:00
|
|
|
|
2010-02-16 01:44:14 +00:00
|
|
|
.include <bsd.kmod.mk>
|