Linux 3.12.28
[linux/fpc-iii.git] / net / nfc / hci / llc.h
blob7be0b7f3ceb6aa34ec3adfa5f6b077c79cef3b24
1 /*
2 * Link Layer Control manager
4 * Copyright (C) 2012 Intel Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __LOCAL_LLC_H_
22 #define __LOCAL_LLC_H_
24 #include <net/nfc/hci.h>
25 #include <net/nfc/llc.h>
26 #include <linux/skbuff.h>
28 struct nfc_llc_ops {
29 void *(*init) (struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv,
30 rcv_to_hci_t rcv_to_hci, int tx_headroom,
31 int tx_tailroom, int *rx_headroom, int *rx_tailroom,
32 llc_failure_t llc_failure);
33 void (*deinit) (struct nfc_llc *llc);
34 int (*start) (struct nfc_llc *llc);
35 int (*stop) (struct nfc_llc *llc);
36 void (*rcv_from_drv) (struct nfc_llc *llc, struct sk_buff *skb);
37 int (*xmit_from_hci) (struct nfc_llc *llc, struct sk_buff *skb);
40 struct nfc_llc_engine {
41 const char *name;
42 struct nfc_llc_ops *ops;
43 struct list_head entry;
46 struct nfc_llc {
47 void *data;
48 struct nfc_llc_ops *ops;
49 int rx_headroom;
50 int rx_tailroom;
53 void *nfc_llc_get_data(struct nfc_llc *llc);
55 int nfc_llc_register(const char *name, struct nfc_llc_ops *ops);
56 void nfc_llc_unregister(const char *name);
58 int nfc_llc_nop_register(void);
60 #if defined(CONFIG_NFC_SHDLC)
61 int nfc_llc_shdlc_register(void);
62 #else
63 static inline int nfc_llc_shdlc_register(void)
65 return 0;
67 #endif
69 #endif /* __LOCAL_LLC_H_ */