client_reg.EventMask = CS_EVENT_REGISTRATION_COMPLETE | CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.event_handler = &wavelan_event; 
wavelan_attach(void){  client_reg_t	client_reg;	/* Register with cardmgr */  dev_link_t *	link;		/* Info for cardmgr */  struct net_device *	dev;		/* Interface generic data */  net_local *	lp;		/* Interface specific data */  int		ret;#ifdef DEBUG_CALLBACK_TRACE  printk(KERN_DEBUG "-> wavelan_attach()\n");#endif  /* Initialize the dev_link_t structure */  link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);  if (!link) return NULL;  memset(link, 0, sizeof(struct dev_link_t));  /* The io structure describes IO port mapping */  link->io.NumPorts1 = 8;  link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;  link->io.IOAddrLines = 3;  /* Interrupt setup */  link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;  link->irq.IRQInfo1 = IRQ_LEVEL_ID;  link->irq.Handler = wavelan_interrupt;  /* General socket configuration */  link->conf.Attributes = CONF_ENABLE_IRQ;  link->conf.Vcc = 50;  link->conf.IntType = INT_MEMORY_AND_IO;  /* Chain drivers */  link->next = dev_list;  dev_list = link;  /* Allocate the generic data structure */  dev = alloc_etherdev(sizeof(net_local));  if (!dev) {      kfree(link);      return NULL;  }  link->priv = link->irq.Instance = dev;  lp = netdev_priv(dev);  /* Init specific data */  lp->configured = 0;  lp->reconfig_82593 = FALSE;  lp->nresets = 0;  /* Multicast stuff */  lp->promiscuous = 0;  lp->allmulticast = 0;  lp->mc_count = 0;  /* Init spinlock */  spin_lock_init(&lp->spinlock);  /* back links */  lp->link = link;  lp->dev = dev;  /* wavelan NET3 callbacks */  SET_MODULE_OWNER(dev);  dev->open = &wavelan_open;  dev->stop = &wavelan_close;  dev->hard_start_xmit = &wavelan_packet_xmit;  dev->get_stats = &wavelan_get_stats;  dev->set_multicast_list = &wavelan_set_multicast_list;#ifdef SET_MAC_ADDRESS  dev->set_mac_address = &wavelan_set_mac_address;#endif	/* SET_MAC_ADDRESS */  /* Set the watchdog timer */  dev->tx_timeout	= &wavelan_watchdog;  dev->watchdog_timeo	= WATCHDOG_JIFFIES;  SET_ETHTOOL_OPS(dev, &ops);#ifdef WIRELESS_EXT	/* If wireless extension exist in the kernel */  dev->wireless_handlers = &wavelan_handler_def;  lp->wireless_data.spy_data = &lp->spy_data;  dev->wireless_data = &lp->wireless_data;#endif  /* Other specific data */  dev->mtu = WAVELAN_MTU;  /* Register with Card Services */  client_reg.dev_info = &dev_info;  client_reg.EventMask =     CS_EVENT_REGISTRATION_COMPLETE |    CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |    CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |    CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;  client_reg.event_handler = &wavelan_event;  client_reg.Version = 0x0210;  client_reg.event_callback_args.client_data = link;#ifdef DEBUG_CONFIG_INFO  printk(KERN_DEBUG "wavelan_attach(): almost done, calling pcmcia_register_client\n");#endif  ret = pcmcia_register_client(&link->handle, &client_reg);  if(ret != 0)    {      cs_error(link->handle, RegisterClient, ret);      wavelan_detach(link);      return NULL;    }#ifdef DEBUG_CALLBACK_TRACE  printk(KERN_DEBUG "<- wavelan_attach()\n");#endif  return link;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1e212f3645a6b355de8c43a23376bc0e2ac49a63/wavelan_cs.c/clean/drivers/net/wireless/wavelan_cs.c