aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/hci
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2012-09-27 05:32:57 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-10-26 12:26:45 -0400
commitc40d17401f89f575a6ff5774abaa0838398b820c (patch)
treeb15731a619e99d60ea2f1ffd44ab08c9cdef3cb8 /net/nfc/hci
parent928326f2237d2dd62b2fb9374c655cd906549868 (diff)
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/hci')
-rw-r--r--net/nfc/hci/core.c24
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)
546 NFC_HCI_EVT_END_OPERATION, NULL, 0); 546 NFC_HCI_EVT_END_OPERATION, NULL, 0);
547} 547}
548 548
549static int hci_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target,
550 __u8 comm_mode, __u8 *gb, size_t gb_len)
551{
552 struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev);
553
554 if (hdev->ops->dep_link_up)
555 return hdev->ops->dep_link_up(hdev, target, comm_mode,
556 gb, gb_len);
557
558 return 0;
559}
560
561static int hci_dep_link_down(struct nfc_dev *nfc_dev)
562{
563 struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev);
564
565 if (hdev->ops->dep_link_down)
566 return hdev->ops->dep_link_down(hdev);
567
568 return 0;
569}
570
549static int hci_activate_target(struct nfc_dev *nfc_dev, 571static int hci_activate_target(struct nfc_dev *nfc_dev,
550 struct nfc_target *target, u32 protocol) 572 struct nfc_target *target, u32 protocol)
551{ 573{
@@ -731,6 +753,8 @@ static struct nfc_ops hci_nfc_ops = {
731 .dev_down = hci_dev_down, 753 .dev_down = hci_dev_down,
732 .start_poll = hci_start_poll, 754 .start_poll = hci_start_poll,
733 .stop_poll = hci_stop_poll, 755 .stop_poll = hci_stop_poll,
756 .dep_link_up = hci_dep_link_up,
757 .dep_link_down = hci_dep_link_down,
734 .activate_target = hci_activate_target, 758 .activate_target = hci_activate_target,
735 .deactivate_target = hci_deactivate_target, 759 .deactivate_target = hci_deactivate_target,
736 .im_transceive = hci_transceive, 760 .im_transceive = hci_transceive,