summaryrefslogtreecommitdiff
path: root/include/net/nfc/nfc.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-05-10 13:28:38 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-14 11:44:58 (GMT)
commitfed7c25ec0d4894edfc36bbe5c5231e52f45483a (patch)
treef481af4d3a05bd2f1b707a074cc49cf2d4a9f93b /include/net/nfc/nfc.h
parent0a946301c2d3eac8673e556df820c0b6023ac6c3 (diff)
downloadlinux-fsl-qoriq-fed7c25ec0d4894edfc36bbe5c5231e52f45483a.tar.xz
NFC: Add secure elements addition and removal API
This API will allow NFC drivers to add and remove the secure elements they know about or detect. Typically this should be called (asynchronously or not) from the driver or the host interface stack detect_se hook. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc/nfc.h')
-rw-r--r--include/net/nfc/nfc.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 5187ec7..0e353f1 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -97,6 +97,23 @@ struct nfc_target {
u8 logical_idx;
};
+/**
+ * nfc_se - A structure for NFC accessible secure elements.
+ *
+ * @idx: The secure element index. User space will enable or
+ * disable a secure element by its index.
+ * @type: The secure element type. It can be SE_UICC or
+ * SE_EMBEDDED.
+ * @state: The secure element state, either enabled or disabled.
+ *
+ */
+struct nfc_se {
+ struct list_head list;
+ u32 idx;
+ u16 type;
+ u16 state;
+};
+
struct nfc_genl_data {
u32 poll_req_portid;
struct mutex genl_data_mutex;
@@ -118,7 +135,7 @@ struct nfc_dev {
struct nfc_genl_data genl_data;
u32 supported_protocols;
- u32 active_se;
+ struct list_head secure_elements;
int tx_headroom;
int tx_tailroom;
@@ -221,4 +238,7 @@ int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb);
void nfc_driver_failure(struct nfc_dev *dev, int err);
+int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type);
+int nfc_remove_se(struct nfc_dev *dev, u32 se_idx);
+
#endif /* __NET_NFC_H */