1

wifi: brcmfmac: Demote vendor-specific attach/detach messages to info

People are getting spooked by brcmfmac errors on their boot console.
There's no reason for these messages to be errors.

Cc: stable@vger.kernel.org # 6.2.x
Fixes: d6a5c56221 ("wifi: brcmfmac: add support for vendor-specific firmware api")
Signed-off-by: Hector Martin <marcan@marcan.st>
[arend.vanspriel@broadcom.com: remove attach/detach vendor callbacks]
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240106103835.269149-2-arend.vanspriel@broadcom.com
This commit is contained in:
Hector Martin 2024-01-06 11:38:33 +01:00 committed by Kalle Valo
parent 9f7861c56b
commit 85da8f71aa
5 changed files with 6 additions and 68 deletions

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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;

View File

@ -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;

View File

@ -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,
};