340-v5.2-0001-brcmfmac-support-repeated-brcmf_fw_alloc_request-cal.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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. During a normal brcmfmac lifetime brcmf_fw_alloc_request() is called
  9. once only during the probe. It's safe to assume provided array is clear.
  10. Further brcmfmac improvements may require calling it multiple times
  11. though. This patch allows it by fixing invalid firmware paths like:
  12. brcm/brcmfmac4366c-pcie.binbrcm/brcmfmac4366c-pcie.bin
  13. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  14. Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  15. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  16. ---
  17. drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 1 +
  18. 1 file changed, 1 insertion(+)
  19. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
  20. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
  21. @@ -582,6 +582,7 @@ int brcmf_fw_map_chip_to_name(u32 chip,
  22. return -ENODEV;
  23. }
  24. + fw_name[0] = '\0';
  25. /* check if firmware path is provided by module parameter */
  26. if (brcmf_mp_global.firmware_path[0] != '\0') {
  27. strlcpy(fw_name, brcmf_mp_global.firmware_path,