diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0183901ea475..4d27368674db 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2314,20 +2314,26 @@ do { \ | |||
2314 | netdev_printk(level, (dev), fmt, ##args); \ | 2314 | netdev_printk(level, (dev), fmt, ##args); \ |
2315 | } while (0) | 2315 | } while (0) |
2316 | 2316 | ||
2317 | #define netif_level(level, priv, type, dev, fmt, args...) \ | ||
2318 | do { \ | ||
2319 | if (netif_msg_##type(priv)) \ | ||
2320 | netdev_##level(dev, fmt, ##args); \ | ||
2321 | } while (0) | ||
2322 | |||
2317 | #define netif_emerg(priv, type, dev, fmt, args...) \ | 2323 | #define netif_emerg(priv, type, dev, fmt, args...) \ |
2318 | netif_printk(priv, type, KERN_EMERG, dev, fmt, ##args) | 2324 | netif_level(emerg, priv, type, dev, fmt, ##args) |
2319 | #define netif_alert(priv, type, dev, fmt, args...) \ | 2325 | #define netif_alert(priv, type, dev, fmt, args...) \ |
2320 | netif_printk(priv, type, KERN_ALERT, dev, fmt, ##args) | 2326 | netif_level(alert, priv, type, dev, fmt, ##args) |
2321 | #define netif_crit(priv, type, dev, fmt, args...) \ | 2327 | #define netif_crit(priv, type, dev, fmt, args...) \ |
2322 | netif_printk(priv, type, KERN_CRIT, dev, fmt, ##args) | 2328 | netif_level(crit, priv, type, dev, fmt, ##args) |
2323 | #define netif_err(priv, type, dev, fmt, args...) \ | 2329 | #define netif_err(priv, type, dev, fmt, args...) \ |
2324 | netif_printk(priv, type, KERN_ERR, dev, fmt, ##args) | 2330 | netif_level(err, priv, type, dev, fmt, ##args) |
2325 | #define netif_warn(priv, type, dev, fmt, args...) \ | 2331 | #define netif_warn(priv, type, dev, fmt, args...) \ |
2326 | netif_printk(priv, type, KERN_WARNING, dev, fmt, ##args) | 2332 | netif_level(warn, priv, type, dev, fmt, ##args) |
2327 | #define netif_notice(priv, type, dev, fmt, args...) \ | 2333 | #define netif_notice(priv, type, dev, fmt, args...) \ |
2328 | netif_printk(priv, type, KERN_NOTICE, dev, fmt, ##args) | 2334 | netif_level(notice, priv, type, dev, fmt, ##args) |
2329 | #define netif_info(priv, type, dev, fmt, args...) \ | 2335 | #define netif_info(priv, type, dev, fmt, args...) \ |
2330 | netif_printk(priv, type, KERN_INFO, (dev), fmt, ##args) | 2336 | netif_level(info, priv, type, dev, fmt, ##args) |
2331 | 2337 | ||
2332 | #if defined(DEBUG) | 2338 | #if defined(DEBUG) |
2333 | #define netif_dbg(priv, type, dev, format, args...) \ | 2339 | #define netif_dbg(priv, type, dev, format, args...) \ |