Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ae7bc86 authored by Maya Erez's avatar Maya Erez Committed by Maya Erez
Browse files

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.

Change-Id: I41eecc91730c60a1851969f8fecf7c201b8b2050
Signed-off-by: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
Git-commit: d8ed043accdee611bce8be7c4224b4e26bdc2ab5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


CRs-Fixed: 1015627
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent ab553df2
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -64,6 +64,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_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...)
{
	struct va_format vaf = {
+1 −1
Original line number Diff line number Diff line
@@ -1759,7 +1759,7 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev)
		goto drop;
	}
	if (unlikely(!test_bit(wil_status_fwconnected, wil->status))) {
		wil_err_ratelimited(wil, "FW not connected\n");
		wil_dbg_ratelimited(wil, "FW not connected, packet dropped\n");
		goto drop;
	}
	if (unlikely(wil->wdev->iftype == NL80211_IFTYPE_MONITOR)) {
+2 −0
Original line number Diff line number Diff line
@@ -636,6 +636,8 @@ void wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...);
void __wil_err(struct wil6210_priv *wil, const char *fmt, ...);
void __wil_err_ratelimited(struct wil6210_priv *wil, const char *fmt, ...);
void __wil_info(struct wil6210_priv *wil, const char *fmt, ...);
__printf(2, 3)
void wil_dbg_ratelimited(const struct wil6210_priv *wil, const char *fmt, ...);
#define wil_dbg(wil, fmt, arg...) do { \
	netdev_dbg(wil_to_ndev(wil), fmt, ##arg); \
	wil_dbg_trace(wil, fmt, ##arg); \