diff -u -urN orinoco-0.11b/Makefile orinoco-0.11b-new/Makefile --- orinoco-0.11b/Makefile Wed May 1 07:44:29 2002 +++ orinoco-0.11b-new/Makefile Thu May 30 11:45:02 2002 @@ -13,7 +13,7 @@ SRCS = hermes.c orinoco.c airport.c orinoco_cs.c orinoco_plx.c orinoco_pci.c userhermes.c HDRS = hermes.h hermes_rid.h orinoco.h ieee802_11.h CONF = hermes.conf -MODULE_DIR = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/net/wireless/ +MODULE_DIR = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/net/wireless CONF_DIR = /etc/pcmcia CPPFLAGS = -D__KERNEL__ -DPCMCIA_DEBUG=1 \ -DMODULE -DEXPORT_SYMTAB \ diff -u -urN orinoco-0.11b/orinoco_cs.c orinoco-0.11b-new/orinoco_cs.c --- orinoco-0.11b/orinoco_cs.c Wed May 1 07:44:29 2002 +++ orinoco-0.11b-new/orinoco_cs.c Thu May 30 11:47:56 2002 @@ -67,16 +67,20 @@ /* Some D-Link cards have buggy CIS. They do work at 5v properly, but * 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(reset_cor, "i"); MODULE_PARM(ignore_cis_vcc, "i"); +MODULE_PARM(eth, "i"); /* Pcmcia specific structure */ struct orinoco_pccard { dev_link_t link; dev_node_t node; + int instance; }; /* @@ -114,6 +118,7 @@ */ static dev_link_t *dev_list; /* = NULL */ +static int num_instances = 0; /*====================================================================*/ @@ -309,6 +314,7 @@ priv->hard_reset = orinoco_cs_hard_reset; /* Link both structures together */ + card->instance = num_instances++; /* FIXME: Racy? */ link = &card->link; link->priv = priv; @@ -413,6 +419,8 @@ } kfree(dev); + num_instances--; /* FIXME: Racy? */ + out: TRACE_EXIT("orinoco"); } /* orinoco_cs_detach */ @@ -618,14 +626,27 @@ ndev->base_addr = link->io.BasePort1; ndev->irq = link->irq.AssignedIRQ; - /* register_netdev will give us an ethX name */ - ndev->name[0] = '\0'; + /* Instance name : by default, use hermesX, on demand use the + * regular ethX (less risky) - Jean II */ + if(!eth) + sprintf(ndev->name, "wvlan%d", card->instance); + else + ndev->name[0] = '\0'; /* Tell the stack we exist */ if (register_netdev(ndev) != 0) { printk(KERN_ERR "orinoco_cs: register_netdev() failed\n"); goto failed; } strcpy(card->node.dev_name, ndev->name); + +// /* register_netdev will give us an ethX name */ +// ndev->name[0] = '\0'; +// /* Tell the stack we exist */ +// if (register_netdev(ndev) != 0) { +// printk(KERN_ERR "orinoco_cs: register_netdev() failed\n"); +// goto failed; +// } +// strcpy(card->node.dev_name, ndev->name); /* Finally, report what we've done */ printk(KERN_DEBUG "%s: index 0x%02x: Vcc %d.%d", @@ -811,11 +832,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);