All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled
@ 2018-01-16  9:26 Wright Feng
  2018-01-16 15:02 ` [v4] " Kalle Valo
  2018-01-16 19:17 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Wright Feng @ 2018-01-16  9:26 UTC (permalink / raw)
  To: arend.vanspriel, franky.lin, hante.meuleman, kvalo, chi-hsien.lin
  Cc: wright.feng, linux-wireless, brcm80211-dev-list.pdl, stable

For legacy chips without CLM blob files, kernel with user helper function
returns -EAGAIN when we request_firmware(), and then driver got failed
when bringing up legacy chips. We expect the CLM blob file for legacy chip
is not existence in firmware path, but the -ENOENT error is transferred to
-EAGAIN in firmware_class.c with user helper.
Because of that, we continue with CLM data currently present in firmware
if getting error from doing request_firmware().

Cc: stable@vger.kernel.org # v4.15.y
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Wright Feng <wright.feng@cypress.com>
---
v2: remove retry from patch v1
v3: remove redundant log print
v4: modify log print
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index 6a59d06..9be0b05 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -182,12 +182,9 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp)
 
 	err = request_firmware(&clm, clm_name, dev);
 	if (err) {
-		if (err == -ENOENT) {
-			brcmf_dbg(INFO, "continue with CLM data currently present in firmware\n");
-			return 0;
-		}
-		brcmf_err("request CLM blob file failed (%d)\n", err);
-		return err;
+		brcmf_info("no clm_blob available(err=%d), device may have limited channels available\n",
+			   err);
+		return 0;
 	}
 
 	chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled
  2018-01-16  9:26 [PATCH v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled Wright Feng
@ 2018-01-16 15:02 ` Kalle Valo
  2018-01-16 19:17 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-16 15:02 UTC (permalink / raw)
  To: Wright Feng
  Cc: arend.vanspriel, franky.lin, hante.meuleman, chi-hsien.lin,
	wright.feng, linux-wireless, brcm80211-dev-list.pdl, stable

Wright Feng <wright.feng@cypress.com> wrote:

> For legacy chips without CLM blob files, kernel with user helper function
> returns -EAGAIN when we request_firmware(), and then driver got failed
> when bringing up legacy chips. We expect the CLM blob file for legacy chip
> is not existence in firmware path, but the -ENOENT error is transferred to
> -EAGAIN in firmware_class.c with user helper.
> Because of that, we continue with CLM data currently present in firmware
> if getting error from doing request_firmware().
> 
> Cc: stable@vger.kernel.org # v4.15.y
> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Wright Feng <wright.feng@cypress.com>

I'll try to squeeze this to 4.15 still.

-- 
https://patchwork.kernel.org/patch/10166257/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled
  2018-01-16  9:26 [PATCH v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled Wright Feng
  2018-01-16 15:02 ` [v4] " Kalle Valo
@ 2018-01-16 19:17 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-16 19:17 UTC (permalink / raw)
  To: Wright Feng
  Cc: arend.vanspriel, franky.lin, hante.meuleman, chi-hsien.lin,
	wright.feng, linux-wireless, brcm80211-dev-list.pdl, stable

Wright Feng <wright.feng@cypress.com> wrote:

> For legacy chips without CLM blob files, kernel with user helper function
> returns -EAGAIN when we request_firmware(), and then driver got failed
> when bringing up legacy chips. We expect the CLM blob file for legacy chip
> is not existence in firmware path, but the -ENOENT error is transferred to
> -EAGAIN in firmware_class.c with user helper.
> Because of that, we continue with CLM data currently present in firmware
> if getting error from doing request_firmware().
> 
> Cc: stable@vger.kernel.org # v4.15.y
> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Wright Feng <wright.feng@cypress.com>

Patch applied to wireless-drivers.git, thanks.

cc124d5cc8d8 brcmfmac: fix CLM load error for legacy chips when user helper is enabled

-- 
https://patchwork.kernel.org/patch/10166257/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-16 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16  9:26 [PATCH v4] brcmfmac: fix CLM load error for legacy chips when user helper is enabled Wright Feng
2018-01-16 15:02 ` [v4] " Kalle Valo
2018-01-16 19:17 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.