Lines Matching refs:targets
473 struct nfc_target *targets;
478 targets = kzalloc(sizeof(struct nfc_target), GFP_KERNEL);
479 if (targets == NULL) {
484 targets->hci_reader_gate = gate;
488 targets->supported_protocols =
490 targets->sens_res =
492 targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
493 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
494 if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
498 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
499 targets->nfcid1_len);
502 targets->supported_protocols =
504 targets->sens_res =
506 targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
507 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
508 if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
512 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
513 targets->nfcid1_len);
516 targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
517 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_B_UID], 4);
518 targets->nfcid1_len = 4;
521 targets->supported_protocols = NFC_PROTO_JEWEL_MASK;
522 targets->sens_res =
524 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_T1_UID], 4);
525 targets->nfcid1_len = 4;
528 targets->supported_protocols = NFC_PROTO_FELICA_MASK;
529 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_T3_UID], 8);
530 targets->nfcid1_len = 8;
537 r = nfc_targets_found(hdev->ndev, targets, 1);
540 kfree(targets);