162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Link Layer Control manager public interface
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2012  Intel Corporation. All rights reserved.
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef __NFC_LLC_H_
962306a36Sopenharmony_ci#define __NFC_LLC_H_
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include <net/nfc/hci.h>
1262306a36Sopenharmony_ci#include <linux/skbuff.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#define LLC_NOP_NAME "nop"
1562306a36Sopenharmony_ci#define LLC_SHDLC_NAME "shdlc"
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_citypedef void (*rcv_to_hci_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
1862306a36Sopenharmony_citypedef int (*xmit_to_drv_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
1962306a36Sopenharmony_citypedef void (*llc_failure_t) (struct nfc_hci_dev *hdev, int err);
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_cistruct nfc_llc;
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_cistruct nfc_llc *nfc_llc_allocate(const char *name, struct nfc_hci_dev *hdev,
2462306a36Sopenharmony_ci				 xmit_to_drv_t xmit_to_drv,
2562306a36Sopenharmony_ci				 rcv_to_hci_t rcv_to_hci, int tx_headroom,
2662306a36Sopenharmony_ci				 int tx_tailroom, llc_failure_t llc_failure);
2762306a36Sopenharmony_civoid nfc_llc_free(struct nfc_llc *llc);
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciint nfc_llc_start(struct nfc_llc *llc);
3062306a36Sopenharmony_ciint nfc_llc_stop(struct nfc_llc *llc);
3162306a36Sopenharmony_civoid nfc_llc_rcv_from_drv(struct nfc_llc *llc, struct sk_buff *skb);
3262306a36Sopenharmony_ciint nfc_llc_xmit_from_hci(struct nfc_llc *llc, struct sk_buff *skb);
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciint nfc_llc_init(void);
3562306a36Sopenharmony_civoid nfc_llc_exit(void);
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#endif /* __NFC_LLC_H_ */
38