From patchwork Thu Oct 12 14:01:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chukun Pan X-Patchwork-Id: 152018 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1252010vqb; Thu, 12 Oct 2023 07:02:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQ5wBhHRAnUoCicQpM+UkkJhEBtZF8Bnt5RnMaO6+f9gUfgkhGGd2cmR6A6xnHLOu9m6qj X-Received: by 2002:a17:902:d512:b0:1bf:349f:b85c with SMTP id b18-20020a170902d51200b001bf349fb85cmr26767581plg.1.1697119333440; Thu, 12 Oct 2023 07:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697119333; cv=none; d=google.com; s=arc-20160816; b=tx6zgV2muuXpIXketYcQpRk8/j96NM9/qluUV2HmOHTXePFxG//wwFchjUlXYOiVwb s/CJ1XlwPruotRVxDRaELiKPt5zZGu10YBBT9i0r3y/tUwbxOLeVb3U0TygPW8QRkMs0 F7PixN8UqD5vomHWRbxuHkd+1gkkRmF4UwJ9GZh2yqFQuVXd6aLVO/sB+GIDj6xEJwju kLjJFrl4klueQMYuYrlk0T5sQDHiFgNL8gapZkz6pkvYtP9BonLufVSJuFs+fs6/+/gV jzI+UCwqPFWTOMsLfNfw/VYv6An5YaAKLAxN/AhO5NKusDS7/CZlu0G3aeoaPLYq9sGJ Am9g== 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 :message-id:date:subject:cc:to:from; bh=3fKkrJztXFw7RZQMHdKV2YVwHGtA+rnveiLlvSbiwWk=; fh=zu+P0qdaV7RU5/MaOo+vkC8XGSspPHklujQD5TK7R3c=; b=eajvxAHSGLS5BFeU4bsgt8jwL+vqZKAvhARKFGFSI4c655bnrvju7AKRg6GrglNYAK zIB4r1WhwnEUrfxOkClJycFN9MOS1pqIYKrHGMIJflex6YNi0F/p8YdaY2n4YA9d7bLR bx5vyWbPazNFUWtK7+P2z0/RpKaneH+gxMud3aqrSJKnm8kMmqMIiWm2YPa6/qG/kEPX 0BUYmjiVPK7d8PYSi0n7lI8q5xz2PE/a7hj0QNWXTydeAvfNoTYk/TFSHzZgmir9IGsK IW1JpwgZeUVcL5vHOw7V+AK3ZJQojhA/3LrvbcAt15erdvlg8Lnsqw3cSC8f8FrjmOKH kq8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=jmu.edu.cn Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d9-20020a170902cec900b001c7316f26a0si2442683plg.516.2023.10.12.07.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 07:02:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=jmu.edu.cn Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 72B0C825CEDD; Thu, 12 Oct 2023 07:02:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344014AbjJLOBu (ORCPT + 19 others); Thu, 12 Oct 2023 10:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235121AbjJLOBt (ORCPT ); Thu, 12 Oct 2023 10:01:49 -0400 Received: from mail-m49198.qiye.163.com (mail-m49198.qiye.163.com [45.254.49.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B8C6B7 for ; Thu, 12 Oct 2023 07:01:44 -0700 (PDT) Received: from localhost.localdomain (unknown [58.61.141.228]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id 1A011800080; Thu, 12 Oct 2023 22:01:24 +0800 (CST) From: Chukun Pan To: Ping-Ke Shih Cc: Kalle Valo , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Chukun Pan Subject: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail Date: Thu, 12 Oct 2023 22:01:20 +0800 Message-Id: <20231012140120.891411-1-amadeus@jmu.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCTB8fVksdThodSUwfSE0dTVUTARMWGhIXJBQOD1 lXWRgSC1lBWU5DVU1KVUpPSlVJSUNZV1kWGg8SFR0UWUFZT0tIVUpKS0hKQ1VKS0tVS1kG X-HM-Tid: 0a8b24312c1fb03akuuu1a011800080 X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OD46EDo6AjwrTQtONFEjNTkR MhowCwxVSlVKTUJMSkpCSUNPTExLVTMWGhIXVRoWGh8eDgg7ERYOVR4fDlUYFUVZV1kSC1lBWU5D VU1KVUpPSlVJSUNZV1kIAVlBSkJIQjcG X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 12 Oct 2023 07:02:05 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779558602440317222 X-GMAIL-MSGID: 1779558602440317222 The rtw88 driver throws a useless Call Trace when the rtl8812bu or rtl8822be wifi modules fail to write the RF mode table. Since this does not affect normal use of the wifi modules, replace WARN() with driver warning to avoid useless panic. Signed-off-by: Chukun Pan --- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c index 3017a9760da8..06b6efcd16d2 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c @@ -820,8 +820,10 @@ static void rtw8822b_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path, break; } - if (WARN(counter <= 0, "write RF mode table fail\n")) + if (counter <= 0) { + rtw_warn(rtwdev, "write RF mode table fail\n"); return; + } rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWE, RFREG_MASK, 0x80000); rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWA, RFREG_MASK, 0x00001);