#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/skbuff.h>
#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/of.h>
#include <linux/serdev.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include "hci_uart.h"
#define HCI_FW_REQ_PKT …
#define HCI_CHIP_VER_PKT …
#define MRVL_ACK …
#define MRVL_NAK …
#define MRVL_RAW_DATA …
#define MRVL_SET_BAUDRATE …
enum { … };
struct mrvl_data { … };
struct mrvl_serdev { … };
struct hci_mrvl_pkt { … } __packed;
#define HCI_MRVL_PKT_SIZE …
static int mrvl_open(struct hci_uart *hu)
{ … }
static int mrvl_close(struct hci_uart *hu)
{ … }
static int mrvl_flush(struct hci_uart *hu)
{ … }
static struct sk_buff *mrvl_dequeue(struct hci_uart *hu)
{ … }
static int mrvl_enqueue(struct hci_uart *hu, struct sk_buff *skb)
{ … }
static void mrvl_send_ack(struct hci_uart *hu, unsigned char type)
{ … }
static int mrvl_recv_fw_req(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
static int mrvl_recv_chip_ver(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
#define HCI_RECV_CHIP_VER …
#define HCI_RECV_FW_REQ …
static const struct h4_recv_pkt mrvl_recv_pkts[] = …;
static int mrvl_recv(struct hci_uart *hu, const void *data, int count)
{ … }
static int mrvl_load_firmware(struct hci_dev *hdev, const char *name)
{ … }
static int mrvl_setup(struct hci_uart *hu)
{ … }
static int mrvl_set_baudrate(struct hci_uart *hu, unsigned int speed)
{ … }
static const struct hci_uart_proto mrvl_proto_8897 = …;
static const struct hci_uart_proto mrvl_proto_8997 = …;
static int mrvl_serdev_probe(struct serdev_device *serdev)
{ … }
static void mrvl_serdev_remove(struct serdev_device *serdev)
{ … }
static const struct of_device_id __maybe_unused mrvl_bluetooth_of_match[] = …;
MODULE_DEVICE_TABLE(of, mrvl_bluetooth_of_match);
static struct serdev_device_driver mrvl_serdev_driver = …;
int __init mrvl_init(void)
{ … }
int __exit mrvl_deinit(void)
{ … }