History log of /freebsd-current/sys/dev/bwn/if_bwn_phy_g.c
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# a9e022d3 04-Apr-2022 Warner Losh <imp@FreeBSD.org>

bwn_lo_measure_gain_values: eliminate write only trsw_rx variable

Sponsored by: Netflix


# 7163a849 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

bwn: clean up empty lines in .c and .h files


# e8a81142 12-Feb-2018 Landon J. Fuller <landonf@FreeBSD.org>

bwn(4): Fix outstanding bug in PHY-G tssi2dbm table generation caught by
-Wconstant-conversion, and remove now unnecessary warning suppression
flags.


# d177c199 05-Feb-2018 Landon J. Fuller <landonf@FreeBSD.org>

bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.

- Remove the shim interface that allowed bwn(4) to use either siba_bwn or
bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents.
- Drop the legay, now-unused siba_bwn bus driver.
- Clean up bhnd(4) board flag defines referenced by bwn(4).

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13518


# 8d14ca9c 01-Dec-2017 Landon J. Fuller <landonf@FreeBSD.org>

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


# 5025b8d5 16-May-2016 Adrian Chadd <adrian@FreeBSD.org>

[bwn] add opt_wlan.h and opt_bwn.h so we can enable bwn debugging as appropriate.

Tested:

* BCM4322, STA mode (11a)

Sponsored by: Palm Springs


# cd39b27e 14-May-2016 Adrian Chadd <adrian@FreeBSD.org>

[bwn] missed commit!


# 52bef765 14-May-2016 Adrian Chadd <adrian@FreeBSD.org>

[bwn] implement reset improvements in preparation for PHY-N support

* Ensure we set 20MHz wide channels (hard-coded) for PHY-N.
* Change the core rese tto take a flag saying "gmode" vesus uint32_t
flags. This is important for BCMA support where the "gmode" bit
is different.
* Refactor out the mac-phy clock reset routine (usde by PHY-N).

Tested:

* BCM4321 (PHY-N), BCM4312 (PHY-LP)

TODO:

* Checkpoint test on PHY-G hardware, just to check.


# 6dbb9b3c 02-May-2016 Adrian Chadd <adrian@FreeBSD.org>

[bwn] migrate bwn_dummy_transmission() back to main, as it'll be used by other PHYs.

The Linux b43 driver uses this in other PHYs besides the g PHY.


# d546e47a 02-May-2016 Adrian Chadd <adrian@FreeBSD.org>

[bwn] break out the 'g' phy code into a separate source file.

* Break out the 'g' phy code;
* Break out the debugging bits into a separate source file, since
some debugging prints are done in the phy code;
* Make some more chip methods in if_bwn.c public.

This brings the size of if_bwn.c down to 6,805 lines which is now
approaching managable.