aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/microread/microread.c16
-rw-r--r--drivers/nfc/st21nfca/Makefile5
-rw-r--r--drivers/nfc/st21nfcb/Makefile5
3 files changed, 18 insertions, 8 deletions
diff --git a/drivers/nfc/microread/microread.c b/drivers/nfc/microread/microread.c
index f868333271aa..963a4a5dc88e 100644
--- a/drivers/nfc/microread/microread.c
+++ b/drivers/nfc/microread/microread.c
@@ -501,9 +501,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
501 targets->sens_res = 501 targets->sens_res =
502 be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]); 502 be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]);
503 targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK]; 503 targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
504 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
505 skb->data[MICROREAD_EMCF_A_LEN]);
506 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN]; 504 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
505 if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
506 r = -EINVAL;
507 goto exit_free;
508 }
509 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
510 targets->nfcid1_len);
507 break; 511 break;
508 case MICROREAD_GATE_ID_MREAD_ISO_A_3: 512 case MICROREAD_GATE_ID_MREAD_ISO_A_3:
509 targets->supported_protocols = 513 targets->supported_protocols =
@@ -511,9 +515,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
511 targets->sens_res = 515 targets->sens_res =
512 be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]); 516 be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]);
513 targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK]; 517 targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
514 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
515 skb->data[MICROREAD_EMCF_A3_LEN]);
516 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN]; 518 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
519 if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
520 r = -EINVAL;
521 goto exit_free;
522 }
523 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
524 targets->nfcid1_len);
517 break; 525 break;
518 case MICROREAD_GATE_ID_MREAD_ISO_B: 526 case MICROREAD_GATE_ID_MREAD_ISO_B:
519 targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK; 527 targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
diff --git a/drivers/nfc/st21nfca/Makefile b/drivers/nfc/st21nfca/Makefile
index db7a38ae05f7..7d688f97aa27 100644
--- a/drivers/nfc/st21nfca/Makefile
+++ b/drivers/nfc/st21nfca/Makefile
@@ -2,7 +2,8 @@
2# Makefile for ST21NFCA HCI based NFC driver 2# Makefile for ST21NFCA HCI based NFC driver
3# 3#
4 4
5st21nfca_i2c-objs = i2c.o 5st21nfca_hci-objs = st21nfca.o st21nfca_dep.o
6obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o
6 7
7obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o 8st21nfca_i2c-objs = i2c.o
8obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o 9obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o
diff --git a/drivers/nfc/st21nfcb/Makefile b/drivers/nfc/st21nfcb/Makefile
index 13d9f03b2fea..f4d835dd15f2 100644
--- a/drivers/nfc/st21nfcb/Makefile
+++ b/drivers/nfc/st21nfcb/Makefile
@@ -2,7 +2,8 @@
2# Makefile for ST21NFCB NCI based NFC driver 2# Makefile for ST21NFCB NCI based NFC driver
3# 3#
4 4
5st21nfcb_i2c-objs = i2c.o 5st21nfcb_nci-objs = ndlc.o st21nfcb.o
6obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o
6 7
7obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o 8st21nfcb_i2c-objs = i2c.o
8obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o 9obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o