aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_ncm.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2013-11-01 06:16:55 -0400
committerDavid S. Miller <davem@davemloft.net>2013-11-02 02:02:04 -0400
commit5448d75f71b2966df0f0da71b9d08eeb2811a80b (patch)
tree72d729a66118f3b8706f990b7992be61d26f6cbd /drivers/net/usb/cdc_ncm.c
parentae223cd406dd63487ad96593248a669da8e551cd (diff)
net: cdc_ncm: log signatures in hex
These signatures are well known bit patterns, mostly made up of ascii characters. Mentally parsing works best if they are printed in hex. Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/cdc_ncm.c')
-rw-r--r--drivers/net/usb/cdc_ncm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 73faf05209b3..d49e4c5b292a 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -883,8 +883,9 @@ int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in)
883 nth16 = (struct usb_cdc_ncm_nth16 *)skb_in->data; 883 nth16 = (struct usb_cdc_ncm_nth16 *)skb_in->data;
884 884
885 if (le32_to_cpu(nth16->dwSignature) != USB_CDC_NCM_NTH16_SIGN) { 885 if (le32_to_cpu(nth16->dwSignature) != USB_CDC_NCM_NTH16_SIGN) {
886 pr_debug("invalid NTH16 signature <%u>\n", 886 netif_dbg(dev, rx_err, dev->net,
887 le32_to_cpu(nth16->dwSignature)); 887 "invalid NTH16 signature <%#010x>\n",
888 le32_to_cpu(nth16->dwSignature));
888 goto error; 889 goto error;
889 } 890 }
890 891
@@ -972,8 +973,9 @@ next_ndp:
972 ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb_in->data + ndpoffset); 973 ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb_in->data + ndpoffset);
973 974
974 if (le32_to_cpu(ndp16->dwSignature) != USB_CDC_NCM_NDP16_NOCRC_SIGN) { 975 if (le32_to_cpu(ndp16->dwSignature) != USB_CDC_NCM_NDP16_NOCRC_SIGN) {
975 pr_debug("invalid DPT16 signature <%u>\n", 976 netif_dbg(dev, rx_err, dev->net,
976 le32_to_cpu(ndp16->dwSignature)); 977 "invalid DPT16 signature <%#010x>\n",
978 le32_to_cpu(ndp16->dwSignature));
977 goto err_ndp; 979 goto err_ndp;
978 } 980 }
979 dpe16 = ndp16->dpe16; 981 dpe16 = ndp16->dpe16;