NFC: hci: Add support for NOTIFY_ALL_PIPE_CLEARED
authorChristophe Ricard <christophe.ricard@gmail.com>
Wed, 12 Nov 2014 23:30:43 +0000 (00:30 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 2 Dec 2014 01:02:00 +0000 (02:02 +0100)
When switching from UICC to another, the CLF may signals to the Terminal
Host that some existing pipe are cleared for future update.

This notification needs to be "acked" by the Terminal Host with a ANY_OK
message.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/hci/core.c

index 779a3c1fc34421dac95c40fb5957b1a7c5c8f6c1..ef50e7716c4a8742840731db126351fee16bc57b 100644 (file)
@@ -200,6 +200,9 @@ void nfc_hci_cmd_received(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd,
                        nfc_hci_send_response(hdev, gate, NFC_HCI_ANY_OK,
                                              &gate_opened, 1);
                break;
+       case NFC_HCI_ADM_NOTIFY_ALL_PIPE_CLEARED:
+               nfc_hci_send_response(hdev, gate, NFC_HCI_ANY_OK, NULL, 0);
+               break;
        default:
                pr_info("Discarded unknown cmd %x to gate %x\n", cmd, gate);
                r = -EINVAL;