From patchwork Tue May 11 21:15:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 12252051 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D87FC433ED for ; Tue, 11 May 2021 21:16:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FB8B611AE for ; Tue, 11 May 2021 21:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229924AbhEKVRy (ORCPT ); Tue, 11 May 2021 17:17:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbhEKVRy (ORCPT ); Tue, 11 May 2021 17:17:54 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E9AC061574; Tue, 11 May 2021 14:16:46 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id m11so14232857lfg.3; Tue, 11 May 2021 14:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HoRbP8bMNRAMwrSttIv6A0hR3UMPnaiNX2rizRlD5KQ=; b=e9Rm8umSvdZceUTGJxFSdgg9uoVJwQn1vxJKVUTVSTwDlEnGrTNc+YTaYBVsapveb8 2ZthPW00n7lS/ngbOzbvT3eCVvSPlxYImW0/zzgpeSnRjQJ/pIOauwXM+lGMML1tkMn3 Jdz82xmEM5CGElwmHbJXZd3qRd6/CUMRiiNASc/jwTLZIm2WkxB0koq6qkg9PetvgW1D +nAvbuC2eDa+UGaOTF19iY1qEtUPu5UBqVf/1MhL5Fk+uuTWygXURiBTSwIBuSTZ+wq+ DtTev7+GUOzIkLD9snNj0hR994oABuQFMdHP0HcV9mob1ZSff6TH+TYY+yRhnXwYpDvg +PiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HoRbP8bMNRAMwrSttIv6A0hR3UMPnaiNX2rizRlD5KQ=; b=KieWAzJv2COsBsagnjVoQ8e59GYT0g047Ih6ZZQ20PgOQSXbMDoeAzDb4WYnOloSqy mrFkD/LIK6+ccE4AWQ3LY9Qasf4F8Qil7596C2VNLVmSilVjFXQjA2zCzw9GOQ6HMMr7 JfqimBkauabUa9dJqTPNPYya5cRJvkQi0H99iDAqYi44f5AjFNTwH12NN8Alv5HH6I7o xxLhG+f0NdlLxKDz9xBOh56cmRdAdPIJS3c4tRRhcYyW+F/x6tiPdzTBVAsV/crUTDH3 QQDtggciDoW1f92mJPycbTgrXrWeEVGEGbp10nYTLhM5y0EIUQsxnu2GwRlJlx2/d7Xs Getg== X-Gm-Message-State: AOAM53397ZIJZpzi8ytS+VquPFUcJsIiWxiU0QTOLpbkrpt9o/xXtTZH 2oU72h4Q+6a4NpemBqM7pjyebyYsVdU= X-Google-Smtp-Source: ABdhPJzDWx/gzX+4FKoJ+MTI5x0Wv9eSBFHHuB69RqaHmAtnwQX9z68lrTCVdQIzFM1PS6JEfU0W3Q== X-Received: by 2002:a19:c518:: with SMTP id w24mr22873333lfe.104.1620767804833; Tue, 11 May 2021 14:16:44 -0700 (PDT) Received: from localhost.localdomain (109-252-193-91.dynamic.spd-mgts.ru. [109.252.193.91]) by smtp.gmail.com with ESMTPSA id a20sm3882527ljn.94.2021.05.11.14.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 14:16:44 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo , Andy Shevchenko , "David S. Miller" , Jakub Kicinski , Johannes Berg Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Date: Wed, 12 May 2021 00:15:48 +0300 Message-Id: <20210511211549.30571-1-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Add wiphy_info_once() helper that prints info message only once. Signed-off-by: Dmitry Osipenko Acked-by: Johannes Berg --- Changelog: v2: - New patch added in v2. include/net/cfg80211.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 5224f885a99a..3b19e03509b3 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -8154,6 +8154,8 @@ bool cfg80211_iftype_allowed(struct wiphy *wiphy, enum nl80211_iftype iftype, dev_notice(&(wiphy)->dev, format, ##args) #define wiphy_info(wiphy, format, args...) \ dev_info(&(wiphy)->dev, format, ##args) +#define wiphy_info_once(wiphy, format, args...) \ + dev_info_once(&(wiphy)->dev, format, ##args) #define wiphy_err_ratelimited(wiphy, format, args...) \ dev_err_ratelimited(&(wiphy)->dev, format, ##args) From patchwork Tue May 11 21:15:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 12252053 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8E15C433ED for ; Tue, 11 May 2021 21:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3FC3611AE for ; Tue, 11 May 2021 21:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbhEKVR4 (ORCPT ); Tue, 11 May 2021 17:17:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbhEKVRz (ORCPT ); Tue, 11 May 2021 17:17:55 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FAA0C061574; Tue, 11 May 2021 14:16:48 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id e11so13396233ljn.13; Tue, 11 May 2021 14:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=osCn6ypOUhoWp7HtfAu6ClFz6GUI5XGyO6vrfaQnjWw=; b=SQ7kZPkAZpOc1zuGaxa/kmSYBev4NCc47yR00hQce9UlxftkJpONQ2WFrow1fF2tbZ HG7bRKaaGkGML+tdas7ARtO7nLyw4d2QhyfM20QAuVOeFftD/rn7zMD1zGewgJ1LSFey sFZE2Dx9Zg2kG1ku39D75BWmG+Aoz6IzaFXszwsYmHHmym/A3ZaVZsPYKJyh6M+5StUj 6RsmP8AxxvC4FygzBR++rFqaOWi2F2HCh1l0eCEuyjGIbVA9Na5pOC6RM3LYwai6n+h+ /bZGtVr4NJG6ywr07tgO1b3eADX4yhEuSoy+TKOKCFgUnbKNDu5rstePwdpj90Hvmcnb m/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=osCn6ypOUhoWp7HtfAu6ClFz6GUI5XGyO6vrfaQnjWw=; b=rZ5zydppsDEN3zeA6MCjtsvvWOsLd6v3rM8c7hV2zP+j3o45FDX+g/C/Zqa6rNDfhQ LdljJ351VkrlC3sEsJ3iKQh4DwGCL6Ml0IqIdvGHfGhLS7SUcye38dFO79H4n8brdjPz IBZTENuUl9RUE08B8sz6oYGAEDBWqeaDPsf9toCihw4COyLQtV4R9JcguM4znFhPU/CP KE1HzSKKhlNjSyxppm9Zp1YOfmnKow46JxiTV3xXwlYKvdDbN9wy5UGxZ4HCnFb6kkZQ khwyby3tqtcuZcE78n1ZHz0+LI/aoHw5nWi/ZbK7zT0LugN7ihDzU+rbOBvUp5n1j99i cQAw== X-Gm-Message-State: AOAM531ek3vpokMpCa82fZ3EEMPkopd4hAOFzxNPlA4v7xUK8J656szo 2ceEGcKt2Ogsh5pyS1IwFpw= X-Google-Smtp-Source: ABdhPJxU6NYAY+gmGHPQ3K7q4BrApWfgG3pow1zq2GlP5Zw2SaeOKrtIpclie1VD9QFBk9RS5HZ/ig== X-Received: by 2002:a2e:9bd7:: with SMTP id w23mr25547197ljj.401.1620767806080; Tue, 11 May 2021 14:16:46 -0700 (PDT) Received: from localhost.localdomain (109-252-193-91.dynamic.spd-mgts.ru. [109.252.193.91]) by smtp.gmail.com with ESMTPSA id a20sm3882527ljn.94.2021.05.11.14.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 14:16:45 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo , Andy Shevchenko , "David S. Miller" , Jakub Kicinski , Johannes Berg Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] brcmfmac: Silence error messages about unsupported firmware features Date: Wed, 12 May 2021 00:15:49 +0300 Message-Id: <20210511211549.30571-2-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210511211549.30571-1-digetx@gmail.com> References: <20210511211549.30571-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org KMSG is flooded with error messages about unsupported firmware features of BCM4329 chip. The GET_ASSOCLIST error became especially noisy with a newer NetworkManager version of Ubuntu 21.04. Turn the noisy error messages into info messages and print them out only once. Signed-off-by: Dmitry Osipenko --- v2: - Switched to use generic printk helper as was suggested by Andy Shevchenko in a comment to v1. - Silenced message about the rxchain, which is also unsupported by BCM4329. .../broadcom/brcm80211/brcmfmac/cfg80211.c | 16 +++++++++++++--- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 11 ++++++++--- .../wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index f4405d7861b6..27331dfc9ec0 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2892,8 +2892,13 @@ brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev, &cfg->assoclist, sizeof(cfg->assoclist)); if (err) { - bphy_err(drvr, "BRCMF_C_GET_ASSOCLIST unsupported, err=%d\n", - err); + /* GET_ASSOCLIST unsupported by firmware of older chips */ + if (err == -EBADE) + bphy_info_once(drvr, "BRCMF_C_GET_ASSOCLIST unsupported\n"); + else + bphy_err(drvr, "BRCMF_C_GET_ASSOCLIST failed, err=%d\n", + err); + cfg->assoclist.count = 0; return -EOPNOTSUPP; } @@ -6848,7 +6853,12 @@ static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg) err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); if (err) { - bphy_err(drvr, "rxchain error (%d)\n", err); + /* rxchain unsupported by firmware of older chips */ + if (err == -EBADE) + bphy_info_once(drvr, "rxchain unsupported\n"); + else + bphy_err(drvr, "rxchain error (%d)\n", err); + nchain = 1; } else { for (nchain = 0; rxchain; nchain++) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index 838b09b23abf..f98b48cfc001 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -188,9 +188,14 @@ static void _brcmf_set_multicast_list(struct work_struct *work) /*Finally, pick up the PROMISC flag */ cmd_value = (ndev->flags & IFF_PROMISC) ? true : false; err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PROMISC, cmd_value); - if (err < 0) - bphy_err(drvr, "Setting BRCMF_C_SET_PROMISC failed, %d\n", - err); + if (err < 0) { + /* PROMISC unsupported by firmware of older chips */ + if (err == -EBADE) + bphy_info_once(drvr, "BRCMF_C_SET_PROMISC unsupported\n"); + else + bphy_err(drvr, "Setting BRCMF_C_SET_PROMISC failed, err=%d\n", + err); + } brcmf_configure_arp_nd_offload(ifp, !cmd_value); } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h index 44ba6f389fa9..9bb5f709d41a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h @@ -60,6 +60,10 @@ void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...); ##__VA_ARGS__); \ } while (0) +#define bphy_info_once(drvr, fmt, ...) \ + wiphy_info_once((drvr)->wiphy, "%s: " fmt, __func__, \ + ##__VA_ARGS__) + #if defined(DEBUG) || defined(CONFIG_BRCM_TRACING) /* For debug/tracing purposes treat info messages as errors */