From: Jérôme Pouiller Date: Tue, 17 Dec 2019 16:14:46 +0000 (+0000) Subject: staging: wfx: improve error message on unexpected confirmation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=42edb537a3bb2b65733eb975b6ae405a9f5b43e9;p=linux.git staging: wfx: improve error message on unexpected confirmation When driver receives an unexpected answer from the device, it shows "unsupported HIF ID". That message does not represent the real error. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 820de216be0c5..1494ad5a507b6 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -358,7 +358,12 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) goto free; } } - dev_err(wdev->dev, "unsupported HIF ID %02x\n", hif_id); + if (hif_id & 0x80) + dev_err(wdev->dev, "unsupported HIF indication: ID %02x\n", + hif_id); + else + dev_err(wdev->dev, "unexpected HIF confirmation: ID %02x\n", + hif_id); free: dev_kfree_skb(skb); }