Lines Matching refs:nfc_tgt

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