NFC: pn533: Dump tx and rx data in debug mode
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Mon, 10 Dec 2012 13:42:47 +0000 (14:42 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 9 Jan 2013 23:51:36 +0000 (00:51 +0100)
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/pn533.c

index 91e1594dfd1394ded59d066661692e268225f48c..b445f0339e03f05eefe4e2b5fef2387eff14fbaa 100644 (file)
@@ -542,6 +542,9 @@ static void pn533_recv_response(struct urb *urb)
 
        in_frame = dev->in_urb->transfer_buffer;
 
+       print_hex_dump(KERN_DEBUG, "PN533 RX: ", DUMP_PREFIX_NONE, 16, 1,
+                      in_frame, PN533_FRAME_SIZE(in_frame), false);
+
        if (!pn533_rx_frame_is_valid(in_frame)) {
                nfc_dev_err(&dev->interface->dev, "Received an invalid frame");
                dev->wq_in_error = -EIO;
@@ -664,6 +667,9 @@ static int __pn533_send_cmd_frame_async(struct pn533 *dev,
        dev->in_urb->transfer_buffer = in_frame;
        dev->in_urb->transfer_buffer_length = in_frame_len;
 
+       print_hex_dump(KERN_DEBUG, "PN533 TX: ", DUMP_PREFIX_NONE, 16, 1,
+                      out_frame, PN533_FRAME_SIZE(out_frame), false);
+
        rc = usb_submit_urb(dev->out_urb, GFP_KERNEL);
        if (rc)
                return rc;