Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93bca2bf authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz
Browse files

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: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ba4db551
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -73,6 +73,7 @@ struct nci_ops {
	int   (*setup)(struct nci_dev *ndev);
	int   (*setup)(struct nci_dev *ndev);
	__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
	__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
	int   (*discover_se)(struct nci_dev *ndev);
	int   (*discover_se)(struct nci_dev *ndev);
	int   (*enable_se)(struct nci_dev *ndev, u32 se_idx);
};
};


#define NCI_MAX_SUPPORTED_RF_INTERFACES		4
#define NCI_MAX_SUPPORTED_RF_INTERFACES		4
+5 −0
Original line number Original line Diff line number Diff line
@@ -746,6 +746,11 @@ static int nci_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)


static int nci_enable_se(struct nfc_dev *nfc_dev, u32 se_idx)
static int nci_enable_se(struct nfc_dev *nfc_dev, u32 se_idx)
{
{
	struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);

	if (ndev->ops->enable_se)
		return ndev->ops->enable_se(ndev, se_idx);

	return 0;
	return 0;
}
}