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 <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
This commit is contained in:
Rafał Miłecki authored and Kalle Valo committed 2019-02-08 17:23:57 +02:00
1 parent 8602e62441
commit 3ef005b82e
2 files changed
+282 -224

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -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 */