aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-11-12 18:30:38 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2014-12-01 20:01:21 -0500
commita688bf55c5908d2206307a9f76d31172ee2b2d92 (patch)
tree10383ae4956bbcea0affd6893a9d224aca954c88 /net
parente9ef9431a347185a8a6a88b072506047d329e480 (diff)
NFC: nci: Add se_io NCI operand
se_io allows to send apdu over the CLF to the embedded Secure Element. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/nfc/nci/core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index bcb70a6b17cd..552b13ba7b32 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -774,6 +774,19 @@ static int nci_discover_se(struct nfc_dev *nfc_dev)
774 return 0; 774 return 0;
775} 775}
776 776
777static int nci_se_io(struct nfc_dev *nfc_dev, u32 se_idx,
778 u8 *apdu, size_t apdu_length,
779 se_io_cb_t cb, void *cb_context)
780{
781 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
782
783 if (ndev->ops->se_io)
784 return ndev->ops->se_io(ndev, se_idx, apdu,
785 apdu_length, cb, cb_context);
786
787 return 0;
788}
789
777static struct nfc_ops nci_nfc_ops = { 790static struct nfc_ops nci_nfc_ops = {
778 .dev_up = nci_dev_up, 791 .dev_up = nci_dev_up,
779 .dev_down = nci_dev_down, 792 .dev_down = nci_dev_down,
@@ -788,6 +801,7 @@ static struct nfc_ops nci_nfc_ops = {
788 .enable_se = nci_enable_se, 801 .enable_se = nci_enable_se,
789 .disable_se = nci_disable_se, 802 .disable_se = nci_disable_se,
790 .discover_se = nci_discover_se, 803 .discover_se = nci_discover_se,
804 .se_io = nci_se_io,
791}; 805};
792 806
793/* ---- Interface to NCI drivers ---- */ 807/* ---- Interface to NCI drivers ---- */