Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: "Arend van Spriel" <arend.vanspriel@broadcom.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 1/4] brcmfmac: support repeated brcmf_fw_alloc_request() calls
Date: Tue, 26 Feb 2019 14:11:16 +0100	[thread overview]
Message-ID: <20190226131119.7907-2-zajec5@gmail.com> (raw)
In-Reply-To: <20190226131119.7907-1-zajec5@gmail.com>

From: Rafał Miłecki <rafal@milecki.pl>

During a normal brcmfmac lifetime brcmf_fw_alloc_request() is called
once only during the probe. It's safe to assume provided array is clear.

Further brcmfmac improvements may require calling it multiple times
though. This patch allows it by fixing invalid firmware paths like:
brcm/brcmfmac4366c-pcie.binbrcm/brcmfmac4366c-pcie.bin

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index 8209a42dea72..65098a02e1ad 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -743,6 +743,7 @@ brcmf_fw_alloc_request(u32 chip, u32 chiprev,
 
 	for (j = 0; j < n_fwnames; j++) {
 		fwreq->items[j].path = fwnames[j].path;
+		fwnames[j].path[0] = '\0';
 		/* check if firmware path is provided by module parameter */
 		if (brcmf_mp_global.firmware_path[0] != '\0') {
 			strlcpy(fwnames[j].path, mp_path,
-- 
2.20.1


  reply	other threads:[~2019-02-26 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 13:11 [PATCH 0/4] brcmfmac: recover PCIe devices from firmware crashes Rafał Miłecki
2019-02-26 13:11 ` Rafał Miłecki [this message]
2019-03-06  8:49   ` [PATCH 1/4] brcmfmac: support repeated brcmf_fw_alloc_request() calls Arend Van Spriel
2019-04-04 10:00   ` Kalle Valo
2019-02-26 13:11 ` [PATCH 2/4] brcmfmac: get RAM info right before downloading PCIe firmware Rafał Miłecki
2019-03-06  8:59   ` Arend Van Spriel
2019-02-26 13:11 ` [PATCH 3/4] brcmfmac: add a function designated for handling firmware fails Rafał Miłecki
2019-03-06  9:02   ` Arend Van Spriel
2019-02-26 13:11 ` [PATCH 4/4] brcmfmac: reset PCIe bus on a firmware crash Rafał Miłecki
2019-03-06  9:08   ` Arend Van Spriel

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=20190226131119.7907-2-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=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rafal@milecki.pl \
    /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