brcmfmac: Return actual error by fwil.
authorHante Meuleman <meuleman@broadcom.com>
Wed, 25 Nov 2015 10:32:38 +0000 (11:32 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 30 Nov 2015 12:46:38 +0000 (14:46 +0200)
FWIL is always mapping back errors to EBADE. This is not very
conventient when trying to understand problems by reading logs.
Some callers print the error code, but that is quite useless
when the exact error code is not returned. It also makes it
impossible to differentiate based on error code. This patch
changes the return of EBADE into the actual error code.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c

index bbf7abbf09015b083d84d428556c1a3c76daf62e..f6a2df94dba727022dc7f03b43d06af275b32c00 100644 (file)
@@ -126,7 +126,8 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set)
 
        brcmf_dbg(FIL, "Failed: %s (%d)\n",
                  brcmf_fil_get_errstr((u32)(-err)), err);
-       return -EBADE;
+
+       return err;
 }
 
 s32