diff options
author | Arron Wang <arron.wang@intel.com> | 2012-09-27 17:32:57 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-10-26 18:26:45 +0200 |
commit | c40d17401f89f575a6ff5774abaa0838398b820c (patch) | |
tree | b15731a619e99d60ea2f1ffd44ab08c9cdef3cb8 /net/nfc | |
parent | 928326f2237d2dd62b2fb9374c655cd906549868 (diff) | |
download | linux-c40d17401f89f575a6ff5774abaa0838398b820c.tar.bz2 |
NFC: Implement HCI DEP link up and down
And implement the corresponding hooks for pn544.
Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/hci/core.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index 052a0a27ac1a..777deb84aa73 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c @@ -546,6 +546,28 @@ static void hci_stop_poll(struct nfc_dev *nfc_dev) NFC_HCI_EVT_END_OPERATION, NULL, 0); } +static int hci_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target, + __u8 comm_mode, __u8 *gb, size_t gb_len) +{ + struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev); + + if (hdev->ops->dep_link_up) + return hdev->ops->dep_link_up(hdev, target, comm_mode, + gb, gb_len); + + return 0; +} + +static int hci_dep_link_down(struct nfc_dev *nfc_dev) +{ + struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev); + + if (hdev->ops->dep_link_down) + return hdev->ops->dep_link_down(hdev); + + return 0; +} + static int hci_activate_target(struct nfc_dev *nfc_dev, struct nfc_target *target, u32 protocol) { @@ -731,6 +753,8 @@ static struct nfc_ops hci_nfc_ops = { .dev_down = hci_dev_down, .start_poll = hci_start_poll, .stop_poll = hci_stop_poll, + .dep_link_up = hci_dep_link_up, + .dep_link_down = hci_dep_link_down, .activate_target = hci_activate_target, .deactivate_target = hci_deactivate_target, .im_transceive = hci_transceive, |