From d8ed043accdee611bce8be7c4224b4e26bdc2ab5 Mon Sep 17 00:00:00 2001 From: Maya Erez Date: Tue, 26 Apr 2016 14:41:39 +0300 Subject: wil6210: print debug message when transmitting while disconnected Network stack can try to transmit data while AP / STA is disconnected. Change this print-out to debug level as this should not be handled as error. This patch also adds wil_dbg_ratelimited, used to limit the above print-out. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/wil6210/debug.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers/net/wireless/ath/wil6210/debug.c') diff --git a/drivers/net/wireless/ath/wil6210/debug.c b/drivers/net/wireless/ath/wil6210/debug.c index 0a301277c06d..c312a667c12a 100644 --- a/drivers/net/wireless/ath/wil6210/debug.c +++ b/drivers/net/wireless/ath/wil6210/debug.c @@ -49,6 +49,22 @@ void __wil_err_ratelimited(struct wil6210_priv *wil, const char *fmt, ...) } } +void wil_dbg_ratelimited(const struct wil6210_priv *wil, const char *fmt, ...) +{ + struct va_format vaf; + va_list args; + + if (!net_ratelimit()) + return; + + va_start(args, fmt); + vaf.fmt = fmt; + vaf.va = &args; + netdev_dbg(wil_to_ndev(wil), "%pV", &vaf); + trace_wil6210_log_dbg(&vaf); + va_end(args); +} + void __wil_info(struct wil6210_priv *wil, const char *fmt, ...) { struct net_device *ndev = wil_to_ndev(wil); -- cgit