From patchwork Mon May 10 22:11: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: 12249367 X-Patchwork-Delegate: kuba@kernel.org 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 64F56C43460 for ; Mon, 10 May 2021 22:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 439CB611CA for ; Mon, 10 May 2021 22:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231151AbhEJWNU (ORCPT ); Mon, 10 May 2021 18:13:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbhEJWNS (ORCPT ); Mon, 10 May 2021 18:13:18 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28DABC061574; Mon, 10 May 2021 15:12:13 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id x19so25692545lfa.2; Mon, 10 May 2021 15:12:13 -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=hIXUVbTGBsLSYyOC432iVfvE9K0Kn0F0wM8I/jCX+dM=; b=G8/tgKBs0wUPtnjeYUMm1ZLUsZzMD+aREtvDqlxGY3IrwPDsoJ3WUTl9pQiBp2vLpr +6Sqv7yTyoOfhRSdVRjKKRVMm1QcnaBFyzk6Sft7iUo+DmVA1CPgt+zle519SXvYEKOJ B0zP6HGclbnE70U4APRGN8ML36INiQE2klG4F5rm/VvKkxprPSbyGnxcsS5TccNk+JcW zeLiQL7d6Bk1j3+WWYT3lahrKomqxvfgTpHApx+fZSvBuaGkWuEZAr3QJTRWCJAw4gLf 1BqKMNF4qzOAYWjlbmQyF4xR+jhWmm2cAyTmx+Nemy4gxFFrM81ub6fTXeV6Qx0cwbgk UJcw== 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=hIXUVbTGBsLSYyOC432iVfvE9K0Kn0F0wM8I/jCX+dM=; b=blB39PlHjCeJBjEBWA/ExLbdG3TiOhg/gzOJtdERdUmETCcwXgEsiuYh+YmedD9JyR 56g43JCTgSTqVHkh6Vwldlb9UzbeKwV6ruNlPp0izYtkWFR9H0dNM6NEvAWUXFKzEllH i5kk8/1U92/3dCbscqPSdsMKCp4AsmjRoYi5dwtCyggTwYZah/R73eslbl/iy9/CogpH M3SGgDWPLeprVEiv9yyo84CMgk7XgP29mwNlQgYBhk5rTjzOmP53v+5OcaB8BeIftz3i j7v+a6pm18ZcpNgsg1B8nlOwLi7n2wWdSzdWEsX1fbEv1TwyvVacxHwXVXN9W1moxV/d 0wGw== X-Gm-Message-State: AOAM5306Xk2BGKMnMgTVsaIJZW6TV4XuQlPfMlrCKzkHtZRjRXvazU3N S8IHcXIKzZmNgETgRqLpLzU= X-Google-Smtp-Source: ABdhPJyMJuyhbehfG/EEX3hGQVVKfIPElG9J2Bb8xaeKtQwlVw2sR0Z4SGoUpqIe2j0sX0cBj4DLcQ== X-Received: by 2002:a05:6512:5c5:: with SMTP id o5mr19241511lfo.168.1620684731689; Mon, 10 May 2021 15:12:11 -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 o11sm2397900lfr.64.2021.05.10.15.12.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 15:12:11 -0700 (PDT) From: Dmitry Osipenko To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Kalle Valo 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 v1] brcmfmac: Silence error messages about unsupported firmware features Date: Tue, 11 May 2021 01:11:48 +0300 Message-Id: <20210510221148.12134-1-digetx@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org KMSG is flooded with error messages about unsupported firmware features on BCM4329 chip. The GET_ASSOCLIST error became especially noisy with a newer NetworkManager version of Ubuntu 21.04. Let's print the noisy error messages only once. Signed-off-by: Dmitry Osipenko --- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 11 +++++++++-- .../net/wireless/broadcom/brcm80211/brcmfmac/core.c | 13 ++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index f4405d7861b6..631536d8abb4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2892,8 +2892,15 @@ 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); + static bool error_printed = false; + + /* GET_ASSOCLIST unsupported by firmware of older chips */ + if (!error_printed || err != -EBADE) { + bphy_err(drvr, "BRCMF_C_GET_ASSOCLIST unsupported, err=%d\n", + err); + error_printed = true; + } + cfg->assoclist.count = 0; return -EOPNOTSUPP; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index 838b09b23abf..7f1a6234fd27 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -188,9 +188,16 @@ 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) { + static bool error_printed = false; + + /* PROMISC unsupported by firmware of older chips */ + if (!error_printed || err != -EBADE) { + bphy_err(drvr, "Setting BRCMF_C_SET_PROMISC unsupported, err=%d\n", + err); + error_printed = true; + } + } brcmf_configure_arp_nd_offload(ifp, !cmd_value); }