307-v4.15-brcmfmac-fix-CLM-load-error-for-legacy-chips-when-us.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From cc124d5cc8d81985c3511892d7a6d546552ff754 Mon Sep 17 00:00:00 2001
  2. From: Wright Feng <[email protected]>
  3. Date: Tue, 16 Jan 2018 17:26:50 +0800
  4. Subject: [PATCH] brcmfmac: fix CLM load error for legacy chips when user
  5. helper is enabled
  6. For legacy chips without CLM blob files, kernel with user helper function
  7. returns -EAGAIN when we request_firmware(), and then driver got failed
  8. when bringing up legacy chips. We expect the CLM blob file for legacy chip
  9. is not existence in firmware path, but the -ENOENT error is transferred to
  10. -EAGAIN in firmware_class.c with user helper.
  11. Because of that, we continue with CLM data currently present in firmware
  12. if getting error from doing request_firmware().
  13. Cc: [email protected] # v4.15.y
  14. Reviewed-by: Arend van Spriel <[email protected]>
  15. Signed-off-by: Wright Feng <[email protected]>
  16. Signed-off-by: Kalle Valo <[email protected]>
  17. ---
  18. drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 9 +++------
  19. 1 file changed, 3 insertions(+), 6 deletions(-)
  20. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
  21. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
  22. @@ -182,12 +182,9 @@ static int brcmf_c_process_clm_blob(stru
  23. err = request_firmware(&clm, clm_name, dev);
  24. if (err) {
  25. - if (err == -ENOENT) {
  26. - brcmf_dbg(INFO, "continue with CLM data currently present in firmware\n");
  27. - return 0;
  28. - }
  29. - brcmf_err("request CLM blob file failed (%d)\n", err);
  30. - return err;
  31. + brcmf_info("no clm_blob available(err=%d), device may have limited channels available\n",
  32. + err);
  33. + return 0;
  34. }
  35. chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL);