Commit 88981354 authored by Lokendra Singh's avatar Lokendra Singh Committed by Marcel Holtmann
Browse files

Bluetooth: btintel: Collect tlv based active firmware build info in FW mode



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: default avatarLokendra Singh <lokendra.singh@intel.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 7de3a42c
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -537,12 +537,23 @@ int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
			version->img_type = tlv->val[0];
			version->img_type = tlv->val[0];
			break;
			break;
		case INTEL_TLV_TIME_STAMP:
		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);
			version->timestamp = get_unaligned_le16(tlv->val);
			break;
			break;
		case INTEL_TLV_BUILD_TYPE:
		case INTEL_TLV_BUILD_TYPE:
			version->build_type = tlv->val[0];
			version->build_type = tlv->val[0];
			break;
			break;
		case INTEL_TLV_BUILD_NUM:
		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);
			version->build_num = get_unaligned_le32(tlv->val);
			break;
			break;
		case INTEL_TLV_SECURE_BOOT:
		case INTEL_TLV_SECURE_BOOT: