aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/nfc
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2012-01-17 04:06:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:21:15 -0500
commitd5a2ca60e41fec4ede7b82d3608278523cffe77b (patch)
tree64faf8e66edaf03fe35b9bd61e8263817a17cca9 /include/net/nfc
parentbfeb4dbc5cb36ae774fabe7b0e0d559e621a2ccd (diff)
NFC: Export new attributes sensb_res and sensf_res
Export new attributes sensb_res for tech B and sensf_res for tech F in the target info (returned as a response to NFC_CMD_GET_TARGET). The max size of the attributes nfcid1, sensb_res and sensf_res is exported to user space though include/linux/nfc. Signed-off-by: Ilan Elias <ilane@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r--include/net/nfc/nci.h19
-rw-r--r--include/net/nfc/nfc.h8
2 files changed, 25 insertions, 2 deletions
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 {