Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp376069rdh; Thu, 23 Nov 2023 06:23:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiA4BVSiJTax3C0EYRm14P1nuOJzyYGFE6grIv5mnqZ7JzlKDuwbeo99tQcegwjR/5LUUX X-Received: by 2002:a17:90b:4d0e:b0:280:4ec6:97e9 with SMTP id mw14-20020a17090b4d0e00b002804ec697e9mr6556191pjb.30.1700749432228; Thu, 23 Nov 2023 06:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700749432; cv=none; d=google.com; s=arc-20160816; b=hAe6nNcZWcNSWJCvlrcovdf3pNbAPgP4mcAmAWVxd+1VMWh0DEnsndFoL+PYwYTFS4 6CkDRn61Cls0j2FE7bxcER9wd4lVZ/VIUlMot9leXOCxfvtYMb3lhtTxws0eW45a/4T9 7nbEt2diwUwoSJPAIYK511VkXSUB8pfJGwMGg3KW36zxQSf6Hfqdnv6Wf1EaTwHcRAHe zM6EoIOiDVL3QylLiUXhoFpqAvwoYxUQILgo2Ql/Wz+XUosJSNAnb/ZfKEDiWrMXpf1C +POPpncZIxgwDW12mzOUVmpwhtdNF4d/th6lPKi7e11mBDVrOG2aKTBiEGIkfR0lRmpV zTIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=L0KB3kWVPRT7EU+/ZlEKzlOTs2Tm4TTeE5YqnSqiLyc=; fh=U3ev7U7uX1ilviB+nfdu7oOFhneDnAUw+Nb8W7HsKBg=; b=D50w/3ZovhJLm17qN6q9ULjmuySjh0E9BXxtoexja+TpzHOb9n/U6NWMOnZq7LUNey tYER18b7plGVWOQg/q+tXOT1L2woTlQlH5PIniV+6/rHl+WzihlkjAgt/NGFFWP73JRl W4BJqm1zELD2RFpFQH+1xpMwNt1kjeyMp3YzLWRQ1c4/oXbjJ2+ksKxwGNH8FfJBxOgy RJhXp7NWI3sYkIdfNHAT4X64E9vVrMzWM6HA8IxZ8h2ce9gKGYL++Nhr1dcrtbb67xTB YWncg+v/lhHwKBMhW0JhDemmIaoQ9CwQogt6eKTxhgzC7V7dtPIiZjZHCRxdkEnedWVR FBFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nalvjSSs; spf=pass (google.com: domain of linux-bluetooth+bounces-186-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-186-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h13-20020a17090adb8d00b002764fc15dd3si1434726pjv.37.2023.11.23.06.23.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 06:23:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-186-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nalvjSSs; spf=pass (google.com: domain of linux-bluetooth+bounces-186-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-186-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2B2D7B215A5 for ; Thu, 23 Nov 2023 14:23:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD8FE2FC46; Thu, 23 Nov 2023 14:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nalvjSSs" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 834F91BD for ; Thu, 23 Nov 2023 06:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700749416; x=1732285416; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jKQ6lQfoYwBKaCQURyeN612gsc+AHcMCKe4AlB11gYQ=; b=nalvjSSsXLJkAbqC2XmqUMEHkxYztox5DSXSAfuXoRmHGqqiHACSSU9g IjXFqk837DWwZXn85iRIPxFQxVgCPiLMYp9BsiW7pgusp9rVTx8/82Bm7 D6oWX2kBXOdU9yhUNfCVBhD6BJUFMoBSRo5Vazhxzgtxx8nrGVr+MbEtH 0NYMgSuIEANgd45lyl3rKK39fdGyoHszLCeIZa5/Xzng+++ze8EjQ1gDx 4Tr1AbjLEzHCwRNpd5/dAhB0M/FS9cXFpWbLSfsM0nK4na6Z4Z+aBNf9d WcJXCNVNy3NpGxZhVPeru3jfEz0fzh4x1iFZBss6Tm0nOCVHCRzFnKwJ4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="5421284" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="5421284" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:23:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="767216653" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="767216653" Received: from intel-lenovo-legion-y540-15irh-pg0.iind.intel.com ([10.224.186.95]) by orsmga002.jf.intel.com with ESMTP; 23 Nov 2023 06:23:34 -0800 From: Kiran K To: linux-bluetooth@vger.kernel.org Cc: ravishankar.srivatsa@intel.com, Kiran K Subject: [PATCH] Bluetooth:btintel: Print firmware SHA1 Date: Thu, 23 Nov 2023 20:05:50 +0530 Message-Id: <20231123143550.2436697-1-kiran.k@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Intel Read Version event contains a TLV(0x32) having firmware sha1 in operational image. Signed-off-by: Kiran K --- drivers/bluetooth/btintel.c | 5 +++++ drivers/bluetooth/btintel.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 2462796a512a..cdc5c08824a0 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -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; } @@ -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; diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index 3a2d5b4219dd..d19fcdb9ff0b 100644 --- a/drivers/bluetooth/btintel.h +++ b/drivers/bluetooth/btintel.h @@ -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 { @@ -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; }; -- 2.34.1