linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tedd Ho-Jeong An <tedd.an@intel.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
	"An, Tedd" <tedd.an@intel.com>,
	Marcel Holtmann <marcel@holtmann.org>
Subject: [RFC v2 3/4] Bluetooth: Set file extension to SFI file for bootloader mode
Date: Mon, 8 Dec 2014 15:24:54 -0800	[thread overview]
Message-ID: <20141208152454.2985e44d@tedd-test> (raw)

From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch sets extension for firmware file to SFI if the device mode
is bootloader.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
---
 drivers/bluetooth/btusb.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index b3ce85f..0c6eb333 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1336,6 +1336,7 @@ struct intel_version {
 
 enum {
 	INTEL_FW_MODE_OP,
+	INTEL_FW_MODE_BL,
 };
 
 static const struct firmware *btusb_setup_intel_get_fw(struct hci_dev *hdev,
@@ -1397,6 +1398,17 @@ static const struct firmware *btusb_setup_intel_get_fw(struct hci_dev *hdev,
 			return NULL;
 		}
 		strncpy(ext, "bseq", 4);
+	} else if (fw_mode == INTEL_FW_MODE_BL) {
+		/* If fw_variant is 0x23, the device is already running in
+		 * operational mode, so no need to download the firmware
+		 */
+		if (ver->fw_variant == 0x23) {
+			BT_INFO("%s: Intel device is running in operation mode",
+				hdev->name);
+			btusb_check_bdaddr_intel(hdev);
+			return NULL;
+		}
+		strncpy(ext, "sfi", 3);
 	} else {
 		BT_ERR("%s: Invalid Intel firmware type: %d",
 		       hdev->name, fw_mode);
-- 
1.9.1

             reply	other threads:[~2014-12-08 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 23:24 Tedd Ho-Jeong An [this message]
2014-12-09  5:47 ` [RFC v2 3/4] Bluetooth: Set file extension to SFI file for bootloader mode Marcel Holtmann
2014-12-10  1:13   ` An, Tedd
2014-12-10 11:25     ` Marcel Holtmann
2014-12-10 22:08       ` An, Tedd
2014-12-11 12:53         ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141208152454.2985e44d@tedd-test \
    --to=tedd.an@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).