SVNews r326454

NOTE: This service is experimental and subject to change! Use at your own risk!

2017-12-02 02:21:27 - r326454 by landonf (landonf)

Complete list of files affected by revision r326454:

(Note: At the moment, these links point to ViewVC on svn.freebsd.org. They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/sys/conf/files  
  History   Contents   Diff   MODIFY   /head/sys/conf/options  
  History   Contents     DELETE   /head/sys/dev/bwn/bwn_mac.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn.c  
  History   Contents     ADD   /head/sys/dev/bwn/if_bwn_bhnd.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_pci.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_pcivar.h  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_phy_common.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_phy_g.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_phy_lp.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_phy_n.c  
  History   Contents     ADD   /head/sys/dev/bwn/if_bwn_siba.c  
  History   Contents     ADD   /head/sys/dev/bwn/if_bwn_siba.h  
  History   Contents     ADD   /head/sys/dev/bwn/if_bwn_siba_compat.c  
  History   Contents     ADD   /head/sys/dev/bwn/if_bwn_siba_compat.h  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwn_util.c  
  History   Contents   Diff   MODIFY   /head/sys/dev/bwn/if_bwnvar.h  
  History   Contents   Diff   MODIFY   /head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_core.c  
  History   Contents   Diff   MODIFY   /head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_ppr.c  
  History   Contents   Diff   MODIFY   /head/sys/gnu/dev/bwn/phy_n/if_bwn_phy_n_tables.c  
  History   Contents   Diff   MODIFY   /head/sys/gnu/dev/bwn/phy_n/if_bwn_radio_2055.c  
  History   Contents   Diff   MODIFY   /head/sys/gnu/dev/bwn/phy_n/if_bwn_radio_2056.c  
  History   Contents   Diff   MODIFY   /head/sys/gnu/dev/bwn/phy_n/if_bwn_radio_2057.c  
  History   Contents   Diff   MODIFY   /head/sys/modules/bwn/Makefile  
  History   Contents   Diff   MODIFY   /head/sys/modules/bwn_pci/Makefile  

Commit message:

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

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 2 ms, 25 files printed. Current time is 2017-12-17 21:23:38. All times are in UTC/GMT.