#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/regmap.h>
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
#include <asm/unaligned.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include "btintel.h"
#define VERSION …
#define BDADDR_INTEL …
#define RSA_HEADER_LEN …
#define CSS_HEADER_OFFSET …
#define ECDSA_OFFSET …
#define ECDSA_HEADER_LEN …
enum { … };
#define CMD_WRITE_BOOT_PARAMS …
struct cmd_write_boot_params { … } __packed;
static struct { … } coredump_info;
static const guid_t btintel_guid_dsm = …;
int btintel_check_bdaddr(struct hci_dev *hdev)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_enter_mfg(struct hci_dev *hdev)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
{ … }
int btintel_set_diag(struct hci_dev *hdev, bool enable)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable)
{ … }
static int btintel_set_diag_combined(struct hci_dev *hdev, bool enable)
{ … }
void btintel_hw_error(struct hci_dev *hdev, u8 code)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
const void *param)
{ … }
int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_version_info_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_parse_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version,
struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_read_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version)
{ … }
#define IBT_REG_MODE_8BIT …
#define IBT_REG_MODE_16BIT …
#define IBT_REG_MODE_32BIT …
struct regmap_ibt_context { … };
struct ibt_cp_reg_access { … } __packed;
struct ibt_rp_reg_access { … } __packed;
static int regmap_ibt_read(void *context, const void *addr, size_t reg_size,
void *val, size_t val_size)
{ … }
static int regmap_ibt_gather_write(void *context,
const void *addr, size_t reg_size,
const void *val, size_t val_size)
{ … }
static int regmap_ibt_write(void *context, const void *data, size_t count)
{ … }
static void regmap_ibt_free_context(void *context)
{ … }
static const struct regmap_bus regmap_ibt = …;
static const struct regmap_config regmap_ibt_cfg = …;
struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
u16 opcode_write)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_read_boot_params(struct hci_dev *hdev,
struct intel_boot_params *params)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_sfi_rsa_header_secure_send(struct hci_dev *hdev,
const struct firmware *fw)
{ … }
static int btintel_sfi_ecdsa_header_secure_send(struct hci_dev *hdev,
const struct firmware *fw)
{ … }
static int btintel_download_firmware_payload(struct hci_dev *hdev,
const struct firmware *fw,
size_t offset)
{ … }
static bool btintel_firmware_version(struct hci_dev *hdev,
u8 num, u8 ww, u8 yy,
const struct firmware *fw,
u32 *boot_addr)
{ … }
int btintel_download_firmware(struct hci_dev *hdev,
struct intel_version *ver,
const struct firmware *fw,
u32 *boot_param)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_download_fw_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver,
const struct firmware *fw, u32 *boot_param,
u8 hw_variant, u8 sbe_type)
{ … }
static void btintel_reset_to_bootloader(struct hci_dev *hdev)
{ … }
static int btintel_read_debug_features(struct hci_dev *hdev,
struct intel_debug_features *features)
{ … }
static int btintel_set_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features)
{ … }
static int btintel_reset_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features)
{ … }
int btintel_set_quality_report(struct hci_dev *hdev, bool enable)
{ … }
EXPORT_SYMBOL_GPL(…);
static void btintel_coredump(struct hci_dev *hdev)
{ … }
static void btintel_dmp_hdr(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
static int btintel_register_devcoredump_support(struct hci_dev *hdev)
{ … }
static const struct firmware *btintel_legacy_rom_get_fw(struct hci_dev *hdev,
struct intel_version *ver)
{ … }
static int btintel_legacy_rom_patching(struct hci_dev *hdev,
const struct firmware *fw,
const u8 **fw_ptr, int *disable_patch)
{ … }
static int btintel_legacy_rom_setup(struct hci_dev *hdev,
struct intel_version *ver)
{ … }
static int btintel_download_wait(struct hci_dev *hdev, ktime_t calltime, int msec)
{ … }
static int btintel_boot_wait(struct hci_dev *hdev, ktime_t calltime, int msec)
{ … }
static int btintel_boot(struct hci_dev *hdev, u32 boot_addr)
{ … }
static int btintel_get_fw_name(struct intel_version *ver,
struct intel_boot_params *params,
char *fw_name, size_t len,
const char *suffix)
{ … }
static int btintel_download_fw(struct hci_dev *hdev,
struct intel_version *ver,
struct intel_boot_params *params,
u32 *boot_param)
{ … }
static int btintel_bootloader_setup(struct hci_dev *hdev,
struct intel_version *ver)
{ … }
static void btintel_get_fw_name_tlv(const struct intel_version_tlv *ver,
char *fw_name, size_t len,
const char *suffix)
{ … }
static void btintel_get_iml_tlv(const struct intel_version_tlv *ver,
char *fw_name, size_t len,
const char *suffix)
{ … }
static int btintel_prepare_fw_download_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver,
u32 *boot_param)
{ … }
static int btintel_get_codec_config_data(struct hci_dev *hdev,
__u8 link, struct bt_codec *codec,
__u8 *ven_len, __u8 **ven_data)
{ … }
static int btintel_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
{ … }
static int btintel_configure_offload(struct hci_dev *hdev)
{ … }
static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver)
{ … }
static int btintel_acpi_reset_method(struct hci_dev *hdev)
{ … }
static void btintel_set_dsm_reset_method(struct hci_dev *hdev,
struct intel_version_tlv *ver_tlv)
{ … }
#define BTINTEL_ISODATA_HANDLE_BASE …
static u8 btintel_classify_pkt_type(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver)
{ … }
EXPORT_SYMBOL_GPL(…);
void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
{ … }
EXPORT_SYMBOL_GPL(…);
void btintel_print_fseq_info(struct hci_dev *hdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_setup_combined(struct hci_dev *hdev)
{ … }
int btintel_shutdown_combined(struct hci_dev *hdev)
{ … }
EXPORT_SYMBOL_GPL(…);
int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name)
{ … }
EXPORT_SYMBOL_GPL(…);
static int btintel_diagnostics(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
int btintel_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
{ … }
EXPORT_SYMBOL_GPL(…);
void btintel_bootup(struct hci_dev *hdev, const void *ptr, unsigned int len)
{ … }
EXPORT_SYMBOL_GPL(…);
void btintel_secure_send_result(struct hci_dev *hdev,
const void *ptr, unsigned int len)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…);
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;