libata-sff: ap->[last_]ctl are SFF specific
[safe/jmp/linux-2.6] / include / linux / netdevice.h
index bcf1083..fa8b476 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
+#include <linux/if_link.h>
 
 #ifdef __KERNEL__
 #include <linux/timer.h>
@@ -63,30 +64,69 @@ struct wireless_dev;
 #define HAVE_FREE_NETDEV               /* free_netdev() */
 #define HAVE_NETDEV_PRIV               /* netdev_priv() */
 
-#define NET_XMIT_SUCCESS       0
-#define NET_XMIT_DROP          1       /* skb dropped                  */
-#define NET_XMIT_CN            2       /* congestion notification      */
-#define NET_XMIT_POLICED       3       /* skb is shot by police        */
-#define NET_XMIT_MASK          0xFFFF  /* qdisc flags in net/sch_generic.h */
-
 /* Backlog congestion levels */
-#define NET_RX_SUCCESS         0   /* keep 'em coming, baby */
-#define NET_RX_DROP            1  /* packet dropped */
+#define NET_RX_SUCCESS         0       /* keep 'em coming, baby */
+#define NET_RX_DROP            1       /* packet dropped */
+
+/*
+ * Transmit return codes: transmit return codes originate from three different
+ * namespaces:
+ *
+ * - qdisc return codes
+ * - driver transmit return codes
+ * - errno values
+ *
+ * Drivers are allowed to return any one of those in their hard_start_xmit()
+ * function. Real network devices commonly used with qdiscs should only return
+ * the driver transmit return codes though - when qdiscs are used, the actual
+ * transmission happens asynchronously, so the value is not propagated to
+ * higher layers. Virtual network devices transmit synchronously, in this case
+ * the driver transmit return codes are consumed by dev_queue_xmit(), all
+ * others are propagated to higher layers.
+ */
+
+/* qdisc ->enqueue() return codes. */
+#define NET_XMIT_SUCCESS       0x00
+#define NET_XMIT_DROP          0x01    /* skb dropped                  */
+#define NET_XMIT_CN            0x02    /* congestion notification      */
+#define NET_XMIT_POLICED       0x03    /* skb is shot by police        */
+#define NET_XMIT_MASK          0x0f    /* qdisc flags in net/sch_generic.h */
 
 /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
  * indicates that the device will soon be dropping packets, or already drops
  * some packets of the same priority; prompting us to send less aggressively. */
-#define net_xmit_eval(e)       ((e) == NET_XMIT_CN? 0 : (e))
+#define net_xmit_eval(e)       ((e) == NET_XMIT_CN ? 0 : (e))
 #define net_xmit_errno(e)      ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
 
 /* Driver transmit return codes */
+#define NETDEV_TX_MASK         0xf0
+
 enum netdev_tx {
-       NETDEV_TX_OK = 0,       /* driver took care of packet */
-       NETDEV_TX_BUSY,         /* driver tx path was busy*/
-       NETDEV_TX_LOCKED = -1,  /* driver tx lock was already taken */
+       __NETDEV_TX_MIN  = INT_MIN,     /* make sure enum is signed */
+       NETDEV_TX_OK     = 0x00,        /* driver took care of packet */
+       NETDEV_TX_BUSY   = 0x10,        /* driver tx path was busy*/
+       NETDEV_TX_LOCKED = 0x20,        /* driver tx lock was already taken */
 };
 typedef enum netdev_tx netdev_tx_t;
 
+/*
+ * Current order: NETDEV_TX_MASK > NET_XMIT_MASK >= 0 is significant;
+ * hard_start_xmit() return < NET_XMIT_MASK means skb was consumed.
+ */
+static inline bool dev_xmit_complete(int rc)
+{
+       /*
+        * Positive cases with an skb consumed by a driver:
+        * - successful transmission (rc == NETDEV_TX_OK)
+        * - error while transmitting (rc < 0)
+        * - error while queueing to a different device (rc & NET_XMIT_MASK)
+        */
+       if (likely(rc < NET_XMIT_MASK))
+               return true;
+
+       return false;
+}
+
 #endif
 
 #define MAX_ADDR_LEN   32              /* Largest hardware address length */
