Lines Matching refs:target
445 struct nfc_target *target, u8 comm_mode,
451 r = nfc_hci_get_param(hdev, target->hci_reader_gate,
467 r = nfc_dep_link_is_up(hdev->ndev, target->idx, comm_mode,
482 struct nfc_target *target)
486 target->supported_protocols = NFC_PROTO_FELICA_MASK;
489 target->supported_protocols = NFC_PROTO_JEWEL_MASK;
490 target->sens_res = 0x0c00;
493 target->supported_protocols = NFC_PROTO_NFC_DEP_MASK;
504 struct nfc_target *target)
512 if (target->supported_protocols & NFC_PROTO_NFC_DEP_MASK) {
519 target->hci_reader_gate = PN544_RF_READER_NFCIP1_INITIATOR_GATE;
520 } else if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) {
521 if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
522 target->nfcid1_len != 10)
527 target->nfcid1, target->nfcid1_len, NULL);
528 } else if (target->supported_protocols & NFC_PROTO_FELICA_MASK) {
549 target->supported_protocols = NFC_PROTO_NFC_DEP_MASK;
550 target->hci_reader_gate =
558 } else if (target->supported_protocols & NFC_PROTO_ISO14443_MASK) {
563 if (target->sens_res == 0x4403) /* Type 4 Mifare DESFire */
604 struct nfc_target *target,
611 target->hci_reader_gate);
613 switch (target->hci_reader_gate) {
615 if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) {
634 target->hci_reader_gate,
648 return nfc_hci_send_cmd_async(hdev, target->hci_reader_gate,
653 return nfc_hci_send_cmd_async(hdev, target->hci_reader_gate,
659 return nfc_hci_send_event(hdev, target->hci_reader_gate,
683 struct nfc_target *target)
685 pr_debug("supported protocol %d\n", target->supported_protocols);
686 if (target->supported_protocols & (NFC_PROTO_ISO14443_MASK |
688 return nfc_hci_send_cmd(hdev, target->hci_reader_gate,
691 } else if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) {
692 if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
693 target->nfcid1_len != 10)
698 target->nfcid1, target->nfcid1_len, NULL);
699 } else if (target->supported_protocols & (NFC_PROTO_JEWEL_MASK |
702 } else if (target->supported_protocols & NFC_PROTO_NFC_DEP_MASK) {
703 return nfc_hci_send_cmd(hdev, target->hci_reader_gate,