aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-02-01 16:26:09 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2015-02-02 15:50:38 -0500
commit8277f6937ae97c51ced5b54faa4934613c76999c (patch)
tree1ae5736c43f4aea943c1aaf6e6ef01ff71701227
parent4aeee6871e8c3b043ef02996db8ac70a1af8be92 (diff)
NFC: nci: Add NCI NFCEE constants
Add NFCEE NCI constant for: - NFCEE Interface/Protocols - Destination type - Destination-specific parameters type - NFCEE Discovery Action Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--include/net/nfc/nci.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h
index e7257a4653b4..6d99e8f79835 100644
--- a/include/net/nfc/nci.h
+++ b/include/net/nfc/nci.h
@@ -62,6 +62,25 @@
62#define NCI_STATUS_NFCEE_PROTOCOL_ERROR 0xc2 62#define NCI_STATUS_NFCEE_PROTOCOL_ERROR 0xc2
63#define NCI_STATUS_NFCEE_TIMEOUT_ERROR 0xc3 63#define NCI_STATUS_NFCEE_TIMEOUT_ERROR 0xc3
64 64
65/* NFCEE Interface/Protocols */
66#define NCI_NFCEE_INTERFACE_APDU 0x00
67#define NCI_NFCEE_INTERFACE_HCI_ACCESS 0x01
68#define NCI_NFCEE_INTERFACE_TYPE3_CMD_SET 0x02
69#define NCI_NFCEE_INTERFACE_TRANSPARENT 0x03
70
71/* Destination type */
72#define NCI_DESTINATION_NFCC_LOOPBACK 0x01
73#define NCI_DESTINATION_REMOTE_NFC_ENDPOINT 0x02
74#define NCI_DESTINATION_NFCEE 0x03
75
76/* Destination-specific parameters type */
77#define NCI_DESTINATION_SPECIFIC_PARAM_RF_TYPE 0x00
78#define NCI_DESTINATION_SPECIFIC_PARAM_NFCEE_TYPE 0x01
79
80/* NFCEE Discovery Action */
81#define NCI_NFCEE_DISCOVERY_ACTION_DISABLE 0x00
82#define NCI_NFCEE_DISCOVERY_ACTION_ENABLE 0x01
83
65/* NCI RF Technology and Mode */ 84/* NCI RF Technology and Mode */
66#define NCI_NFC_A_PASSIVE_POLL_MODE 0x00 85#define NCI_NFC_A_PASSIVE_POLL_MODE 0x00
67#define NCI_NFC_B_PASSIVE_POLL_MODE 0x01 86#define NCI_NFC_B_PASSIVE_POLL_MODE 0x01
@@ -260,6 +279,11 @@ struct nci_rf_deactivate_cmd {
260 __u8 type; 279 __u8 type;
261} __packed; 280} __packed;
262 281
282#define NCI_OP_NFCEE_DISCOVER_CMD nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x00)
283struct nci_nfcee_discover_cmd {
284 __u8 discovery_action;
285} __packed;
286
263/* ----------------------- */ 287/* ----------------------- */
264/* ---- NCI Responses ---- */ 288/* ---- NCI Responses ---- */
265/* ----------------------- */ 289/* ----------------------- */
@@ -303,6 +327,12 @@ struct nci_core_set_config_rsp {
303 327
304#define NCI_OP_RF_DEACTIVATE_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x06) 328#define NCI_OP_RF_DEACTIVATE_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x06)
305 329
330#define NCI_OP_NFCEE_DISCOVER_RSP nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x00)
331struct nci_nfcee_discover_rsp {
332 __u8 status;
333 __u8 num_nfcee;
334} __packed;
335
306/* --------------------------- */ 336/* --------------------------- */
307/* ---- NCI Notifications ---- */ 337/* ---- NCI Notifications ---- */
308/* --------------------------- */ 338/* --------------------------- */
@@ -430,4 +460,22 @@ struct nci_rf_deactivate_ntf {
430 __u8 reason; 460 __u8 reason;
431} __packed; 461} __packed;
432 462
463#define NCI_OP_NFCEE_DISCOVER_NTF nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x00)
464struct nci_nfcee_supported_protocol {
465 __u8 num_protocol;
466 __u8 supported_protocol[0];
467} __packed;
468
469struct nci_nfcee_information_tlv {
470 __u8 num_tlv;
471 __u8 information_tlv[0];
472} __packed;
473
474struct nci_nfcee_discover_ntf {
475 __u8 nfcee_id;
476 __u8 nfcee_status;
477 struct nci_nfcee_supported_protocol supported_protocols;
478 struct nci_nfcee_information_tlv information_tlv;
479} __packed;
480
433#endif /* __NCI_H */ 481#endif /* __NCI_H */