aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@linux.intel.com>2013-04-29 11:47:42 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-13 18:26:09 -0400
commit9a695d23aab889273821c91b4132f1ed315b251b (patch)
treeb9c2c8f3130e365821df7966d5d6fc4b27e75838 /net/nfc
parent9674da8759df0d6c0d24e1ede6e2a1acdef91e3c (diff)
NFC: HCI: Implement fw_upload ops
This is a simple forward to the HCI driver. When driver is done with the operation, it shall directly notify NFC Core by calling nfc_fw_upload_done(). Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/hci/core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index 91020b210d87..b7e4dac5654e 100644
--- a/net/nfc/hci/core.c
+++ b/net/nfc/hci/core.c
@@ -779,6 +779,16 @@ static void nfc_hci_recv_from_llc(struct nfc_hci_dev *hdev, struct sk_buff *skb)
779 } 779 }
780} 780}
781 781
782static int hci_fw_upload(struct nfc_dev *nfc_dev, const char *firmware_name)
783{
784 struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev);
785
786 if (hdev->ops->fw_upload)
787 return hdev->ops->fw_upload(hdev, firmware_name);
788
789 return -ENOTSUPP;
790}
791
782static struct nfc_ops hci_nfc_ops = { 792static struct nfc_ops hci_nfc_ops = {
783 .dev_up = hci_dev_up, 793 .dev_up = hci_dev_up,
784 .dev_down = hci_dev_down, 794 .dev_down = hci_dev_down,
@@ -791,6 +801,7 @@ static struct nfc_ops hci_nfc_ops = {
791 .im_transceive = hci_transceive, 801 .im_transceive = hci_transceive,
792 .tm_send = hci_tm_send, 802 .tm_send = hci_tm_send,
793 .check_presence = hci_check_presence, 803 .check_presence = hci_check_presence,
804 .fw_upload = hci_fw_upload,
794}; 805};
795 806
796struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, 807struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops,