how is DPRINTF defined.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how is DPRINTF defined.

legendbb
Don't understand the DPRINTF format in the driver.

ex. DPRINTF(sc, ATH_DEBUG_DOTH,
"Set CHANNEL_DFS_CLEAR flag on channel %4u MHz\n",
channel->channel);

The macro is:
#define DPRINTF(sc, _fmt, ...) do { \
if (sc->sc_debug & ATH_DEBUG_RATE) \
printk(_fmt, __VA_ARGS__); \
} while (0)

to my knowledge, the above ex. is replaced as printk(ATH_DEBUG_DOTH, "Set...

How does this "ATH_DEBUG_DOTH, " work for the printk's format?

Please suggest!

Thx
Reply | Threaded
Open this post in threaded view
|

Re: how is DPRINTF defined.

Pavel Roskin
On Fri, 2010-02-12 at 06:40 -0800, legendbb wrote:

> Don't understand the DPRINTF format in the driver.
>
> ex. DPRINTF(sc, ATH_DEBUG_DOTH,
> "Set CHANNEL_DFS_CLEAR flag on channel %4u MHz\n",
> channel->channel);
>
> The macro is:
> #define DPRINTF(sc, _fmt, ...) do { \
> if (sc->sc_debug & ATH_DEBUG_RATE) \
> printk(_fmt, __VA_ARGS__); \
> } while (0)

There are several definitions of DPRINTF across the kernel, and it looks
like the one you quote is from ath_rate/onoe/onoe.c, but the call is
from ath/if_ath.c.  As you can check, ath/if_ath.c doesn't include
ath_rate/onoe/onoe.c, so it's using another definition.

--
Regards,
Pavel Roskin

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Madwifi-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/madwifi-users