1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef __LOCAL_LLC_H_
20#define __LOCAL_LLC_H_
21
22#include <net/nfc/hci.h>
23#include <net/nfc/llc.h>
24#include <linux/skbuff.h>
25
26struct nfc_llc_ops {
27 void *(*init) (struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
28 rcv_to_hci_t rcv_to_hci, int tx_headroom,
29 int tx_tailroom, int *rx_headroom, int *rx_tailroom,
30 llc_failure_t llc_failure);
31 void (*deinit) (struct nfc_llc *llc);
32 int (*start) (struct nfc_llc *llc);
33 int (*stop) (struct nfc_llc *llc);
34 void (*rcv_from_drv) (struct nfc_llc *llc, struct sk_buff *skb);
35 int (*xmit_from_hci) (struct nfc_llc *llc, struct sk_buff *skb);
36};
37
38struct nfc_llc_engine {
39 const char *name;
40 struct nfc_llc_ops *ops;
41 struct list_head entry;
42};
43
44struct nfc_llc {
45 void *data;
46 struct nfc_llc_ops *ops;
47 int rx_headroom;
48 int rx_tailroom;
49};
50
51void *nfc_llc_get_data(struct nfc_llc *llc);
52
53int nfc_llc_register(const char *name, struct nfc_llc_ops *ops);
54void nfc_llc_unregister(const char *name);
55
56int nfc_llc_nop_register(void);
57
58#if defined(CONFIG_NFC_SHDLC)
59int nfc_llc_shdlc_register(void);
60#else
61static inline int nfc_llc_shdlc_register(void)
62{
63 return 0;
64}
65#endif
66
67#endif
68