diff options
author | Arend van Spriel <arend@broadcom.com> | 2014-10-28 14:56:09 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-30 20:24:50 +0100 |
commit | 9c6476668025e76a8365be783f2649fe3259b91c (patch) | |
tree | d91aafc832b4e3e29d5782e9aa18fca6bd9b49a1 /drivers/net/wireless | |
parent | brcmfmac: remove unused defintion (diff) | |
download | linux-9c6476668025e76a8365be783f2649fe3259b91c.tar.xz linux-9c6476668025e76a8365be783f2649fe3259b91c.zip |
brcmfmac: do not use firmware error code in driver
Passing the firmware error codes up the driver may be mapped to
linux error numbers which may impact proper fault analysis. So
better pass up a generic failure code, ie. -EBADE and only show
firmware error code in FIL debug message.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c index 42da73e26142..dccbdc1aae6d 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c @@ -122,12 +122,11 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) err = brcmf_proto_query_dcmd(drvr, ifp->ifidx, cmd, data, len); if (err >= 0) - err = 0; - else - brcmf_dbg(FIL, "Failed: %s (%d)\n", - brcmf_fil_get_errstr((u32)(-err)), err); + return 0; - return err; + brcmf_dbg(FIL, "Failed: %s (%d)\n", + brcmf_fil_get_errstr((u32)(-err)), err); + return -EBADE; } s32 |