patch-2.4.4 linux/drivers/net/hamachi.c
Next file: linux/drivers/net/hamradio/6pack.c
Previous file: linux/drivers/net/gt96100eth.h
Back to the patch index
Back to the overall index
- Lines: 90
- Date:
Fri Apr 20 11:54:23 2001
- Orig file:
v2.4.3/linux/drivers/net/hamachi.c
- Orig date:
Sun Mar 25 18:24:31 2001
diff -u --recursive --new-file v2.4.3/linux/drivers/net/hamachi.c linux/drivers/net/hamachi.c
@@ -27,16 +27,6 @@
*/
-static const char *version =
-"hamachi.c:v1.01 5/16/2000 Written by Donald Becker\n"
-" Some modifications by Eric kasten <kasten@nscl.msu.edu>\n"
-" Further modifications by Keith Underwood <keithu@parl.clemson.edu>\n"
-" Support by many others\n"
-" http://www.scyld.com/network/hamachi.html\n"
-" or\n"
-" http://www.parl.clemson.edu/~keithu/drivers/hamachi.html\n";
-
-
/* A few user-configurable values. */
static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */
@@ -44,7 +34,7 @@
#define hamachi_debug debug
/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
static int max_interrupt_work = 40;
-static int mtu = 0;
+static int mtu;
/* Default values selected by testing on a dual processor PIII-450 */
/* These six interrupt control parameters may be set directly when loading the
* module, or through the rx_params and tx_params variables
@@ -60,13 +50,13 @@
-Setting to > 1518 causes all frames to be copied
-Setting to 0 disables copies
*/
-static int rx_copybreak = 0;
+static int rx_copybreak;
/* An override for the hardware detection of bus width.
Set to 1 to force 32 bit PCI bus detection. Set to 4 to force 64 bit.
Add 2 to disable parity detection.
*/
-static int force32 = 0;
+static int force32;
/* Used to pass the media type, etc.
@@ -175,6 +165,12 @@
#include <linux/ip.h>
#include <linux/delay.h>
+static char version[] __initdata =
+KERN_INFO "hamachi.c:v1.01 5/16/2000 Written by Donald Becker\n"
+KERN_INFO " Some modifications by Eric kasten <kasten@nscl.msu.edu>\n"
+KERN_INFO " Further modifications by Keith Underwood <keithu@parl.clemson.edu>\n";
+
+
/* IP_MF appears to be only defined in <netinet/ip.h>, however,
we need it for hardware checksumming support. FYI... some of
the definitions in <netinet/ip.h> conflict/duplicate those in
@@ -548,17 +544,20 @@
static int __init hamachi_init_one (struct pci_dev *pdev,
const struct pci_device_id *ent)
{
- static int did_version = 0; /* Already printed version info. */
struct hamachi_private *hmp;
int option, i, rx_int_var, tx_int_var, boguscnt;
int chip_id = ent->driver_data;
int irq;
long ioaddr;
- static int card_idx = 0;
+ static int card_idx;
struct net_device *dev;
- if (hamachi_debug > 0 && did_version++ == 0)
+/* when built into the kernel, we only print version if device is found */
+#ifndef MODULE
+ static int printed_version;
+ if (!printed_version++)
printk(version);
+#endif
if (pci_enable_device(pdev))
return -EIO;
@@ -1887,6 +1886,10 @@
static int __init hamachi_init (void)
{
+/* when a module, this is printed whether or not devices are found in probe */
+#ifdef MODULE
+ printk(version);
+#endif
if (pci_register_driver(&hamachi_driver) > 0)
return 0;
pci_unregister_driver(&hamachi_driver);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)