diff -u -urN orinoco-0.11/Makefile orinoco-0.11-new/Makefile --- orinoco-0.11/Makefile Fri Apr 5 06:35:56 2002 +++ orinoco-0.11-new/Makefile Sat Apr 13 13:25:43 2002 @@ -12,7 +12,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.11/orinoco_cs.c orinoco-0.11-new/orinoco_cs.c --- orinoco-0.11/orinoco_cs.c Fri Apr 5 06:35:56 2002 +++ orinoco-0.11-new/orinoco_cs.c Sat Apr 13 13:28:30 2002 @@ -64,16 +64,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; /* Common structure (fully included), see orinoco.h */ struct orinoco_private *priv; @@ -115,6 +119,7 @@ */ static dev_link_t *dev_list; /* = NULL */ +static int num_instances = 0; /*====================================================================*/ @@ -293,6 +298,7 @@ memset(card, 0, sizeof(*card)); /* Link both structure together */ + card->instance = num_instances++; /* FIXME: Racy? */ link = &card->link; link->priv = priv; @@ -401,6 +407,8 @@ } kfree(priv->card); + num_instances--; /* FIXME: Racy? */ + out: TRACE_EXIT("orinoco"); } /* orinoco_cs_detach */ @@ -611,14 +619,27 @@ if (reset_cor) orinoco_cs_cor_reset(priv); - /* 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", @@ -804,11 +825,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);