aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/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 /net/nfc/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 'net/nfc/nfc.h')
-rw-r--r--net/nfc/nfc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h
index 8335f4de8f4..aaf9832298f 100644
--- a/net/nfc/nfc.h
+++ b/net/nfc/nfc.h
@@ -42,6 +42,20 @@ struct nfc_protocol {
42 const struct nfc_protocol *nfc_proto); 42 const struct nfc_protocol *nfc_proto);
43}; 43};
44 44
45struct nfc_rawsock {
46 struct sock sk;
47 struct nfc_dev *dev;
48 u32 target_idx;
49 struct work_struct tx_work;
50 bool tx_work_scheduled;
51};
52#define nfc_rawsock(sk) ((struct nfc_rawsock *) sk)
53#define to_rawsock_sk(_tx_work) \
54 ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work))
55
56int __init rawsock_init(void);
57void rawsock_exit(void);
58
45int __init af_nfc_init(void); 59int __init af_nfc_init(void);
46void af_nfc_exit(void); 60void af_nfc_exit(void);
47int nfc_proto_register(const struct nfc_protocol *nfc_proto); 61int nfc_proto_register(const struct nfc_protocol *nfc_proto);