aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfc.h7
-rw-r--r--include/net/nfc/nci.h19
-rw-r--r--include/net/nfc/nfc.h8
3 files changed, 32 insertions, 2 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h
index 01d4e5d60325..b4999abcb2a2 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -89,6 +89,8 @@ enum nfc_commands {
89 * @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the 89 * @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the
90 * target is not NFC-Forum compliant) 90 * target is not NFC-Forum compliant)
91 * @NFC_ATTR_TARGET_NFCID1: NFC-A targets identifier, max 10 bytes 91 * @NFC_ATTR_TARGET_NFCID1: NFC-A targets identifier, max 10 bytes
92 * @NFC_ATTR_TARGET_SENSB_RES: NFC-B targets extra information, max 12 bytes
93 * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes
92 * @NFC_ATTR_COMM_MODE: Passive or active mode 94 * @NFC_ATTR_COMM_MODE: Passive or active mode
93 * @NFC_ATTR_RF_MODE: Initiator or target 95 * @NFC_ATTR_RF_MODE: Initiator or target
94 */ 96 */
@@ -101,6 +103,8 @@ enum nfc_attrs {
101 NFC_ATTR_TARGET_SENS_RES, 103 NFC_ATTR_TARGET_SENS_RES,
102 NFC_ATTR_TARGET_SEL_RES, 104 NFC_ATTR_TARGET_SEL_RES,
103 NFC_ATTR_TARGET_NFCID1, 105 NFC_ATTR_TARGET_NFCID1,
106 NFC_ATTR_TARGET_SENSB_RES,
107 NFC_ATTR_TARGET_SENSF_RES,
104 NFC_ATTR_COMM_MODE, 108 NFC_ATTR_COMM_MODE,
105 NFC_ATTR_RF_MODE, 109 NFC_ATTR_RF_MODE,
106/* private: internal use only */ 110/* private: internal use only */
@@ -109,6 +113,9 @@ enum nfc_attrs {
109#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1) 113#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
110 114
111#define NFC_DEVICE_NAME_MAXSIZE 8 115#define NFC_DEVICE_NAME_MAXSIZE 8
116#define NFC_NFCID1_MAXSIZE 10
117#define NFC_SENSB_RES_MAXSIZE 12
118#define NFC_SENSF_RES_MAXSIZE 18
112 119
113/* NFC protocols */ 120/* NFC protocols */
114#define NFC_PROTO_JEWEL 1 121#define NFC_PROTO_JEWEL 1
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h
index 2be95e2626c0..34f5ed29c3c1 100644
--- a/include/net/nfc/nci.h
+++ b/include/net/nfc/nci.h
@@ -275,11 +275,27 @@ struct rf_tech_specific_params_nfca_poll {
275 __u8 sel_res; 275 __u8 sel_res;
276} __packed; 276} __packed;
277 277
278struct rf_tech_specific_params_nfcb_poll {
279 __u8 sensb_res_len;
280 __u8 sensb_res[12]; /* 11 or 12 Bytes */
281} __packed;
282
283struct rf_tech_specific_params_nfcf_poll {
284 __u8 bit_rate;
285 __u8 sensf_res_len;
286 __u8 sensf_res[18]; /* 16 or 18 Bytes */
287} __packed;
288
278struct activation_params_nfca_poll_iso_dep { 289struct activation_params_nfca_poll_iso_dep {
279 __u8 rats_res_len; 290 __u8 rats_res_len;
280 __u8 rats_res[20]; 291 __u8 rats_res[20];
281}; 292};
282 293
294struct activation_params_nfcb_poll_iso_dep {
295 __u8 attrib_res_len;
296 __u8 attrib_res[50];
297};
298
283struct nci_rf_intf_activated_ntf { 299struct nci_rf_intf_activated_ntf {
284 __u8 rf_discovery_id; 300 __u8 rf_discovery_id;
285 __u8 rf_interface; 301 __u8 rf_interface;
@@ -291,6 +307,8 @@ struct nci_rf_intf_activated_ntf {
291 307
292 union { 308 union {
293 struct rf_tech_specific_params_nfca_poll nfca_poll; 309 struct rf_tech_specific_params_nfca_poll nfca_poll;
310 struct rf_tech_specific_params_nfcb_poll nfcb_poll;
311 struct rf_tech_specific_params_nfcf_poll nfcf_poll;
294 } rf_tech_specific_params; 312 } rf_tech_specific_params;
295 313
296 __u8 data_exch_rf_tech_and_mode; 314 __u8 data_exch_rf_tech_and_mode;
@@ -300,6 +318,7 @@ struct nci_rf_intf_activated_ntf {
300 318
301 union { 319 union {
302 struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep; 320 struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep;
321 struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep;
303 } activation_params; 322 } activation_params;
304 323
305} __packed; 324} __packed;
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 8696b773a695..819530d0e37f 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -24,6 +24,7 @@
24#ifndef __NET_NFC_H 24#ifndef __NET_NFC_H
25#define __NET_NFC_H 25#define __NET_NFC_H
26 26
27#include <linux/nfc.h>
27#include <linux/device.h> 28#include <linux/device.h>
28#include <linux/skbuff.h> 29#include <linux/skbuff.h>
29 30
@@ -65,7 +66,6 @@ struct nfc_ops {
65 66
66#define NFC_TARGET_IDX_ANY -1 67#define NFC_TARGET_IDX_ANY -1
67#define NFC_MAX_GT_LEN 48 68#define NFC_MAX_GT_LEN 48
68#define NFC_MAX_NFCID1_LEN 10
69 69
70struct nfc_target { 70struct nfc_target {
71 u32 idx; 71 u32 idx;
@@ -73,7 +73,11 @@ struct nfc_target {
73 u16 sens_res; 73 u16 sens_res;
74 u8 sel_res; 74 u8 sel_res;
75 u8 nfcid1_len; 75 u8 nfcid1_len;
76 u8 nfcid1[NFC_MAX_NFCID1_LEN]; 76 u8 nfcid1[NFC_NFCID1_MAXSIZE];
77 u8 sensb_res_len;
78 u8 sensb_res[NFC_SENSB_RES_MAXSIZE];
79 u8 sensf_res_len;
80 u8 sensf_res[NFC_SENSF_RES_MAXSIZE];
77}; 81};
78 82
79struct nfc_genl_data { 83struct nfc_genl_data {