[Prism54-devel] GUPD (Grand Unified Prism54 Driver) Open discussion

Margit Schubert-While margitsw at t-online.de
Thu Jun 17 21:02:17 UTC 2004


Luis scribeth:
 > Move verbose/debug printing to use netif_msg instead of our nasty ifdefs.
 > No one is working on this yet though so it can wait.

No big problem. Looking at other drivers, it should look like this :

static int debug = 3;
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
#define DPRINTK(nlevel, klevel, fmt, args...) \
         (void)((NETIF_MSG_##nlevel & priv->msg_enable) && \
         printk(KERN_##klevel "%s: %s: " fmt, priv->ndev->name, \
                 __FUNCTION__ , ## args))

We need to define msg_enable in the priv structure and have the
priv structure available to all functions.
msg_enable gets set to (1 << debug) -1

We can then replace all printks. (Not only debug/verbose).

I can do this for GUPD and/or current CVS.
Let me know if/when/what.

Margit 




More information about the Prism54-devel mailing list