Commit 4a61cd66 authored by Eric Lapuyade's avatar Eric Lapuyade Committed by Samuel Ortiz

NFC: Add an shdlc llc module to llc core

This is used by HCI drivers such as the one for the pn544 which require
communications between HCI and the chip to use shdlc.
Signed-off-by: default avatarEric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 8af00d48
......@@ -25,6 +25,7 @@
#include <linux/skbuff.h>
#define LLC_NOP_NAME "nop"
#define LLC_SHDLC_NAME "shdlc"
typedef void (*rcv_to_hci_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
typedef int (*xmit_to_drv_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
......
......@@ -5,4 +5,4 @@
obj-$(CONFIG_NFC_HCI) += hci.o
hci-y := core.o hcp.o command.o llc.o llc_nop.o
hci-$(CONFIG_NFC_SHDLC) += shdlc.o
hci-$(CONFIG_NFC_SHDLC) += shdlc.o llc_shdlc.o
......@@ -26,9 +26,23 @@ static struct list_head llc_engines;
int nfc_llc_init(void)
{
int r;
INIT_LIST_HEAD(&llc_engines);
return nfc_llc_nop_register();
r = nfc_llc_nop_register();
if (r)
goto exit;
r = nfc_llc_shdlc_register();
if (r)
goto exit;
return 0;
exit:
nfc_llc_exit();
return r;
}
EXPORT_SYMBOL(nfc_llc_init);
......
......@@ -56,5 +56,6 @@ int nfc_llc_register(const char *name, struct nfc_llc_ops *ops);
void nfc_llc_unregister(const char *name);
int nfc_llc_nop_register(void);
int nfc_llc_shdlc_register(void);
#endif /* __LOCAL_LLC_H_ */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment