#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/signal.h>
#include <linux/ioctl.h>
#include <linux/skbuff.h>
#include <linux/firmware.h>
#include <linux/serdev.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include "btintel.h"
#include "btbcm.h"
#include "hci_uart.h"
#define VERSION …
static const struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];
int hci_uart_register_proto(const struct hci_uart_proto *p)
{ … }
int hci_uart_unregister_proto(const struct hci_uart_proto *p)
{ … }
static const struct hci_uart_proto *hci_uart_get_proto(unsigned int id)
{ … }
static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type)
{ … }
static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)
{ … }
int hci_uart_tx_wakeup(struct hci_uart *hu)
{ … }
EXPORT_SYMBOL_GPL(…);
static void hci_uart_write_work(struct work_struct *work)
{ … }
void hci_uart_init_work(struct work_struct *work)
{ … }
int hci_uart_init_ready(struct hci_uart *hu)
{ … }
int hci_uart_wait_until_sent(struct hci_uart *hu)
{ … }
static int hci_uart_flush(struct hci_dev *hdev)
{ … }
static int hci_uart_open(struct hci_dev *hdev)
{ … }
static int hci_uart_close(struct hci_dev *hdev)
{ … }
static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
bool hci_uart_has_flow_control(struct hci_uart *hu)
{ … }
void hci_uart_set_flow_control(struct hci_uart *hu, bool enable)
{ … }
void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
unsigned int oper_speed)
{ … }
void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed)
{ … }
static int hci_uart_setup(struct hci_dev *hdev)
{ … }
static int hci_uart_tty_open(struct tty_struct *tty)
{ … }
static void hci_uart_tty_close(struct tty_struct *tty)
{ … }
static void hci_uart_tty_wakeup(struct tty_struct *tty)
{ … }
static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
const u8 *flags, size_t count)
{ … }
static int hci_uart_register_dev(struct hci_uart *hu)
{ … }
static int hci_uart_set_proto(struct hci_uart *hu, int id)
{ … }
static int hci_uart_set_flags(struct hci_uart *hu, unsigned long flags)
{ … }
static int hci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg)
{ … }
static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file,
u8 *buf, size_t nr, void **cookie,
unsigned long offset)
{ … }
static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file,
const u8 *data, size_t count)
{ … }
static struct tty_ldisc_ops hci_uart_ldisc = …;
static int __init hci_uart_init(void)
{ … }
static void __exit hci_uart_exit(void)
{ … }
module_init(…) …;
module_exit(hci_uart_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…);
MODULE_LICENSE(…) …;
MODULE_ALIAS_LDISC(…);