diff options
author | Ilan Elias <ilane@ti.com> | 2011-12-20 09:57:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-04 14:30:39 -0500 |
commit | 637d85a7cdfe4240a56da7d70cf95cca65ea21d3 (patch) | |
tree | 955b49a8a27b871725c0f262f4d475cab59db01c /include/net | |
parent | cee0bec58a922976a5f4d70081a3b2fd73e108e9 (diff) |
NFC: Update names and structs to NCI spec 1.0 d22
Addition, deletion, and modification of NCI constants.
Changes in NCI commands, responses, and notifications structures.
Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/nfc/nci.h | 43 | ||||
-rw-r--r-- | include/net/nfc/nci_core.h | 6 |
2 files changed, 19 insertions, 30 deletions
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h index b61eb6c9df14..2a7fdb265611 100644 --- a/include/net/nfc/nci.h +++ b/include/net/nfc/nci.h | |||
@@ -54,11 +54,10 @@ | |||
54 | #define NCI_STATUS_RF_PROTOCOL_ERROR 0xb1 | 54 | #define NCI_STATUS_RF_PROTOCOL_ERROR 0xb1 |
55 | #define NCI_STATUS_RF_TIMEOUT_ERROR 0xb2 | 55 | #define NCI_STATUS_RF_TIMEOUT_ERROR 0xb2 |
56 | /* NFCEE Interface Specific Status Codes */ | 56 | /* NFCEE Interface Specific Status Codes */ |
57 | #define NCI_STATUS_MAX_ACTIVE_NFCEE_INTERFACES_REACHED 0xc0 | 57 | #define NCI_STATUS_NFCEE_INTERFACE_ACTIVATION_FAILED 0xc0 |
58 | #define NCI_STATUS_NFCEE_INTERFACE_ACTIVATION_FAILED 0xc1 | 58 | #define NCI_STATUS_NFCEE_TRANSMISSION_ERROR 0xc1 |
59 | #define NCI_STATUS_NFCEE_TRANSMISSION_ERROR 0xc2 | 59 | #define NCI_STATUS_NFCEE_PROTOCOL_ERROR 0xc2 |
60 | #define NCI_STATUS_NFCEE_PROTOCOL_ERROR 0xc3 | 60 | #define NCI_STATUS_NFCEE_TIMEOUT_ERROR 0xc3 |
61 | #define NCI_STATUS_NFCEE_TIMEOUT_ERROR 0xc4 | ||
62 | 61 | ||
63 | /* NCI RF Technology and Mode */ | 62 | /* NCI RF Technology and Mode */ |
64 | #define NCI_NFC_A_PASSIVE_POLL_MODE 0x00 | 63 | #define NCI_NFC_A_PASSIVE_POLL_MODE 0x00 |
@@ -66,11 +65,13 @@ | |||
66 | #define NCI_NFC_F_PASSIVE_POLL_MODE 0x02 | 65 | #define NCI_NFC_F_PASSIVE_POLL_MODE 0x02 |
67 | #define NCI_NFC_A_ACTIVE_POLL_MODE 0x03 | 66 | #define NCI_NFC_A_ACTIVE_POLL_MODE 0x03 |
68 | #define NCI_NFC_F_ACTIVE_POLL_MODE 0x05 | 67 | #define NCI_NFC_F_ACTIVE_POLL_MODE 0x05 |
68 | #define NCI_NFC_15693_PASSIVE_POLL_MODE 0x06 | ||
69 | #define NCI_NFC_A_PASSIVE_LISTEN_MODE 0x80 | 69 | #define NCI_NFC_A_PASSIVE_LISTEN_MODE 0x80 |
70 | #define NCI_NFC_B_PASSIVE_LISTEN_MODE 0x81 | 70 | #define NCI_NFC_B_PASSIVE_LISTEN_MODE 0x81 |
71 | #define NCI_NFC_F_PASSIVE_LISTEN_MODE 0x82 | 71 | #define NCI_NFC_F_PASSIVE_LISTEN_MODE 0x82 |
72 | #define NCI_NFC_A_ACTIVE_LISTEN_MODE 0x83 | 72 | #define NCI_NFC_A_ACTIVE_LISTEN_MODE 0x83 |
73 | #define NCI_NFC_F_ACTIVE_LISTEN_MODE 0x85 | 73 | #define NCI_NFC_F_ACTIVE_LISTEN_MODE 0x85 |
74 | #define NCI_NFC_15693_PASSIVE_LISTEN_MODE 0x86 | ||
74 | 75 | ||
75 | /* NCI RF Technologies */ | 76 | /* NCI RF Technologies */ |
76 | #define NCI_NFC_RF_TECHNOLOGY_A 0x00 | 77 | #define NCI_NFC_RF_TECHNOLOGY_A 0x00 |
@@ -83,9 +84,9 @@ | |||
83 | #define NCI_NFC_BIT_RATE_212 0x01 | 84 | #define NCI_NFC_BIT_RATE_212 0x01 |
84 | #define NCI_NFC_BIT_RATE_424 0x02 | 85 | #define NCI_NFC_BIT_RATE_424 0x02 |
85 | #define NCI_NFC_BIT_RATE_848 0x03 | 86 | #define NCI_NFC_BIT_RATE_848 0x03 |
86 | #define NCI_NFC_BIT_RATE_1696 0x04 | 87 | #define NCI_NFC_BIT_RATE_1695 0x04 |
87 | #define NCI_NFC_BIT_RATE_3392 0x05 | 88 | #define NCI_NFC_BIT_RATE_3390 0x05 |
88 | #define NCI_NFC_BIT_RATE_6784 0x06 | 89 | #define NCI_NFC_BIT_RATE_6780 0x06 |
89 | 90 | ||
90 | /* NCI RF Protocols */ | 91 | /* NCI RF Protocols */ |
91 | #define NCI_RF_PROTOCOL_UNKNOWN 0x00 | 92 | #define NCI_RF_PROTOCOL_UNKNOWN 0x00 |
@@ -114,20 +115,6 @@ | |||
114 | /* NCI RF_DISCOVER_MAP_CMD modes */ | 115 | /* NCI RF_DISCOVER_MAP_CMD modes */ |
115 | #define NCI_DISC_MAP_MODE_POLL 0x01 | 116 | #define NCI_DISC_MAP_MODE_POLL 0x01 |
116 | #define NCI_DISC_MAP_MODE_LISTEN 0x02 | 117 | #define NCI_DISC_MAP_MODE_LISTEN 0x02 |
117 | #define NCI_DISC_MAP_MODE_BOTH 0x03 | ||
118 | |||
119 | /* NCI Discovery Types */ | ||
120 | #define NCI_DISCOVERY_TYPE_POLL_A_PASSIVE 0x00 | ||
121 | #define NCI_DISCOVERY_TYPE_POLL_B_PASSIVE 0x01 | ||
122 | #define NCI_DISCOVERY_TYPE_POLL_F_PASSIVE 0x02 | ||
123 | #define NCI_DISCOVERY_TYPE_POLL_A_ACTIVE 0x03 | ||
124 | #define NCI_DISCOVERY_TYPE_POLL_F_ACTIVE 0x05 | ||
125 | #define NCI_DISCOVERY_TYPE_WAKEUP_A_ACTIVE 0x09 | ||
126 | #define NCI_DISCOVERY_TYPE_LISTEN_A_PASSIVE 0x80 | ||
127 | #define NCI_DISCOVERY_TYPE_LISTEN_B_PASSIVE 0x81 | ||
128 | #define NCI_DISCOVERY_TYPE_LISTEN_F_PASSIVE 0x82 | ||
129 | #define NCI_DISCOVERY_TYPE_LISTEN_A_ACTIVE 0x83 | ||
130 | #define NCI_DISCOVERY_TYPE_LISTEN_F_ACTIVE 0x85 | ||
131 | 118 | ||
132 | /* NCI Deactivation Type */ | 119 | /* NCI Deactivation Type */ |
133 | #define NCI_DEACTIVATE_TYPE_IDLE_MODE 0x00 | 120 | #define NCI_DEACTIVATE_TYPE_IDLE_MODE 0x00 |
@@ -200,7 +187,7 @@ struct nci_core_reset_cmd { | |||
200 | struct disc_map_config { | 187 | struct disc_map_config { |
201 | __u8 rf_protocol; | 188 | __u8 rf_protocol; |
202 | __u8 mode; | 189 | __u8 mode; |
203 | __u8 rf_interface_type; | 190 | __u8 rf_interface; |
204 | } __packed; | 191 | } __packed; |
205 | 192 | ||
206 | struct nci_rf_disc_map_cmd { | 193 | struct nci_rf_disc_map_cmd { |
@@ -211,7 +198,7 @@ struct nci_rf_disc_map_cmd { | |||
211 | 198 | ||
212 | #define NCI_OP_RF_DISCOVER_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x03) | 199 | #define NCI_OP_RF_DISCOVER_CMD nci_opcode_pack(NCI_GID_RF_MGMT, 0x03) |
213 | struct disc_config { | 200 | struct disc_config { |
214 | __u8 type; | 201 | __u8 rf_tech_and_mode; |
215 | __u8 frequency; | 202 | __u8 frequency; |
216 | } __packed; | 203 | } __packed; |
217 | 204 | ||
@@ -249,8 +236,6 @@ struct nci_core_init_rsp_2 { | |||
249 | __le16 max_routing_table_size; | 236 | __le16 max_routing_table_size; |
250 | __u8 max_ctrl_pkt_payload_len; | 237 | __u8 max_ctrl_pkt_payload_len; |
251 | __le16 max_size_for_large_params; | 238 | __le16 max_size_for_large_params; |
252 | __u8 max_data_pkt_payload_size; | ||
253 | __u8 initial_num_credits; | ||
254 | __u8 manufact_id; | 239 | __u8 manufact_id; |
255 | __le32 manufact_specific_info; | 240 | __le32 manufact_specific_info; |
256 | } __packed; | 241 | } __packed; |
@@ -264,7 +249,7 @@ struct nci_core_init_rsp_2 { | |||
264 | /* --------------------------- */ | 249 | /* --------------------------- */ |
265 | /* ---- NCI Notifications ---- */ | 250 | /* ---- NCI Notifications ---- */ |
266 | /* --------------------------- */ | 251 | /* --------------------------- */ |
267 | #define NCI_OP_CORE_CONN_CREDITS_NTF nci_opcode_pack(NCI_GID_CORE, 0x07) | 252 | #define NCI_OP_CORE_CONN_CREDITS_NTF nci_opcode_pack(NCI_GID_CORE, 0x06) |
268 | struct conn_credit_entry { | 253 | struct conn_credit_entry { |
269 | __u8 conn_id; | 254 | __u8 conn_id; |
270 | __u8 credits; | 255 | __u8 credits; |
@@ -291,9 +276,11 @@ struct activation_params_nfca_poll_iso_dep { | |||
291 | 276 | ||
292 | struct nci_rf_intf_activated_ntf { | 277 | struct nci_rf_intf_activated_ntf { |
293 | __u8 rf_discovery_id; | 278 | __u8 rf_discovery_id; |
294 | __u8 rf_interface_type; | 279 | __u8 rf_interface; |
295 | __u8 rf_protocol; | 280 | __u8 rf_protocol; |
296 | __u8 activation_rf_tech_and_mode; | 281 | __u8 activation_rf_tech_and_mode; |
282 | __u8 max_data_pkt_payload_size; | ||
283 | __u8 initial_num_credits; | ||
297 | __u8 rf_tech_specific_params_len; | 284 | __u8 rf_tech_specific_params_len; |
298 | 285 | ||
299 | union { | 286 | union { |
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index c92b69d7e0c2..bccd89e9d4c2 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
@@ -111,11 +111,13 @@ struct nci_dev { | |||
111 | __u16 max_routing_table_size; | 111 | __u16 max_routing_table_size; |
112 | __u8 max_ctrl_pkt_payload_len; | 112 | __u8 max_ctrl_pkt_payload_len; |
113 | __u16 max_size_for_large_params; | 113 | __u16 max_size_for_large_params; |
114 | __u8 max_data_pkt_payload_size; | ||
115 | __u8 initial_num_credits; | ||
116 | __u8 manufact_id; | 114 | __u8 manufact_id; |
117 | __u32 manufact_specific_info; | 115 | __u32 manufact_specific_info; |
118 | 116 | ||
117 | /* received during NCI_OP_RF_INTF_ACTIVATED_NTF */ | ||
118 | __u8 max_data_pkt_payload_size; | ||
119 | __u8 initial_num_credits; | ||
120 | |||
119 | /* stored during nci_data_exchange */ | 121 | /* stored during nci_data_exchange */ |
120 | data_exchange_cb_t data_exchange_cb; | 122 | data_exchange_cb_t data_exchange_cb; |
121 | void *data_exchange_cb_context; | 123 | void *data_exchange_cb_context; |