Lines Matching refs:nfc_tgt
1256 static int pn533_target_found_type_a(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_type_a() argument
1268 nfc_tgt->supported_protocols = NFC_PROTO_MIFARE_MASK; in pn533_target_found_type_a()
1271 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_MASK; in pn533_target_found_type_a()
1274 nfc_tgt->supported_protocols = NFC_PROTO_NFC_DEP_MASK; in pn533_target_found_type_a()
1277 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_MASK | in pn533_target_found_type_a()
1282 nfc_tgt->sens_res = be16_to_cpu(tgt_type_a->sens_res); in pn533_target_found_type_a()
1283 nfc_tgt->sel_res = tgt_type_a->sel_res; in pn533_target_found_type_a()
1284 nfc_tgt->nfcid1_len = tgt_type_a->nfcid_len; in pn533_target_found_type_a()
1285 memcpy(nfc_tgt->nfcid1, tgt_type_a->nfcid_data, nfc_tgt->nfcid1_len); in pn533_target_found_type_a()
1314 static int pn533_target_found_felica(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_felica() argument
1326 nfc_tgt->supported_protocols = NFC_PROTO_NFC_DEP_MASK; in pn533_target_found_felica()
1328 nfc_tgt->supported_protocols = NFC_PROTO_FELICA_MASK; in pn533_target_found_felica()
1330 memcpy(nfc_tgt->sensf_res, &tgt_felica->opcode, 9); in pn533_target_found_felica()
1331 nfc_tgt->sensf_res_len = 9; in pn533_target_found_felica()
1333 memcpy(nfc_tgt->nfcid2, tgt_felica->nfcid2, NFC_NFCID2_MAXSIZE); in pn533_target_found_felica()
1334 nfc_tgt->nfcid2_len = NFC_NFCID2_MAXSIZE; in pn533_target_found_felica()
1366 static int pn533_target_found_jewel(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_jewel() argument
1376 nfc_tgt->supported_protocols = NFC_PROTO_JEWEL_MASK; in pn533_target_found_jewel()
1377 nfc_tgt->sens_res = be16_to_cpu(tgt_jewel->sens_res); in pn533_target_found_jewel()
1378 nfc_tgt->nfcid1_len = 4; in pn533_target_found_jewel()
1379 memcpy(nfc_tgt->nfcid1, tgt_jewel->jewelid, nfc_tgt->nfcid1_len); in pn533_target_found_jewel()
1425 static int pn533_target_found_type_b(struct nfc_target *nfc_tgt, u8 *tgt_data, in pn533_target_found_type_b() argument
1435 nfc_tgt->supported_protocols = NFC_PROTO_ISO14443_B_MASK; in pn533_target_found_type_b()
1443 struct nfc_target nfc_tgt; in pn533_target_found() local
1452 memset(&nfc_tgt, 0, sizeof(struct nfc_target)); in pn533_target_found()
1456 rc = pn533_target_found_type_a(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
1460 rc = pn533_target_found_felica(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
1463 rc = pn533_target_found_jewel(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
1466 rc = pn533_target_found_type_b(&nfc_tgt, tgdata, tgdata_len); in pn533_target_found()
1477 if (!(nfc_tgt.supported_protocols & dev->poll_protocols)) { in pn533_target_found()
1485 nfc_tgt.supported_protocols); in pn533_target_found()
1487 dev->tgt_available_prots = nfc_tgt.supported_protocols; in pn533_target_found()
1489 nfc_targets_found(dev->nfc_dev, &nfc_tgt, 1); in pn533_target_found()