[PATCH 14/55] staging: wfx: improve error message on unexpected confirmation

Jérôme Pouiller Jerome.Pouiller at silabs.com
Mon Dec 16 17:03:40 UTC 2019


From: Jérôme Pouiller <jerome.pouiller at silabs.com>

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 <jerome.pouiller at silabs.com>
---
 drivers/staging/wfx/hif_rx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
index 820de216be0c..1494ad5a507b 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);
 }
-- 
2.20.1


More information about the devel mailing list