2 * Copyright 2012 Luis R. Rodriguez <mcgrof@frijolero.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * Compatibility file for Linux wireless for kernels 3.2.
11 #include <linux/kernel.h>
12 #include <linux/device.h>
14 int __netdev_printk(const char *level, const struct net_device *dev,
15 struct va_format *vaf)
19 if (dev && dev->dev.parent)
20 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35))
21 r = dev_printk(level, dev->dev.parent, "%s: %pV",
22 netdev_name(dev), vaf);
24 /* XXX: this could likely be done better but I'm lazy */
25 r = printk("%s%s: %pV", level, netdev_name(dev), vaf);
28 r = printk("%s%s: %pV", level, netdev_name(dev), vaf);
30 r = printk("%s(NULL net_device): %pV", level, vaf);
34 EXPORT_SYMBOL_GPL(__netdev_printk);