summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-02-15 15:45:54 +0100
committerKalle Valo <kvalo@codeaurora.org>2019-02-19 17:07:13 +0200
commit16e646768396339b3d354985b99bcd3f1f195a7d (patch)
treeb785f8adb803a00567878a41ccc7428cfb138cf7 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
parent30519cbe339a45bd11a57ca8ece07f4f6a1cda2e (diff)
brcmfmac: rework bphy_err() to take struct brcmf_pub argument
This macro will be used in more places not just the cfg80211.c. It makes sense to pass some common struct to it as "struct wiphy" is mostly referenced in cfg80211 code only. A very common one (used above the bus abstraction layer) is struct brcmf_pub. Many functions already keep reference to it which will make using bphy_err() simpler. It should also allow extending that macro's logic if it's ever needed. This improves code recently added in the commit 3ef005b82e2a ("brcmfmac: add bphy_err() and use it in the cfg80211.c"). Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
index 3cf853c84a9e..2998726b62c3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
@@ -62,12 +62,12 @@ void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...);
} while (0)
#endif
-#define bphy_err(wiphy, fmt, ...) \
+#define bphy_err(drvr, fmt, ...) \
do { \
if (IS_ENABLED(CONFIG_BRCMDBG) || \
IS_ENABLED(CONFIG_BRCM_TRACING) || \
net_ratelimit()) \
- wiphy_err(wiphy, "%s: " fmt, __func__, \
+ wiphy_err((drvr)->wiphy, "%s: " fmt, __func__, \
##__VA_ARGS__); \
} while (0)