patch-2.4.27 linux-2.4.27/include/linux/netdevice.h

Next file: linux-2.4.27/include/linux/netfilter.h
Previous file: linux-2.4.27/include/linux/module.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/include/linux/netdevice.h linux-2.4.27/include/linux/netdevice.h
@@ -43,13 +43,14 @@
 struct vlan_group;
 struct ethtool_ops;
 
-					/* source back-compat hook */
+					/* source back-compat hooks */
 #define SET_ETHTOOL_OPS(netdev,ops) \
 	( (netdev)->ethtool_ops = (ops) )
 
 #define HAVE_ALLOC_NETDEV		/* feature macro: alloc_xxxdev
 					   functions are available. */
-#define HAVE_FREE_NETDEV
+#define HAVE_FREE_NETDEV		/* free_netdev() */
+#define HAVE_NETDEV_PRIV		/* netdev_priv() */
 
 #define NET_XMIT_SUCCESS	0
 #define NET_XMIT_DROP		1	/* skb dropped			*/
@@ -467,6 +468,10 @@
 	struct packet_type	*next;
 };
 
+static inline void *netdev_priv(struct net_device *dev)
+{
+	return dev->priv;
+}
 
 #include <linux/interrupt.h>
 #include <linux/notifier.h>
@@ -732,6 +737,17 @@
 #define netif_msg_hw(p)		((p)->msg_enable & NETIF_MSG_HW)
 #define netif_msg_wol(p)	((p)->msg_enable & NETIF_MSG_WOL)
 
+static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
+{
+	/* use default */
+	if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
+		return default_msg_enable_bits;
+	if (debug_value == 0)	/* no output */
+		return 0;
+	/* set low N bits */
+	return (1 << debug_value) - 1;
+}
+
 /* Schedule rx intr now? */
 
 static inline int netif_rx_schedule_prep(struct net_device *dev)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)