Bluetooth: btintel: Export few static functions

Some of the functions used in btintel.c is made global so that they can
be reused in other transport drivers apart from USB.

Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Kiran K 2024-05-07 21:26:56 +05:30 committed by Luiz Augusto von Dentz
parent 84a4bb6548
commit 67d4dbac3b
2 changed files with 59 additions and 10 deletions

View File

@ -245,7 +245,7 @@ static int btintel_set_diag_combined(struct hci_dev *hdev, bool enable)
return ret; return ret;
} }
static void btintel_hw_error(struct hci_dev *hdev, u8 code) void btintel_hw_error(struct hci_dev *hdev, u8 code)
{ {
struct sk_buff *skb; struct sk_buff *skb;
u8 type = 0x00; u8 type = 0x00;
@ -277,6 +277,7 @@ static void btintel_hw_error(struct hci_dev *hdev, u8 code)
kfree_skb(skb); kfree_skb(skb);
} }
EXPORT_SYMBOL_GPL(btintel_hw_error);
int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver) int btintel_version_info(struct hci_dev *hdev, struct intel_version *ver)
{ {
@ -455,8 +456,8 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
} }
EXPORT_SYMBOL_GPL(btintel_read_version); EXPORT_SYMBOL_GPL(btintel_read_version);
static int btintel_version_info_tlv(struct hci_dev *hdev, int btintel_version_info_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version) struct intel_version_tlv *version)
{ {
const char *variant; const char *variant;
@ -544,10 +545,11 @@ static int btintel_version_info_tlv(struct hci_dev *hdev,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_version_info_tlv);
static int btintel_parse_version_tlv(struct hci_dev *hdev, int btintel_parse_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version, struct intel_version_tlv *version,
struct sk_buff *skb) struct sk_buff *skb)
{ {
/* Consume Command Complete Status field */ /* Consume Command Complete Status field */
skb_pull(skb, 1); skb_pull(skb, 1);
@ -649,6 +651,7 @@ static int btintel_parse_version_tlv(struct hci_dev *hdev,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_parse_version_tlv);
static int btintel_read_version_tlv(struct hci_dev *hdev, static int btintel_read_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version) struct intel_version_tlv *version)
@ -2597,8 +2600,8 @@ static void btintel_set_dsm_reset_method(struct hci_dev *hdev,
data->acpi_reset_method = btintel_acpi_reset_method; data->acpi_reset_method = btintel_acpi_reset_method;
} }
static int btintel_bootloader_setup_tlv(struct hci_dev *hdev, int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver) struct intel_version_tlv *ver)
{ {
u32 boot_param; u32 boot_param;
char ddcname[64]; char ddcname[64];
@ -2682,8 +2685,9 @@ finish:
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_bootloader_setup_tlv);
static void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant) void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
{ {
switch (hw_variant) { switch (hw_variant) {
/* Legacy bootloader devices that supports MSFT Extension */ /* Legacy bootloader devices that supports MSFT Extension */
@ -2707,6 +2711,7 @@ static void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
break; break;
} }
} }
EXPORT_SYMBOL_GPL(btintel_set_msft_opcode);
static void btintel_print_fseq_info(struct hci_dev *hdev) static void btintel_print_fseq_info(struct hci_dev *hdev)
{ {
@ -3078,7 +3083,7 @@ exit_error:
return err; return err;
} }
static int btintel_shutdown_combined(struct hci_dev *hdev) int btintel_shutdown_combined(struct hci_dev *hdev)
{ {
struct sk_buff *skb; struct sk_buff *skb;
int ret; int ret;
@ -3112,6 +3117,7 @@ static int btintel_shutdown_combined(struct hci_dev *hdev)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(btintel_shutdown_combined);
int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name) int btintel_configure_setup(struct hci_dev *hdev, const char *driver_name)
{ {

View File

@ -234,6 +234,16 @@ void btintel_bootup(struct hci_dev *hdev, const void *ptr, unsigned int len);
void btintel_secure_send_result(struct hci_dev *hdev, void btintel_secure_send_result(struct hci_dev *hdev,
const void *ptr, unsigned int len); const void *ptr, unsigned int len);
int btintel_set_quality_report(struct hci_dev *hdev, bool enable); int btintel_set_quality_report(struct hci_dev *hdev, bool enable);
int btintel_version_info_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version);
int btintel_parse_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version,
struct sk_buff *skb);
void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant);
int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver);
int btintel_shutdown_combined(struct hci_dev *hdev);
void btintel_hw_error(struct hci_dev *hdev, u8 code);
#else #else
static inline int btintel_check_bdaddr(struct hci_dev *hdev) static inline int btintel_check_bdaddr(struct hci_dev *hdev)
@ -330,4 +340,37 @@ static inline int btintel_set_quality_report(struct hci_dev *hdev, bool enable)
{ {
return -ENODEV; return -ENODEV;
} }
static inline int btintel_version_info_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version)
{
return -EOPNOTSUPP;
}
static inline int btintel_parse_version_tlv(struct hci_dev *hdev,
struct intel_version_tlv *version,
struct sk_buff *skb)
{
return -EOPNOTSUPP;
}
static inline void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
{
}
static inline int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver)
{
return -ENODEV;
}
static inline int btintel_shutdown_combined(struct hci_dev *hdev)
{
return -ENODEV;
}
static void btintel_hw_error(struct hci_dev *hdev, u8 code)
{
}
#endif #endif