aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ray_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:21:06 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:21:06 -0500
commitfba395eee7d3f342ca739c20f5b3ee635d0420a0 (patch)
tree5a73f68d3514aa795b0d8c500e4d72170651d762 /drivers/net/wireless/ray_cs.c
parentfd238232cd0ff4840ae6946bb338502154096d88 (diff)
[PATCH] pcmcia: remove dev_link_t and client_handle_t indirection
dev_link_t * and client_handle_t both mean struct pcmcai_device * by now. Therefore, remove all such indirections. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/ray_cs.c')
-rw-r--r--drivers/net/wireless/ray_cs.c92
1 files changed, 44 insertions, 48 deletions
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 60297460deb..415ae8be1e2 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -90,8 +90,8 @@ module_param(pc_debug, int, 0);
90#define DEBUG(n, args...) 90#define DEBUG(n, args...)
91#endif 91#endif
92/** Prototypes based on PCMCIA skeleton driver *******************************/ 92/** Prototypes based on PCMCIA skeleton driver *******************************/
93static void ray_config(dev_link_t *link); 93static void ray_config(struct pcmcia_device *link);
94static void ray_release(dev_link_t *link); 94static void ray_release(struct pcmcia_device *link);
95static void ray_detach(struct pcmcia_device *p_dev); 95static void ray_detach(struct pcmcia_device *p_dev);
96 96
97/***** Prototypes indicated by device structure ******************************/ 97/***** Prototypes indicated by device structure ******************************/
@@ -190,10 +190,10 @@ static int bc;
190static char *phy_addr = NULL; 190static char *phy_addr = NULL;
191 191
192 192
193/* A dev_link_t structure has fields for most things that are needed 193/* A struct pcmcia_device structure has fields for most things that are needed
194 to keep track of a socket, but there will usually be some device 194 to keep track of a socket, but there will usually be some device
195 specific information that also needs to be kept track of. The 195 specific information that also needs to be kept track of. The
196 'priv' pointer in a dev_link_t structure can be used to point to 196 'priv' pointer in a struct pcmcia_device structure can be used to point to
197 a device-specific private data structure, like this. 197 a device-specific private data structure, like this.
198*/ 198*/
199static unsigned int ray_mem_speed = 500; 199static unsigned int ray_mem_speed = 500;
@@ -381,9 +381,8 @@ fail_alloc_dev:
381 structures are freed. Otherwise, the structures will be freed 381 structures are freed. Otherwise, the structures will be freed
382 when the device is released. 382 when the device is released.
383=============================================================================*/ 383=============================================================================*/
384static void ray_detach(struct pcmcia_device *p_dev) 384static void ray_detach(struct pcmcia_device *link)
385{ 385{
386 dev_link_t *link = dev_to_instance(p_dev);
387 struct net_device *dev; 386 struct net_device *dev;
388 ray_dev_t *local; 387 ray_dev_t *local;
389 388
@@ -413,9 +412,8 @@ static void ray_detach(struct pcmcia_device *p_dev)
413#define CS_CHECK(fn, ret) \ 412#define CS_CHECK(fn, ret) \
414do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 413do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
415#define MAX_TUPLE_SIZE 128 414#define MAX_TUPLE_SIZE 128
416static void ray_config(dev_link_t *link) 415static void ray_config(struct pcmcia_device *link)
417{ 416{
418 client_handle_t handle = link->handle;
419 tuple_t tuple; 417 tuple_t tuple;
420 cisparse_t parse; 418 cisparse_t parse;
421 int last_fn = 0, last_ret = 0; 419 int last_fn = 0, last_ret = 0;
@@ -430,23 +428,23 @@ static void ray_config(dev_link_t *link)
430 428
431 /* This reads the card's CONFIG tuple to find its configuration regs */ 429 /* This reads the card's CONFIG tuple to find its configuration regs */
432 tuple.DesiredTuple = CISTPL_CONFIG; 430 tuple.DesiredTuple = CISTPL_CONFIG;
433 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple)); 431 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
434 tuple.TupleData = buf; 432 tuple.TupleData = buf;
435 tuple.TupleDataMax = MAX_TUPLE_SIZE; 433 tuple.TupleDataMax = MAX_TUPLE_SIZE;
436 tuple.TupleOffset = 0; 434 tuple.TupleOffset = 0;
437 CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple)); 435 CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
438 CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse)); 436 CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse));
439 link->conf.ConfigBase = parse.config.base; 437 link->conf.ConfigBase = parse.config.base;
440 link->conf.Present = parse.config.rmask[0]; 438 link->conf.Present = parse.config.rmask[0];
441 439
442 /* Determine card type and firmware version */ 440 /* Determine card type and firmware version */
443 buf[0] = buf[MAX_TUPLE_SIZE - 1] = 0; 441 buf[0] = buf[MAX_TUPLE_SIZE - 1] = 0;
444 tuple.DesiredTuple = CISTPL_VERS_1; 442 tuple.DesiredTuple = CISTPL_VERS_1;
445 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple)); 443 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
446 tuple.TupleData = buf; 444 tuple.TupleData = buf;
447 tuple.TupleDataMax = MAX_TUPLE_SIZE; 445 tuple.TupleDataMax = MAX_TUPLE_SIZE;
448 tuple.TupleOffset = 2; 446 tuple.TupleOffset = 2;
449 CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple)); 447 CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple));
450 448
451 for (i=0; i<tuple.TupleDataLen - 4; i++) 449 for (i=0; i<tuple.TupleDataLen - 4; i++)
452 if (buf[i] == 0) buf[i] = ' '; 450 if (buf[i] == 0) buf[i] = ' ';
@@ -458,20 +456,20 @@ static void ray_config(dev_link_t *link)
458 /* Now allocate an interrupt line. Note that this does not 456 /* Now allocate an interrupt line. Note that this does not
459 actually assign a handler to the interrupt. 457 actually assign a handler to the interrupt.
460 */ 458 */
461 CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq)); 459 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
462 dev->irq = link->irq.AssignedIRQ; 460 dev->irq = link->irq.AssignedIRQ;
463 461
464 /* This actually configures the PCMCIA socket -- setting up 462 /* This actually configures the PCMCIA socket -- setting up
465 the I/O windows and the interrupt mapping. 463 the I/O windows and the interrupt mapping.
466 */ 464 */
467 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf)); 465 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
468 466
469/*** Set up 32k window for shared memory (transmit and control) ************/ 467/*** Set up 32k window for shared memory (transmit and control) ************/
470 req.Attributes = WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_CM | WIN_ENABLE | WIN_USE_WAIT; 468 req.Attributes = WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_CM | WIN_ENABLE | WIN_USE_WAIT;
471 req.Base = 0; 469 req.Base = 0;
472 req.Size = 0x8000; 470 req.Size = 0x8000;
473 req.AccessSpeed = ray_mem_speed; 471 req.AccessSpeed = ray_mem_speed;
474 CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &link->win)); 472 CS_CHECK(RequestWindow, pcmcia_request_window(&link, &req, &link->win));
475 mem.CardOffset = 0x0000; mem.Page = 0; 473 mem.CardOffset = 0x0000; mem.Page = 0;
476 CS_CHECK(MapMemPage, pcmcia_map_mem_page(link->win, &mem)); 474 CS_CHECK(MapMemPage, pcmcia_map_mem_page(link->win, &mem));
477 local->sram = ioremap(req.Base,req.Size); 475 local->sram = ioremap(req.Base,req.Size);
@@ -481,7 +479,7 @@ static void ray_config(dev_link_t *link)
481 req.Base = 0; 479 req.Base = 0;
482 req.Size = 0x4000; 480 req.Size = 0x4000;
483 req.AccessSpeed = ray_mem_speed; 481 req.AccessSpeed = ray_mem_speed;
484 CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &local->rmem_handle)); 482 CS_CHECK(RequestWindow, pcmcia_request_window(&link, &req, &local->rmem_handle));
485 mem.CardOffset = 0x8000; mem.Page = 0; 483 mem.CardOffset = 0x8000; mem.Page = 0;
486 CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->rmem_handle, &mem)); 484 CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->rmem_handle, &mem));
487 local->rmem = ioremap(req.Base,req.Size); 485 local->rmem = ioremap(req.Base,req.Size);
@@ -491,7 +489,7 @@ static void ray_config(dev_link_t *link)
491 req.Base = 0; 489 req.Base = 0;
492 req.Size = 0x1000; 490 req.Size = 0x1000;
493 req.AccessSpeed = ray_mem_speed; 491 req.AccessSpeed = ray_mem_speed;
494 CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &local->amem_handle)); 492 CS_CHECK(RequestWindow, pcmcia_request_window(&link, &req, &local->amem_handle));
495 mem.CardOffset = 0x0000; mem.Page = 0; 493 mem.CardOffset = 0x0000; mem.Page = 0;
496 CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->amem_handle, &mem)); 494 CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->amem_handle, &mem));
497 local->amem = ioremap(req.Base,req.Size); 495 local->amem = ioremap(req.Base,req.Size);
@@ -504,7 +502,7 @@ static void ray_config(dev_link_t *link)
504 return; 502 return;
505 } 503 }
506 504
507 SET_NETDEV_DEV(dev, &handle_to_dev(handle)); 505 SET_NETDEV_DEV(dev, &handle_to_dev(link));
508 i = register_netdev(dev); 506 i = register_netdev(dev);
509 if (i != 0) { 507 if (i != 0) {
510 printk("ray_config register_netdev() failed\n"); 508 printk("ray_config register_netdev() failed\n");
@@ -524,7 +522,7 @@ static void ray_config(dev_link_t *link)
524 return; 522 return;
525 523
526cs_failed: 524cs_failed:
527 cs_error(link->handle, last_fn, last_ret); 525 cs_error(link, last_fn, last_ret);
528 526
529 ray_release(link); 527 ray_release(link);
530} /* ray_config */ 528} /* ray_config */
@@ -553,7 +551,7 @@ static int ray_init(struct net_device *dev)
553 UCHAR *p; 551 UCHAR *p;
554 struct ccs __iomem *pccs; 552 struct ccs __iomem *pccs;
555 ray_dev_t *local = (ray_dev_t *)dev->priv; 553 ray_dev_t *local = (ray_dev_t *)dev->priv;
556 dev_link_t *link = local->finder; 554 struct pcmcia_device *link = local->finder;
557 DEBUG(1, "ray_init(0x%p)\n", dev); 555 DEBUG(1, "ray_init(0x%p)\n", dev);
558 if (!(link->state & DEV_PRESENT)) { 556 if (!(link->state & DEV_PRESENT)) {
559 DEBUG(0,"ray_init - device not present\n"); 557 DEBUG(0,"ray_init - device not present\n");
@@ -615,7 +613,7 @@ static int dl_startup_params(struct net_device *dev)
615 int ccsindex; 613 int ccsindex;
616 ray_dev_t *local = (ray_dev_t *)dev->priv; 614 ray_dev_t *local = (ray_dev_t *)dev->priv;
617 struct ccs __iomem *pccs; 615 struct ccs __iomem *pccs;
618 dev_link_t *link = local->finder; 616 struct pcmcia_device *link = local->finder;
619 617
620 DEBUG(1,"dl_startup_params entered\n"); 618 DEBUG(1,"dl_startup_params entered\n");
621 if (!(link->state & DEV_PRESENT)) { 619 if (!(link->state & DEV_PRESENT)) {
@@ -722,7 +720,7 @@ static void verify_dl_startup(u_long data)
722 ray_dev_t *local = (ray_dev_t *)data; 720 ray_dev_t *local = (ray_dev_t *)data;
723 struct ccs __iomem *pccs = ccs_base(local) + local->dl_param_ccs; 721 struct ccs __iomem *pccs = ccs_base(local) + local->dl_param_ccs;
724 UCHAR status; 722 UCHAR status;
725 dev_link_t *link = local->finder; 723 struct pcmcia_device *link = local->finder;
726 724
727 if (!(link->state & DEV_PRESENT)) { 725 if (!(link->state & DEV_PRESENT)) {
728 DEBUG(2,"ray_cs verify_dl_startup - device not present\n"); 726 DEBUG(2,"ray_cs verify_dl_startup - device not present\n");
@@ -762,7 +760,7 @@ static void start_net(u_long data)
762 ray_dev_t *local = (ray_dev_t *)data; 760 ray_dev_t *local = (ray_dev_t *)data;
763 struct ccs __iomem *pccs; 761 struct ccs __iomem *pccs;
764 int ccsindex; 762 int ccsindex;
765 dev_link_t *link = local->finder; 763 struct pcmcia_device *link = local->finder;
766 if (!(link->state & DEV_PRESENT)) { 764 if (!(link->state & DEV_PRESENT)) {
767 DEBUG(2,"ray_cs start_net - device not present\n"); 765 DEBUG(2,"ray_cs start_net - device not present\n");
768 return; 766 return;
@@ -789,7 +787,7 @@ static void join_net(u_long data)
789 787
790 struct ccs __iomem *pccs; 788 struct ccs __iomem *pccs;
791 int ccsindex; 789 int ccsindex;
792 dev_link_t *link = local->finder; 790 struct pcmcia_device *link = local->finder;
793 791
794 if (!(link->state & DEV_PRESENT)) { 792 if (!(link->state & DEV_PRESENT)) {
795 DEBUG(2,"ray_cs join_net - device not present\n"); 793 DEBUG(2,"ray_cs join_net - device not present\n");
@@ -815,7 +813,7 @@ static void join_net(u_long data)
815 device, and release the PCMCIA configuration. If the device is 813 device, and release the PCMCIA configuration. If the device is
816 still open, this will be postponed until it is closed. 814 still open, this will be postponed until it is closed.
817=============================================================================*/ 815=============================================================================*/
818static void ray_release(dev_link_t *link) 816static void ray_release(struct pcmcia_device *link)
819{ 817{
820 struct net_device *dev = link->priv; 818 struct net_device *dev = link->priv;
821 ray_dev_t *local = dev->priv; 819 ray_dev_t *local = dev->priv;
@@ -833,14 +831,13 @@ static void ray_release(dev_link_t *link)
833 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i); 831 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i);
834 i = pcmcia_release_window(local->rmem_handle); 832 i = pcmcia_release_window(local->rmem_handle);
835 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i); 833 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i);
836 pcmcia_disable_device(link->handle); 834 pcmcia_disable_device(link);
837 835
838 DEBUG(2,"ray_release ending\n"); 836 DEBUG(2,"ray_release ending\n");
839} 837}
840 838
841static int ray_suspend(struct pcmcia_device *p_dev) 839static int ray_suspend(struct pcmcia_device *link)
842{ 840{
843 dev_link_t *link = dev_to_instance(p_dev);
844 struct net_device *dev = link->priv; 841 struct net_device *dev = link->priv;
845 842
846 if ((link->state & DEV_CONFIG) && (link->open)) 843 if ((link->state & DEV_CONFIG) && (link->open))
@@ -849,9 +846,8 @@ static int ray_suspend(struct pcmcia_device *p_dev)
849 return 0; 846 return 0;
850} 847}
851 848
852static int ray_resume(struct pcmcia_device *p_dev) 849static int ray_resume(struct pcmcia_device *link)
853{ 850{
854 dev_link_t *link = dev_to_instance(p_dev);
855 struct net_device *dev = link->priv; 851 struct net_device *dev = link->priv;
856 852
857 if ((link->state & DEV_CONFIG) && (link->open)) { 853 if ((link->state & DEV_CONFIG) && (link->open)) {
@@ -869,7 +865,7 @@ int ray_dev_init(struct net_device *dev)
869 int i; 865 int i;
870#endif /* RAY_IMMEDIATE_INIT */ 866#endif /* RAY_IMMEDIATE_INIT */
871 ray_dev_t *local = dev->priv; 867 ray_dev_t *local = dev->priv;
872 dev_link_t *link = local->finder; 868 struct pcmcia_device *link = local->finder;
873 869
874 DEBUG(1,"ray_dev_init(dev=%p)\n",dev); 870 DEBUG(1,"ray_dev_init(dev=%p)\n",dev);
875 if (!(link->state & DEV_PRESENT)) { 871 if (!(link->state & DEV_PRESENT)) {
@@ -903,7 +899,7 @@ int ray_dev_init(struct net_device *dev)
903static int ray_dev_config(struct net_device *dev, struct ifmap *map) 899static int ray_dev_config(struct net_device *dev, struct ifmap *map)
904{ 900{
905 ray_dev_t *local = dev->priv; 901 ray_dev_t *local = dev->priv;
906 dev_link_t *link = local->finder; 902 struct pcmcia_device *link = local->finder;
907 /* Dummy routine to satisfy device structure */ 903 /* Dummy routine to satisfy device structure */
908 DEBUG(1,"ray_dev_config(dev=%p,ifmap=%p)\n",dev,map); 904 DEBUG(1,"ray_dev_config(dev=%p,ifmap=%p)\n",dev,map);
909 if (!(link->state & DEV_PRESENT)) { 905 if (!(link->state & DEV_PRESENT)) {
@@ -917,7 +913,7 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map)
917static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) 913static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
918{ 914{
919 ray_dev_t *local = dev->priv; 915 ray_dev_t *local = dev->priv;
920 dev_link_t *link = local->finder; 916 struct pcmcia_device *link = local->finder;
921 short length = skb->len; 917 short length = skb->len;
922 918
923 if (!(link->state & DEV_PRESENT)) { 919 if (!(link->state & DEV_PRESENT)) {
@@ -1529,7 +1525,7 @@ static int ray_commit(struct net_device *dev,
1529static iw_stats * ray_get_wireless_stats(struct net_device * dev) 1525static iw_stats * ray_get_wireless_stats(struct net_device * dev)
1530{ 1526{
1531 ray_dev_t * local = (ray_dev_t *) dev->priv; 1527 ray_dev_t * local = (ray_dev_t *) dev->priv;
1532 dev_link_t *link = local->finder; 1528 struct pcmcia_device *link = local->finder;
1533 struct status __iomem *p = local->sram + STATUS_BASE; 1529 struct status __iomem *p = local->sram + STATUS_BASE;
1534 1530
1535 if(local == (ray_dev_t *) NULL) 1531 if(local == (ray_dev_t *) NULL)
@@ -1617,7 +1613,7 @@ static const struct iw_handler_def ray_handler_def =
1617static int ray_open(struct net_device *dev) 1613static int ray_open(struct net_device *dev)
1618{ 1614{
1619 ray_dev_t *local = (ray_dev_t *)dev->priv; 1615 ray_dev_t *local = (ray_dev_t *)dev->priv;
1620 dev_link_t *link; 1616 struct pcmcia_device *link;
1621 link = local->finder; 1617 link = local->finder;
1622 1618
1623 DEBUG(1, "ray_open('%s')\n", dev->name); 1619 DEBUG(1, "ray_open('%s')\n", dev->name);
@@ -1651,7 +1647,7 @@ static int ray_open(struct net_device *dev)
1651static int ray_dev_close(struct net_device *dev) 1647static int ray_dev_close(struct net_device *dev)
1652{ 1648{
1653 ray_dev_t *local = (ray_dev_t *)dev->priv; 1649 ray_dev_t *local = (ray_dev_t *)dev->priv;
1654 dev_link_t *link; 1650 struct pcmcia_device *link;
1655 link = local->finder; 1651 link = local->finder;
1656 1652
1657 DEBUG(1, "ray_dev_close('%s')\n", dev->name); 1653 DEBUG(1, "ray_dev_close('%s')\n", dev->name);
@@ -1677,7 +1673,7 @@ static void ray_reset(struct net_device *dev) {
1677static int interrupt_ecf(ray_dev_t *local, int ccs) 1673static int interrupt_ecf(ray_dev_t *local, int ccs)
1678{ 1674{
1679 int i = 50; 1675 int i = 50;
1680 dev_link_t *link = local->finder; 1676 struct pcmcia_device *link = local->finder;
1681 1677
1682 if (!(link->state & DEV_PRESENT)) { 1678 if (!(link->state & DEV_PRESENT)) {
1683 DEBUG(2,"ray_cs interrupt_ecf - device not present\n"); 1679 DEBUG(2,"ray_cs interrupt_ecf - device not present\n");
@@ -1704,7 +1700,7 @@ static int get_free_tx_ccs(ray_dev_t *local)
1704{ 1700{
1705 int i; 1701 int i;
1706 struct ccs __iomem *pccs = ccs_base(local); 1702 struct ccs __iomem *pccs = ccs_base(local);
1707 dev_link_t *link = local->finder; 1703 struct pcmcia_device *link = local->finder;
1708 1704
1709 if (!(link->state & DEV_PRESENT)) { 1705 if (!(link->state & DEV_PRESENT)) {
1710 DEBUG(2,"ray_cs get_free_tx_ccs - device not present\n"); 1706 DEBUG(2,"ray_cs get_free_tx_ccs - device not present\n");
@@ -1735,7 +1731,7 @@ static int get_free_ccs(ray_dev_t *local)
1735{ 1731{
1736 int i; 1732 int i;
1737 struct ccs __iomem *pccs = ccs_base(local); 1733 struct ccs __iomem *pccs = ccs_base(local);
1738 dev_link_t *link = local->finder; 1734 struct pcmcia_device *link = local->finder;
1739 1735
1740 if (!(link->state & DEV_PRESENT)) { 1736 if (!(link->state & DEV_PRESENT)) {
1741 DEBUG(2,"ray_cs get_free_ccs - device not present\n"); 1737 DEBUG(2,"ray_cs get_free_ccs - device not present\n");
@@ -1810,7 +1806,7 @@ static int parse_addr(char *in_str, UCHAR *out)
1810static struct net_device_stats *ray_get_stats(struct net_device *dev) 1806static struct net_device_stats *ray_get_stats(struct net_device *dev)
1811{ 1807{
1812 ray_dev_t *local = (ray_dev_t *)dev->priv; 1808 ray_dev_t *local = (ray_dev_t *)dev->priv;
1813 dev_link_t *link = local->finder; 1809 struct pcmcia_device *link = local->finder;
1814 struct status __iomem *p = local->sram + STATUS_BASE; 1810 struct status __iomem *p = local->sram + STATUS_BASE;
1815 if (!(link->state & DEV_PRESENT)) { 1811 if (!(link->state & DEV_PRESENT)) {
1816 DEBUG(2,"ray_cs net_device_stats - device not present\n"); 1812 DEBUG(2,"ray_cs net_device_stats - device not present\n");
@@ -1840,7 +1836,7 @@ static struct net_device_stats *ray_get_stats(struct net_device *dev)
1840static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value, int len) 1836static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value, int len)
1841{ 1837{
1842 ray_dev_t *local = (ray_dev_t *)dev->priv; 1838 ray_dev_t *local = (ray_dev_t *)dev->priv;
1843 dev_link_t *link = local->finder; 1839 struct pcmcia_device *link = local->finder;
1844 int ccsindex; 1840 int ccsindex;
1845 int i; 1841 int i;
1846 struct ccs __iomem *pccs; 1842 struct ccs __iomem *pccs;
@@ -1877,7 +1873,7 @@ static void ray_update_multi_list(struct net_device *dev, int all)
1877 struct ccs __iomem *pccs; 1873 struct ccs __iomem *pccs;
1878 int i = 0; 1874 int i = 0;
1879 ray_dev_t *local = (ray_dev_t *)dev->priv; 1875 ray_dev_t *local = (ray_dev_t *)dev->priv;
1880 dev_link_t *link = local->finder; 1876 struct pcmcia_device *link = local->finder;
1881 void __iomem *p = local->sram + HOST_TO_ECF_BASE; 1877 void __iomem *p = local->sram + HOST_TO_ECF_BASE;
1882 1878
1883 if (!(link->state & DEV_PRESENT)) { 1879 if (!(link->state & DEV_PRESENT)) {
@@ -1957,7 +1953,7 @@ static void set_multicast_list(struct net_device *dev)
1957static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs) 1953static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
1958{ 1954{
1959 struct net_device *dev = (struct net_device *)dev_id; 1955 struct net_device *dev = (struct net_device *)dev_id;
1960 dev_link_t *link; 1956 struct pcmcia_device *link;
1961 ray_dev_t *local; 1957 ray_dev_t *local;
1962 struct ccs __iomem *pccs; 1958 struct ccs __iomem *pccs;
1963 struct rcs __iomem *prcs; 1959 struct rcs __iomem *prcs;
@@ -1972,7 +1968,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs)
1972 DEBUG(4,"ray_cs: interrupt for *dev=%p\n",dev); 1968 DEBUG(4,"ray_cs: interrupt for *dev=%p\n",dev);
1973 1969
1974 local = (ray_dev_t *)dev->priv; 1970 local = (ray_dev_t *)dev->priv;
1975 link = (dev_link_t *)local->finder; 1971 link = (struct pcmcia_device *)local->finder;
1976 if ( ! (link->state & DEV_PRESENT) || link->state & DEV_SUSPEND ) { 1972 if ( ! (link->state & DEV_PRESENT) || link->state & DEV_SUSPEND ) {
1977 DEBUG(2,"ray_cs interrupt from device not present or suspended.\n"); 1973 DEBUG(2,"ray_cs interrupt from device not present or suspended.\n");
1978 return IRQ_NONE; 1974 return IRQ_NONE;
@@ -2492,7 +2488,7 @@ static void release_frag_chain(ray_dev_t *local, struct rcs __iomem * prcs)
2492/*===========================================================================*/ 2488/*===========================================================================*/
2493static void authenticate(ray_dev_t *local) 2489static void authenticate(ray_dev_t *local)
2494{ 2490{
2495 dev_link_t *link = local->finder; 2491 struct pcmcia_device *link = local->finder;
2496 DEBUG(0,"ray_cs Starting authentication.\n"); 2492 DEBUG(0,"ray_cs Starting authentication.\n");
2497 if (!(link->state & DEV_PRESENT)) { 2493 if (!(link->state & DEV_PRESENT)) {
2498 DEBUG(2,"ray_cs authenticate - device not present\n"); 2494 DEBUG(2,"ray_cs authenticate - device not present\n");
@@ -2558,7 +2554,7 @@ static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs,
2558static void associate(ray_dev_t *local) 2554static void associate(ray_dev_t *local)
2559{ 2555{
2560 struct ccs __iomem *pccs; 2556 struct ccs __iomem *pccs;
2561 dev_link_t *link = local->finder; 2557 struct pcmcia_device *link = local->finder;
2562 struct net_device *dev = link->priv; 2558 struct net_device *dev = link->priv;
2563 int ccsindex; 2559 int ccsindex;
2564 if (!(link->state & DEV_PRESENT)) { 2560 if (!(link->state & DEV_PRESENT)) {
@@ -2641,7 +2637,7 @@ static int ray_cs_proc_read(char *buf, char **start, off_t offset, int len)
2641 * eg ifconfig 2637 * eg ifconfig
2642 */ 2638 */
2643 int i; 2639 int i;
2644 dev_link_t *link; 2640 struct pcmcia_device *link;
2645 struct net_device *dev; 2641 struct net_device *dev;
2646 ray_dev_t *local; 2642 ray_dev_t *local;
2647 UCHAR *p; 2643 UCHAR *p;