diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-09-16 08:04:27 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-09-16 08:42:00 +0200 |
commit | bece406c2fcb63d3f055002e789a96d114579867 (patch) | |
tree | 25a5bb7b7a1c9a24753d7a623029e5f3cc04b29b /package/kernel/mac80211/patches/brcm/392-v5.4-0003-brcmfmac-don-t-realloc-wiphy-during-PCIe-reset.patch | |
parent | efa2db42b28343f3f41e512acaca715c11103638 (diff) | |
download | upstream-bece406c2fcb63d3f055002e789a96d114579867.tar.gz upstream-bece406c2fcb63d3f055002e789a96d114579867.tar.bz2 upstream-bece406c2fcb63d3f055002e789a96d114579867.zip |
mac80211: brcmfmac: backport the last 5.4 changes
This makes brcmfmac use the same wiphy after PCIe reset to help user
space handle corner cases (e.g. firmware crash).
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit f39f4b2f6d4300995270f635261b07197e8cf61e)
Diffstat (limited to 'package/kernel/mac80211/patches/brcm/392-v5.4-0003-brcmfmac-don-t-realloc-wiphy-during-PCIe-reset.patch')
-rw-r--r-- | package/kernel/mac80211/patches/brcm/392-v5.4-0003-brcmfmac-don-t-realloc-wiphy-during-PCIe-reset.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/brcm/392-v5.4-0003-brcmfmac-don-t-realloc-wiphy-during-PCIe-reset.patch b/package/kernel/mac80211/patches/brcm/392-v5.4-0003-brcmfmac-don-t-realloc-wiphy-during-PCIe-reset.patch new file mode 100644 index 0000000000..511f24dd72 --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/392-v5.4-0003-brcmfmac-don-t-realloc-wiphy-during-PCIe-reset.patch @@ -0,0 +1,51 @@ +From a1f5aac1765afbeace9581afa27da34085f68e1d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl> +Date: Tue, 3 Sep 2019 06:29:28 +0200 +Subject: [PATCH 3/3] brcmfmac: don't realloc wiphy during PCIe reset +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Providing a new wiphy on every PCIe reset was confusing and was causing +configuration problems for some users (supplicant and authenticators). +Sticking to the existing wiphy should make error recovery much simpler +and more reliable. + +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 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -1430,7 +1430,6 @@ static int brcmf_pcie_reset(struct devic + brcmf_pcie_bus_console_read(devinfo, true); + + brcmf_detach(dev); +- brcmf_free(dev); + + brcmf_pcie_release_irq(devinfo); + brcmf_pcie_release_scratchbuffers(devinfo); +@@ -1826,9 +1825,6 @@ static void brcmf_pcie_setup(struct devi + brcmf_pcie_intr_enable(devinfo); + brcmf_pcie_hostready(devinfo); + +- ret = brcmf_alloc(&devinfo->pdev->dev, devinfo->settings); +- if (ret) +- goto fail; + ret = brcmf_attach(&devinfo->pdev->dev); + if (ret) + goto fail; +@@ -1931,6 +1927,10 @@ brcmf_pcie_probe(struct pci_dev *pdev, c + bus->wowl_supported = pci_pme_capable(pdev, PCI_D3hot); + dev_set_drvdata(&pdev->dev, bus); + ++ ret = brcmf_alloc(&devinfo->pdev->dev, devinfo->settings); ++ if (ret) ++ goto fail_bus; ++ + fwreq = brcmf_pcie_prepare_fw_request(devinfo); + if (!fwreq) { + ret = -ENOMEM; |