aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/pcmcia.c14
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c22
-rw-r--r--drivers/net/wireless/netwave_cs.c5
-rw-r--r--drivers/net/wireless/ray_cs.c4
-rw-r--r--drivers/net/wireless/wavelan_cs.c16
-rw-r--r--drivers/net/wireless/wl3501_cs.c4
6 files changed, 33 insertions, 32 deletions
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index b8aa16307f79..ab42fb6addf6 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -82,13 +82,13 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
82 tuple.TupleOffset = 0; 82 tuple.TupleOffset = 0;
83 83
84 res = pcmcia_get_first_tuple(dev, &tuple); 84 res = pcmcia_get_first_tuple(dev, &tuple);
85 if (res != CS_SUCCESS) 85 if (res != 0)
86 goto err_kfree_ssb; 86 goto err_kfree_ssb;
87 res = pcmcia_get_tuple_data(dev, &tuple); 87 res = pcmcia_get_tuple_data(dev, &tuple);
88 if (res != CS_SUCCESS) 88 if (res != 0)
89 goto err_kfree_ssb; 89 goto err_kfree_ssb;
90 res = pcmcia_parse_tuple(dev, &tuple, &parse); 90 res = pcmcia_parse_tuple(dev, &tuple, &parse);
91 if (res != CS_SUCCESS) 91 if (res != 0)
92 goto err_kfree_ssb; 92 goto err_kfree_ssb;
93 93
94 dev->conf.ConfigBase = parse.config.base; 94 dev->conf.ConfigBase = parse.config.base;
@@ -107,13 +107,13 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
107 win.Size = SSB_CORE_SIZE; 107 win.Size = SSB_CORE_SIZE;
108 win.AccessSpeed = 250; 108 win.AccessSpeed = 250;
109 res = pcmcia_request_window(&dev, &win, &dev->win); 109 res = pcmcia_request_window(&dev, &win, &dev->win);
110 if (res != CS_SUCCESS) 110 if (res != 0)
111 goto err_kfree_ssb; 111 goto err_kfree_ssb;
112 112
113 mem.CardOffset = 0; 113 mem.CardOffset = 0;
114 mem.Page = 0; 114 mem.Page = 0;
115 res = pcmcia_map_mem_page(dev->win, &mem); 115 res = pcmcia_map_mem_page(dev->win, &mem);
116 if (res != CS_SUCCESS) 116 if (res != 0)
117 goto err_disable; 117 goto err_disable;
118 118
119 dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; 119 dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
@@ -121,11 +121,11 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
121 dev->irq.Handler = NULL; /* The handler is registered later. */ 121 dev->irq.Handler = NULL; /* The handler is registered later. */
122 dev->irq.Instance = NULL; 122 dev->irq.Instance = NULL;
123 res = pcmcia_request_irq(dev, &dev->irq); 123 res = pcmcia_request_irq(dev, &dev->irq);
124 if (res != CS_SUCCESS) 124 if (res != 0)
125 goto err_disable; 125 goto err_disable;
126 126
127 res = pcmcia_request_configuration(dev, &dev->conf); 127 res = pcmcia_request_configuration(dev, &dev->conf);
128 if (res != CS_SUCCESS) 128 if (res != 0)
129 goto err_disable; 129 goto err_disable;
130 130
131 err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); 131 err = ssb_bus_pcmciabus_register(ssb, dev, win.Base);
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index c768d42d5177..2826e674a8e7 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -234,7 +234,7 @@ static void sandisk_set_iobase(local_info_t *local)
234 reg.Value = hw_priv->link->io.BasePort1 & 0x00ff; 234 reg.Value = hw_priv->link->io.BasePort1 & 0x00ff;
235 res = pcmcia_access_configuration_register(hw_priv->link, 235 res = pcmcia_access_configuration_register(hw_priv->link,
236 &reg); 236 &reg);
237 if (res != CS_SUCCESS) { 237 if (res != 0) {
238 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -" 238 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
239 " res=%d\n", res); 239 " res=%d\n", res);
240 } 240 }
@@ -246,7 +246,7 @@ static void sandisk_set_iobase(local_info_t *local)
246 reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8; 246 reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8;
247 res = pcmcia_access_configuration_register(hw_priv->link, 247 res = pcmcia_access_configuration_register(hw_priv->link,
248 &reg); 248 &reg);
249 if (res != CS_SUCCESS) { 249 if (res != 0) {
250 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -" 250 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
251 " res=%d\n", res); 251 " res=%d\n", res);
252 } 252 }
@@ -322,7 +322,7 @@ static int sandisk_enable_wireless(struct net_device *dev)
322 reg.Value = COR_SOFT_RESET; 322 reg.Value = COR_SOFT_RESET;
323 res = pcmcia_access_configuration_register(hw_priv->link, 323 res = pcmcia_access_configuration_register(hw_priv->link,
324 &reg); 324 &reg);
325 if (res != CS_SUCCESS) { 325 if (res != 0) {
326 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", 326 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
327 dev->name, res); 327 dev->name, res);
328 goto done; 328 goto done;
@@ -339,7 +339,7 @@ static int sandisk_enable_wireless(struct net_device *dev)
339 reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA; 339 reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA;
340 res = pcmcia_access_configuration_register(hw_priv->link, 340 res = pcmcia_access_configuration_register(hw_priv->link,
341 &reg); 341 &reg);
342 if (res != CS_SUCCESS) { 342 if (res != 0) {
343 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n", 343 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
344 dev->name, res); 344 dev->name, res);
345 goto done; 345 goto done;
@@ -374,7 +374,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
374 reg.Value = 0; 374 reg.Value = 0;
375 res = pcmcia_access_configuration_register(hw_priv->link, 375 res = pcmcia_access_configuration_register(hw_priv->link,
376 &reg); 376 &reg);
377 if (res != CS_SUCCESS) { 377 if (res != 0) {
378 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n", 378 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n",
379 res); 379 res);
380 return; 380 return;
@@ -386,7 +386,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
386 reg.Value |= COR_SOFT_RESET; 386 reg.Value |= COR_SOFT_RESET;
387 res = pcmcia_access_configuration_register(hw_priv->link, 387 res = pcmcia_access_configuration_register(hw_priv->link,
388 &reg); 388 &reg);
389 if (res != CS_SUCCESS) { 389 if (res != 0) {
390 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n", 390 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n",
391 res); 391 res);
392 return; 392 return;
@@ -399,7 +399,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
399 reg.Value |= COR_IREQ_ENA; 399 reg.Value |= COR_IREQ_ENA;
400 res = pcmcia_access_configuration_register(hw_priv->link, 400 res = pcmcia_access_configuration_register(hw_priv->link,
401 &reg); 401 &reg);
402 if (res != CS_SUCCESS) { 402 if (res != 0) {
403 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n", 403 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n",
404 res); 404 res);
405 return; 405 return;
@@ -433,7 +433,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
433 reg.Value = 0; 433 reg.Value = 0;
434 res = pcmcia_access_configuration_register(hw_priv->link, 434 res = pcmcia_access_configuration_register(hw_priv->link,
435 &reg); 435 &reg);
436 if (res != CS_SUCCESS) { 436 if (res != 0) {
437 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 " 437 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 "
438 "(%d)\n", res); 438 "(%d)\n", res);
439 return; 439 return;
@@ -446,7 +446,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
446 reg.Value |= COR_SOFT_RESET; 446 reg.Value |= COR_SOFT_RESET;
447 res = pcmcia_access_configuration_register(hw_priv->link, 447 res = pcmcia_access_configuration_register(hw_priv->link,
448 &reg); 448 &reg);
449 if (res != CS_SUCCESS) { 449 if (res != 0) {
450 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 " 450 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 "
451 "(%d)\n", res); 451 "(%d)\n", res);
452 return; 452 return;
@@ -460,7 +460,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
460 reg.Offset = CISREG_CCSR; 460 reg.Offset = CISREG_CCSR;
461 res = pcmcia_access_configuration_register(hw_priv->link, 461 res = pcmcia_access_configuration_register(hw_priv->link,
462 &reg); 462 &reg);
463 if (res != CS_SUCCESS) { 463 if (res != 0) {
464 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 " 464 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 "
465 "(%d)\n", res); 465 "(%d)\n", res);
466 return; 466 return;
@@ -472,7 +472,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
472 reg.Value = old_cor & ~COR_SOFT_RESET; 472 reg.Value = old_cor & ~COR_SOFT_RESET;
473 res = pcmcia_access_configuration_register(hw_priv->link, 473 res = pcmcia_access_configuration_register(hw_priv->link,
474 &reg); 474 &reg);
475 if (res != CS_SUCCESS) { 475 if (res != 0) {
476 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 " 476 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 "
477 "(%d)\n", res); 477 "(%d)\n", res);
478 return; 478 return;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index f479c1af6782..bf2dd1057928 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -749,9 +749,10 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
749 for (i = j = 0x0; j < 0x400; j += 0x20) { 749 for (i = j = 0x0; j < 0x400; j += 0x20) {
750 link->io.BasePort1 = j ^ 0x300; 750 link->io.BasePort1 = j ^ 0x300;
751 i = pcmcia_request_io(link, &link->io); 751 i = pcmcia_request_io(link, &link->io);
752 if (i == CS_SUCCESS) break; 752 if (i == 0)
753 break;
753 } 754 }
754 if (i != CS_SUCCESS) { 755 if (i != 0) {
755 cs_error(link, RequestIO, i); 756 cs_error(link, RequestIO, i);
756 goto failed; 757 goto failed;
757 } 758 }
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 963960dc30f2..99c7c8bc2573 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -798,9 +798,9 @@ static void ray_release(struct pcmcia_device *link)
798 iounmap(local->amem); 798 iounmap(local->amem);
799 /* Do bother checking to see if these succeed or not */ 799 /* Do bother checking to see if these succeed or not */
800 i = pcmcia_release_window(local->amem_handle); 800 i = pcmcia_release_window(local->amem_handle);
801 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i); 801 if ( i != 0 ) DEBUG(0,"ReleaseWindow(local->amem) ret = %x\n",i);
802 i = pcmcia_release_window(local->rmem_handle); 802 i = pcmcia_release_window(local->rmem_handle);
803 if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i); 803 if ( i != 0 ) DEBUG(0,"ReleaseWindow(local->rmem) ret = %x\n",i);
804 pcmcia_disable_device(link); 804 pcmcia_disable_device(link);
805 805
806 DEBUG(2,"ray_release ending\n"); 806 DEBUG(2,"ray_release ending\n");
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index b584c0ecc62d..fee9a0250534 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3708,7 +3708,7 @@ wv_pcmcia_reset(struct net_device * dev)
3708#endif 3708#endif
3709 3709
3710 i = pcmcia_access_configuration_register(link, &reg); 3710 i = pcmcia_access_configuration_register(link, &reg);
3711 if(i != CS_SUCCESS) 3711 if (i != 0)
3712 { 3712 {
3713 cs_error(link, AccessConfigurationRegister, i); 3713 cs_error(link, AccessConfigurationRegister, i);
3714 return FALSE; 3714 return FALSE;
@@ -3722,7 +3722,7 @@ wv_pcmcia_reset(struct net_device * dev)
3722 reg.Action = CS_WRITE; 3722 reg.Action = CS_WRITE;
3723 reg.Value = reg.Value | COR_SW_RESET; 3723 reg.Value = reg.Value | COR_SW_RESET;
3724 i = pcmcia_access_configuration_register(link, &reg); 3724 i = pcmcia_access_configuration_register(link, &reg);
3725 if(i != CS_SUCCESS) 3725 if (i != 0)
3726 { 3726 {
3727 cs_error(link, AccessConfigurationRegister, i); 3727 cs_error(link, AccessConfigurationRegister, i);
3728 return FALSE; 3728 return FALSE;
@@ -3731,7 +3731,7 @@ wv_pcmcia_reset(struct net_device * dev)
3731 reg.Action = CS_WRITE; 3731 reg.Action = CS_WRITE;
3732 reg.Value = COR_LEVEL_IRQ | COR_CONFIG; 3732 reg.Value = COR_LEVEL_IRQ | COR_CONFIG;
3733 i = pcmcia_access_configuration_register(link, &reg); 3733 i = pcmcia_access_configuration_register(link, &reg);
3734 if(i != CS_SUCCESS) 3734 if (i != 0)
3735 { 3735 {
3736 cs_error(link, AccessConfigurationRegister, i); 3736 cs_error(link, AccessConfigurationRegister, i);
3737 return FALSE; 3737 return FALSE;
@@ -3909,7 +3909,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3909 do 3909 do
3910 { 3910 {
3911 i = pcmcia_request_io(link, &link->io); 3911 i = pcmcia_request_io(link, &link->io);
3912 if(i != CS_SUCCESS) 3912 if (i != 0)
3913 { 3913 {
3914 cs_error(link, RequestIO, i); 3914 cs_error(link, RequestIO, i);
3915 break; 3915 break;
@@ -3920,7 +3920,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3920 * actually assign a handler to the interrupt. 3920 * actually assign a handler to the interrupt.
3921 */ 3921 */
3922 i = pcmcia_request_irq(link, &link->irq); 3922 i = pcmcia_request_irq(link, &link->irq);
3923 if(i != CS_SUCCESS) 3923 if (i != 0)
3924 { 3924 {
3925 cs_error(link, RequestIRQ, i); 3925 cs_error(link, RequestIRQ, i);
3926 break; 3926 break;
@@ -3932,7 +3932,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3932 */ 3932 */
3933 link->conf.ConfigIndex = 1; 3933 link->conf.ConfigIndex = 1;
3934 i = pcmcia_request_configuration(link, &link->conf); 3934 i = pcmcia_request_configuration(link, &link->conf);
3935 if(i != CS_SUCCESS) 3935 if (i != 0)
3936 { 3936 {
3937 cs_error(link, RequestConfiguration, i); 3937 cs_error(link, RequestConfiguration, i);
3938 break; 3938 break;
@@ -3948,7 +3948,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3948 req.Base = req.Size = 0; 3948 req.Base = req.Size = 0;
3949 req.AccessSpeed = mem_speed; 3949 req.AccessSpeed = mem_speed;
3950 i = pcmcia_request_window(&link, &req, &link->win); 3950 i = pcmcia_request_window(&link, &req, &link->win);
3951 if(i != CS_SUCCESS) 3951 if (i != 0)
3952 { 3952 {
3953 cs_error(link, RequestWindow, i); 3953 cs_error(link, RequestWindow, i);
3954 break; 3954 break;
@@ -3960,7 +3960,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3960 3960
3961 mem.CardOffset = 0; mem.Page = 0; 3961 mem.CardOffset = 0; mem.Page = 0;
3962 i = pcmcia_map_mem_page(link->win, &mem); 3962 i = pcmcia_map_mem_page(link->win, &mem);
3963 if(i != CS_SUCCESS) 3963 if (i != 0)
3964 { 3964 {
3965 cs_error(link, MapMemPage, i); 3965 cs_error(link, MapMemPage, i);
3966 break; 3966 break;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 377141995e36..969f53fd705b 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1977,10 +1977,10 @@ static int wl3501_config(struct pcmcia_device *link)
1977 link->io.BasePort1 = j; 1977 link->io.BasePort1 = j;
1978 link->io.BasePort2 = link->io.BasePort1 + 0x10; 1978 link->io.BasePort2 = link->io.BasePort1 + 0x10;
1979 i = pcmcia_request_io(link, &link->io); 1979 i = pcmcia_request_io(link, &link->io);
1980 if (i == CS_SUCCESS) 1980 if (i == 0)
1981 break; 1981 break;
1982 } 1982 }
1983 if (i != CS_SUCCESS) { 1983 if (i != 0) {
1984 cs_error(link, RequestIO, i); 1984 cs_error(link, RequestIO, i);
1985 goto failed; 1985 goto failed;
1986 } 1986 }