diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-12-19 13:11:32 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 18:51:54 -0500 |
commit | 390a1bd8538132186ddb679cafe9e75b7ef7e2d2 (patch) | |
tree | 1c548396163a30e0e29f6572cf7b6f0c645085ba /include/net/nfc | |
parent | 2ad554a502facd705ce6eb362d0f1ac3ca426508 (diff) |
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.h | 3 | ||||
-rw-r--r-- | include/net/nfc/nci_core.h | 1 | ||||
-rw-r--r-- | include/net/nfc/nfc.h | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h index 2ff71750c428..b87a1692b086 100644 --- a/include/net/nfc/hci.h +++ b/include/net/nfc/hci.h | |||
@@ -59,6 +59,8 @@ struct nfc_hci_ops { | |||
59 | struct nfc_target *target); | 59 | struct nfc_target *target); |
60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 60 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
61 | struct sk_buff *skb); | 61 | struct sk_buff *skb); |
62 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | ||
63 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | ||
62 | }; | 64 | }; |
63 | 65 | ||
64 | /* Pipes */ | 66 | /* Pipes */ |
@@ -150,6 +152,7 @@ struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, | |||
150 | struct nfc_hci_init_data *init_data, | 152 | struct nfc_hci_init_data *init_data, |
151 | unsigned long quirks, | 153 | unsigned long quirks, |
152 | u32 protocols, | 154 | u32 protocols, |
155 | u32 supported_se, | ||
153 | const char *llc_name, | 156 | const char *llc_name, |
154 | int tx_headroom, | 157 | int tx_headroom, |
155 | int tx_tailroom, | 158 | int tx_tailroom, |
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index d705d8674949..5bc0c460edc0 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
@@ -147,6 +147,7 @@ struct nci_dev { | |||
147 | /* ----- NCI Devices ----- */ | 147 | /* ----- NCI Devices ----- */ |
148 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, | 148 | struct nci_dev *nci_allocate_device(struct nci_ops *ops, |
149 | __u32 supported_protocols, | 149 | __u32 supported_protocols, |
150 | __u32 supported_se, | ||
150 | int tx_headroom, | 151 | int tx_headroom, |
151 | int tx_tailroom); | 152 | int tx_tailroom); |
152 | void nci_free_device(struct nci_dev *ndev); | 153 | void nci_free_device(struct nci_dev *ndev); |
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 1665674e86b2..87a6417fc934 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
@@ -68,6 +68,8 @@ struct nfc_ops { | |||
68 | void *cb_context); | 68 | void *cb_context); |
69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); | 69 | int (*tm_send)(struct nfc_dev *dev, struct sk_buff *skb); |
70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); | 70 | int (*check_presence)(struct nfc_dev *dev, struct nfc_target *target); |
71 | int (*enable_se)(struct nfc_dev *dev, u32 secure_element); | ||
72 | int (*disable_se)(struct nfc_dev *dev, u32 secure_element); | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | #define NFC_TARGET_IDX_ANY -1 | 75 | #define NFC_TARGET_IDX_ANY -1 |
@@ -109,6 +111,9 @@ struct nfc_dev { | |||
109 | struct nfc_genl_data genl_data; | 111 | struct nfc_genl_data genl_data; |
110 | u32 supported_protocols; | 112 | u32 supported_protocols; |
111 | 113 | ||
114 | u32 supported_se; | ||
115 | u32 active_se; | ||
116 | |||
112 | int tx_headroom; | 117 | int tx_headroom; |
113 | int tx_tailroom; | 118 | int tx_tailroom; |
114 | 119 | ||
@@ -125,6 +130,7 @@ extern struct class nfc_class; | |||
125 | 130 | ||
126 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, | 131 | struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, |
127 | u32 supported_protocols, | 132 | u32 supported_protocols, |
133 | u32 supported_se, | ||
128 | int tx_headroom, | 134 | int tx_headroom, |
129 | int tx_tailroom); | 135 | int tx_tailroom); |
130 | 136 | ||