staging: wfx: improve error message on unexpected confirmation
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 17 Dec 2019 16:14:46 +0000 (16:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Dec 2019 14:55:58 +0000 (15:55 +0100)
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@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-15-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/hif_rx.c

index 820de21..1494ad5 100644 (file)
@@ -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);
 }