]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Bluetooth: Replace constant hw_variant from Intel Bluetooth firmware filename
authorTedd Ho-Jeong An <tedd.an@intel.com>
Tue, 25 Jul 2017 05:57:44 +0000 (13:57 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:38:06 +0000 (12:38 +0200)
BugLink: http://bugs.launchpad.net/bugs/1705633
The format of Intel Bluetooth firmware filename for bootloader product
is ibt-<hw_variant>-<device_revision_id>.sfi

Currently the driver uses a constant value 11 (0x0b) for hw_variant
to support LnP/SfP product. But new product like WsP product has
a different value such as 12 (0x0c).

To support the multiple products, this patch replaces the constant
value of hw_variant to the actual hw_variant value read from
the device.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 230b04ac8f439d0797ab85fb356f069f0472306f)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/bluetooth/btusb.c

index e7262382681dcc4078775ac60b52f4bb5346962b..342cd709d030061a90d31356c6b8572991bfe8c8 100644 (file)
@@ -2141,10 +2141,14 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
        /* With this Intel bootloader only the hardware variant and device
         * revision information are used to select the right firmware.
         *
-        * Currently this bootloader support is limited to hardware variant
-        * iBT 3.0 (LnP/SfP) which is identified by the value 11 (0x0b).
+        * The firmware filename is ibt-<hw_variant>-<dev_revid>.sfi.
+        *
+        * Currently the supported hardware variants are:
+        *   11 (0x0b) for iBT3.0 (LnP/SfP)
+        *   12 (0x0c) for iBT3.5 (WsP)
         */
-       snprintf(fwname, sizeof(fwname), "intel/ibt-11-%u.sfi",
+       snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.sfi",
+                le16_to_cpu(ver.hw_variant),
                 le16_to_cpu(params->dev_revid));
 
        err = request_firmware(&fw, fwname, &hdev->dev);
@@ -2160,7 +2164,8 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
        /* Save the DDC file name for later use to apply once the firmware
         * downloading is done.
         */
-       snprintf(fwname, sizeof(fwname), "intel/ibt-11-%u.ddc",
+       snprintf(fwname, sizeof(fwname), "intel/ibt-%u-%u.ddc",
+                le16_to_cpu(ver.hw_variant),
                 le16_to_cpu(params->dev_revid));
 
        kfree_skb(skb);