lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210510221148.12134-1-digetx@gmail.com>
Date:   Tue, 11 May 2021 01:11:48 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Arend van Spriel <arend.vanspriel@...adcom.com>,
        Franky Lin <franky.lin@...adcom.com>,
        Hante Meuleman <hante.meuleman@...adcom.com>,
        Chi-Hsien Lin <chi-hsien.lin@...ress.com>,
        Wright Feng <wright.feng@...ress.com>,
        Kalle Valo <kvalo@...eaurora.org>
Cc:     linux-wireless@...r.kernel.org,
        brcm80211-dev-list.pdl@...adcom.com,
        brcm80211-dev-list@...ress.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH v1] brcmfmac: Silence error messages about unsupported firmware features

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 <digetx@...il.com>
---
 .../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);
 }
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