NFC: nci: Update nci_discover_se to run proprietary commands to discover all availabl...
authorChristophe Ricard <christophe.ricard@gmail.com>
Wed, 12 Nov 2014 23:30:35 +0000 (00:30 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 2 Dec 2014 01:01:21 +0000 (02:01 +0100)
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>
include/net/nfc/nci_core.h
net/nfc/nci/core.c

index cfea60748a3900ec8576f67246473cd3f440817e..8399a7964de43ff87238e753c3160fda7ef55903 100644 (file)
@@ -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
index a354d1985d50551d89a6c7e6f27aaea1f57cdf48..4044973084a7a43797dbc3f5c7f0a5b8ffd54598 100644 (file)
@@ -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;
 }
 
This page took 0.037191 seconds and 5 git commands to generate.