Skip to content

Commit

Permalink
Bluetooth: btintel: Print firmware SHA1
Browse files Browse the repository at this point in the history
Intel Read Version event contains a TLV(0x32) having firmware sha1 in
operational image.

Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
  • Loading branch information
Kiran K authored and Luiz Augusto von Dentz committed Dec 22, 2023
1 parent 78db544 commit a2e7707
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions drivers/bluetooth/btintel.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ static int btintel_version_info_tlv(struct hci_dev *hdev,
bt_dev_info(hdev, "%s timestamp %u.%u buildtype %u build %u", variant,
2000 + (version->timestamp >> 8), version->timestamp & 0xff,
version->build_type, version->build_num);
if (version->img_type == 0x03)
bt_dev_info(hdev, "Firmware SHA1: 0x%8.8x", version->git_sha1);

return 0;
}
Expand Down Expand Up @@ -630,6 +632,9 @@ static int btintel_parse_version_tlv(struct hci_dev *hdev,
memcpy(&version->otp_bd_addr, tlv->val,
sizeof(bdaddr_t));
break;
case INTEL_TLV_GIT_SHA1:
version->git_sha1 = get_unaligned_le32(tlv->val);
break;
default:
/* Ignore rest of information */
break;
Expand Down
4 changes: 3 additions & 1 deletion drivers/bluetooth/btintel.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ enum {
INTEL_TLV_LIMITED_CCE,
INTEL_TLV_SBE_TYPE,
INTEL_TLV_OTP_BDADDR,
INTEL_TLV_UNLOCKED_STATE
INTEL_TLV_UNLOCKED_STATE,
INTEL_TLV_GIT_SHA1
};

struct intel_tlv {
Expand Down Expand Up @@ -69,6 +70,7 @@ struct intel_version_tlv {
u8 min_fw_build_yy;
u8 limited_cce;
u8 sbe_type;
u32 git_sha1;
bdaddr_t otp_bd_addr;
};

Expand Down

0 comments on commit a2e7707

Please sign in to comment.