ef694f079f64016dcaccb30d4b7dbd76784065f4
[openwrt/staging/stintel.git] /
1 From c9692820710f57c826b2e43a6fb1e4cd307508b0 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Tue, 26 Feb 2019 14:11:16 +0100
4 Subject: [PATCH] brcmfmac: support repeated brcmf_fw_alloc_request() calls
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 During a normal brcmfmac lifetime brcmf_fw_alloc_request() is called
10 once only during the probe. It's safe to assume provided array is clear.
11
12 Further brcmfmac improvements may require calling it multiple times
13 though. This patch allows it by fixing invalid firmware paths like:
14 brcm/brcmfmac4366c-pcie.binbrcm/brcmfmac4366c-pcie.bin
15
16 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
18 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 ---
20 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 1 +
21 1 file changed, 1 insertion(+)
22
23 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
24 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
25 @@ -743,6 +743,7 @@ brcmf_fw_alloc_request(u32 chip, u32 chi
26
27 for (j = 0; j < n_fwnames; j++) {
28 fwreq->items[j].path = fwnames[j].path;
29 + fwnames[j].path[0] = '\0';
30 /* check if firmware path is provided by module parameter */
31 if (brcmf_mp_global.firmware_path[0] != '\0') {
32 strlcpy(fwnames[j].path, mp_path,