18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Link Layer Control manager public interface
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2012  Intel Corporation. All rights reserved.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __NFC_LLC_H_
98c2ecf20Sopenharmony_ci#define __NFC_LLC_H_
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <net/nfc/hci.h>
128c2ecf20Sopenharmony_ci#include <linux/skbuff.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#define LLC_NOP_NAME "nop"
158c2ecf20Sopenharmony_ci#define LLC_SHDLC_NAME "shdlc"
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_citypedef void (*rcv_to_hci_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
188c2ecf20Sopenharmony_citypedef int (*xmit_to_drv_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
198c2ecf20Sopenharmony_citypedef void (*llc_failure_t) (struct nfc_hci_dev *hdev, int err);
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistruct nfc_llc;
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cistruct nfc_llc *nfc_llc_allocate(const char *name, struct nfc_hci_dev *hdev,
248c2ecf20Sopenharmony_ci				 xmit_to_drv_t xmit_to_drv,
258c2ecf20Sopenharmony_ci				 rcv_to_hci_t rcv_to_hci, int tx_headroom,
268c2ecf20Sopenharmony_ci				 int tx_tailroom, llc_failure_t llc_failure);
278c2ecf20Sopenharmony_civoid nfc_llc_free(struct nfc_llc *llc);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciint nfc_llc_start(struct nfc_llc *llc);
308c2ecf20Sopenharmony_ciint nfc_llc_stop(struct nfc_llc *llc);
318c2ecf20Sopenharmony_civoid nfc_llc_rcv_from_drv(struct nfc_llc *llc, struct sk_buff *skb);
328c2ecf20Sopenharmony_ciint nfc_llc_xmit_from_hci(struct nfc_llc *llc, struct sk_buff *skb);
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciint nfc_llc_init(void);
358c2ecf20Sopenharmony_civoid nfc_llc_exit(void);
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#endif /* __NFC_LLC_H_ */
38