Lines Matching refs:targets
471 struct nfc_target *targets;
476 targets = kzalloc(sizeof(struct nfc_target), GFP_KERNEL);
477 if (targets == NULL) {
482 targets->hci_reader_gate = gate;
486 targets->supported_protocols =
488 targets->sens_res =
490 targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
491 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
492 if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
496 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
497 targets->nfcid1_len);
500 targets->supported_protocols =
502 targets->sens_res =
504 targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
505 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
506 if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
510 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
511 targets->nfcid1_len);
514 targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
515 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_B_UID], 4);
516 targets->nfcid1_len = 4;
519 targets->supported_protocols = NFC_PROTO_JEWEL_MASK;
520 targets->sens_res =
522 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_T1_UID], 4);
523 targets->nfcid1_len = 4;
526 targets->supported_protocols = NFC_PROTO_FELICA_MASK;
527 memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_T3_UID], 8);
528 targets->nfcid1_len = 8;
535 r = nfc_targets_found(hdev->ndev, targets, 1);
538 kfree(targets);