aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2012-12-10 08:42:47 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-09 18:51:36 -0500
commit99e591be3d95e55412585729624b05862bb5463c (patch)
tree34bc1f84afd3cdda042e87ba5cf27a899f81560e /drivers/nfc
parentb1e666f503b5479efe9adf79fb46f09fe4f04af5 (diff)
NFC: pn533: Dump tx and rx data in debug mode
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/pn533.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 91e1594dfd13..b445f0339e03 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -542,6 +542,9 @@ static void pn533_recv_response(struct urb *urb)
542 542
543 in_frame = dev->in_urb->transfer_buffer; 543 in_frame = dev->in_urb->transfer_buffer;
544 544
545 print_hex_dump(KERN_DEBUG, "PN533 RX: ", DUMP_PREFIX_NONE, 16, 1,
546 in_frame, PN533_FRAME_SIZE(in_frame), false);
547
545 if (!pn533_rx_frame_is_valid(in_frame)) { 548 if (!pn533_rx_frame_is_valid(in_frame)) {
546 nfc_dev_err(&dev->interface->dev, "Received an invalid frame"); 549 nfc_dev_err(&dev->interface->dev, "Received an invalid frame");
547 dev->wq_in_error = -EIO; 550 dev->wq_in_error = -EIO;
@@ -664,6 +667,9 @@ static int __pn533_send_cmd_frame_async(struct pn533 *dev,
664 dev->in_urb->transfer_buffer = in_frame; 667 dev->in_urb->transfer_buffer = in_frame;
665 dev->in_urb->transfer_buffer_length = in_frame_len; 668 dev->in_urb->transfer_buffer_length = in_frame_len;
666 669
670 print_hex_dump(KERN_DEBUG, "PN533 TX: ", DUMP_PREFIX_NONE, 16, 1,
671 out_frame, PN533_FRAME_SIZE(out_frame), false);
672
667 rc = usb_submit_urb(dev->out_urb, GFP_KERNEL); 673 rc = usb_submit_urb(dev->out_urb, GFP_KERNEL);
668 if (rc) 674 if (rc)
669 return rc; 675 return rc;