summaryrefslogtreecommitdiffstats
path: root/include/net/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-12-19 19:11:32 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-10 00:51:54 +0100
commit390a1bd8538132186ddb679cafe9e75b7ef7e2d2 (patch)
tree1c548396163a30e0e29f6572cf7b6f0c645085ba /include/net/nfc
parent2ad554a502facd705ce6eb362d0f1ac3ca426508 (diff)
downloadop-kernel-dev-390a1bd8538132186ddb679cafe9e75b7ef7e2d2.zip
op-kernel-dev-390a1bd8538132186ddb679cafe9e75b7ef7e2d2.tar.gz
NFC: Initial Secure Element API
Each NFC adapter can have several links to different secure elements and that property needs to be exported by the drivers. A secure element link can be enabled and disabled, and card emulation will be handled by the currently active one. Otherwise card emulation will be host implemented. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r--include/net/nfc/hci.h3
-rw-r--r--include/net/nfc/nci_core.h1
-rw-r--r--include/net/nfc/nfc.h6
3 files changed, 10 insertions, 0 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index 2ff7175..b87a169 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -59,6 +59,8 @@ struct nfc_hci_ops {
struct nfc_target *target);
int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event,
struct sk_buff *skb);
+ int (*enable_se)(struct nfc_dev *dev, u32 secure_element);
+ int (*disable_se)(struct nfc_dev *dev, u32 secure_element);
};
/* Pipes */
@@ -150,6 +152,7 @@ struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops,
struct nfc_hci_init_data *init_data,
unsigned long quirks,
u32 protocols,
+ u32 supported_se,
const char *llc_name,
int tx_headroom,
int tx_tailroom,
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index d705d86..5bc0c46 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -147,6 +147,7 @@ struct nci_dev {
/* ----- NCI Devices ----- */
struct nci_dev *nci_allocate_device(struct nci_ops *ops,
__u32 supported_protocols,
+ __u32 supported_se,
int tx_headroom,
int tx_tailroom);
void nci_free_device(struct nci_dev *ndev);
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 1665674..87a6417 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -68,6 +68,8 @@ struct nfc_ops {
void *cb_context);
int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb);
int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target);
+ int (*enable_se)(struct nfc_dev *dev, u32 secure_element);
+ int (*disable_se)(struct nfc_dev *dev, u32 secure_element);
};
#define NFC_TARGET_IDX_ANY -1
@@ -109,6 +111,9 @@ struct nfc_dev {
struct nfc_genl_data genl_data;
u32 supported_protocols;
+ u32 supported_se;
+ u32 active_se;
+
int tx_headroom;
int tx_tailroom;
@@ -125,6 +130,7 @@ extern struct class nfc_class;
struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops,
u32 supported_protocols,
+ u32 supported_se,
int tx_headroom,
int tx_tailroom);
OpenPOWER on IntegriCloud