summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIlan Elias <ilane@ti.com>2011-12-22 11:51:54 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-01-04 14:30:43 -0500
commit288e0713f469c03dbc412153b5341d6dfc2c9907 (patch)
tree1155f2d96309acb17a23d4a384417c5de3940647 /include
parent9931df2692ddb7db092550ce063e674730176ecf (diff)
downloadlinux-288e0713f469c03dbc412153b5341d6dfc2c9907.tar.bz2
NFC: Export a new attribute nfcid1 in target info
The nfcid1 is the NFC-A identifier. It is exported as an attribute of the target info (returned as a response to NFC_CMD_GET_TARGET). 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.h2
-rw-r--r--include/net/nfc/nfc.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h
index 89fee4ab1904..01d4e5d60325 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -88,6 +88,7 @@ enum nfc_commands {
* @NFC_ATTR_TARGET_SENS_RES: NFC-A targets extra information such as NFCID
* @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_COMM_MODE: Passive or active mode
* @NFC_ATTR_RF_MODE: Initiator or target
*/
@@ -99,6 +100,7 @@ enum nfc_attrs {
NFC_ATTR_TARGET_INDEX,
NFC_ATTR_TARGET_SENS_RES,
NFC_ATTR_TARGET_SEL_RES,
+ NFC_ATTR_TARGET_NFCID1,
NFC_ATTR_COMM_MODE,
NFC_ATTR_RF_MODE,
/* private: internal use only */
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h
index ccfe757a94ec..8696b773a695 100644
--- a/include/net/nfc/nfc.h
+++ b/include/net/nfc/nfc.h
@@ -65,12 +65,15 @@ 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;
u32 supported_protocols;
u16 sens_res;
u8 sel_res;
+ u8 nfcid1_len;
+ u8 nfcid1[NFC_MAX_NFCID1_LEN];
};
struct nfc_genl_data {