/* Do *NOT* add other headers here, you are guaranteed to be wrong - Jean II */
#include "wavelan_cs.p.h" /* Private header */
+#ifdef WAVELAN_ROAMING
+static void wl_cell_expiry(unsigned long data);
+static void wl_del_wavepoint(wavepoint_history *wavepoint, struct net_local *lp);
+static void wv_nwid_filter(unsigned char mode, net_local *lp);
+#endif /* WAVELAN_ROAMING */
+
/************************* MISC SUBROUTINES **************************/
/*
* Subroutines which won't fit in one of the following category
u_char * b, /* buffer to fill */
int n) /* size to read */
{
- u_char * ptr = ((u_char *)dev->mem_start) + PSA_ADDR + (o << 1);
+ net_local *lp = netdev_priv(dev);
+ u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
while(n-- > 0)
{
u_char * b, /* Buffer in memory */
int n) /* Length of buffer */
{
- u_char * ptr = ((u_char *) dev->mem_start) + PSA_ADDR + (o << 1);
+ net_local *lp = netdev_priv(dev);
+ u_char __iomem *ptr = lp->mem + PSA_ADDR + (o << 1);
int count = 0;
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
/* As there seem to have no flag PSA_BUSY as in the ISA model, we are
* oblige to verify this address to know when the PSA is ready... */
- volatile u_char * verify = ((u_char *) dev->mem_start) + PSA_ADDR +
+ volatile u_char __iomem *verify = lp->mem + PSA_ADDR +
(psaoff(0, psa_comp_number) << 1);
/* Authorize writting to PSA */
}
}
-#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
/*------------------------------------------------------------------*/
/*
fee_wait(base, 10, 100);
#endif /* EEPROM_IS_PROTECTED */
}
-#endif /* WIRELESS_EXT */
/******************* WaveLAN Roaming routines... ********************/
#ifdef WAVELAN_ROAMING /* Conditional compile, see wavelan_cs.h */
-unsigned char WAVELAN_BEACON_ADDRESS[]= {0x09,0x00,0x0e,0x20,0x03,0x00};
+static unsigned char WAVELAN_BEACON_ADDRESS[] = {0x09,0x00,0x0e,0x20,0x03,0x00};
-void wv_roam_init(struct net_device *dev)
+static void wv_roam_init(struct net_device *dev)
{
net_local *lp= netdev_priv(dev);
printk(KERN_DEBUG "WaveLAN: Roaming enabled on device %s\n",dev->name);
}
-void wv_roam_cleanup(struct net_device *dev)
+static void wv_roam_cleanup(struct net_device *dev)
{
wavepoint_history *ptr,*old_ptr;
net_local *lp= netdev_priv(dev);
}
/* Enable/Disable NWID promiscuous mode on a given device */
-void wv_nwid_filter(unsigned char mode, net_local *lp)
+static void wv_nwid_filter(unsigned char mode, net_local *lp)
{
mm_t m;
unsigned long flags;
}
/* Find a record in the WavePoint table matching a given NWID */
-wavepoint_history *wl_roam_check(unsigned short nwid, net_local *lp)
+static wavepoint_history *wl_roam_check(unsigned short nwid, net_local *lp)
{
wavepoint_history *ptr=lp->wavepoint_table.head;
}
/* Create a new wavepoint table entry */
-wavepoint_history *wl_new_wavepoint(unsigned short nwid, unsigned char seq, net_local* lp)
+static wavepoint_history *wl_new_wavepoint(unsigned short nwid, unsigned char seq, net_local* lp)
{
wavepoint_history *new_wavepoint;
}
/* Remove a wavepoint entry from WavePoint table */
-void wl_del_wavepoint(wavepoint_history *wavepoint, struct net_local *lp)
+static void wl_del_wavepoint(wavepoint_history *wavepoint, struct net_local *lp)
{
if(wavepoint==NULL)
return;
}
/* Timer callback function - checks WavePoint table for stale entries */
-void wl_cell_expiry(unsigned long data)
+static void wl_cell_expiry(unsigned long data)
{
net_local *lp=(net_local *)data;
wavepoint_history *wavepoint=lp->wavepoint_table.head,*old_point;
}
/* Update SNR history of a wavepoint */
-void wl_update_history(wavepoint_history *wavepoint, unsigned char sigqual, unsigned char seq)
+static void wl_update_history(wavepoint_history *wavepoint, unsigned char sigqual, unsigned char seq)
{
int i=0,num_missed=0,ptr=0;
int average_fast=0,average_slow=0;
}
/* Perform a handover to a new WavePoint */
-void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp)
+static void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp)
{
- ioaddr_t base = lp->dev->base_addr;
+ kio_addr_t base = lp->dev->base_addr;
mm_t m;
unsigned long flags;
int cmd,
int result)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
int status;
int wait_completed;
long spin;
static inline int
wv_diag(struct net_device * dev)
{
- int ret = FALSE;
-
- if(wv_82593_cmd(dev, "wv_diag(): diagnose",
- OP0_DIAGNOSE, SR0_DIAGNOSE_PASSED))
- ret = TRUE;
-
-#ifdef DEBUG_CONFIG_ERROR
- printk(KERN_INFO "wavelan_cs: i82593 Self Test failed!\n");
-#endif
- return(ret);
+ return(wv_82593_cmd(dev, "wv_diag(): diagnose",
+ OP0_DIAGNOSE, SR0_DIAGNOSE_PASSED));
} /* wv_diag */
/*------------------------------------------------------------------*/
char * buf,
int len)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
int ring_ptr = addr;
int chunk_len;
char * buf_ptr = buf;
static void
wv_mmc_show(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev);
mmr_t m;
mmc_read(base, 0, (u_char *)&m, sizeof(m));
mmc_out(base, mmwoff(0, mmw_freeze), 0);
-#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
/* Don't forget to update statistics */
lp->wstats.discard.nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l;
-#endif /* WIRELESS_EXT */
spin_unlock_irqrestore(&lp->spinlock, flags);
static inline void
wv_init_info(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
psa_t psa;
int i;
#ifdef DEBUG_BASIC_SHOW
/* Now, let's go for the basic stuff */
- printk(KERN_NOTICE "%s: WaveLAN: port %#x, irq %d, hw_addr",
+ printk(KERN_NOTICE "%s: WaveLAN: port %#lx, irq %d, hw_addr",
dev->name, base, dev->irq);
for(i = 0; i < WAVELAN_ADDR_SIZE; i++)
printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]);
}
#endif /* SET_MAC_ADDRESS */
-#ifdef WIRELESS_EXT /* If wireless extension exist in the kernel */
/*------------------------------------------------------------------*/
/*
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
psa_t psa;
mm_t m;
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
unsigned long flags;
int ret;
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
psa_t psa;
unsigned long flags;
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
psa_t psa;
unsigned long flags;
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
unsigned long flags;
psa_t psa;
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
psa_t psa;
unsigned long flags;
extra[IW_ESSID_MAX_SIZE] = '\0';
/* Set the length */
- wrqu->data.length = strlen(extra) + 1;
+ wrqu->data.length = strlen(extra);
return 0;
}
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
struct iw_range *range = (struct iw_range *) extra;
unsigned long flags;
union iwreq_data *wrqu,
char *extra)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local *lp = netdev_priv(dev);
psa_t psa;
unsigned long flags;
static iw_stats *
wavelan_get_wireless_stats(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev);
mmr_t m;
iw_stats * wstats;
#endif
return &lp->wstats;
}
-#endif /* WIRELESS_EXT */
/************************* PACKET RECEPTION *************************/
/*
int rfp, /* end of frame */
int wrap) /* start of buffer */
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
int rp;
int len;
static inline void
wv_packet_rcv(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev);
int newrfp;
int rp;
short length)
{
net_local * lp = netdev_priv(dev);
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
unsigned long flags;
int clen = length;
register u_short xmtdata_base = TX_BASE;
static inline int
wv_mmc_init(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
psa_t psa;
mmw_t m;
int configured;
static int
wv_ru_stop(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev);
unsigned long flags;
int status;
/* If there was a problem */
if(spin <= 0)
{
-#ifdef DEBUG_CONFIG_ERROR
+#ifdef DEBUG_CONFIG_ERRORS
printk(KERN_INFO "%s: wv_ru_stop(): The chip doesn't want to stop...\n",
dev->name);
#endif
static int
wv_ru_start(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev);
unsigned long flags;
static int
wv_82593_config(struct net_device * dev)
{
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
net_local * lp = netdev_priv(dev);
struct i82593_conf_block cfblk;
int ret = TRUE;
cfblk.lin_prio = 0; /* conform to 802.3 backoff algoritm */
cfblk.exp_prio = 5; /* conform to 802.3 backoff algoritm */
cfblk.bof_met = 1; /* conform to 802.3 backoff algoritm */
- cfblk.ifrm_spc = 0x20; /* 32 bit times interframe spacing */
- cfblk.slottim_low = 0x20; /* 32 bit times slot time */
+ cfblk.ifrm_spc = 0x20 >> 4; /* 32 bit times interframe spacing */
+ cfblk.slottim_low = 0x20 >> 5; /* 32 bit times slot time */
cfblk.slottim_hi = 0x0;
cfblk.max_retr = 15;
cfblk.prmisc = ((lp->promiscuous) ? TRUE: FALSE); /* Promiscuous mode */
wv_hw_config(struct net_device * dev)
{
net_local * lp = netdev_priv(dev);
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
unsigned long flags;
int ret = FALSE;
static inline int
wv_pcmcia_config(dev_link_t * link)
{
- client_handle_t handle;
+ client_handle_t handle = link->handle;
tuple_t tuple;
cisparse_t parse;
- struct net_device * dev;
+ struct net_device * dev = (struct net_device *) link->priv;
int i;
u_char buf[64];
win_req_t req;
memreq_t mem;
+ net_local * lp = netdev_priv(dev);
- handle = link->handle;
- dev = (struct net_device *) link->priv;
#ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link);
break;
}
- dev->mem_start = (u_long)ioremap(req.Base, req.Size);
+ lp->mem = ioremap(req.Base, req.Size);
+ dev->mem_start = (u_long)lp->mem;
dev->mem_end = dev->mem_start + req.Size;
mem.CardOffset = 0; mem.Page = 0;
netif_start_queue(dev);
#ifdef DEBUG_CONFIG_INFO
- printk(KERN_DEBUG "wv_pcmcia_config: MEMSTART 0x%x IRQ %d IOPORT 0x%x\n",
- (u_int) dev->mem_start, dev->irq, (u_int) dev->base_addr);
+ printk(KERN_DEBUG "wv_pcmcia_config: MEMSTART %p IRQ %d IOPORT 0x%x\n",
+ lp->mem, dev->irq, (u_int) dev->base_addr);
#endif
+ SET_NETDEV_DEV(dev, &handle_to_dev(handle));
i = register_netdev(dev);
if(i != 0)
{
wv_pcmcia_release(dev_link_t *link)
{
struct net_device * dev = (struct net_device *) link->priv;
+ net_local * lp = netdev_priv(dev);
#ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link);
#endif
/* Don't bother checking to see if these succeed or not */
- iounmap((u_char *)dev->mem_start);
+ iounmap(lp->mem);
pcmcia_release_window(link->win);
pcmcia_release_configuration(link->handle);
pcmcia_release_io(link->handle, &link->io);
{
struct net_device * dev;
net_local * lp;
- ioaddr_t base;
+ kio_addr_t base;
int status0;
u_int tx_status;
wavelan_watchdog(struct net_device * dev)
{
net_local * lp = netdev_priv(dev);
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
unsigned long flags;
int aborted = FALSE;
{
net_local * lp = netdev_priv(dev);
dev_link_t * link = lp->link;
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
#ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "%s: ->wavelan_open(dev=0x%x)\n", dev->name,
wavelan_close(struct net_device * dev)
{
dev_link_t * link = ((net_local *)netdev_priv(dev))->link;
- ioaddr_t base = dev->base_addr;
+ kio_addr_t base = dev->base_addr;
#ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "%s: ->wavelan_close(dev=0x%x)\n", dev->name,
* configure the card at this point -- we wait until we receive a
* card insertion event.
*/
-static dev_link_t *
-wavelan_attach(void)
+static int
+wavelan_attach(struct pcmcia_device *p_dev)
{
- 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 i, 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));
+ link = kzalloc(sizeof(struct dev_link_t), GFP_KERNEL);
+ if (!link) return -ENOMEM;
/* The io structure describes IO port mapping */
link->io.NumPorts1 = 8;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
- link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
- if (irq_list[0] == -1)
- link->irq.IRQInfo2 = irq_mask;
- else
- for (i = 0; i < 4; i++)
- link->irq.IRQInfo2 |= 1 << irq_list[i];
+ link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = wavelan_interrupt;
/* General socket configuration */
link->conf.IntType = INT_MEMORY_AND_IO;
/* Chain drivers */
- link->next = dev_list;
- dev_list = link;
+ link->next = NULL;
/* Allocate the generic data structure */
dev = alloc_etherdev(sizeof(net_local));
if (!dev) {
kfree(link);
- return NULL;
+ return -ENOMEM;
}
link->priv = link->irq.Instance = dev;
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.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
- 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;
+ link->handle = p_dev;
+ p_dev->instance = 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;
- }
+ link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
+ if(wv_pcmcia_config(link) &&
+ wv_hw_config(dev))
+ wv_init_info(dev);
+ else
+ dev->irq = 0;
#ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "<- wavelan_attach()\n");
#endif
- return link;
+ return 0;
}
/*------------------------------------------------------------------*/
* is released.
*/
static void
-wavelan_detach(dev_link_t * link)
+wavelan_detach(struct pcmcia_device *p_dev)
{
+ dev_link_t *link = dev_to_instance(p_dev);
+
#ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "-> wavelan_detach(0x%p)\n", link);
#endif
wv_pcmcia_release(link);
}
- /* Break the link with Card Services */
- if(link->handle)
- pcmcia_deregister_client(link->handle);
-
- /* Remove the interface data from the linked list */
- if(dev_list == link)
- dev_list = link->next;
- else
- {
- dev_link_t * prev = dev_list;
-
- while((prev != (dev_link_t *) NULL) && (prev->next != link))
- prev = prev->next;
-
- if(prev == (dev_link_t *) NULL)
- {
-#ifdef DEBUG_CONFIG_ERRORS
- printk(KERN_WARNING "wavelan_detach : Attempting to remove a nonexistent device.\n");
-#endif
- return;
- }
-
- prev->next = link->next;
- }
-
/* Free pieces */
if(link->priv)
{
#endif
}
-/*------------------------------------------------------------------*/
-/*
- * The card status event handler. Mostly, this schedules other stuff
- * to run after an event is received. A CARD_REMOVAL event also sets
- * some flags to discourage the net drivers from trying to talk to the
- * card any more.
- */
-static int
-wavelan_event(event_t event, /* The event received */
- int priority,
- event_callback_args_t * args)
+static int wavelan_suspend(struct pcmcia_device *p_dev)
{
- dev_link_t * link = (dev_link_t *) args->client_data;
- struct net_device * dev = (struct net_device *) link->priv;
-
-#ifdef DEBUG_CALLBACK_TRACE
- printk(KERN_DEBUG "->wavelan_event(): %s\n",
- ((event == CS_EVENT_REGISTRATION_COMPLETE)?"registration complete" :
- ((event == CS_EVENT_CARD_REMOVAL) ? "card removal" :
- ((event == CS_EVENT_CARD_INSERTION) ? "card insertion" :
- ((event == CS_EVENT_PM_SUSPEND) ? "pm suspend" :
- ((event == CS_EVENT_RESET_PHYSICAL) ? "physical reset" :
- ((event == CS_EVENT_PM_RESUME) ? "pm resume" :
- ((event == CS_EVENT_CARD_RESET) ? "card reset" :
- "unknown"))))))));
-#endif
-
- switch(event)
- {
- case CS_EVENT_REGISTRATION_COMPLETE:
-#ifdef DEBUG_CONFIG_INFO
- printk(KERN_DEBUG "wavelan_cs: registration complete\n");
-#endif
- break;
-
- case CS_EVENT_CARD_REMOVAL:
- /* Oups ! The card is no more there */
- link->state &= ~DEV_PRESENT;
- if(link->state & DEV_CONFIG)
- {
- /* Accept no more transmissions */
- netif_device_detach(dev);
-
- /* Release the card */
- wv_pcmcia_release(link);
- }
- break;
+ dev_link_t *link = dev_to_instance(p_dev);
+ struct net_device * dev = (struct net_device *) link->priv;
- case CS_EVENT_CARD_INSERTION:
- /* Reset and configure the card */
- link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
- if(wv_pcmcia_config(link) &&
- wv_hw_config(dev))
- wv_init_info(dev);
- else
- dev->irq = 0;
- break;
-
- case CS_EVENT_PM_SUSPEND:
/* NB: wavelan_close will be called, but too late, so we are
* obliged to close nicely the wavelan here. David, could you
* close the device before suspending them ? And, by the way,
/* The card is now suspended */
link->state |= DEV_SUSPEND;
- /* Fall through... */
- case CS_EVENT_RESET_PHYSICAL:
+
if(link->state & DEV_CONFIG)
- {
- if(link->open)
- netif_device_detach(dev);
- pcmcia_release_configuration(link->handle);
- }
- break;
+ {
+ if(link->open)
+ netif_device_detach(dev);
+ pcmcia_release_configuration(link->handle);
+ }
+
+ return 0;
+}
+
+static int wavelan_resume(struct pcmcia_device *p_dev)
+{
+ dev_link_t *link = dev_to_instance(p_dev);
+ struct net_device * dev = (struct net_device *) link->priv;
- case CS_EVENT_PM_RESUME:
link->state &= ~DEV_SUSPEND;
- /* Fall through... */
- case CS_EVENT_CARD_RESET:
if(link->state & DEV_CONFIG)
- {
- pcmcia_request_configuration(link->handle, &link->conf);
- if(link->open) /* If RESET -> True, If RESUME -> False ? */
- {
- wv_hw_reset(dev);
- netif_device_attach(dev);
- }
- }
- break;
- }
+ {
+ pcmcia_request_configuration(link->handle, &link->conf);
+ if(link->open) /* If RESET -> True, If RESUME -> False ? */
+ {
+ wv_hw_reset(dev);
+ netif_device_attach(dev);
+ }
+ }
-#ifdef DEBUG_CALLBACK_TRACE
- printk(KERN_DEBUG "<-wavelan_event()\n");
-#endif
- return 0;
+ return 0;
}
+
+static struct pcmcia_device_id wavelan_ids[] = {
+ PCMCIA_DEVICE_PROD_ID12("AT&T","WaveLAN/PCMCIA", 0xe7c5affd, 0x1bc50975),
+ PCMCIA_DEVICE_PROD_ID12("Digital", "RoamAbout/DS", 0x9999ab35, 0x00d05e06),
+ PCMCIA_DEVICE_PROD_ID12("Lucent Technologies", "WaveLAN/PCMCIA", 0x23eb9949, 0x1bc50975),
+ PCMCIA_DEVICE_PROD_ID12("NCR", "WaveLAN/PCMCIA", 0x24358cd4, 0x1bc50975),
+ PCMCIA_DEVICE_NULL,
+};
+MODULE_DEVICE_TABLE(pcmcia, wavelan_ids);
+
static struct pcmcia_driver wavelan_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "wavelan_cs",
},
- .attach = wavelan_attach,
- .detach = wavelan_detach,
+ .probe = wavelan_attach,
+ .remove = wavelan_detach,
+ .id_table = wavelan_ids,
+ .suspend = wavelan_suspend,
+ .resume = wavelan_resume,
};
static int __init