summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-11-13 00:30:35 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2014-12-02 02:01:21 +0100
commitba4db551bb48943bcebdacc30219d35a1248de11 (patch)
tree8f3d138ac8fc898240d9c08676f237c07438dc8d
parentc7dea2525b0a2c10423ddabea7c0ccc635380ba7 (diff)
downloadop-kernel-dev-ba4db551bb48943bcebdacc30219d35a1248de11.zip
op-kernel-dev-ba4db551bb48943bcebdacc30219d35a1248de11.tar.gz
NFC: nci: Update nci_discover_se to run proprietary commands to discover all available secure element
Some NFC controller using NCI protocols may need a proprietary commands flow to discover all available 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 cfea607..8399a79 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -72,6 +72,7 @@ struct nci_ops {
int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
int (*setup)(struct nci_dev *ndev);
__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
+ int (*discover_se)(struct nci_dev *ndev);
};
#define NCI_MAX_SUPPORTED_RF_INTERFACES 4
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index a354d19..4044973 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -756,6 +756,11 @@ static int nci_disable_se(struct nfc_dev *nfc_dev, u32 se_idx)
static int nci_discover_se(struct nfc_dev *nfc_dev)
{
+ struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
+
+ if (ndev->ops->discover_se)
+ return ndev->ops->discover_se(ndev);
+
return 0;
}
OpenPOWER on IntegriCloud