linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] brcmfmac: Silence error messages about unsupported firmware features
@ 2021-05-10 22:11 Dmitry Osipenko
       [not found] ` <CAHp75VdbFDxQy6vxDheTzcQhYEoodwbjD_LTOCyoiuLUoj4DXQ@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2021-05-10 22:11 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Kalle Valo
  Cc: linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	netdev, linux-kernel

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@gmail.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] brcmfmac: Silence error messages about unsupported firmware features
       [not found] ` <CAHp75VdbFDxQy6vxDheTzcQhYEoodwbjD_LTOCyoiuLUoj4DXQ@mail.gmail.com>
@ 2021-05-10 22:24   ` Dmitry Osipenko
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Osipenko @ 2021-05-10 22:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Kalle Valo, linux-wireless, brcm80211-dev-list.pdl,
	brcm80211-dev-list, netdev, linux-kernel

11.05.2021 01:18, Andy Shevchenko пишет:
> On Tuesday, May 11, 2021, Dmitry Osipenko <digetx@gmail.com
> <mailto:digetx@gmail.com>> wrote:
> 
>     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.
> 
> 
> Seems like you are reinventing *_once() printing methods. Please use
> them instead

Indeed, I see now that it won't be difficult to add the new
wiphy_err_once() helper that will use the generic dev_err_once(). I'll
make a v2, thank you for taking a look at the patch.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-10 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 22:11 [PATCH v1] brcmfmac: Silence error messages about unsupported firmware features Dmitry Osipenko
     [not found] ` <CAHp75VdbFDxQy6vxDheTzcQhYEoodwbjD_LTOCyoiuLUoj4DXQ@mail.gmail.com>
2021-05-10 22:24   ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).