aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/pn533.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nfc/pn533.c')
-rw-r--r--drivers/nfc/pn533.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 37786ff18c36..84d8175db818 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -1806,7 +1806,17 @@ static int pn533_build_tx_frame(struct pn533 *dev, struct sk_buff *skb,
1806 1806
1807 if (target == true) { 1807 if (target == true) {
1808 switch (dev->device_type) { 1808 switch (dev->device_type) {
1809 case PN533_DEVICE_STD: 1809 case PN533_DEVICE_PASORI:
1810 if (dev->tgt_active_prot == NFC_PROTO_FELICA) {
1811 skb_push(skb, PN533_CMD_DATAEXCH_HEAD_LEN - 1);
1812 out_frame = (struct pn533_frame *) skb->data;
1813 pn533_tx_frame_init(out_frame,
1814 PN533_CMD_IN_COMM_THRU);
1815
1816 break;
1817 }
1818
1819 default:
1810 skb_push(skb, PN533_CMD_DATAEXCH_HEAD_LEN); 1820 skb_push(skb, PN533_CMD_DATAEXCH_HEAD_LEN);
1811 out_frame = (struct pn533_frame *) skb->data; 1821 out_frame = (struct pn533_frame *) skb->data;
1812 pn533_tx_frame_init(out_frame, 1822 pn533_tx_frame_init(out_frame,
@@ -1815,19 +1825,8 @@ static int pn533_build_tx_frame(struct pn533 *dev, struct sk_buff *skb,
1815 memcpy(PN533_FRAME_CMD_PARAMS_PTR(out_frame), 1825 memcpy(PN533_FRAME_CMD_PARAMS_PTR(out_frame),
1816 &tg, sizeof(u8)); 1826 &tg, sizeof(u8));
1817 out_frame->datalen += sizeof(u8); 1827 out_frame->datalen += sizeof(u8);
1818 break;
1819
1820 case PN533_DEVICE_PASORI:
1821 skb_push(skb, PN533_CMD_DATAEXCH_HEAD_LEN - 1);
1822 out_frame = (struct pn533_frame *) skb->data;
1823 pn533_tx_frame_init(out_frame, PN533_CMD_IN_COMM_THRU);
1824 1828
1825 break; 1829 break;
1826
1827 default:
1828 nfc_dev_err(&dev->interface->dev,
1829 "Unknown device type %d", dev->device_type);
1830 return -EINVAL;
1831 } 1830 }
1832 1831
1833 } else { 1832 } else {