From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v10 8/9] Bluetooth: btintel: Collect tlv based active firmware build info in FW mode
Date: Tue, 23 Mar 2021 11:59:03 -0700 [thread overview]
Message-ID: <20210323185904.3372987-8-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20210323185904.3372987-1-luiz.dentz@gmail.com>
From: Lokendra Singh <lokendra.singh@intel.com>
In Operational firmware mode, 'Minimum FW version' TLV ID is not available.
So, we cannot fetch already running firmware info for comparison against
another build. However, It can be collected using a combination of other
TLV ID's information.
Signed-off-by: Lokendra Singh <lokendra.singh@intel.com>
---
drivers/bluetooth/btintel.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 4ddbf895c382..6442acba76d1 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -537,12 +537,23 @@ int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
version->img_type = tlv->val[0];
break;
case INTEL_TLV_TIME_STAMP:
+ /* If image type is Operational firmware (0x03), then
+ * running FW Calendar Week and Year information can
+ * be extracted from Timestamp information
+ */
+ version->min_fw_build_cw = tlv->val[0];
+ version->min_fw_build_yy = tlv->val[1];
version->timestamp = get_unaligned_le16(tlv->val);
break;
case INTEL_TLV_BUILD_TYPE:
version->build_type = tlv->val[0];
break;
case INTEL_TLV_BUILD_NUM:
+ /* If image type is Operational firmware (0x03), then
+ * running FW build number can be extracted from the
+ * Build information
+ */
+ version->min_fw_build_nn = tlv->val[0];
version->build_num = get_unaligned_le32(tlv->val);
break;
case INTEL_TLV_SECURE_BOOT:
--
2.30.2
next prev parent reply other threads:[~2021-03-23 19:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 18:58 [PATCH v10 1/9] Bluetooth: btintel: Check firmware version before download Luiz Augusto von Dentz
2021-03-23 18:58 ` [PATCH v10 2/9] Bluetooth: btintel: Move operational checks after version check Luiz Augusto von Dentz
2021-03-23 18:58 ` [PATCH v10 3/9] Bluetooth: btintel: Consolidate intel_version_tlv parsing Luiz Augusto von Dentz
2021-03-23 18:58 ` [PATCH v10 4/9] Bluetooth: btintel: Consolidate intel_version parsing Luiz Augusto von Dentz
2021-03-23 18:59 ` [PATCH v10 5/9] Bluetooth: btusb: Consolidate code for waiting firmware download Luiz Augusto von Dentz
2021-03-23 18:59 ` [PATCH v10 6/9] Bluetooth: btusb: Consolidate code for waiting firmware to boot Luiz Augusto von Dentz
2021-03-23 18:59 ` [PATCH v10 7/9] Bluetooth: btintel: Reorganized bootloader mode tlv checks in intel_version_tlv parsing Luiz Augusto von Dentz
2021-03-23 18:59 ` Luiz Augusto von Dentz [this message]
2021-03-23 18:59 ` [PATCH v10 9/9] Bluetooth: btintel: Skip reading firmware file version while in bootloader mode Luiz Augusto von Dentz
2021-03-23 20:08 ` [v10,1/9] Bluetooth: btintel: Check firmware version before download bluez.test.bot
2021-03-23 20:51 ` [PATCH v10 1/9] " An, Tedd
2021-03-24 7:04 ` Marcel Holtmann
2021-03-24 19:06 ` An, Tedd
2021-03-26 7:37 ` 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=20210323185904.3372987-8-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.