brcmfmac: add bphy_err() and use it in the cfg80211.c

This new macro uses wiphy_err() which:
1) Should be the best choice with wiphy already created
2) Uses dev_err() which allows identifying error-affected device

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Rafał Miłecki 2019-01-16 07:28:54 +01:00 committed by Kalle Valo
parent 8602e62441
commit 3ef005b82e
2 changed files with 282 additions and 224 deletions

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,15 @@ void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...);
} while (0)
#endif
#define bphy_err(wiphy, fmt, ...) \
do { \
if (IS_ENABLED(CONFIG_BRCMDBG) || \
IS_ENABLED(CONFIG_BRCM_TRACING) || \
net_ratelimit()) \
wiphy_err(wiphy, "%s: " fmt, __func__, \
##__VA_ARGS__); \
} while (0)
#if defined(DEBUG) || defined(CONFIG_BRCM_TRACING)
/* For debug/tracing purposes treat info messages as errors */