aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2020-04-17 19:15:30 +0200
committerMarcel Holtmann <marcel@holtmann.org>2020-04-22 19:43:58 +0200
commitf53b975cf113fa0dca9c7bba067c3d749682cc82 (patch)
tree1b9ed0d30edcfaa5ef934a68bd65c46f6ac4b462 /drivers/bluetooth
parentBluetooth: btbcm: Make btbcm_setup_patchram use btbcm_finalize (diff)
downloadlinux-dev-f53b975cf113fa0dca9c7bba067c3d749682cc82.tar.xz
linux-dev-f53b975cf113fa0dca9c7bba067c3d749682cc82.zip
Bluetooth: btbcm: Bail sooner from btbcm_initialize() when not loading fw
If we have already loaded the firmware/patchram and btbcm_initialize() is called to re-init the HCI after this then there is no need to get the USB device-ids and build a firmware-filename out of these. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btbcm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index cc3628cace35..9fa153b35825 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -463,6 +463,13 @@ int btbcm_initialize(struct hci_dev *hdev, bool *fw_load_done)
}
}
+ bt_dev_info(hdev, "%s (%3.3u.%3.3u.%3.3u) build %4.4u",
+ hw_name, (subver & 0xe000) >> 13,
+ (subver & 0x1f00) >> 8, (subver & 0x00ff), rev & 0x0fff);
+
+ if (*fw_load_done)
+ return 0;
+
if (hdev->bus == HCI_USB) {
/* Read USB Product Info */
skb = btbcm_read_usb_product(hdev);
@@ -479,13 +486,6 @@ int btbcm_initialize(struct hci_dev *hdev, bool *fw_load_done)
snprintf(fw_name, BCM_FW_NAME_LEN, "brcm/%s.hcd", hw_name);
}
- bt_dev_info(hdev, "%s (%3.3u.%3.3u.%3.3u) build %4.4u",
- hw_name, (subver & 0xe000) >> 13,
- (subver & 0x1f00) >> 8, (subver & 0x00ff), rev & 0x0fff);
-
- if (*fw_load_done)
- return 0;
-
err = request_firmware(&fw, fw_name, &hdev->dev);
if (err) {
bt_dev_info(hdev, "BCM: Patch %s not found", fw_name);