linux/drivers/bluetooth/btrtl.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Bluetooth support for Realtek devices
 *
 *  Copyright (C) 2015 Endless Mobile, Inc.
 */

#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/unaligned.h>
#include <linux/usb.h>

#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>

#include "btrtl.h"

#define VERSION

#define RTL_CHIP_8723CS_CG
#define RTL_CHIP_8723CS_VF
#define RTL_CHIP_8723CS_XX
#define RTL_EPATCH_SIGNATURE
#define RTL_EPATCH_SIGNATURE_V2
#define RTL_ROM_LMP_8703B
#define RTL_ROM_LMP_8723A
#define RTL_ROM_LMP_8723B
#define RTL_ROM_LMP_8821A
#define RTL_ROM_LMP_8761A
#define RTL_ROM_LMP_8822B
#define RTL_ROM_LMP_8852A
#define RTL_ROM_LMP_8851B
#define RTL_ROM_LMP_8922A
#define RTL_CONFIG_MAGIC

#define RTL_VSC_OP_COREDUMP

#define IC_MATCH_FL_LMPSUBV
#define IC_MATCH_FL_HCIREV
#define IC_MATCH_FL_HCIVER
#define IC_MATCH_FL_HCIBUS
#define IC_MATCH_FL_CHIP_TYPE
#define IC_INFO(lmps, hcir, hciv, bus)

#define RTL_CHIP_SUBVER
#define RTL_CHIP_REV
#define RTL_SEC_PROJ

#define RTL_PATCH_SNIPPETS
#define RTL_PATCH_DUMMY_HEADER
#define RTL_PATCH_SECURITY_HEADER

enum btrtl_chip_id {};

struct id_table {};

struct btrtl_device_info {};

static const struct id_table ic_id_table[] =;

static const struct id_table *btrtl_match_ic(u16 lmp_subver, u16 hci_rev,
					     u8 hci_ver, u8 hci_bus,
					     u8 chip_type)
{}

static struct sk_buff *btrtl_read_local_version(struct hci_dev *hdev)
{}

static int rtl_read_rom_version(struct hci_dev *hdev, u8 *version)
{}

static int btrtl_vendor_read_reg16(struct hci_dev *hdev,
				   struct rtl_vendor_cmd *cmd, u8 *rp)
{}

static void *rtl_iov_pull_data(struct rtl_iovec *iov, u32 len)
{}

static void btrtl_insert_ordered_subsec(struct rtl_subsection *node,
					struct btrtl_device_info *btrtl_dev)
{}

static int btrtl_parse_section(struct hci_dev *hdev,
			       struct btrtl_device_info *btrtl_dev, u32 opcode,
			       u8 *data, u32 len)
{}

static int rtlbt_parse_firmware_v2(struct hci_dev *hdev,
				   struct btrtl_device_info *btrtl_dev,
				   unsigned char **_buf)
{}

static int rtlbt_parse_firmware(struct hci_dev *hdev,
				struct btrtl_device_info *btrtl_dev,
				unsigned char **_buf)
{}

static int rtl_download_firmware(struct hci_dev *hdev,
				 const unsigned char *data, int fw_len)
{}

static int rtl_load_file(struct hci_dev *hdev, const char *name, u8 **buff)
{}

static int btrtl_setup_rtl8723a(struct hci_dev *hdev,
				struct btrtl_device_info *btrtl_dev)
{}

static int btrtl_setup_rtl8723b(struct hci_dev *hdev,
				struct btrtl_device_info *btrtl_dev)
{}

static void btrtl_coredump(struct hci_dev *hdev)
{}

static void btrtl_dmp_hdr(struct hci_dev *hdev, struct sk_buff *skb)
{}

static void btrtl_register_devcoredump_support(struct hci_dev *hdev)
{}

void btrtl_set_driver_name(struct hci_dev *hdev, const char *driver_name)
{}
EXPORT_SYMBOL_GPL();

static bool rtl_has_chip_type(u16 lmp_subver)
{}

static int rtl_read_chip_type(struct hci_dev *hdev, u8 *type)
{}

void btrtl_free(struct btrtl_device_info *btrtl_dev)
{}
EXPORT_SYMBOL_GPL();

struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,
					   const char *postfix)
{}
EXPORT_SYMBOL_GPL();

int btrtl_download_firmware(struct hci_dev *hdev,
			    struct btrtl_device_info *btrtl_dev)
{}
EXPORT_SYMBOL_GPL();

void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
{}
EXPORT_SYMBOL_GPL();

int btrtl_setup_realtek(struct hci_dev *hdev)
{}
EXPORT_SYMBOL_GPL();

int btrtl_shutdown_realtek(struct hci_dev *hdev)
{}
EXPORT_SYMBOL_GPL();

static unsigned int btrtl_convert_baudrate(u32 device_baudrate)
{}

int btrtl_get_uart_settings(struct hci_dev *hdev,
			    struct btrtl_device_info *btrtl_dev,
			    unsigned int *controller_baudrate,
			    u32 *device_baudrate, bool *flow_control)
{}
EXPORT_SYMBOL_GPL();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_LICENSE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();