patch-2.3.14 linux/drivers/net/skeleton.c

Next file: linux/drivers/net/sktr.c
Previous file: linux/drivers/net/sk_mca.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.13/linux/drivers/net/skeleton.c linux/drivers/net/skeleton.c
@@ -96,21 +96,21 @@
 
 /* Index to functions, as function prototypes. */
 
-extern int netcard_probe(struct device *dev);
+extern int netcard_probe(struct net_device *dev);
 
-static int	netcard_probe1(struct device *dev, int ioaddr);
-static int	net_open(struct device *dev);
-static int	net_send_packet(struct sk_buff *skb, struct device *dev);
+static int	netcard_probe1(struct net_device *dev, int ioaddr);
+static int	net_open(struct net_device *dev);
+static int	net_send_packet(struct sk_buff *skb, struct net_device *dev);
 static void	net_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-static void	net_rx(struct device *dev);
-static int	net_close(struct device *dev);
-static struct	net_device_stats *net_get_stats(struct device *dev);
-static void	set_multicast_list(struct device *dev);
+static void	net_rx(struct net_device *dev);
+static int	net_close(struct net_device *dev);
+static struct	net_device_stats *net_get_stats(struct net_device *dev);
+static void	set_multicast_list(struct net_device *dev);
 
 /* Example routines you must write ;->. */
 #define tx_done(dev) 1
 extern void	hardware_send_packet(short ioaddr, char *buf, int length);
-extern void 	chipset_init(struct device *dev, int startp);
+extern void 	chipset_init(struct net_device *dev, int startp);
 
 /*
  * Check for a network adaptor of this type, and return '0' iff one exists.
@@ -128,7 +128,7 @@
 {cardname, netcard_probe1, NETCARD_IO_EXTENT, netcard_portlist};
 #else
 int __init 
-netcard_probe(struct device *dev)
+netcard_probe(struct net_device *dev)
 {
 	int i;
 	int base_addr = dev ? dev->base_addr : 0;
@@ -155,7 +155,7 @@
  * probes on the ISA bus. A good device probes avoids doing writes, and
  * verifies that the correct device exists and functions.
  */
-static int __init netcard_probe1(struct device *dev, int ioaddr)
+static int __init netcard_probe1(struct net_device *dev, int ioaddr)
 {
 	static unsigned version_printed = 0;
 	int i;
@@ -306,7 +306,7 @@
  * there is non-reboot way to recover if something goes wrong.
  */
 static int
-net_open(struct device *dev)
+net_open(struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
 	int ioaddr = dev->base_addr;
@@ -340,7 +340,7 @@
 	return 0;
 }
 
-static int net_send_packet(struct sk_buff *skb, struct device *dev)
+static int net_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
 	int ioaddr = dev->base_addr;
@@ -389,7 +389,7 @@
  */
 static void net_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
-	struct device *dev = dev_id;
+	struct net_device *dev = dev_id;
 	struct net_local *lp;
 	int ioaddr, status, boguscount = 0;
 
@@ -425,7 +425,7 @@
 
 /* We have a good packet(s), get it/them out of the buffers. */
 static void
-net_rx(struct device *dev)
+net_rx(struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
 	int ioaddr = dev->base_addr;
@@ -480,7 +480,7 @@
 
 /* The inverse routine to net_open(). */
 static int
-net_close(struct device *dev)
+net_close(struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
 	int ioaddr = dev->base_addr;
@@ -512,7 +512,7 @@
  * Get the current statistics.
  * This may be called with the card open or closed.
  */
-static struct net_device_stats *net_get_stats(struct device *dev)
+static struct net_device_stats *net_get_stats(struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
 	short ioaddr = dev->base_addr;
@@ -533,7 +533,7 @@
  *			and do best-effort filtering.
  */
 static void
-set_multicast_list(struct device *dev)
+set_multicast_list(struct net_device *dev)
 {
 	short ioaddr = dev->base_addr;
 	if (dev->flags&IFF_PROMISC)
@@ -562,7 +562,7 @@
 #ifdef MODULE
 
 static char devicename[9] = { 0, };
-static struct device this_device = {
+static struct net_device this_device = {
 	devicename, /* will be inserted by linux/drivers/net/net_init.c */
 	0, 0, 0, 0,
 	0, 0,  /* I/O address, IRQ */

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