Search Linux Wireless

Re: [PATCH] ath9k: Gather and report bus-timeout errors.

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

 



On Tue, 2012-04-03 at 13:22 -0700, greearb@xxxxxxxxxxxxxxx wrote:
> From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> 
> Seems like a useful stat to report (when debugfs
> is enabled).
[]
> diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
[]
> @@ -385,57 +385,61 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
>  				   size_t count, loff_t *ppos)
>  {
>  	struct ath_softc *sc = file->private_data;
> -	char buf[512];
> +	char buf[800];

800 seems excessive.
Maybe it's better to kmalloc this.

>  	unsigned int len = 0;
>  
>  	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
>  		len += snprintf(buf + len, sizeof(buf) - len,
> -			"%8s: %10u\n", "RXLP", sc->debug.stats.istats.rxlp);
> +			"%11s: %10u\n", "RXLP", sc->debug.stats.istats.rxlp);

why change the size from 8 to 11?

>  		len += snprintf(buf + len, sizeof(buf) - len,
> -			"%8s: %10u\n", "RXHP", sc->debug.stats.istats.rxhp);
> +			"%11s: %10u\n", "RXHP", sc->debug.stats.istats.rxhp);
>  		len += snprintf(buf + len, sizeof(buf) - len,
> -			"%8s: %10u\n", "WATCHDOG",
> +			"%11s: %10u\n", "WATCHDOG",
>  			sc->debug.stats.istats.bb_watchdog);

[]

> diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
[]
> @@ -85,8 +86,15 @@ struct ath_interrupt_stats {
>  	u32 dtim;
>  	u32 bb_watchdog;
>  	u32 tsfoor;
> +	u32 sync_local_timeout;
>  };
>  
> +#define ATH_INCR_IRQ_STAT_COMMON(c, s)					\
> +	do {								\
> +		struct ath_softc *sc = (struct ath_softc *) (c)->priv;	\

Isn't priv void *?
I think you don't need the cast.

> +		sc->debug.stats.istats.s++;				\
> +	} while (0);

sb: "while (0)" without the ;


--
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