aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-11-12 18:30:36 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2014-12-01 20:01:21 -0500
commit93bca2bfa4b79b689603b56feeea0ebed2842cbe (patch)
treed0479cb079628f90d563d039b7e4ea253e3a479b
parentba4db551bb48943bcebdacc30219d35a1248de11 (diff)
NFC: nci: Update nci_enable_se to run proprietary commands to enable a secure element
Some NFC controller using NCI protocols may need a proprietary commands flow to enable a secure element Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--include/net/nfc/nci_core.h1
-rw-r--r--net/nfc/nci/core.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 8399a7964de4..db2d12790112 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -73,6 +73,7 @@ struct nci_ops {
73 int (*setup)(struct nci_dev *ndev); 73 int (*setup)(struct nci_dev *ndev);
74 __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol); 74 __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
75 int (*discover_se)(struct nci_dev *ndev); 75 int (*discover_se)(struct nci_dev *ndev);
76 int (*enable_se)(struct nci_dev *ndev, u32 se_idx);
76}; 77};
77 78
78#define NCI_MAX_SUPPORTED_RF_INTERFACES 4 79#define NCI_MAX_SUPPORTED_RF_INTERFACES 4
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 4044973084a7..6c36ec6e477c 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -746,6 +746,11 @@ static int nci_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)
746 746
747static int nci_enable_se(struct nfc_dev *nfc_dev, u32 se_idx) 747static int nci_enable_se(struct nfc_dev *nfc_dev, u32 se_idx)
748{ 748{
749 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
750
751 if (ndev->ops->enable_se)
752 return ndev->ops->enable_se(ndev, se_idx);
753
749 return 0; 754 return 0;
750} 755}
751 756