Lines Matching defs:nfc_tgt
707 static int pn533_target_found_type_a(struct nfc_target *nfc_tgt, u8 *tgt_data,
719 nfc_tgt->supported_protocols = NFC_PROTO_MIFARE_MASK;
722 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_MASK;
725 nfc_tgt->supported_protocols = NFC_PROTO_NFC_DEP_MASK;
728 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_MASK |
733 nfc_tgt->sens_res = be16_to_cpu(tgt_type_a->sens_res);
734 nfc_tgt->sel_res = tgt_type_a->sel_res;
735 nfc_tgt->nfcid1_len = tgt_type_a->nfcid_len;
736 memcpy(nfc_tgt->nfcid1, tgt_type_a->nfcid_data, nfc_tgt->nfcid1_len);
765 static int pn533_target_found_felica(struct nfc_target *nfc_tgt, u8 *tgt_data,
777 nfc_tgt->supported_protocols = NFC_PROTO_NFC_DEP_MASK;
779 nfc_tgt->supported_protocols = NFC_PROTO_FELICA_MASK;
781 memcpy(nfc_tgt->sensf_res, &tgt_felica->opcode, 9);
782 nfc_tgt->sensf_res_len = 9;
784 memcpy(nfc_tgt->nfcid2, tgt_felica->nfcid2, NFC_NFCID2_MAXSIZE);
785 nfc_tgt->nfcid2_len = NFC_NFCID2_MAXSIZE;
817 static int pn533_target_found_jewel(struct nfc_target *nfc_tgt, u8 *tgt_data,
827 nfc_tgt->supported_protocols = NFC_PROTO_JEWEL_MASK;
828 nfc_tgt->sens_res = be16_to_cpu(tgt_jewel->sens_res);
829 nfc_tgt->nfcid1_len = 4;
830 memcpy(nfc_tgt->nfcid1, tgt_jewel->jewelid, nfc_tgt->nfcid1_len);
876 static int pn533_target_found_type_b(struct nfc_target *nfc_tgt, u8 *tgt_data,
886 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
895 struct nfc_target nfc_tgt;
904 memset(&nfc_tgt, 0, sizeof(struct nfc_target));
908 rc = pn533_target_found_type_a(&nfc_tgt, tgdata, tgdata_len);
912 rc = pn533_target_found_felica(&nfc_tgt, tgdata, tgdata_len);
915 rc = pn533_target_found_jewel(&nfc_tgt, tgdata, tgdata_len);
918 rc = pn533_target_found_type_b(&nfc_tgt, tgdata, tgdata_len);
929 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) {
937 nfc_tgt.supported_protocols);
939 dev->tgt_available_prots = nfc_tgt.supported_protocols;
942 nfc_targets_found(dev->nfc_dev, &nfc_tgt, 1);
1401 struct nfc_target nfc_tgt;
1428 memset(&nfc_tgt, 0, sizeof(struct nfc_target));
1432 rc = pn533_target_found_type_a(&nfc_tgt, apr->tgdata,
1438 rc = pn533_target_found_felica(&nfc_tgt, apr->tgdata,
1443 rc = pn533_target_found_jewel(&nfc_tgt, apr->tgdata,
1448 rc = pn533_target_found_type_b(&nfc_tgt, apr->tgdata,
1453 rc = pn533_target_found_type_a(&nfc_tgt, apr->tgdata,
1465 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) {
1472 dev->tgt_available_prots = nfc_tgt.supported_protocols;
1478 nfc_targets_found(dev->nfc_dev, &nfc_tgt, 1);