summaryrefslogtreecommitdiffstats
path: root/include/linux/nfc.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-12-14 16:43:12 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-12-14 14:50:13 -0500
commitd646960f7986fefb460a2b062d5ccc8ccfeacc3a (patch)
tree0624d338715a8d275a39fbfce074df5c5d2783f5 /include/linux/nfc.h
parent361f3cb7f9cfdb82c80926d0e7843c098c034545 (diff)
downloadop-kernel-dev-d646960f7986fefb460a2b062d5ccc8ccfeacc3a.zip
op-kernel-dev-d646960f7986fefb460a2b062d5ccc8ccfeacc3a.tar.gz
NFC: Initial LLCP support
This patch is an initial implementation for the NFC Logical Link Control protocol. It's also known as NFC peer to peer mode. This is a basic implementation as it lacks SDP (services Discovery Protocol), frames aggregation support, and frame rejecion parsing. Follow up patches will implement those missing features. This code has been tested against a Nexus S phone implementing LLCP 1.0. 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.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h
index 34d8303..89fee4a 100644
--- a/include/linux/nfc.h
+++ b/include/linux/nfc.h
@@ -139,9 +139,22 @@ struct sockaddr_nfc {
__u32 nfc_protocol;
};
+#define NFC_LLCP_MAX_SERVICE_NAME 63
+struct sockaddr_nfc_llcp {
+ sa_family_t sa_family;
+ __u32 dev_idx;
+ __u32 target_idx;
+ __u32 nfc_protocol;
+ __u8 dsap; /* Destination SAP, if known */
+ __u8 ssap; /* Source SAP to be bound to */
+ char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
+ size_t service_name_len;
+};
+
/* NFC socket protocols */
#define NFC_SOCKPROTO_RAW 0
-#define NFC_SOCKPROTO_MAX 1
+#define NFC_SOCKPROTO_LLCP 1
+#define NFC_SOCKPROTO_MAX 2
#define NFC_HEADER_SIZE 1
OpenPOWER on IntegriCloud