Re: [PATCH V2 1/3] wifi: brcmfmac: Demote vendor-specific attach/detach messages to info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 06, 2024 at 11:38:33AM +0100, Arend van Spriel wrote:
> From: Hector Martin <marcan@xxxxxxxxx>
> 
> People are getting spooked by brcmfmac errors on their boot console.
> There's no reason for these messages to be errors.
> 
> Cc: stable@xxxxxxxxxxxxxxx # 6.2.x
> Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
> Signed-off-by: Hector Martin <marcan@xxxxxxxxx>
> [arend.vanspriel@xxxxxxxxxxxx: remove attach/detach vendor callbacks]
> Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
> ---
>  .../broadcom/brcm80211/brcmfmac/bca/core.c    | 13 ----------
>  .../broadcom/brcm80211/brcmfmac/cyw/core.c    | 13 ----------
>  .../broadcom/brcm80211/brcmfmac/fwvid.c       |  7 +++--
>  .../broadcom/brcm80211/brcmfmac/fwvid.h       | 26 ++-----------------
>  .../broadcom/brcm80211/brcmfmac/wcc/core.c    | 15 +----------
>  5 files changed, 6 insertions(+), 68 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> index a5d9ac5e6763..a963c242975a 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bca/core.c
> @@ -11,17 +11,6 @@
>  
>  #include "vops.h"
>  
> -static int brcmf_bca_attach(struct brcmf_pub *drvr)
> -{
> -	pr_err("%s: executing\n", __func__);
> -	return 0;
> -}
> -
> -static void brcmf_bca_detach(struct brcmf_pub *drvr)
> -{
> -	pr_err("%s: executing\n", __func__);
> -}
> -
>  static void brcmf_bca_feat_attach(struct brcmf_if *ifp)
>  {
>  	/* SAE support not confirmed so disabling for now */
> @@ -29,7 +18,5 @@ static void brcmf_bca_feat_attach(struct brcmf_if *ifp)
>  }
>  
>  const struct brcmf_fwvid_ops brcmf_bca_ops = {
> -	.attach = brcmf_bca_attach,
> -	.detach = brcmf_bca_detach,
>  	.feat_attach = brcmf_bca_feat_attach,
>  };
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c
> index 24670497f1a4..bec5748310b9 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c
> @@ -11,17 +11,6 @@
>  
>  #include "vops.h"
>  
> -static int brcmf_cyw_attach(struct brcmf_pub *drvr)
> -{
> -	pr_err("%s: executing\n", __func__);
> -	return 0;
> -}
> -
> -static void brcmf_cyw_detach(struct brcmf_pub *drvr)
> -{
> -	pr_err("%s: executing\n", __func__);
> -}
> -
>  static int brcmf_cyw_set_sae_pwd(struct brcmf_if *ifp,
>  				 struct cfg80211_crypto_settings *crypto)
>  {
> @@ -49,7 +38,5 @@ static int brcmf_cyw_set_sae_pwd(struct brcmf_if *ifp,
>  }
>  
>  const struct brcmf_fwvid_ops brcmf_cyw_ops = {
> -	.attach = brcmf_cyw_attach,
> -	.detach = brcmf_cyw_detach,
>  	.set_sae_password = brcmf_cyw_set_sae_pwd,
>  };
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
> index 86eafdb40541..f633e2bbd891 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
> @@ -89,8 +89,7 @@ int brcmf_fwvid_register_vendor(enum brcmf_fwvendor fwvid, struct module *vmod,
>  	if (fwvid >= BRCMF_FWVENDOR_NUM)
>  		return -ERANGE;
>  
> -	if (WARN_ON(!vmod) || WARN_ON(!vops) ||
> -	    WARN_ON(!vops->attach) || WARN_ON(!vops->detach))
> +	if (WARN_ON(!vmod) || WARN_ON(!vops))
>  		return -EINVAL;
>  
>  	if (WARN_ON(fwvid_list[fwvid].vmod))
> @@ -150,7 +149,7 @@ static inline int brcmf_fwvid_request_module(enum brcmf_fwvendor fwvid)
>  }
>  #endif
>  
> -int brcmf_fwvid_attach_ops(struct brcmf_pub *drvr)
> +int brcmf_fwvid_attach(struct brcmf_pub *drvr)
>  {
>  	enum brcmf_fwvendor fwvid = drvr->bus_if->fwvid;
>  	int ret;
> @@ -175,7 +174,7 @@ int brcmf_fwvid_attach_ops(struct brcmf_pub *drvr)
>  	return ret;
>  }
>  
> -void brcmf_fwvid_detach_ops(struct brcmf_pub *drvr)
> +void brcmf_fwvid_detach(struct brcmf_pub *drvr)
>  {
>  	enum brcmf_fwvendor fwvid = drvr->bus_if->fwvid;
>  
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
> index d9fc76b46db9..dac22534d033 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.h
> @@ -12,8 +12,6 @@ struct brcmf_pub;
>  struct brcmf_if;
>  
>  struct brcmf_fwvid_ops {
> -	int (*attach)(struct brcmf_pub *drvr);
> -	void (*detach)(struct brcmf_pub *drvr);
>  	void (*feat_attach)(struct brcmf_if *ifp);
>  	int (*set_sae_password)(struct brcmf_if *ifp, struct cfg80211_crypto_settings *crypto);
>  };
> @@ -24,30 +22,10 @@ int brcmf_fwvid_register_vendor(enum brcmf_fwvendor fwvid, struct module *mod,
>  int brcmf_fwvid_unregister_vendor(enum brcmf_fwvendor fwvid, struct module *mod);
>  
>  /* core driver functions */
> -int brcmf_fwvid_attach_ops(struct brcmf_pub *drvr);
> -void brcmf_fwvid_detach_ops(struct brcmf_pub *drvr);
> +int brcmf_fwvid_attach(struct brcmf_pub *drvr);
> +void brcmf_fwvid_detach(struct brcmf_pub *drvr);
>  const char *brcmf_fwvid_vendor_name(struct brcmf_pub *drvr);
>  
> -static inline int brcmf_fwvid_attach(struct brcmf_pub *drvr)
> -{
> -	int ret;
> -
> -	ret = brcmf_fwvid_attach_ops(drvr);
> -	if (ret)
> -		return ret;
> -
> -	return drvr->vops->attach(drvr);
> -}
> -
> -static inline void brcmf_fwvid_detach(struct brcmf_pub *drvr)
> -{
> -	if (!drvr->vops)
> -		return;
> -
> -	drvr->vops->detach(drvr);
> -	brcmf_fwvid_detach_ops(drvr);
> -}
> -
>  static inline void brcmf_fwvid_feat_attach(struct brcmf_if *ifp)
>  {
>  	const struct brcmf_fwvid_ops *vops = ifp->drvr->vops;
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c
> index 2d8f80bd7382..fd593b93ad40 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/wcc/core.c
> @@ -7,21 +7,10 @@
>  #include <core.h>
>  #include <bus.h>
>  #include <fwvid.h>
> -#include <fwil.h>
> +#include <cfg80211.h>
>  
>  #include "vops.h"
>  
> -static int brcmf_wcc_attach(struct brcmf_pub *drvr)
> -{
> -	pr_debug("%s: executing\n", __func__);
> -	return 0;
> -}
> -
> -static void brcmf_wcc_detach(struct brcmf_pub *drvr)
> -{
> -	pr_debug("%s: executing\n", __func__);
> -}
> -
>  static int brcmf_wcc_set_sae_pwd(struct brcmf_if *ifp,
>  				 struct cfg80211_crypto_settings *crypto)
>  {
> @@ -30,7 +19,5 @@ static int brcmf_wcc_set_sae_pwd(struct brcmf_if *ifp,
>  }
>  
>  const struct brcmf_fwvid_ops brcmf_wcc_ops = {
> -	.attach = brcmf_wcc_attach,
> -	.detach = brcmf_wcc_detach,
>  	.set_sae_password = brcmf_wcc_set_sae_pwd,
>  };
> -- 
> 2.32.0
> 


<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux