diff -u -urN orinoco-0.13b/orinoco.c orinoco-0.13b-new/orinoco.c --- orinoco-0.13b/orinoco.c Mon Feb 10 04:38:09 2003 +++ orinoco-0.13b-new/orinoco.c Fri Apr 4 12:46:49 2003 @@ -2935,7 +2935,7 @@ if (!priv->has_sensitivity) return -EOPNOTSUPP; - if ((val < 1) || (val > 3)) + if ((val < 0) || (val > 3)) return -EINVAL; err = orinoco_lock(priv, &flags); diff -u -urN orinoco-0.13b/orinoco_cs.c orinoco-0.13b-new/orinoco_cs.c --- orinoco-0.13b/orinoco_cs.c Mon Feb 10 04:38:09 2003 +++ orinoco-0.13b-new/orinoco_cs.c Fri Apr 4 12:56:23 2003 @@ -64,9 +64,13 @@ * don't have any CIS entry for it. This workaround it... */ static int ignore_cis_vcc; /* = 0 */ +/* Control device name allocation. 0 -> dldwdX ; 1 -> ethX */ +static int eth = 1; + MODULE_PARM(irq_mask, "i"); MODULE_PARM(irq_list, "1-4i"); MODULE_PARM(ignore_cis_vcc, "i"); +MODULE_PARM(eth, "i"); /********************************************************************/ /* Magic constants */ @@ -88,6 +92,7 @@ struct orinoco_pccard { dev_link_t link; dev_node_t node; + int instance; /* Used to handle hard reset */ /* yuck, we need this hack to work around the insanity of the @@ -101,6 +106,7 @@ * dev_link_t structure (defined in ds.h). */ static dev_link_t *dev_list; /* = NULL */ +static int num_instances = 0; /********************************************************************/ /* Function prototypes */ @@ -198,6 +204,7 @@ card = priv->card; /* Link both structures together */ + card->instance = num_instances++; /* FIXME: Racy? */ link = &card->link; link->priv = dev; @@ -297,6 +304,9 @@ unregister_netdev(dev); } kfree(dev); + + num_instances--; /* FIXME: Racy? */ + } /* orinoco_cs_detach */ /* @@ -496,8 +506,12 @@ SET_MODULE_OWNER(dev); card->node.major = card->node.minor = 0; - /* register_netdev will give us an ethX name */ - dev->name[0] = '\0'; + /* Instance name : by default, use hermesX, on demand use the + * regular ethX (less risky) - Jean II */ + if(!eth) + sprintf(dev->name, "wvlan%d", card->instance); + else + dev->name[0] = '\0'; /* Tell the stack we exist */ if (register_netdev(dev) != 0) { printk(KERN_ERR "orinoco_cs: register_netdev() failed\n"); @@ -703,11 +717,11 @@ printk(KERN_DEBUG "%s\n", version); CardServices(GetCardServicesInfo, &serv); - if (serv.Revision != CS_RELEASE_CODE) { - printk(KERN_NOTICE "orinoco_cs: Card Services release " - "does not match!\n"); - return -1; - } +// if (serv.Revision != CS_RELEASE_CODE) { +// printk(KERN_NOTICE "orinoco_cs: Card Services release " +// "does not match!\n"); +// return -1; +// } register_pccard_driver(&dev_info, &orinoco_cs_attach, &orinoco_cs_detach);