diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-08-28 00:39:48 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-25 02:30:47 +0200 |
commit | 72b70b6ec4fa7da86a3ac0aacee699b18d94fc3b (patch) | |
tree | fb9e9e0a29349ca9e294492bad8195e9a84ce931 /include/net/nfc | |
parent | b9c0c678f7267831b73e1d73fb30c9b4658e91ec (diff) | |
download | linux-stable-72b70b6ec4fa7da86a3ac0aacee699b18d94fc3b.tar.gz linux-stable-72b70b6ec4fa7da86a3ac0aacee699b18d94fc3b.tar.bz2 linux-stable-72b70b6ec4fa7da86a3ac0aacee699b18d94fc3b.zip |
NFC: Define secure element IO API and commands
In order to send and receive ISO7816 APDUs to and from NFC embedded
secure elements, we define a specific netlink command.
On a typical SE use case, host applications will send very few APDUs
(Less than 10) per transaction. This is why we decided to go for a
simple netlink API. Defining another NFC socket protocol for such low
traffic would have been overengineered.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r-- | include/net/nfc/nfc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 5329804ebb70..82fc4e43fc6e 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h @@ -53,6 +53,8 @@ struct nfc_dev; typedef void (*data_exchange_cb_t)(void *context, struct sk_buff *skb, int err); +typedef void (*se_io_cb_t)(void *context, u8 *apdu, size_t apdu_len, int err); + struct nfc_target; struct nfc_ops { @@ -79,6 +81,9 @@ struct nfc_ops { int (*discover_se)(struct nfc_dev *dev); int (*enable_se)(struct nfc_dev *dev, u32 se_idx); int (*disable_se)(struct nfc_dev *dev, u32 se_idx); + int (*se_io) (struct nfc_dev *dev, u32 se_idx, + u8 *apdu, size_t apdu_length, + se_io_cb_t cb, void *cb_context); }; #define NFC_TARGET_IDX_ANY -1 |