aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfc.h
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@openbossa.org>2011-07-01 18:31:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-05 15:26:58 -0400
commit23b7869c0fd08d73c9f83a2db88a13312d6198bb (patch)
treebc14ecbeac8998fddf48a52709c65ca5cdbbf6b0 /include/linux/nfc.h
parentc7fe3b52c1283b8ba810eb6ecddf1c8a0bcc13ab (diff)
NFC: add the NFC socket raw protocol
This socket protocol is used to perform data exchange with NFC targets. Signed-off-by: Lauro Ramos Venancio <lauro.venancio@openbossa.org> Signed-off-by: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/nfc.h')
-rw-r--r--include/linux/nfc.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h
index 15f8cb3edcc6..330a4c5db588 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -24,6 +24,9 @@
24#ifndef __LINUX_NFC_H 24#ifndef __LINUX_NFC_H
25#define __LINUX_NFC_H 25#define __LINUX_NFC_H
26 26
27#include <linux/types.h>
28#include <linux/socket.h>
29
27#define NFC_GENL_NAME "nfc" 30#define NFC_GENL_NAME "nfc"
28#define NFC_GENL_VERSION 1 31#define NFC_GENL_VERSION 1
29 32
@@ -109,7 +112,15 @@ enum nfc_attrs {
109#define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443) 112#define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443)
110#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) 113#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
111 114
115struct sockaddr_nfc {
116 sa_family_t sa_family;
117 __u32 dev_idx;
118 __u32 target_idx;
119 __u32 nfc_protocol;
120};
121
112/* NFC socket protocols */ 122/* NFC socket protocols */
113#define NFC_SOCKPROTO_MAX 0 123#define NFC_SOCKPROTO_RAW 0
124#define NFC_SOCKPROTO_MAX 1
114 125
115#endif /*__LINUX_NFC_H */ 126#endif /*__LINUX_NFC_H */