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
- Lines: 46
- Date:
2004-08-07 16:26:06.294414165 -0700
- Orig file:
linux-2.4.26/include/linux/netdevice.h
- Orig date:
2004-02-18 05:36:32.000000000 -0800
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)