Code in function setting/querying device was treating every error as Broadcom protocol specific one. It wasn't right thing to do as most of subcalls return "normal" errors (errno-base.h). This resulted in e.g.: brcmf_usb_rx_ctlpkt: rxctl wait timed out brcmfmac: brcmf_fil_cmd_data Failed: BCME_NOTDOWN (-5) which was misleading because of interpreting -EIO as BCME_NOTDOWN. Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx> --- drivers/net/wireless/brcm80211/brcmfmac/bcdc.c | 5 ++++- drivers/net/wireless/brcm80211/brcmfmac/fwil.c | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c index 8e0e91c..47941ab 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcdc.c @@ -203,8 +203,11 @@ retry: } /* Check the ERROR flag */ - if (flags & BCDC_DCMD_ERROR) + if (flags & BCDC_DCMD_ERROR) { ret = le32_to_cpu(msg->status); + brcmf_dbg(BCDC, "received message with error %s (%d)\n", + brcmf_get_errstr((u32)(-ret)), ret); + } done: return ret; diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c index bdbdc9e..c86a522 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fwil.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwil.c @@ -53,8 +53,7 @@ brcmf_fil_cmd_data(struct brcmf_if *ifp, u32 cmd, void *data, u32 len, bool set) if (err >= 0) return 0; - brcmf_dbg(FIL, "Failed: %s (%d)\n", - brcmf_get_errstr((u32)(-err)), err); + brcmf_dbg(FIL, "Failed: %d\n", err); return -EBADE; } -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html