openwrt/target/linux/bcm63xx
Daniel González Cabanelas a0e0e621ca bcm63xx: sprom: override the PCI device ID
The PCI device ID detected by the wifi drivers on devices using a fallback
SPROM is wrong. Currently the chipnum is used for this parameter.

Most SSB based Broadcom wifi chips are 2.4 and 5GHz capable. But on
devices without a physical SPROM, the only one way to detect if the device
suports both bands or only the 5GHz band, is by reading the device ID from
the fallback SPROM.

In some devices, this may lead to a non working wifi on a 5GHz-only card,
or in the best case a working 2.4GHz-only in a dual band wifi card.

The offset for the deviceid in SSB SPROMs is 0x0008, whereas in BCMA is
0x0060. This is true for any SPROM version.

Override the PCI device ID with the one defined at the fallback SPROM, to
detect the correct wifi card model and allow using the 5GHz band if
supported.

The patch has been tested with the following wifi radios:

BCM43222: b43: both 2.4/5GHz working
          brcm-wl: both 2.4/5GHz working

BCM43225: b43: 2.4GHz, working
	 brcmsmac: working
	 brcm-wl: it lacks support

BCM43217: b43: 2.4GHz, working
	 brcmsmac: it lacks support
	 brcm-wl: it lacks support

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[amend commit description, rework patch to avoid using a new global variable
and keep ssb sprom extraction code as close to ssb/pci.c as possible]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-02 20:40:31 +01:00
..
base-files bcm63xx: add support for Innacomm W3400V6 2020-12-09 08:42:26 +01:00
dts bcm63xx: add support for Innacomm W3400V6 2020-12-09 08:42:26 +01:00
generic
image treewide: provide global default for SUPPORTED_DEVICES 2021-01-23 12:45:21 +01:00
patches-5.4 bcm63xx: sprom: override the PCI device ID 2021-02-02 20:40:31 +01:00
profiles treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
smp kernel: move some disabled symbols to generic 2020-12-22 19:11:50 +01:00
config-5.4 kernel: move some disabled symbols to generic 2020-12-22 19:11:50 +01:00
Makefile
modules.mk