Commit b7da6a69 authored by Tedd Ho-Jeong An's avatar Tedd Ho-Jeong An Committed by Marcel Holtmann

Bluetooth: hci_intel: Fix firmware file name to use hw_variant

The format of Intel Bluetooth firmware for bootloader product is
ibt-<hw_variant>-<device_revision_id>.sfi and .ddc.

This patch uses a hw_variant value read from the device during
runtime to form the firmware filenames instead of using a constant
value, so it can support multiple prouducts.
Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent de766142
...@@ -704,11 +704,14 @@ static int intel_setup(struct hci_uart *hu) ...@@ -704,11 +704,14 @@ static int intel_setup(struct hci_uart *hu)
/* With this Intel bootloader only the hardware variant and device /* With this Intel bootloader only the hardware variant and device
* revision information are used to select the right firmware. * revision information are used to select the right firmware.
* *
* Currently this bootloader support is limited to hardware variant * The firmware filename is ibt-<hw_variant>-<dev_revid>.sfi.
* iBT 3.0 (LnP/SfP) which is identified by the value 11 (0x0b). *
* Currently the supported hardware variants are:
* 11 (0x0b) for iBT 3.0 (LnP/SfP)
*/ */
snprintf(fwname, sizeof(fwname), "intel/ibt-11-%u.sfi", snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.sfi",
le16_to_cpu(params->dev_revid)); le16_to_cpu(ver.hw_variant),
le16_to_cpu(params->dev_revid));
err = request_firmware(&fw, fwname, &hdev->dev); err = request_firmware(&fw, fwname, &hdev->dev);
if (err < 0) { if (err < 0) {
...@@ -721,8 +724,9 @@ static int intel_setup(struct hci_uart *hu) ...@@ -721,8 +724,9 @@ static int intel_setup(struct hci_uart *hu)
bt_dev_info(hdev, "Found device firmware: %s", fwname); bt_dev_info(hdev, "Found device firmware: %s", fwname);
/* Save the DDC file name for later */ /* Save the DDC file name for later */
snprintf(fwname, sizeof(fwname), "intel/ibt-11-%u.ddc", snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.ddc",
le16_to_cpu(params->dev_revid)); le16_to_cpu(ver.hw_variant),
le16_to_cpu(params->dev_revid));
kfree_skb(skb); kfree_skb(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment