Lines Matching refs:nfc_tgt

715 static int pn533_target_found_type_a(struct nfc_target *nfc_tgt, u8 *tgt_data,  in pn533_target_found_type_a()  argument
727 nfc_tgt->supported_protocols = NFC_PROTO_MIFARE_MASK; in pn533_target_found_type_a()
730 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_MASK; in pn533_target_found_type_a()
733 nfc_tgt->supported_protocols = NFC_PROTO_NFC_DEP_MASK; in pn533_target_found_type_a()
736 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_MASK | in pn533_target_found_type_a()
741 nfc_tgt->sens_res = be16_to_cpu(tgt_type_a->sens_res); in pn533_target_found_type_a()
742 nfc_tgt->sel_res = tgt_type_a->sel_res; in pn533_target_found_type_a()
743 nfc_tgt->nfcid1_len = tgt_type_a->nfcid_len; in pn533_target_found_type_a()
744 memcpy(nfc_tgt->nfcid1, tgt_type_a->nfcid_data, nfc_tgt->nfcid1_len); in pn533_target_found_type_a()
773 static int pn533_target_found_felica(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_felica() argument
785 nfc_tgt->supported_protocols = NFC_PROTO_NFC_DEP_MASK; in pn533_target_found_felica()
787 nfc_tgt->supported_protocols = NFC_PROTO_FELICA_MASK; in pn533_target_found_felica()
789 memcpy(nfc_tgt->sensf_res, &tgt_felica->opcode, 9); in pn533_target_found_felica()
790 nfc_tgt->sensf_res_len = 9; in pn533_target_found_felica()
792 memcpy(nfc_tgt->nfcid2, tgt_felica->nfcid2, NFC_NFCID2_MAXSIZE); in pn533_target_found_felica()
793 nfc_tgt->nfcid2_len = NFC_NFCID2_MAXSIZE; in pn533_target_found_felica()
825 static int pn533_target_found_jewel(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_jewel() argument
835 nfc_tgt->supported_protocols = NFC_PROTO_JEWEL_MASK; in pn533_target_found_jewel()
836 nfc_tgt->sens_res = be16_to_cpu(tgt_jewel->sens_res); in pn533_target_found_jewel()
837 nfc_tgt->nfcid1_len = 4; in pn533_target_found_jewel()
838 memcpy(nfc_tgt->nfcid1, tgt_jewel->jewelid, nfc_tgt->nfcid1_len); in pn533_target_found_jewel()
884 static int pn533_target_found_type_b(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_type_b() argument
894 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_B_MASK; in pn533_target_found_type_b()
903 struct nfc_target nfc_tgt; in pn533_target_found() local
912 memset(&nfc_tgt, 0, sizeof(struct nfc_target)); in pn533_target_found()
916 rc = pn533_target_found_type_a(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
920 rc = pn533_target_found_felica(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
923 rc = pn533_target_found_jewel(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
926 rc = pn533_target_found_type_b(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
937 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) { in pn533_target_found()
945 nfc_tgt.supported_protocols); in pn533_target_found()
947 dev->tgt_available_prots = nfc_tgt.supported_protocols; in pn533_target_found()
950 nfc_targets_found(dev->nfc_dev, &nfc_tgt, 1); in pn533_target_found()
1425 struct nfc_target nfc_tgt; in pn533_autopoll_complete() local
1452 memset(&nfc_tgt, 0, sizeof(struct nfc_target)); in pn533_autopoll_complete()
1456 rc = pn533_target_found_type_a(&nfc_tgt, apr->tgdata, in pn533_autopoll_complete()
1462 rc = pn533_target_found_felica(&nfc_tgt, apr->tgdata, in pn533_autopoll_complete()
1467 rc = pn533_target_found_jewel(&nfc_tgt, apr->tgdata, in pn533_autopoll_complete()
1472 rc = pn533_target_found_type_b(&nfc_tgt, apr->tgdata, in pn533_autopoll_complete()
1477 rc = pn533_target_found_type_a(&nfc_tgt, apr->tgdata, in pn533_autopoll_complete()
1489 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) { in pn533_autopoll_complete()
1496 dev->tgt_available_prots = nfc_tgt.supported_protocols; in pn533_autopoll_complete()
1502 nfc_targets_found(dev->nfc_dev, &nfc_tgt, 1); in pn533_autopoll_complete()