Search Linux Wireless

Re: [ath5k-devel] ath5k: more consistent debug, info and error logging

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

 



> > > > +     ATH_DEBUG_RESET         = 0x00000001,   /* reset processing */
> > > > +     ATH_DEBUG_INTR          = 0x00000002,   /* ISR */
> > > > +     ATH_DEBUG_MODE          = 0x00000004,   /* mode init/setup */
> > > > +     ATH_DEBUG_XMIT          = 0x00000008,   /* basic xmit operation
> > > > */ +     ATH_DEBUG_BEACON        = 0x00000010,   /* beacon handling
> > > > */ +     ATH_DEBUG_BEACON_PROC   = 0x00000020,   /* beacon ISR proc
> > > > */ + ATH_DEBUG_CALIBRATE     = 0x00000100,   /* periodic calibration
> > > > */ + ATH_DEBUG_TXPOWER       = 0x00000200,   /* transmit power */ +
> > > > ATH_DEBUG_LED           = 0x00000400,   /* led management */ +
> > > > ATH_DEBUG_DUMP_RX       = 0x00001000,   /* print received skb content
> > > > */ +     ATH_DEBUG_DUMP_TX       = 0x00002000,   /* print transmit
> > > > skb content */ +     ATH_DEBUG_DUMPSTATE     = 0x00004000,   /* dump
> > > > register state */ +     ATH_DEBUG_DUMPMODES     = 0x00008000,   /*
> > > > dump modes */ +     ATH_DEBUG_TRACE         = 0x00010000,   /* trace
> > > > function calls */ +     ATH_DEBUG_FATAL         = 0x80000000,   /*
> > > > fatal errors */ +     ATH_DEBUG_ANY           = 0xffffffff
> > > > +};
> >
> > While you're at it can you move these to use kernel-doc? You'll have
> > to name the enum, perhaps ath5k_debug ?
>
> o.k.

while doing that i question myself, what is ATH5K_DEBUG_FATAL /* fatal errors 
*/ supposed to mean? shouldn't fatal errors be reported as errors, and not 
only in debugging mode?

the only place where ATH5K_DEBUG_FATAL is used is in the code i moved from 
ath5k_rx_stop() to:

void
ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)
{
	struct ath5k_desc *ds;
	struct ath5k_buf *bf;
	int status;

	if (likely(!(sc->debug.level &
	    (ATH5K_DEBUG_RESET | ATH5K_DEBUG_FATAL))))
		return;

	printk(KERN_DEBUG "rx queue %x, link %p\n",
		ath5k_hw_get_rx_buf(ah), sc->rxlink);

	spin_lock_bh(&sc->rxbuflock);
	list_for_each_entry(bf, &sc->rxbuf, list) {
		ds = bf->desc;
		status = ah->ah_proc_rx_desc(ah, ds);
		if (!status || (sc->debug.level & ATH5K_DEBUG_FATAL))
			ath5k_debug_printrxbuf(bf, status == 0);
	}
	spin_unlock_bh(&sc->rxbuflock);
}

so would it be ok to remove ATH5K_DEBUG_FATAL alltogether?
i might make that as a seperate patch once the first two are thru.

bruno
-
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux