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