From patchwork Tue Nov 29 10:07:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 27145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp244551wrr; Tue, 29 Nov 2022 02:12:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf5YH74EDIQSXV6bzlsL1MSIGYHVkSdiI4nU8LcCwOeNxNIKnb19gvSpGHKDK/U+b78jJjeT X-Received: by 2002:a05:6402:5513:b0:467:7026:515e with SMTP id fi19-20020a056402551300b004677026515emr51665102edb.26.1669716724898; Tue, 29 Nov 2022 02:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669716724; cv=none; d=google.com; s=arc-20160816; b=a+SVOLlSoMhXrOdZTZp7vKCByNrI43jLtwlCjWlYdKhqK3xu5MvQP+jrzIhgqrJU7C O/7ommwaOQzWaaoSYSRGm+nzGan4diHdnnnxqiUfEDu/3/7L3/liB+2fc7rkrkO+Cikn gYTwLAKejJPDPolSkQVTcfKHyY4k6Eabo4PytWSwJL9Gzq+a7WFzOuoTycwH/qTNYIxv 4SaHKk44Dy20dwABYP4Zu2+bH4bU6pLgr9CZOvf8pWg2pYirH4BzsYJGZcFUhtmx4yn/ tFrXjZ3CjsRFBOAhgtbEUNR5uS31DlpPOehBxMJxx2d5AxFn4eGtq2WKejL7uZfJHNe+ Rxww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IZC4HCT9+l32iWb6x9aFklQvCoe73eLQkew5k++bB50=; b=rUDqDjkJdS5+yHrRNjKMQKcs72QTtfNHXlyZV37nyBZtdl3B8NNRQ6CTm/duRy071Z giOouWC7uJiuykJ4d1V2wFyCTuOG1Ddn2uKTMjoaGP1hrldtzWDpao1DDC3fxdMWzowB cS72uu7r7iclxfcPdM/hYyEbdaHFIk7tcidPfDJIbDQflZerZDLiP+y7Ih8ziGPtefBq zxUEry04nEf/EGlmb++sc5xEyAowdnzUw2967trVpFjvn7KlhsoyI7fvFZYkLiifYq91 G4qFqNSzC5DALR9INJHR0PjtIiOXMXh6N3ZFgcBtgr35uuMnanD15KzDPge2aukXYNpD NTZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr34-20020a1709073fa200b007820aa60dc3si13720837ejc.74.2022.11.29.02.11.40; Tue, 29 Nov 2022 02:12:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbiK2KJU (ORCPT + 99 others); Tue, 29 Nov 2022 05:09:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232350AbiK2KIr (ORCPT ); Tue, 29 Nov 2022 05:08:47 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 156912AC57 for ; Tue, 29 Nov 2022 02:08:21 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozxX5-0006yG-6k; Tue, 29 Nov 2022 11:08:07 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1ozxWy-0012iK-Pw; Tue, 29 Nov 2022 11:08:01 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1ozxWx-00BYGo-C7; Tue, 29 Nov 2022 11:07:59 +0100 From: Sascha Hauer To: linux-wireless@vger.kernel.org Cc: Neo Jou , Hans Ulli Kroll , Ping-Ke Shih , Yan-Hsuan Chuang , Kalle Valo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , kernel@pengutronix.de, Johannes Berg , Alexander Hochbaum , Da Xue , Po-Hao Huang , Viktor Petrenko , Sascha Hauer Subject: [PATCH v4 01/11] wifi: rtw88: print firmware type in info message Date: Tue, 29 Nov 2022 11:07:44 +0100 Message-Id: <20221129100754.2753237-2-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221129100754.2753237-1-s.hauer@pengutronix.de> References: <20221129100754.2753237-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750824884444671542?= X-GMAIL-MSGID: =?utf-8?q?1750824884444671542?= It's confusing to read two different firmware versions in the syslog for the same device: rtw_8822cu 2-1:1.2: Firmware version 9.9.4, H2C version 15 rtw_8822cu 2-1:1.2: Firmware version 9.9.11, H2C version 15 Print the firmware type in this message to make clear these are really two different firmwares for different purposes: rtw_8822cu 1-1.4:1.2: WOW Firmware version 9.9.4, H2C version 15 rtw_8822cu 1-1.4:1.2: Firmware version 9.9.11, H2C version 15 Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih --- Notes: Changes since v2: - new patch drivers/net/wireless/realtek/rtw88/main.c | 4 +++- drivers/net/wireless/realtek/rtw88/main.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 67151dbf83842..a7331872e8530 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1731,7 +1731,8 @@ static void rtw_load_firmware_cb(const struct firmware *firmware, void *context) update_firmware_info(rtwdev, fw); complete_all(&fw->completion); - rtw_info(rtwdev, "Firmware version %u.%u.%u, H2C version %u\n", + rtw_info(rtwdev, "%sFirmware version %u.%u.%u, H2C version %u\n", + fw->type == RTW_WOWLAN_FW ? "WOW " : "", fw->version, fw->sub_version, fw->sub_index, fw->h2c_version); } @@ -1757,6 +1758,7 @@ static int rtw_load_firmware(struct rtw_dev *rtwdev, enum rtw_fw_type type) return -ENOENT; } + fw->type = type; fw->rtwdev = rtwdev; init_completion(&fw->completion); diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h index bccd7b28f60c7..6e5875f6d07f4 100644 --- a/drivers/net/wireless/realtek/rtw88/main.h +++ b/drivers/net/wireless/realtek/rtw88/main.h @@ -1851,6 +1851,7 @@ struct rtw_fw_state { u16 h2c_version; u32 feature; u32 feature_ext; + enum rtw_fw_type type; }; enum rtw_sar_sources {