Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp320598pxp; Wed, 9 Mar 2022 03:45:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjwzsaJQXV2fRC4kCEBEuhRzZLGMrVUX4CHPOpvl5j/tN4txYhqajh+UTwhj5OaWscAwrm X-Received: by 2002:a05:6a00:16d6:b0:4e0:ed6a:cf82 with SMTP id l22-20020a056a0016d600b004e0ed6acf82mr23045979pfc.9.1646826347922; Wed, 09 Mar 2022 03:45:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646826347; cv=none; d=google.com; s=arc-20160816; b=z0VWlCsCbSnfU6HyFCF0d58lQ1K9xs1A3L4v1RiX73D0nnPYRYzHqUMK3crbhuBJIs pv5LO6uCoMbPg3XcJ/o4X0Rli/dCKegGE+6EYiG3TjF+c1gYgKnpx33Pycezl3YrQxX4 b0GX1opzsbUhzAaBV5orBT2LwfM7fb2NK7q/FdzbdFWS2spbOYQ79A7iq9XJ7UtYtQK0 b26dScy18nJFJGrGRbz99LhGPLr87g8QTC8TQopw+go/n+4+cFWmgd1KIueNBBdSkO7E /yii+ZxiTGhLZU+CqM9hOL/tqLKqDUSnDSLQolUgz+rFMlxjBs+0rnS/9RywO4sftqki 29zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=ehH+Lo/z/nbOf/9EJEdMK+qE8kvy+kJoylFy5ryoBg4=; b=ZjMKpFpE+/mUhecy447xpq4AS7PStzJDjTsGxa2jI5RXIVPnspyiC1aDfER2ZeP1E9 ztDj90nooksD2DttGGgARMo0R44kssT/unuLAW/JrvOUfkqKcFXOfFfy7yI+hnrJTJQQ +JOc0NalieguhN57yV977yUshCQsJDGiHHa72PkaL0jTMDhyA11eadxrxSv6hbzgdHN/ TYkrwpCAsJ61sEynui04GniCWE8L9zaTdY1U4FZOh+JMXU8zR3NBMEpeC09VTAHMox2W 0/6LBUNJmmRzzxt4k650w8c8HirkMsbafNWLKbnHuLZF3YrEQ3YPMzYeYbiCvxIadPDe zfLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UTOWHYgI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020a65604c000000b00376ae198334si1552427pgp.638.2022.03.09.03.45.32; Wed, 09 Mar 2022 03:45:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UTOWHYgI; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbiCILZp (ORCPT + 70 others); Wed, 9 Mar 2022 06:25:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiCILZn (ORCPT ); Wed, 9 Mar 2022 06:25:43 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89E8F155C3F for ; Wed, 9 Mar 2022 03:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646825085; x=1678361085; h=from:to:cc:subject:date:message-id:mime-version; bh=ehH+Lo/z/nbOf/9EJEdMK+qE8kvy+kJoylFy5ryoBg4=; b=UTOWHYgIxJRDoDrEAXq+hs64PSMorlgjfuUufjt6tCjTOifJQd/nj6Xc 7a9/AcBvCkBBWxQIIsMqqrALIk/LjogZ42/Ccvpnb2F50m7uiX4YRGTdE hZWIH4ckDtZxmGeIQjgcAeyNUUp9xOdrRmVFViTnnyW3vRMALmrpRWRj2 c=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 09 Mar 2022 03:24:44 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 03:24:44 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 9 Mar 2022 03:24:43 -0800 Received: from haric-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 9 Mar 2022 03:24:41 -0800 From: To: CC: , , "Hari Chandrakanthan" Subject: [PATCH v1] ath11k: change fw build id format in driver init log Date: Wed, 9 Mar 2022 16:54:25 +0530 Message-ID: <1646825065-7736-1-git-send-email-quic_haric@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Hari Chandrakanthan Currently fw build id is printed during init as follows. fw_version 0x250684a5 fw_build_timestamp 2021-07-13 10:57 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 The string "QC_IMAGE_VERSION_STRING=" is removed from the log to improve readability. With this patch the fw build id is printed during init as follows. fw_version 0x250684a5 fw_build_timestamp 2021-07-13 10:57 fw_build_id WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Hari Chandrakanthan --- drivers/net/wireless/ath/ath11k/qmi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index b717813..a35cdaf 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -14,6 +14,8 @@ #define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02 #define HOST_CSTATE_BIT 0x04 +#define FW_BUILD_ID_MASK "QC_IMAGE_VERSION_STRING=" + bool ath11k_cold_boot_cal = 1; EXPORT_SYMBOL(ath11k_cold_boot_cal); module_param_named(cold_boot_cal, ath11k_cold_boot_cal, bool, 0644); @@ -1917,6 +1919,8 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab) struct qmi_txn txn; int ret = 0; int r; + char *fw_build_id; + int fw_build_id_mask_len; memset(&req, 0, sizeof(req)); memset(&resp, 0, sizeof(resp)); @@ -1982,6 +1986,11 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab) ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi cal data supported from eeprom\n"); } + fw_build_id = ab->qmi.target.fw_build_id; + fw_build_id_mask_len = strlen(FW_BUILD_ID_MASK); + if (!strncmp(fw_build_id, FW_BUILD_ID_MASK, fw_build_id_mask_len)) + fw_build_id = fw_build_id + fw_build_id_mask_len; + ath11k_info(ab, "chip_id 0x%x chip_family 0x%x board_id 0x%x soc_id 0x%x\n", ab->qmi.target.chip_id, ab->qmi.target.chip_family, ab->qmi.target.board_id, ab->qmi.target.soc_id); @@ -1989,7 +1998,7 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab) ath11k_info(ab, "fw_version 0x%x fw_build_timestamp %s fw_build_id %s", ab->qmi.target.fw_version, ab->qmi.target.fw_build_timestamp, - ab->qmi.target.fw_build_id); + fw_build_id); r = ath11k_core_check_dt(ab); if (r) -- 2.7.4