diff options
Diffstat (limited to 'include/net/nfc/nfc.h')
| -rw-r--r-- | include/net/nfc/nfc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 12adb817c27a..73190e65d5c1 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h | |||
| @@ -135,6 +135,31 @@ struct nfc_se { | |||
| 135 | u16 state; | 135 | u16 state; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | /** | ||
| 139 | * nfc_evt_transaction - A struct for NFC secure element event transaction. | ||
| 140 | * | ||
| 141 | * @aid: The application identifier triggering the event | ||
| 142 | * | ||
| 143 | * @aid_len: The application identifier length [5:16] | ||
| 144 | * | ||
| 145 | * @params: The application parameters transmitted during the transaction | ||
| 146 | * | ||
| 147 | * @params_len: The applications parameters length [0:255] | ||
| 148 | * | ||
| 149 | */ | ||
| 150 | #define NFC_MIN_AID_LENGTH 5 | ||
| 151 | #define NFC_MAX_AID_LENGTH 16 | ||
| 152 | #define NFC_MAX_PARAMS_LENGTH 255 | ||
| 153 | |||
| 154 | #define NFC_EVT_TRANSACTION_AID_TAG 0x81 | ||
| 155 | #define NFC_EVT_TRANSACTION_PARAMS_TAG 0x82 | ||
| 156 | struct nfc_evt_transaction { | ||
| 157 | u32 aid_len; | ||
| 158 | u8 aid[NFC_MAX_AID_LENGTH]; | ||
| 159 | u8 params_len; | ||
| 160 | u8 params[NFC_MAX_PARAMS_LENGTH]; | ||
| 161 | } __packed; | ||
| 162 | |||
| 138 | struct nfc_genl_data { | 163 | struct nfc_genl_data { |
| 139 | u32 poll_req_portid; | 164 | u32 poll_req_portid; |
| 140 | struct mutex genl_data_mutex; | 165 | struct mutex genl_data_mutex; |
| @@ -262,6 +287,8 @@ int nfc_tm_data_received(struct nfc_dev *dev, struct sk_buff *skb); | |||
| 262 | 287 | ||
| 263 | void nfc_driver_failure(struct nfc_dev *dev, int err); | 288 | void nfc_driver_failure(struct nfc_dev *dev, int err); |
| 264 | 289 | ||
| 290 | int nfc_se_transaction(struct nfc_dev *dev, u8 se_idx, | ||
| 291 | struct nfc_evt_transaction *evt_transaction); | ||
| 265 | int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type); | 292 | int nfc_add_se(struct nfc_dev *dev, u32 se_idx, u16 type); |
| 266 | int nfc_remove_se(struct nfc_dev *dev, u32 se_idx); | 293 | int nfc_remove_se(struct nfc_dev *dev, u32 se_idx); |
| 267 | struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx); | 294 | struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx); |
