openwrt/target/linux
Daniel González Cabanelas cf5e5204d9 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
2021-02-07 19:08:08 +01:00
..
apm821xx kernel: Update kernel 4.14 to version 4.14.195 2020-08-27 00:27:56 +02:00
ar71xx kernel: bump 4.14 to 4.14.219 2021-02-05 09:30:47 +01:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt armvirt,x86: fix build breakage of crypto ccp module 2020-07-05 13:33:31 +02:00
at91 at91: disable legacy PTYs and virtual terminals 2019-12-17 11:27:20 +02:00
ath25 kernel: bump 4.14 to 4.14.214 2021-01-12 23:55:26 +01:00
ath79 kernel: bump 4.14 to 4.14.219 2021-02-05 09:30:47 +01:00
bcm53xx kernel: bump 4.14 to 4.14.214 2021-01-12 23:55:26 +01:00
brcm47xx kernel: bump 4.14 to 4.14.214 2021-01-12 23:55:26 +01:00
brcm63xx bcm63xx: sprom: override the PCI device ID 2021-02-07 19:08:08 +01:00
brcm2708 kernel: bump 4.14 to 4.14.206 2020-11-16 09:35:05 +01:00
cns3xxx kernel: bump 4.14 to 4.14.212 2020-12-16 22:23:52 +01:00
gemini kernel: bump 4.14 to 4.14.156 2019-11-29 10:00:35 +01:00
generic kernel: bump 4.14 to 4.14.218 2021-02-02 11:52:31 +01:00
imx6 treewide: remove 4.19 leftovers 2019-10-08 12:45:13 +02:00
ipq40xx kernel: bump 4.14 to 4.14.212 2020-12-16 22:23:52 +01:00
ipq806x kernel: bump 4.14 to 4.14.214 2021-01-12 23:55:26 +01:00
kirkwood kirkwood: support for button in Pogoplug V4 2020-07-10 13:55:54 +02:00
lantiq kernel: Update to version 4.14.199 2020-09-28 01:04:35 +02:00
layerscape kernel: bump 4.14 to 4.14.218 2021-02-02 11:52:31 +01:00
malta malta: remove CONFIG_LEGACY_PTY from kernel config 2019-12-17 11:27:30 +02:00
mediatek kernel: bump 4.14 to 4.14.206 2020-11-16 09:35:05 +01:00
mpc85xx kernel: bump 4.14 to 4.14.206 2020-11-16 09:35:05 +01:00
mvebu mvebu: omnia: make initramfs image usable out of the box 2021-02-02 10:06:04 +01:00
mxs kernel: bump 4.14 to 4.14.178 2020-05-04 21:05:21 +02:00
octeon kernel: bump 4.14 to 4.14.206 2020-11-16 09:35:05 +01:00
octeontx kernel: bump 4.14 to 4.14.176 2020-04-16 13:23:52 +02:00
omap treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
oxnas kernel: bump 4.14 to 4.14.206 2020-11-16 09:35:05 +01:00
pistachio kernel: backport GD25Q256 support from 4.15 2020-12-01 21:59:30 +01:00
ramips ramips: enable LED VCC for Asus RT-AC51U 2020-12-10 13:41:10 +01:00
rb532 kernel: bump 4.14 to 4.14.206 2020-11-16 09:35:05 +01:00
samsung kernel: fix nand_release() usage. 2020-07-04 21:04:11 +02:00
sunxi kernel: bump 4.14 to 4.14.169 2020-02-04 18:11:26 +01:00
tegra tegra: correct cpu subtype 2020-04-18 00:18:13 +02:00
uml kernel: bump 4.14 to 4.14.201 2020-10-14 17:18:54 +02:00
x86 x86: Add CONFIG_EFI_CUSTOM_SSDT_OVERLAYS 2020-08-11 20:44:31 +02:00
zynq zynq: make title consistent for all devices 2019-05-17 21:41:43 +02:00
Makefile