From: Vladimir Kondratiev Date: Mon, 17 Mar 2014 13:34:11 +0000 (+0200) Subject: wil6210: reduce dmesg pollution after FW crash X-Git-Tag: v4.14-rc1~7785^2~18^2^2~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa27deaabfa0c4a08cdb4d3209a13ab02695c186;p=platform%2Fkernel%2Flinux-rpi.git wil6210: reduce dmesg pollution after FW crash When FW crashes, dmesg get polluted with the "FW not ready" error message. Print it only once per FW lifecycle Signed-off-by: Vladimir Kondratiev Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index 41f88ee..5cda0ea9 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -956,11 +956,15 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev) struct wil6210_priv *wil = ndev_to_wil(ndev); struct ethhdr *eth = (void *)skb->data; struct vring *vring; + static bool pr_once_fw; int rc; wil_dbg_txrx(wil, "%s()\n", __func__); if (!test_bit(wil_status_fwready, &wil->status)) { - wil_err(wil, "FW not ready\n"); + if (!pr_once_fw) { + wil_err(wil, "FW not ready\n"); + pr_once_fw = true; + } goto drop; } if (!test_bit(wil_status_fwconnected, &wil->status)) { @@ -971,6 +975,7 @@ netdev_tx_t wil_start_xmit(struct sk_buff *skb, struct net_device *ndev) wil_err(wil, "Xmit in monitor mode not supported\n"); goto drop; } + pr_once_fw = false; /* find vring */ if (is_unicast_ether_addr(eth->h_dest)) {