@@ -97,7 +137,7 @@ typedef enum netdev_tx netdev_tx_t;
  *     used.
  */
 
-#if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if defined(CONFIG_WLAN) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
 # if defined(CONFIG_MAC80211_MESH)
 #  define LL_MAX_HEADER 128
 # else
@@ -125,8 +165,7 @@ typedef enum netdev_tx netdev_tx_t;
  *     with byte counters.
  */
 
-struct net_device_stats
-{
+struct net_device_stats {
        unsigned long   rx_packets;             /* total packets received       */
        unsigned long   tx_packets;             /* total packets transmitted    */
        unsigned long   rx_bytes;               /* total bytes received         */
@@ -179,8 +218,7 @@ struct neighbour;
 struct neigh_parms;
 struct sk_buff;
 
-struct netif_rx_stats
-{
+struct netif_rx_stats {
        unsigned total;
        unsigned dropped;
        unsigned time_squeeze;
@@ -189,8 +227,7 @@ struct netif_rx_stats
 
 DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
 
-struct dev_addr_list
-{
+struct dev_addr_list {
        struct dev_addr_list    *next;
        u8                      da_addr[MAX_ADDR_LEN];
        u8                      da_addrlen;
@@ -227,8 +264,18 @@ struct netdev_hw_addr_list {
        int                     count;
 };
 
-struct hh_cache
-{
+#define netdev_uc_count(dev) ((dev)->uc.count)
+#define netdev_uc_empty(dev) ((dev)->uc.count == 0)
+#define netdev_for_each_uc_addr(ha, dev) \
+       list_for_each_entry(ha, &dev->uc.list, list)
+
+#define netdev_mc_count(dev) ((dev)->mc_count)
+#define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0)
+
+#define netdev_for_each_mc_addr(mclist, dev) \
+       for (mclist = dev->mc_list; mclist; mclist = mclist->next)
+
+struct hh_cache {
        struct hh_cache *hh_next;       /* Next entry                        */
        atomic_t        hh_refcnt;      /* number of users                   */
 /*
@@ -291,8 +338,7 @@ struct header_ops {
  * code.
  */
 
-enum netdev_state_t
-{
+enum netdev_state_t {
        __LINK_STATE_START,
        __LINK_STATE_PRESENT,
        __LINK_STATE_NOCARRIER,
@@ -341,8 +387,7 @@ struct napi_struct {
        struct sk_buff          *skb;
 };
 
-enum
-{
+enum {
        NAPI_STATE_SCHED,       /* Poll is scheduled */
        NAPI_STATE_DISABLE,     /* Disable pending */
        NAPI_STATE_NPSVC,       /* Netpoll - don't dequeue from poll_list */
@@ -458,8 +503,7 @@ static inline void napi_synchronize(const struct napi_struct *n)
 # define napi_synchronize(n)   barrier()
 #endif
 
-enum netdev_queue_state_t
-{
+enum netdev_queue_state_t {
        __QUEUE_STATE_XOFF,
        __QUEUE_STATE_FROZEN,
 };
@@ -578,6 +622,13 @@ struct netdev_queue {
  *     this function is called when a VLAN id is unregistered.
  *
  * void (*ndo_poll_controller)(struct net_device *dev);
+ *
+ *     SR-IOV management functions.
+ * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
+ * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
+ * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
+ * int (*ndo_get_vf_config)(struct net_device *dev,
+ *                         int vf, struct ifla_vf_info *ivf);
  */
 #define HAVE_NET_DEVICE_OPS
 struct net_device_ops {
@@ -589,30 +640,21 @@ struct net_device_ops {
                                                   struct net_device *dev);
        u16                     (*ndo_select_queue)(struct net_device *dev,
                                                    struct sk_buff *skb);
-#define HAVE_CHANGE_RX_FLAGS
        void                    (*ndo_change_rx_flags)(struct net_device *dev,
                                                       int flags);
-#define HAVE_SET_RX_MODE
        void                    (*ndo_set_rx_mode)(struct net_device *dev);
-#define HAVE_MULTICAST
        void                    (*ndo_set_multicast_list)(struct net_device *dev);
-#define HAVE_SET_MAC_ADDR
        int                     (*ndo_set_mac_address)(struct net_device *dev,
                                                       void *addr);
-#define HAVE_VALIDATE_ADDR
        int                     (*ndo_validate_addr)(struct net_device *dev);
-#define HAVE_PRIVATE_IOCTL
        int                     (*ndo_do_ioctl)(struct net_device *dev,
                                                struct ifreq *ifr, int cmd);
-#define HAVE_SET_CONFIG
        int                     (*ndo_set_config)(struct net_device *dev,
                                                  struct ifmap *map);
-#define HAVE_CHANGE_MTU
        int                     (*ndo_change_mtu)(struct net_device *dev,
                                                  int new_mtu);
        int                     (*ndo_neigh_setup)(struct net_device *dev,
                                                   struct neigh_parms *);
-#define HAVE_TX_TIMEOUT
        void                    (*ndo_tx_timeout) (struct net_device *dev);
 
        struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
@@ -624,9 +666,17 @@ struct net_device_ops {
        void                    (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
                                                        unsigned short vid);
 #ifdef CONFIG_NET_POLL_CONTROLLER
-#define HAVE_NETDEV_POLL
        void                    (*ndo_poll_controller)(struct net_device *dev);
 #endif
+       int                     (*ndo_set_vf_mac)(struct net_device *dev,
+                                                 int queue, u8 *mac);
+       int                     (*ndo_set_vf_vlan)(struct net_device *dev,
+                                                  int queue, u16 vlan, u8 qos);
+       int                     (*ndo_set_vf_tx_rate)(struct net_device *dev,
+                                                     int vf, int rate);
+       int                     (*ndo_get_vf_config)(struct net_device *dev,
+                                                    int vf,
+                                                    struct ifla_vf_info *ivf);
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
        int                     (*ndo_fcoe_enable)(struct net_device *dev);
        int                     (*ndo_fcoe_disable)(struct net_device *dev);
@@ -653,8 +703,7 @@ struct net_device_ops {
  *     moves out.
  */
 
-struct net_device
-{
+struct net_device {
 
        /*
         * This is the first field of the "visible" part of this structure
@@ -714,6 +763,7 @@ struct net_device
 #define NETIF_F_FCOE_CRC       (1 << 24) /* FCoE CRC32 */
 #define NETIF_F_SCTP_CSUM      (1 << 25) /* SCTP checksum offload */
 #define NETIF_F_FCOE_MTU       (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/
+#define NETIF_F_NTUPLE         (1 << 27) /* N-tuple filters supported */
 
        /* Segmentation offload features */
 #define NETIF_F_GSO_SHIFT      16
@@ -865,7 +915,7 @@ struct net_device
        /* device index hash chain */
        struct hlist_node       index_hlist;
 
-       struct net_device       *link_watch_next;
+       struct list_head        link_watch_list;
 
        /* register/unregister state machine */
        enum { NETREG_UNINITIALIZED=0,
@@ -874,7 +924,12 @@ struct net_device
               NETREG_UNREGISTERED,     /* completed unregister todo */
               NETREG_RELEASED,         /* called free_netdev */
               NETREG_DUMMY,            /* dummy device for NAPI poll */
-       } reg_state;
+       } reg_state:16;
+
+       enum {
+               RTNL_LINK_INITIALIZED,
+               RTNL_LINK_INITIALIZING,
+       } rtnl_link_state:16;
 
        /* Called from unregister, can be used to call free_netdev */
        void (*destructor)(struct net_device *dev);
@@ -922,6 +977,8 @@ struct net_device
        /* max exchange id for FCoE LRO by ddp */
        unsigned int            fcoe_ddp_xid;
 #endif
+       /* n-tuple filter list attached to this device */
+       struct ethtool_rx_ntuple_list ethtool_ntuple_list;
 };
 #define to_net_dev(d) container_of(d, struct net_device, dev)
 
@@ -978,6 +1035,15 @@ static inline bool netdev_uses_dsa_tags(struct net_device *dev)
        return 0;
 }
 
+#ifndef CONFIG_NET_NS
+static inline void skb_set_dev(struct sk_buff *skb, struct net_device *dev)
+{
+       skb->dev = dev;
+}
+#else /* CONFIG_NET_NS */
+void skb_set_dev(struct sk_buff *skb, struct net_device *dev);
+#endif
+
 static inline bool netdev_uses_trailer_tags(struct net_device *dev)
 {
 #ifdef CONFIG_NET_DSA_TAG_TRAILER
@@ -1081,10 +1147,16 @@ extern rwlock_t                         dev_base_lock;          /* Device list lock */
 
 #define for_each_netdev(net, d)                \
                list_for_each_entry(d, &(net)->dev_base_head, dev_list)
+#define for_each_netdev_reverse(net, d)        \
+               list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list)
+#define for_each_netdev_rcu(net, d)            \
+               list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
 #define for_each_netdev_safe(net, d, n)        \
                list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list)
 #define for_each_netdev_continue(net, d)               \
                list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list)
+#define for_each_netdev_continue_rcu(net, d)           \
+       list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list)
 #define net_device_entry(lh)   list_entry(lh, struct net_device, dev_list)
 
 static inline struct net_device *next_net_device(struct net_device *dev)
@@ -1097,6 +1169,16 @@ static inline struct net_device *next_net_device(struct net_device *dev)
        return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
 }
 
+static inline struct net_device *next_net_device_rcu(struct net_device *dev)
+{
+       struct list_head *lh;
+       struct net *net;
+
+       net = dev_net(dev);
+       lh = rcu_dereference(dev->dev_list.next);
+       return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
+}
+
 static inline struct net_device *first_net_device(struct net *net)
 {
        return list_empty(&net->dev_base_head) ? NULL :
@@ -1227,8 +1309,7 @@ static inline int unregister_gifconf(unsigned int family)
  * Incoming packets are placed on per-cpu queues so that
  * no locking is needed.
  */
-struct softnet_data
-{
+struct softnet_data {
        struct Qdisc            *output_queue;
        struct sk_buff_head     input_pkt_queue;
        struct list_head        poll_list;
@@ -1481,7 +1562,6 @@ extern int                netif_rx(struct sk_buff *skb);
 extern int             netif_rx_ni(struct sk_buff *skb);
 #define HAVE_NETIF_RECEIVE_SKB 1
 extern int             netif_receive_skb(struct sk_buff *skb);
-extern void            napi_gro_flush(struct napi_struct *napi);
 extern gro_result_t    dev_gro_receive(struct napi_struct *napi,
                                        struct sk_buff *skb);
 extern gro_result_t    napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
@@ -1507,7 +1587,9 @@ extern int                dev_valid_name(const char *name);
 extern int             dev_ioctl(struct net *net, unsigned int cmd, void __user *);
 extern int             dev_ethtool(struct net *net, struct ifreq *);
 extern unsigned                dev_get_flags(const struct net_device *);
+extern int             __dev_change_flags(struct net_device *, unsigned int flags);
 extern int             dev_change_flags(struct net_device *, unsigned);
+extern void            __dev_notify_flags(struct net_device *, unsigned int old_flags);
 extern int             dev_change_name(struct net_device *, const char *);
 extern int             dev_set_alias(struct net_device *, const char *, size_t);
 extern int             dev_change_net_namespace(struct net_device *,
@@ -1518,6 +1600,8 @@ extern int                dev_set_mac_address(struct net_device *,
 extern int             dev_hard_start_xmit(struct sk_buff *skb,
                                            struct net_device *dev,
                                            struct netdev_queue *txq);
+extern int             dev_forward_skb(struct net_device *dev,
+                                       struct sk_buff *skb);
 
 extern int             netdev_budget;
 
@@ -1556,6 +1640,7 @@ static inline void dev_hold(struct net_device *dev)
  */
 
 extern void linkwatch_fire_event(struct net_device *dev);
+extern void linkwatch_forget_dev(struct net_device *dev);
 
 /**
  *     netif_carrier_ok - test if carrier present
@@ -1625,7 +1710,8 @@ static inline int netif_dormant(const struct net_device *dev)
  *
  * Check if carrier is operational
  */
-static inline int netif_oper_up(const struct net_device *dev) {
+static inline int netif_oper_up(const struct net_device *dev)
+{
        return (dev->operstate == IF_OPER_UP ||
                dev->operstate == IF_OPER_UNKNOWN /* backward compat */);
 }
@@ -1896,6 +1982,7 @@ extern void               netdev_features_change(struct net_device *dev);
 extern void            dev_load(struct net *net, const char *name);
 extern void            dev_mcast_init(void);
 extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
+extern void            dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats);
 
 extern int             netdev_max_backlog;
 extern int             weight_p;
@@ -1930,6 +2017,9 @@ unsigned long netdev_increment_features(unsigned long all, unsigned long one,
                                        unsigned long mask);
 unsigned long netdev_fix_features(unsigned long features, const char *name);
 
+void netif_stacked_transfer_operstate(const struct net_device *rootdev,
+                                       struct net_device *dev);
+
 static inline int net_gso_ok(int features, int gso_type)
 {
        int feature = gso_type << NETIF_F_GSO_SHIFT;
@@ -1969,12 +2059,12 @@ static inline void skb_bond_set_mac_by_master(struct sk_buff *skb,
  * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and
  * ARP on active-backup slaves with arp_validate enabled.
  */
-static inline int skb_bond_should_drop(struct sk_buff *skb)
+static inline int skb_bond_should_drop(struct sk_buff *skb,
+                                      struct net_device *master)
 {
-       struct net_device *dev = skb->dev;
-       struct net_device *master = dev->master;
-
        if (master) {
+               struct net_device *dev = skb->dev;
+
                if (master->priv_flags & IFF_MASTER_ARPMON)
                        dev->last_rx = jiffies;
 
@@ -2029,6 +2119,130 @@ static inline u32 dev_ethtool_get_flags(struct net_device *dev)
                return 0;
        return dev->ethtool_ops->get_flags(dev);
 }
+
+/* Logging, debugging and troubleshooting/diagnostic helpers. */
+
+/* netdev_printk helpers, similar to dev_printk */
+
+static inline const char *netdev_name(const struct net_device *dev)
+{
+       if (dev->reg_state != NETREG_REGISTERED)
+               return "(unregistered net_device)";
+       return dev->name;
+}
+
+#define netdev_printk(level, netdev, format, args...)          \
+       dev_printk(level, (netdev)->dev.parent,                 \
+                  "%s: " format,                               \
+                  netdev_name(netdev), ##args)
+
+#define netdev_emerg(dev, format, args...)                     \
+       netdev_printk(KERN_EMERG, dev, format, ##args)
+#define netdev_alert(dev, format, args...)                     \
+       netdev_printk(KERN_ALERT, dev, format, ##args)
+#define netdev_crit(dev, format, args...)                      \
+       netdev_printk(KERN_CRIT, dev, format, ##args)
+#define netdev_err(dev, format, args...)                       \
+       netdev_printk(KERN_ERR, dev, format, ##args)
+#define netdev_warn(dev, format, args...)                      \
+       netdev_printk(KERN_WARNING, dev, format, ##args)
+#define netdev_notice(dev, format, args...)                    \
+       netdev_printk(KERN_NOTICE, dev, format, ##args)
+#define netdev_info(dev, format, args...)                      \
+       netdev_printk(KERN_INFO, dev, format, ##args)
+
+#if defined(DEBUG)
+#define netdev_dbg(__dev, format, args...)                     \
+       netdev_printk(KERN_DEBUG, __dev, format, ##args)
+#elif defined(CONFIG_DYNAMIC_DEBUG)
+#define netdev_dbg(__dev, format, args...)                     \
+do {                                                           \
+       dynamic_dev_dbg((__dev)->dev.parent, "%s: " format,     \
+                       netdev_name(__dev), ##args);            \
+} while (0)
+#else
+#define netdev_dbg(__dev, format, args...)                     \
+({                                                             \
+       if (0)                                                  \
+               netdev_printk(KERN_DEBUG, __dev, format, ##args); \
+       0;                                                      \
+})
+#endif
+
+#if defined(VERBOSE_DEBUG)
+#define netdev_vdbg    netdev_dbg
+#else
+
+#define netdev_vdbg(dev, format, args...)                      \
+({                                                             \
+       if (0)                                                  \
+               netdev_printk(KERN_DEBUG, dev, format, ##args); \
+       0;                                                      \
+})
+#endif
+
+/*
+ * netdev_WARN() acts like dev_printk(), but with the key difference
+ * of using a WARN/WARN_ON to get the message out, including the
+ * file/line information and a backtrace.
+ */
+#define netdev_WARN(dev, format, args...)                      \
+       WARN(1, "netdevice: %s\n" format, netdev_name(dev), ##args);
+
+/* netif printk helpers, similar to netdev_printk */
+
+#define netif_printk(priv, type, level, dev, fmt, args...)     \
+do {                                                           \
+       if (netif_msg_##type(priv))                             \
+               netdev_printk(level, (dev), fmt, ##args);       \
+} while (0)
+
+#define netif_emerg(priv, type, dev, fmt, args...)             \
+       netif_printk(priv, type, KERN_EMERG, dev, fmt, ##args)
+#define netif_alert(priv, type, dev, fmt, args...)             \
+       netif_printk(priv, type, KERN_ALERT, dev, fmt, ##args)
+#define netif_crit(priv, type, dev, fmt, args...)              \
+       netif_printk(priv, type, KERN_CRIT, dev, fmt, ##args)
+#define netif_err(priv, type, dev, fmt, args...)               \
+       netif_printk(priv, type, KERN_ERR, dev, fmt, ##args)
+#define netif_warn(priv, type, dev, fmt, args...)              \
+       netif_printk(priv, type, KERN_WARNING, dev, fmt, ##args)
+#define netif_notice(priv, type, dev, fmt, args...)            \
+       netif_printk(priv, type, KERN_NOTICE, dev, fmt, ##args)
+#define netif_info(priv, type, dev, fmt, args...)              \
+       netif_printk(priv, type, KERN_INFO, (dev), fmt, ##args)
+
+#if defined(DEBUG)
+#define netif_dbg(priv, type, dev, format, args...)            \
+       netif_printk(priv, type, KERN_DEBUG, dev, format, ##args)
+#elif defined(CONFIG_DYNAMIC_DEBUG)
+#define netif_dbg(priv, type, netdev, format, args...)         \
+do {                                                           \
+       if (netif_msg_##type(priv))                             \
+               dynamic_dev_dbg((netdev)->dev.parent,           \
+                               "%s: " format,                  \
+                               netdev_name(netdev), ##args);   \
+} while (0)
+#else
+#define netif_dbg(priv, type, dev, format, args...)                    \
+({                                                                     \
+       if (0)                                                          \
+               netif_printk(priv, type, KERN_DEBUG, dev, format, ##args); \
+       0;                                                              \
+})
+#endif
+
+#if defined(VERBOSE_DEBUG)
+#define netif_vdbg     netdev_dbg
+#else
+#define netif_vdbg(priv, type, dev, format, args...)           \
+({                                                             \
+       if (0)                                                  \
+               netif_printk(KERN_DEBUG, dev, format, ##args);  \
+       0;                                                      \
+})
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif /* _LINUX_NETDEVICE_H */