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

Bluetooth: btintel: Reorganized bootloader mode tlv checks in intel_version_tlv parsing



This moves limited_cce and sbe_type checks under bootloader during tlv parsing
as operational firmware don't have access to these values. Any attempt to read
such values in operational firmware will only fetch garbage data.

Signed-off-by: default avatarLokendra Singh <lokendra.singh@intel.com>
Signed-off-by: default avatarKiran K <kiran.k@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 604b3cf8
Loading
Loading
Loading
Loading
+17 −17
Original line number Original line Diff line number Diff line
@@ -434,6 +434,9 @@ int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
		return -EINVAL;
		return -EINVAL;
	}
	}


	switch (version->img_type) {
	case 0x01:
		variant = "Bootloader";
		/* It is required that every single firmware fragment is acknowledged
		/* It is required that every single firmware fragment is acknowledged
		 * with a command complete event. If the boot parameters indicate
		 * with a command complete event. If the boot parameters indicate
		 * that this bootloader does not send them, then abort the setup.
		 * that this bootloader does not send them, then abort the setup.
@@ -451,9 +454,6 @@ int btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
			return -EINVAL;
			return -EINVAL;
		}
		}


	switch (version->img_type) {
	case 0x01:
		variant = "Bootloader";
		bt_dev_info(hdev, "Device revision is %u", version->dev_rev_id);
		bt_dev_info(hdev, "Device revision is %u", version->dev_rev_id);
		bt_dev_info(hdev, "Secure boot is %s",
		bt_dev_info(hdev, "Secure boot is %s",
			    version->secure_boot ? "enabled" : "disabled");
			    version->secure_boot ? "enabled" : "disabled");