History

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.

Samuel Ortiz committed 13 years ago

Commit 390a1bd1 parent 2ad554a11 files · +38 −3Browse files

Showing the changes to include/uapi (1 of 11 files). Show all

Unified · Split

include/uapi/linux/nfc.h+14−0
@@ -67,6 +67,11 @@ · 66 unmodified lines
6767 * subsequent CONNECT and CC messages.
6868 * If one of the passed parameters is wrong none is set and -EINVAL is
6969 * returned.
70+ * @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element.
71+ * Once enabled a secure element will handle card emulation mode, i.e.
72+ * starting a poll from a device which has a secure element enabled means
73+ * we want to do SE based card emulation.
74+ * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element.
7075 */
7176 enum nfc_commands {
7277 NFC_CMD_UNSPEC,
@@ -86,6 +91,8 @@ enum nfc_commands { · 13 unmodified lines
8691 NFC_EVENT_TM_DEACTIVATED,
8792 NFC_CMD_LLC_GET_PARAMS,
8893 NFC_CMD_LLC_SET_PARAMS,
94+ NFC_CMD_ENABLE_SE,
95+ NFC_CMD_DISABLE_SE,
8996 /* private: internal use only */
9097 __NFC_CMD_AFTER_LAST
9198 };
@@ -114,6 +121,7 @@ enum nfc_commands { · 22 unmodified lines
114121 * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter
115122 * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter
116123 * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter
124+ * @NFC_ATTR_SE: Available Secure Elements
117125 */
118126 enum nfc_attrs {
119127 NFC_ATTR_UNSPEC,
@@ -134,6 +142,7 @@ enum nfc_attrs { · 14 unmodified lines
134142 NFC_ATTR_LLC_PARAM_LTO,
135143 NFC_ATTR_LLC_PARAM_RW,
136144 NFC_ATTR_LLC_PARAM_MIUX,
145+ NFC_ATTR_SE,
137146 /* private: internal use only */
138147 __NFC_ATTR_AFTER_LAST
139148 };
@@ -172,6 +181,11 @@ enum nfc_attrs { · 32 unmodified lines
172181 #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
173182 #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B)
174183
184+/* NFC Secure Elements */
185+#define NFC_SE_NONE 0x0
186+#define NFC_SE_UICC 0x1
187+#define NFC_SE_EMBEDDED 0x2
188+
175189 struct sockaddr_nfc {
176190 sa_family_t sa_family;
177191 __u32 dev_idx;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t