aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nfc.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-12-14 10:43:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-14 14:50:13 -0500
commitd646960f7986fefb460a2b062d5ccc8ccfeacc3a (patch)
tree0624d338715a8d275a39fbfce074df5c5d2783f5 /net/nfc/nfc.h
parent361f3cb7f9cfdb82c80926d0e7843c098c034545 (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 'net/nfc/nfc.h')
-rw-r--r--net/nfc/nfc.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/net/nfc/nfc.h b/net/nfc/nfc.h
index 4d0fb125d033..2c2c4015c68b 100644
--- a/net/nfc/nfc.h
+++ b/net/nfc/nfc.h
@@ -46,6 +46,60 @@ struct nfc_rawsock {
46#define to_rawsock_sk(_tx_work) \ 46#define to_rawsock_sk(_tx_work) \
47 ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work)) 47 ((struct sock *) container_of(_tx_work, struct nfc_rawsock, tx_work))
48 48
49#ifdef CONFIG_NFC_LLCP
50
51void nfc_llcp_mac_is_down(struct nfc_dev *dev);
52void nfc_llcp_mac_is_up(struct nfc_dev *dev, u32 target_idx,
53 u8 comm_mode, u8 rf_mode);
54int nfc_llcp_register_device(struct nfc_dev *dev);
55void nfc_llcp_unregister_device(struct nfc_dev *dev);
56int nfc_llcp_set_remote_gb(struct nfc_dev *dev, u8 *gb, u8 gb_len);
57u8 *nfc_llcp_general_bytes(struct nfc_dev *dev, u8 *general_bytes_len);
58int __init nfc_llcp_init(void);
59void nfc_llcp_exit(void);
60
61#else
62
63void nfc_llcp_mac_is_down(struct nfc_dev *dev)
64{
65}
66
67void nfc_llcp_mac_is_up(struct nfc_dev *dev, u32 target_idx,
68 u8 comm_mode, u8 rf_mode)
69{
70}
71
72static inline int nfc_llcp_register_device(struct nfc_dev *dev)
73{
74 return 0;
75}
76
77static inline void nfc_llcp_unregister_device(struct nfc_dev *dev)
78{
79}
80
81static inline int nfc_llcp_set_remote_gb(struct nfc_dev *dev, u8 *gb, u8 gb_len)
82{
83 return 0;
84}
85
86static inline u8 *nfc_llcp_general_bytes(struct nfc_dev *dev, u8 *gb_len)
87{
88 *gb_len = 0;
89 return NULL;
90}
91
92static inline int nfc_llcp_init(void)
93{
94 return 0;
95}
96
97static inline void nfc_llcp_exit(void)
98{
99}
100
101#endif
102
49int __init rawsock_init(void); 103int __init rawsock_init(void);
50void rawsock_exit(void); 104void rawsock_exit(void);
51 105