diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2011-12-14 10:43:12 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-14 14:50:13 -0500 |
commit | d646960f7986fefb460a2b062d5ccc8ccfeacc3a (patch) | |
tree | 0624d338715a8d275a39fbfce074df5c5d2783f5 /include/linux/nfc.h | |
parent | 361f3cb7f9cfdb82c80926d0e7843c098c034545 (diff) |
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.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h index 34d8303111f0..89fee4ab1904 100644 --- a/include/linux/nfc.h +++ b/include/linux/nfc.h | |||
@@ -139,9 +139,22 @@ struct sockaddr_nfc { | |||
139 | __u32 nfc_protocol; | 139 | __u32 nfc_protocol; |
140 | }; | 140 | }; |
141 | 141 | ||
142 | #define NFC_LLCP_MAX_SERVICE_NAME 63 | ||
143 | struct sockaddr_nfc_llcp { | ||
144 | sa_family_t sa_family; | ||
145 | __u32 dev_idx; | ||
146 | __u32 target_idx; | ||
147 | __u32 nfc_protocol; | ||
148 | __u8 dsap; /* Destination SAP, if known */ | ||
149 | __u8 ssap; /* Source SAP to be bound to */ | ||
150 | char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */; | ||
151 | size_t service_name_len; | ||
152 | }; | ||
153 | |||
142 | /* NFC socket protocols */ | 154 | /* NFC socket protocols */ |
143 | #define NFC_SOCKPROTO_RAW 0 | 155 | #define NFC_SOCKPROTO_RAW 0 |
144 | #define NFC_SOCKPROTO_MAX 1 | 156 | #define NFC_SOCKPROTO_LLCP 1 |
157 | #define NFC_SOCKPROTO_MAX 2 | ||
145 | 158 | ||
146 | #define NFC_HEADER_SIZE 1 | 159 | #define NFC_HEADER_SIZE 1 |
147 | 160 | ||