From: "Rafał Miłecki" <zajec5@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: "Arend van Spriel" <arend.vanspriel@broadcom.com>,
"Franky Lin" <franky.lin@broadcom.com>,
"Hante Meuleman" <hante.meuleman@broadcom.com>,
"Chi-Hsien Lin" <chi-hsien.lin@cypress.com>,
"Wright Feng" <wright.feng@cypress.com>,
"Winnie Chang" <winnie.chang@cypress.com>,
linux-wireless@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com,
brcm80211-dev-list@cypress.com,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 3/3] brcmfmac: don't realloc wiphy during PCIe reset
Date: Tue, 3 Sep 2019 06:29:28 +0200 [thread overview]
Message-ID: <20190903042928.18621-4-zajec5@gmail.com> (raw)
In-Reply-To: <20190903042928.18621-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
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>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index b01b33e99c14..6c463475e90b 100644
--- 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 device *dev)
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 device *dev, int ret,
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, const struct pci_device_id *id)
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;
--
2.21.0
next prev parent reply other threads:[~2019-09-03 4:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 4:29 [PATCH 0/3] brcmfmac: keep wiphy during PCIe driver lifetime Rafał Miłecki
2019-09-03 4:29 ` [PATCH 1/3] brcmfmac: move "cfg80211_ops" pointer to another struct Rafał Miłecki
2019-09-03 18:59 ` Arend Van Spriel
2019-09-09 13:15 ` Rafał Miłecki
2019-09-13 13:42 ` Kalle Valo
2019-09-03 4:29 ` [PATCH 2/3] brcmfmac: split brcmf_attach() and brcmf_detach() functions Rafał Miłecki
2019-09-03 19:03 ` Arend Van Spriel
2019-09-03 4:29 ` Rafał Miłecki [this message]
2019-09-03 19:04 ` [PATCH 3/3] brcmfmac: don't realloc wiphy during PCIe reset Arend Van Spriel
2019-09-03 18:51 ` [PATCH 0/3] brcmfmac: keep wiphy during PCIe driver lifetime Arend Van Spriel
2019-09-09 13:06 ` Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903042928.18621-4-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=chi-hsien.lin@cypress.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rafal@milecki.pl \
--cc=winnie.chang@cypress.com \
--cc=wright.feng@cypress.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).