summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2012-01-17 11:06:43 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:21:15 -0500
commitd5a2ca60e41fec4ede7b82d3608278523cffe77b (patch)
tree64faf8e66edaf03fe35b9bd61e8263817a17cca9 /include
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')
-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 01d4e5d6032..b4999abcb2a 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -89,6 +89,8 @@ enum nfc_commands {
* @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the
* target is not NFC-Forum compliant)
* @NFC_ATTR_TARGET_NFCID1: NFC-A targets identifier, max 10 bytes
+ * @NFC_ATTR_TARGET_SENSB_RES: NFC-B targets extra information, max 12 bytes
+ * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes
* @NFC_ATTR_COMM_MODE: Passive or active mode
* @NFC_ATTR_RF_MODE: Initiator or target
*/
@@ -101,6 +103,8 @@ enum nfc_attrs {
NFC_ATTR_TARGET_SENS_RES,
NFC_ATTR_TARGET_SEL_RES,
NFC_ATTR_TARGET_NFCID1,
+ NFC_ATTR_TARGET_SENSB_RES,
+ NFC_ATTR_TARGET_SENSF_RES,
NFC_ATTR_COMM_MODE,
NFC_ATTR_RF_MODE,
/* private: internal use only */
@@ -109,6 +113,9 @@ enum nfc_attrs {
#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
#define NFC_DEVICE_NAME_MAXSIZE 8
+#define NFC_NFCID1_MAXSIZE 10
+#define NFC_SENSB_RES_MAXSIZE 12
+#define NFC_SENSF_RES_MAXSIZE 18
/* NFC protocols */
#define NFC_PROTO_JEWEL 1
diff --git a/include/net/nfc/nci.h b/include/net/nfc/nci.h
index 2be95e2626c..34f5ed29c3c 100644
--- a/include/net/nfc/nci.h
+++ b/include/net/nfc/nci.h
@@ -275,11 +275,27 @@ struct rf_tech_specific_params_nfca_poll {
__u8 sel_res;
} __packed;
+struct rf_tech_specific_params_nfcb_poll {
+ __u8 sensb_res_len;
+ __u8 sensb_res[12]; /* 11 or 12 Bytes */
+} __packed;
+
+struct rf_tech_specific_params_nfcf_poll {
+ __u8 bit_rate;
+ __u8 sensf_res_len;
+ __u8 sensf_res[18]; /* 16 or 18 Bytes */
+} __packed;
+
struct activation_params_nfca_poll_iso_dep {
__u8 rats_res_len;
__u8 rats_res[20];
};
+struct activation_params_nfcb_poll_iso_dep {
+ __u8 attrib_res_len;
+ __u8 attrib_res[50];
+};
+
struct nci_rf_intf_activated_ntf {
__u8 rf_discovery_id;
__u8 rf_interface;
@@ -291,6 +307,8 @@ struct nci_rf_intf_activated_ntf {
union {
struct rf_tech_specific_params_nfca_poll nfca_poll;
+ struct rf_tech_specific_params_nfcb_poll nfcb_poll;
+ struct rf_tech_specific_params_nfcf_poll nfcf_poll;
} rf_tech_specific_params;
__u8 data_exch_rf_tech_and_mode;
@@ -300,6 +318,7 @@ struct nci_rf_intf_activated_ntf {
union {
struct activation_params_nfca_poll_iso_dep nfca_poll_iso_dep;
+ struct activation_params_nfcb_poll_iso_dep nfcb_poll_iso_dep;
} activation_params;
} __packed;
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index 8696b773a69..819530d0e37 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -24,6 +24,7 @@
#ifndef __NET_NFC_H
#define __NET_NFC_H
+#include <linux/nfc.h>
#include <linux/device.h>
#include <linux/skbuff.h>
@@ -65,7 +66,6 @@ struct nfc_ops {
#define NFC_TARGET_IDX_ANY -1
#define NFC_MAX_GT_LEN 48
-#define NFC_MAX_NFCID1_LEN 10
struct nfc_target {
u32 idx;
@@ -73,7 +73,11 @@ struct nfc_target {
u16 sens_res;
u8 sel_res;
u8 nfcid1_len;
- u8 nfcid1[NFC_MAX_NFCID1_LEN];
+ u8 nfcid1[NFC_NFCID1_MAXSIZE];
+ u8 sensb_res_len;
+ u8 sensb_res[NFC_SENSB_RES_MAXSIZE];
+ u8 sensf_res_len;
+ u8 sensf_res[NFC_SENSF_RES_MAXSIZE];
};
struct nfc_genl_data {