patch-1.3.17 linux/drivers/net/wavelan.c

Next file: linux/drivers/net/wd.c
Previous file: linux/drivers/net/tulip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.16/linux/drivers/net/wavelan.c linux/drivers/net/wavelan.c
@@ -31,6 +31,7 @@
 #include	<linux/skbuff.h>
 #include	<linux/malloc.h>
 #include	<linux/timer.h>
+#include	<linux/proc_fs.h>
 #define	STRUCT_CHECK	1
 #include	"i82586.h"
 #include	"wavelan.h"
@@ -84,6 +85,7 @@
 static int		wavelan_close(device *);
 static en_stats		*wavelan_get_stats(device *);
 static void		wavelan_set_multicast_list(device *, int, void *);
+static int		wavelan_get_info(char*, char**, off_t, int, int);
 
 /*
  * Other forward declarations.
@@ -836,6 +838,10 @@
 		{
 			if (wavelan_debug > 0)
 				printk("%s: <-wavelan_probe(): 0\n", dev->name);
+			proc_net_register(&(struct proc_dir_entry)
+					  { PROC_NET_WAVELAN, wavelan_get_info,
+					      7, "wavelan" });
+
 			return 0;
 		}
 	}
@@ -2108,8 +2114,8 @@
 	);
 }
 
-int
-wavelan_get_info(char *buffer, char **start, off_t offset, int length)
+static int
+wavelan_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
 {
 	int		len;
 	off_t		begin;
@@ -2170,11 +2176,17 @@
 	0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, wavelan_probe
 };
 
+int io = 0x390; /* Default from above.. */
+int irq = 0;
+
 int
 init_module(void)
 {
+	dev_wavelan.base_addr = io;
+	dev_wavelan.irq       = irq;
 	if (register_netdev(&dev_wavelan) != 0)
 		return -EIO;
+
 	return 0;
 }
 
@@ -2185,6 +2197,7 @@
 		printk("wavelan: device busy, remove delayed\n");
 	else
 	{
+		proc_net_unregister(PROC_NET_WAVELAN);
 		unregister_netdev(&dev_wavelan);
 		kfree_s(dev_wavelan.priv, sizeof(struct net_local));
 		dev_wavelan.priv = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this