diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-07-26 22:43:18 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-07-27 08:14:13 +0200 |
commit | 29aab93ea2a334026c0cc87414e7d1e731aedb11 (patch) | |
tree | 1fe3cf90534d134a15545af58c3fc8333f0c311f /package/kernel/mac80211/patches/337-v4.18-brcmfmac-fix-regression-in-parsing-NVRAM-for-multipl.patch | |
parent | 4e7f4777b0a311c354461f890e863453f462ca28 (diff) | |
download | upstream-29aab93ea2a334026c0cc87414e7d1e731aedb11.tar.gz upstream-29aab93ea2a334026c0cc87414e7d1e731aedb11.tar.bz2 upstream-29aab93ea2a334026c0cc87414e7d1e731aedb11.zip |
mac80211: backport brcmfmac fixes & debugging helpers from 4.18
The most important is probably regression fix in handling platform
NVRAM. That bug stopped hardware from being properly calibrated breaking
e.g. 5 GHz for Netgear R8000.
Other than that it triggers memory dumps when experiencing firmware
problems which is important for debugging purposes.
Fixes: 2811c97803e5 ("mac80211: backport brcmfmac firmware & clm_blob loading rework")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit b26214adb53da2816ff830b6cd6e31e1dafa2635)
Diffstat (limited to 'package/kernel/mac80211/patches/337-v4.18-brcmfmac-fix-regression-in-parsing-NVRAM-for-multipl.patch')
-rw-r--r-- | package/kernel/mac80211/patches/337-v4.18-brcmfmac-fix-regression-in-parsing-NVRAM-for-multipl.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/337-v4.18-brcmfmac-fix-regression-in-parsing-NVRAM-for-multipl.patch b/package/kernel/mac80211/patches/337-v4.18-brcmfmac-fix-regression-in-parsing-NVRAM-for-multipl.patch new file mode 100644 index 0000000000..2e265a2f37 --- /dev/null +++ b/package/kernel/mac80211/patches/337-v4.18-brcmfmac-fix-regression-in-parsing-NVRAM-for-multipl.patch @@ -0,0 +1,41 @@ +From 299b6365a3b7cf7f5ea1c945a420e9ee4841d6f7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> +Date: Sun, 22 Jul 2018 23:46:25 +0200 +Subject: [PATCH] brcmfmac: fix regression in parsing NVRAM for multiple + devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +NVRAM is designed to work with Broadcom's SDK Linux kernel which fakes +PCI domain 0 for all internal MMIO devices. Since official Linux kernel +uses platform devices for that purpose there is a mismatch in numbering +PCI domains. + +There used to be a fix for that problem but it was accidentally dropped +during the last firmware loading rework. That resulted in brcmfmac not +being able to extract device specific NVRAM content and all kind of +calibration problems. + +Reported-by: Aditya Xavier <adityaxavier@gmail.com> +Fixes: 2baa3aaee27f ("brcmfmac: introduce brcmf_fw_alloc_request() function") +Cc: stable@vger.kernel.org # v4.17+ +Signed-off-by: Rafał Miłecki <rafal@milecki.pl> +Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -1785,7 +1785,8 @@ brcmf_pcie_prepare_fw_request(struct brc + fwreq->items[BRCMF_PCIE_FW_CODE].type = BRCMF_FW_TYPE_BINARY; + fwreq->items[BRCMF_PCIE_FW_NVRAM].type = BRCMF_FW_TYPE_NVRAM; + fwreq->items[BRCMF_PCIE_FW_NVRAM].flags = BRCMF_FW_REQF_OPTIONAL; +- fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus); ++ /* NVRAM reserves PCI domain 0 for Broadcom's SDK faked bus */ ++ fwreq->domain_nr = pci_domain_nr(devinfo->pdev->bus) + 1; + fwreq->bus_nr = devinfo->pdev->bus->number; + + return fwreq; |