immortalwrt/target/linux
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
..
apm821xx treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
ar7 kernel: bump 4.9 to 4.9.237 2020-09-30 20:08:29 +08:00
ar71xx kernel: bump to 4.9.256, 4.14.219, 4.19.173 2021-02-07 02:20:09 +08:00
arc770 update target 2019-08-19 22:26:19 +08:00
archs38 update target 2019-08-19 22:26:19 +08:00
armvirt armvirt: README: rename it from LEDE to OpenWrt 2020-12-15 11:39:07 +08:00
at91 at91: switch to 4.14 (#3040) 2020-02-11 17:26:30 +08:00
ath25 kernel: bump to 4.9.249, 4.14.213, 4.19.164 2020-12-31 20:59:32 +08:00
ath79 kernel: bump to 4.9.256, 4.14.219, 4.19.173 2021-02-07 02:20:09 +08:00
bcm27xx kernel: bump 4.19 to 4.19.171 2021-01-29 03:28:54 +08:00
bcm53xx Package Lean: Cleanup Makefile 2021-01-30 20:09:14 +08:00
brcm47xx kernel: bump to 4.9.249, 4.14.213, 4.19.164 2020-12-31 20:59:32 +08:00
brcm63xx bcm63xx: sprom: override the PCI device ID 2021-02-09 21:46:49 +08:00
cns3xxx kernel: bump to 4.9.249, 4.14.213, 4.19.164 2020-12-31 20:59:32 +08:00
gemini treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
generic kernel: bump to 4.9.256, 4.14.219, 4.19.173 2021-02-07 02:20:09 +08:00
imx6 kernel: bump 4.19 to 4.19.110 2020-03-19 17:50:48 +08:00
ipq40xx ipq40xx: r619ac: fix the conflict with 4G network card 2021-02-09 12:35:30 +08:00
ipq806x treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
ixp4xx kernel: bump to 4.9.256, 4.14.219, 4.19.173 2021-02-07 02:20:09 +08:00
kirkwood treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
lantiq treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
layerscape kernel: bump to 4.9.256, 4.14.219, 4.19.173 2021-02-07 02:20:09 +08:00
malta update target 2019-08-19 22:26:19 +08:00
mediatek treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
mpc85xx kernel: bump 4.19 to 4.19.155 2020-11-08 03:24:12 +08:00
mvebu treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
mxs kernel: bump 4.14 to 4.14.177 2020-05-03 19:32:54 +08:00
octeon kernel: bump 4.19 to 4.19.155 2020-11-08 03:24:12 +08:00
octeontx kernel: bump to 4.9.219, 4.14.176, 4.19.115 (#4350) 2020-04-17 11:50:34 +08:00
omap treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
orion update target 2019-08-19 22:26:19 +08:00
oxnas treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
pistachio kernel: bump to kernel 4.9.247, 4.14.210, 4.19.161 2020-12-06 00:24:09 +08:00
ramips treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
rb532 kernel: bump to 4.14.203, 4.19.154 2020-10-31 01:29:00 +08:00
samsung kernel: Update kernel 4.14 to version 4.14.187 2020-07-05 11:53:32 +08:00
sunxi sunxi: Nanopi R1S H5: add missing device package 2021-02-09 12:40:22 +08:00
tegra treewide: provide global default for SUPPORTED_DEVICES 2021-01-29 22:47:58 +08:00
uml kernel: bump to 4.9.240, 4.14.202, 4.19.152 2020-10-17 19:46:46 +08:00
x86 x86: fix upgrade by emptying SUPPORTED_DEVICES 2021-01-29 22:56:03 +08:00
zynq update target 2019-08-19 22:26:19 +08:00
Makefile build: add 'make kernel_xconfig' command 2020-07-09 12:03:26 +08:00