Search Linux Wireless

Re: [PATCH 4/7] wil6210: print debug message when transmitting while disconnected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-04-05 at 14:24 +0300, Maya Erez w
> 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.

Should probably say something about adding ratelimited
logging functions

> diff --git a/drivers/net/wireless/ath/wil6210/debug.c b/drivers/net/wireless/ath/wil6210/debug.c
[]
> @@ -49,6 +49,23 @@ void __wil_err_ratelimited(struct wil6210_priv *wil, const char *fmt, ...)
>  	}
>  }
>  
> +void __wil_dbg_ratelimited(struct wil6210_priv *wil, const char *fmt, ...)
> +{
> +	if (net_ratelimit()) {

Inverting the test would reduce indentation.

> +		struct net_device *ndev = wil_to_ndev(wil);
> +		struct va_format vaf = {
> +			.fmt = fmt,
> +		};
> +		va_list args;
> +
> +		va_start(args, fmt);
> +		vaf.va = &args;
> +		netdev_dbg(ndev, "%pV", &vaf);
> +		trace_wil6210_log_dbg(&vaf);
> +		va_end(args);
> +	}
> +}

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux