immortalwrt/target/linux/brcm63xx
Daniel González Cabanelas 68fbe1c0aa
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>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Backported from a0e0e621ca

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-09 21:46:49 +08:00
..
base-files kernel: bump to 4.14.155, 4.19.85 2019-11-22 09:25:25 -08:00
dts kernel: bump to 4.14.155, 4.19.85 2019-11-22 09:25:25 -08:00
generic update source 2017-09-06 19:19:45 +08:00
image kernel: bump to 4.14.155, 4.19.85 2019-11-22 09:25:25 -08:00
patches-4.14 bcm63xx: sprom: override the PCI device ID 2021-02-09 21:46:49 +08:00
patches-4.19 kernel: bump 4.19 to 4.19.171 2021-01-29 03:28:54 +08:00
profiles Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
smp update source 2017-09-06 19:19:45 +08:00
config-4.14 bcm63xx: refresh kernel config 2020-05-19 12:27:57 +08:00
config-4.19 kernel: bump to 4.14.155, 4.19.85 2019-11-22 09:25:25 -08:00
Makefile kernel: bump to 4.14.155, 4.19.85 2019-11-22 09:25:25 -08:00
modules.mk update source 2017-09-06 19:19:45 +08:00