All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] cfg80211: Add wiphy_info_once()
@ 2021-05-11 21:15 Dmitry Osipenko
  2021-05-11 21:15 ` [PATCH v2 2/2] brcmfmac: Silence error messages about unsupported firmware features Dmitry Osipenko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dmitry Osipenko @ 2021-05-11 21:15 UTC (permalink / raw)
  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, brcm80211-dev-list.pdl, brcm80211-dev-list,
	netdev, linux-kernel

Add wiphy_info_once() helper that prints info message only once.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---

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)
-- 
2.30.2


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

* [PATCH v2 2/2] brcmfmac: Silence error messages about unsupported firmware features
  2021-05-11 21:15 [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
@ 2021-05-11 21:15 ` Dmitry Osipenko
  2021-06-18 20:44 ` [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
  2021-06-23 17:46 ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Dmitry Osipenko @ 2021-05-11 21:15 UTC (permalink / raw)
  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, brcm80211-dev-list.pdl, brcm80211-dev-list,
	netdev, linux-kernel

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

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 */
-- 
2.30.2


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

* Re: [PATCH v2 1/2] cfg80211: Add wiphy_info_once()
  2021-05-11 21:15 [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
  2021-05-11 21:15 ` [PATCH v2 2/2] brcmfmac: Silence error messages about unsupported firmware features Dmitry Osipenko
@ 2021-06-18 20:44 ` Dmitry Osipenko
  2021-06-19  6:27   ` Kalle Valo
  2021-06-23 17:46 ` Kalle Valo
  2 siblings, 1 reply; 7+ messages in thread
From: Dmitry Osipenko @ 2021-06-18 20:44 UTC (permalink / raw)
  To: Arend van Spriel, Kalle Valo
  Cc: linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
	netdev, linux-kernel, Franky Lin, Chi-Hsien Lin, Hante Meuleman,
	Andy Shevchenko, Wright Feng, David S. Miller, Jakub Kicinski,
	Johannes Berg

12.05.2021 00:15, Dmitry Osipenko пишет:
> Add wiphy_info_once() helper that prints info message only once.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
> 
> 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)
> 

Ping?

Arend, is this series good to you? I assume Kalle could pick it up if
you'll give ack. Thanks in advance.

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

* Re: [PATCH v2 1/2] cfg80211: Add wiphy_info_once()
  2021-06-18 20:44 ` [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
@ 2021-06-19  6:27   ` Kalle Valo
  2021-06-19 11:02     ` Dmitry Osipenko
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2021-06-19  6:27 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Arend van Spriel, linux-wireless, brcm80211-dev-list.pdl,
	brcm80211-dev-list, netdev, linux-kernel, Franky Lin,
	Chi-Hsien Lin, Hante Meuleman, Andy Shevchenko, Wright Feng,
	David S. Miller, Jakub Kicinski, Johannes Berg

Dmitry Osipenko <digetx@gmail.com> writes:

> 12.05.2021 00:15, Dmitry Osipenko пишет:
>> Add wiphy_info_once() helper that prints info message only once.
>> 
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>> 
>> 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)
>> 
>
> Ping?
>
> Arend, is this series good to you? I assume Kalle could pick it up if
> you'll give ack. Thanks in advance.

Normally cfg80211 changes go via Johannes' tree though I guess small
changes I could take it via my tree, but then I need an ack from
Johannes.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH v2 1/2] cfg80211: Add wiphy_info_once()
  2021-06-19  6:27   ` Kalle Valo
@ 2021-06-19 11:02     ` Dmitry Osipenko
  2021-06-23  8:15       ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Osipenko @ 2021-06-19 11:02 UTC (permalink / raw)
  To: Kalle Valo, Johannes Berg
  Cc: Arend van Spriel, linux-wireless, brcm80211-dev-list.pdl, netdev,
	linux-kernel, Franky Lin, Chi-Hsien Lin, Hante Meuleman,
	Andy Shevchenko, Wright Feng, David S. Miller, Jakub Kicinski

19.06.2021 09:27, Kalle Valo пишет:
> Dmitry Osipenko <digetx@gmail.com> writes:
> 
>> 12.05.2021 00:15, Dmitry Osipenko пишет:
>>> Add wiphy_info_once() helper that prints info message only once.
>>>
>>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>>> ---
>>>
>>> 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)
>>>
>>
>> Ping?
>>
>> Arend, is this series good to you? I assume Kalle could pick it up if
>> you'll give ack. Thanks in advance.
> 
> Normally cfg80211 changes go via Johannes' tree though I guess small
> changes I could take it via my tree, but then I need an ack from
> Johannes.
> 

Thank you for the clarification.

Johannes, are these patches good to you?

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

* Re: [PATCH v2 1/2] cfg80211: Add wiphy_info_once()
  2021-06-19 11:02     ` Dmitry Osipenko
@ 2021-06-23  8:15       ` Johannes Berg
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2021-06-23  8:15 UTC (permalink / raw)
  To: Dmitry Osipenko, Kalle Valo
  Cc: Arend van Spriel, linux-wireless, brcm80211-dev-list.pdl, netdev,
	linux-kernel, Franky Lin, Chi-Hsien Lin, Hante Meuleman,
	Andy Shevchenko, Wright Feng, David S. Miller, Jakub Kicinski

On Sat, 2021-06-19 at 14:02 +0300, Dmitry Osipenko wrote:
> 
> Johannes, are these patches good to you?
> 
Yeah, that's fine. I was going to pick it up now but I guess it'll be
faster for Kalle to do that, so

Acked-by: Johannes Berg <johannes@sipsolutions.net>

and I'll assign it to Kalle in patchwork.

johannes


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

* Re: [PATCH v2 1/2] cfg80211: Add wiphy_info_once()
  2021-05-11 21:15 [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
  2021-05-11 21:15 ` [PATCH v2 2/2] brcmfmac: Silence error messages about unsupported firmware features Dmitry Osipenko
  2021-06-18 20:44 ` [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
@ 2021-06-23 17:46 ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2021-06-23 17:46 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
	Wright Feng, Andy Shevchenko, David S. Miller, Jakub Kicinski,
	Johannes Berg, linux-wireless, brcm80211-dev-list.pdl,
	brcm80211-dev-list, netdev, linux-kernel

Dmitry Osipenko <digetx@gmail.com> wrote:

> Add wiphy_info_once() helper that prints info message only once.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> Acked-by: Johannes Berg <johannes@sipsolutions.net>

2 patches applied to wireless-drivers-next.git, thanks.

761025b51c54 cfg80211: Add wiphy_info_once()
78f0a64f66d4 brcmfmac: Silence error messages about unsupported firmware features

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210511211549.30571-1-digetx@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2021-06-23 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 21:15 [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
2021-05-11 21:15 ` [PATCH v2 2/2] brcmfmac: Silence error messages about unsupported firmware features Dmitry Osipenko
2021-06-18 20:44 ` [PATCH v2 1/2] cfg80211: Add wiphy_info_once() Dmitry Osipenko
2021-06-19  6:27   ` Kalle Valo
2021-06-19 11:02     ` Dmitry Osipenko
2021-06-23  8:15       ` Johannes Berg
2021-06-23 17:46 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.