diff options
Diffstat (limited to 'include/net/nfc/nci.h')
-rw-r--r-- | include/net/nfc/nci.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h index 276094b91d7c..88785e5c6b2c 100644 --- a/include/net/nfc/nci.h +++ b/include/net/nfc/nci.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #define NCI_MAX_NUM_MAPPING_CONFIGS 10 | 32 | #define NCI_MAX_NUM_MAPPING_CONFIGS 10 |
33 | #define NCI_MAX_NUM_RF_CONFIGS 10 | 33 | #define NCI_MAX_NUM_RF_CONFIGS 10 |
34 | #define NCI_MAX_NUM_CONN 10 | 34 | #define NCI_MAX_NUM_CONN 10 |
35 | #define NCI_MAX_PARAM_LEN 251 | ||
35 | 36 | ||
36 | /* NCI Status Codes */ | 37 | /* NCI Status Codes */ |
37 | #define NCI_STATUS_OK 0x00 | 38 | #define NCI_STATUS_OK 0x00 |
@@ -102,6 +103,9 @@ | |||
102 | #define NCI_RF_INTERFACE_ISO_DEP 0x02 | 103 | #define NCI_RF_INTERFACE_ISO_DEP 0x02 |
103 | #define NCI_RF_INTERFACE_NFC_DEP 0x03 | 104 | #define NCI_RF_INTERFACE_NFC_DEP 0x03 |
104 | 105 | ||
106 | /* NCI Configuration Parameter Tags */ | ||
107 | #define NCI_PN_ATR_REQ_GEN_BYTES 0x29 | ||
108 | |||
105 | /* NCI Reset types */ | 109 | /* NCI Reset types */ |
106 | #define NCI_RESET_TYPE_KEEP_CONFIG 0x00 | 110 | #define NCI_RESET_TYPE_KEEP_CONFIG 0x00 |
107 | #define NCI_RESET_TYPE_RESET_CONFIG 0x01 | 111 | #define NCI_RESET_TYPE_RESET_CONFIG 0x01 |
@@ -188,6 +192,18 @@ struct nci_core_reset_cmd { | |||
188 | 192 | ||
189 | #define NCI_OP_CORE_INIT_CMD nci_opcode_pack(NCI_GID_CORE, 0x01) | 193 | #define NCI_OP_CORE_INIT_CMD nci_opcode_pack(NCI_GID_CORE, 0x01) |
190 | 194 | ||
195 | #define NCI_OP_CORE_SET_CONFIG_CMD nci_opcode_pack(NCI_GID_CORE, 0x02) | ||
196 | struct set_config_param { | ||
197 | __u8 id; | ||
198 | __u8 len; | ||
199 | __u8 val[NCI_MAX_PARAM_LEN]; | ||
200 | } __packed; | ||
201 | |||
202 | struct nci_core_set_config_cmd { | ||
203 | __u8 num_params; | ||
204 | struct set_config_param param; /* support 1 param per cmd is enough */ | ||
205 | } __packed; | ||
206 | |||
191 | #define NCI_OP_RF_DISCOVER_MAP_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) | 207 | #define NCI_OP_RF_DISCOVER_MAP_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) |
192 | struct disc_map_config { | 208 | struct disc_map_config { |
193 | __u8 rf_protocol; | 209 | __u8 rf_protocol; |
@@ -252,6 +268,13 @@ struct nci_core_init_rsp_2 { | |||
252 | __le32 manufact_specific_info; | 268 | __le32 manufact_specific_info; |
253 | } __packed; | 269 | } __packed; |
254 | 270 | ||
271 | #define NCI_OP_CORE_SET_CONFIG_RSP nci_opcode_pack(NCI_GID_CORE, 0x02) | ||
272 | struct nci_core_set_config_rsp { | ||
273 | __u8 status; | ||
274 | __u8 num_params; | ||
275 | __u8 params_id[0]; /* variable size array */ | ||
276 | } __packed; | ||
277 | |||
255 | #define NCI_OP_RF_DISCOVER_MAP_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) | 278 | #define NCI_OP_RF_DISCOVER_MAP_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x00) |
256 | 279 | ||
257 | #define NCI_OP_RF_DISCOVER_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x03) | 280 | #define NCI_OP_RF_DISCOVER_RSP nci_opcode_pack(NCI_GID_RF_MGMT, 0x03) |
@@ -328,6 +351,11 @@ struct activation_params_nfcb_poll_iso_dep { | |||
328 | __u8 attrib_res[50]; | 351 | __u8 attrib_res[50]; |
329 | }; | 352 | }; |
330 | 353 | ||
354 | struct activation_params_poll_nfc_dep { | ||
355 | __u8 atr_res_len; | ||
356 | __u8 atr_res[63]; | ||
357 | }; | ||
358 | |||
331 | struct nci_rf_intf_activated_ntf { | 359 | struct nci_rf_intf_activated_ntf { |
332 | __u8 rf_discovery_id; | 360 | __u8 rf_discovery_id; |
333 | __u8 rf_interface; | 361 | __u8 rf_interface; |
@@ -351,6 +379,7 @@ struct nci_rf_intf_activated_ntf { | |||
351 | union { | 379 | union { |
352 | struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep; | 380 | struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep; |
353 | struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep; | 381 | struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep; |
382 | struct activation_params_poll_nfc_dep poll_nfc_dep; | ||
354 | } activation_params; | 383 | } activation_params; |
355 | 384 | ||
356 | } __packed; | 385 | } __packed; |