* [RFC 2/3] Bluetooth: Add parameter to specify the firmware file extension
@ 2014-12-04 1:09 Tedd Ho-Jeong An
0 siblings, 0 replies; only message in thread
From: Tedd Ho-Jeong An @ 2014-12-04 1:09 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org; +Cc: An, Tedd, Johan Hedberg, Marcel Holtmann
From: Tedd Ho-Jeong An <tedd.an@intel.com>
This patch add a parameter to specify the extension of firmware file,
so differnt format of firmware file can be opened.
---
drivers/bluetooth/btusb.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d88faab..0fa1c13 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1290,17 +1290,17 @@ struct intel_version {
} __packed;
static const struct firmware *btusb_setup_intel_get_fw(struct hci_dev *hdev,
- struct intel_version *ver)
+ struct intel_version *ver, char *ext)
{
const struct firmware *fw;
char fwname[64];
int ret;
snprintf(fwname, sizeof(fwname),
- "intel/ibt-hw-%x.%x.%x-fw-%x.%x.%x.%x.%x.bseq",
+ "intel/ibt-hw-%x.%x.%x-fw-%x.%x.%x.%x.%x.%s",
ver->hw_platform, ver->hw_variant, ver->hw_revision,
ver->fw_variant, ver->fw_revision, ver->fw_build_num,
- ver->fw_build_ww, ver->fw_build_yy);
+ ver->fw_build_ww, ver->fw_build_yy, ext);
ret = request_firmware(&fw, fwname, &hdev->dev);
if (ret < 0) {
@@ -1316,8 +1316,8 @@ static const struct firmware *btusb_setup_intel_get_fw(struct hci_dev *hdev,
/* If the correct firmware patch file is not found, use the
* default firmware patch file instead
*/
- snprintf(fwname, sizeof(fwname), "intel/ibt-hw-%x.%x.bseq",
- ver->hw_platform, ver->hw_variant);
+ snprintf(fwname, sizeof(fwname), "intel/ibt-hw-%x.%x.%s",
+ ver->hw_platform, ver->hw_variant, ext);
if (request_firmware(&fw, fwname, &hdev->dev) < 0) {
BT_ERR("%s failed to open default Intel fw file: %s",
hdev->name, fwname);
@@ -1583,7 +1583,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
* If no patch file is found, allow the device to operate without
* a patch.
*/
- fw = btusb_setup_intel_get_fw(hdev, &ver);
+ fw = btusb_setup_intel_get_fw(hdev, &ver, "bseq");
if (!fw) {
btusb_check_bdaddr_intel(hdev);
return 0;
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-04 1:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 1:09 [RFC 2/3] Bluetooth: Add parameter to specify the firmware file extension Tedd Ho-Jeong An
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).