mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
NFC: HCI check presence must not fail when driver doesn't support it
When the driver does not support checking the tag is still present, it must return -EOPNOTSUPP. The NFC Core will then stop asking and not report a tag lost event to user space. Signed-off-by: Eric Lapuyade <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
da052850b9
commit
632c016ab8
2 changed files with 4 additions and 1 deletions
|
|
@ -986,7 +986,7 @@ static int pn544_hci_check_presence(struct nfc_hci_dev *hdev,
|
|||
} else if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) {
|
||||
if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
|
||||
target->nfcid1_len != 10)
|
||||
return -EPROTO;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE,
|
||||
PN544_RF_READER_CMD_ACTIVATE_NEXT,
|
||||
|
|
|
|||
Loading…
Reference in a new issue