aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-15 06:43:16 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:55 -0500
commit70294b468302fd7a0a99dad935c7ba5322989345 (patch)
treee54b0b7c85517ef717f3755e06ca08fbb0f5937e /drivers/net/wireless
parent4bbed5231468014b500b048d7370a1c6c349231a (diff)
[PATCH] pcmcia: remove unneeded Vcc pseudo setting
As we do not allow setting Vcc in the pcmcia core, and Vpp1 and Vpp2 can only be set to the same value, a lot of code can be streamlined. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/airo_cs.c19
-rw-r--r--drivers/net/wireless/atmel_cs.c10
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c19
-rw-r--r--drivers/net/wireless/netwave_cs.c1
-rw-r--r--drivers/net/wireless/orinoco_cs.c18
-rw-r--r--drivers/net/wireless/ray_cs.c1
-rw-r--r--drivers/net/wireless/spectrum_cs.c16
-rw-r--r--drivers/net/wireless/wavelan_cs.c1
-rw-r--r--drivers/net/wireless/wl3501_cs.c1
9 files changed, 30 insertions, 56 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index adb90b679d7d..2216c04a02af 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -168,7 +168,6 @@ static int airo_attach(struct pcmcia_device *p_dev)
168 device, and can be hard-wired here. 168 device, and can be hard-wired here.
169 */ 169 */
170 link->conf.Attributes = 0; 170 link->conf.Attributes = 0;
171 link->conf.Vcc = 50;
172 link->conf.IntType = INT_MEMORY_AND_IO; 171 link->conf.IntType = INT_MEMORY_AND_IO;
173 172
174 /* Allocate space for private device-specific data */ 173 /* Allocate space for private device-specific data */
@@ -294,16 +293,11 @@ static void airo_config(dev_link_t *link)
294 293
295 /* Use power settings for Vcc and Vpp if present */ 294 /* Use power settings for Vcc and Vpp if present */
296 /* Note that the CIS values need to be rescaled */ 295 /* Note that the CIS values need to be rescaled */
297 if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM))
298 link->conf.Vcc = cfg->vcc.param[CISTPL_POWER_VNOM]/10000;
299 else if (dflt.vcc.present & (1<<CISTPL_POWER_VNOM))
300 link->conf.Vcc = dflt.vcc.param[CISTPL_POWER_VNOM]/10000;
301
302 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) 296 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
303 link->conf.Vpp1 = link->conf.Vpp2 = 297 link->conf.Vpp =
304 cfg->vpp1.param[CISTPL_POWER_VNOM]/10000; 298 cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
305 else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM)) 299 else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
306 link->conf.Vpp1 = link->conf.Vpp2 = 300 link->conf.Vpp =
307 dflt.vpp1.param[CISTPL_POWER_VNOM]/10000; 301 dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
308 302
309 /* Do we need to allocate an interrupt? */ 303 /* Do we need to allocate an interrupt? */
@@ -391,11 +385,10 @@ static void airo_config(dev_link_t *link)
391 link->dev = &dev->node; 385 link->dev = &dev->node;
392 386
393 /* Finally, report what we've done */ 387 /* Finally, report what we've done */
394 printk(KERN_INFO "%s: index 0x%02x: Vcc %d.%d", 388 printk(KERN_INFO "%s: index 0x%02x: ",
395 dev->node.dev_name, link->conf.ConfigIndex, 389 dev->node.dev_name, link->conf.ConfigIndex);
396 link->conf.Vcc/10, link->conf.Vcc%10); 390 if (link->conf.Vpp)
397 if (link->conf.Vpp1) 391 printk(", Vpp %d.%d", link->conf.Vpp/10, link->conf.Vpp%10);
398 printk(", Vpp %d.%d", link->conf.Vpp1/10, link->conf.Vpp1%10);
399 if (link->conf.Attributes & CONF_ENABLE_IRQ) 392 if (link->conf.Attributes & CONF_ENABLE_IRQ)
400 printk(", irq %d", link->irq.AssignedIRQ); 393 printk(", irq %d", link->irq.AssignedIRQ);
401 if (link->io.NumPorts1) 394 if (link->io.NumPorts1)
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 89dbc783ff80..53fdaa22226d 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -179,7 +179,6 @@ static int atmel_attach(struct pcmcia_device *p_dev)
179 device, and can be hard-wired here. 179 device, and can be hard-wired here.
180 */ 180 */
181 link->conf.Attributes = 0; 181 link->conf.Attributes = 0;
182 link->conf.Vcc = 50;
183 link->conf.IntType = INT_MEMORY_AND_IO; 182 link->conf.IntType = INT_MEMORY_AND_IO;
184 183
185 /* Allocate space for private device-specific data */ 184 /* Allocate space for private device-specific data */
@@ -314,16 +313,11 @@ static void atmel_config(dev_link_t *link)
314 313
315 /* Use power settings for Vcc and Vpp if present */ 314 /* Use power settings for Vcc and Vpp if present */
316 /* Note that the CIS values need to be rescaled */ 315 /* Note that the CIS values need to be rescaled */
317 if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM))
318 link->conf.Vcc = cfg->vcc.param[CISTPL_POWER_VNOM]/10000;
319 else if (dflt.vcc.present & (1<<CISTPL_POWER_VNOM))
320 link->conf.Vcc = dflt.vcc.param[CISTPL_POWER_VNOM]/10000;
321
322 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) 316 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
323 link->conf.Vpp1 = link->conf.Vpp2 = 317 link->conf.Vpp =
324 cfg->vpp1.param[CISTPL_POWER_VNOM]/10000; 318 cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
325 else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM)) 319 else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
326 link->conf.Vpp1 = link->conf.Vpp2 = 320 link->conf.Vpp =
327 dflt.vpp1.param[CISTPL_POWER_VNOM]/10000; 321 dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
328 322
329 /* Do we need to allocate an interrupt? */ 323 /* Do we need to allocate an interrupt? */
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 0fb625185452..69024bfb5bba 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -512,7 +512,6 @@ static int prism2_attach(struct pcmcia_device *p_dev)
512 memset(link, 0, sizeof(dev_link_t)); 512 memset(link, 0, sizeof(dev_link_t));
513 513
514 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info); 514 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
515 link->conf.Vcc = 33;
516 link->conf.IntType = INT_MEMORY_AND_IO; 515 link->conf.IntType = INT_MEMORY_AND_IO;
517 516
518 link->handle = p_dev; 517 link->handle = p_dev;
@@ -603,9 +602,6 @@ static int prism2_config(dev_link_t *link)
603 602
604 CS_CHECK(GetConfigurationInfo, 603 CS_CHECK(GetConfigurationInfo,
605 pcmcia_get_configuration_info(link->handle, &conf)); 604 pcmcia_get_configuration_info(link->handle, &conf));
606 PDEBUG(DEBUG_HW, "%s: %s Vcc=%d (from config)\n", dev_info,
607 ignore_cis_vcc ? "ignoring" : "setting", conf.Vcc);
608 link->conf.Vcc = conf.Vcc;
609 605
610 /* Look for an appropriate configuration table entry in the CIS */ 606 /* Look for an appropriate configuration table entry in the CIS */
611 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; 607 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
@@ -650,10 +646,10 @@ static int prism2_config(dev_link_t *link)
650 } 646 }
651 647
652 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) 648 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
653 link->conf.Vpp1 = link->conf.Vpp2 = 649 link->conf.Vpp =
654 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; 650 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
655 else if (dflt.vpp1.present & (1 << CISTPL_POWER_VNOM)) 651 else if (dflt.vpp1.present & (1 << CISTPL_POWER_VNOM))
656 link->conf.Vpp1 = link->conf.Vpp2 = 652 link->conf.Vpp =
657 dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000; 653 dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
658 654
659 /* Do we need to allocate an interrupt? */ 655 /* Do we need to allocate an interrupt? */
@@ -745,12 +741,11 @@ static int prism2_config(dev_link_t *link)
745 dev->base_addr = link->io.BasePort1; 741 dev->base_addr = link->io.BasePort1;
746 742
747 /* Finally, report what we've done */ 743 /* Finally, report what we've done */
748 printk(KERN_INFO "%s: index 0x%02x: Vcc %d.%d", 744 printk(KERN_INFO "%s: index 0x%02x: ",
749 dev_info, link->conf.ConfigIndex, 745 dev_info, link->conf.ConfigIndex);
750 link->conf.Vcc / 10, link->conf.Vcc % 10); 746 if (link->conf.Vpp)
751 if (link->conf.Vpp1) 747 printk(", Vpp %d.%d", link->conf.Vpp / 10,
752 printk(", Vpp %d.%d", link->conf.Vpp1 / 10, 748 link->conf.Vpp % 10);
753 link->conf.Vpp1 % 10);
754 if (link->conf.Attributes & CONF_ENABLE_IRQ) 749 if (link->conf.Attributes & CONF_ENABLE_IRQ)
755 printk(", irq %d", link->irq.AssignedIRQ); 750 printk(", irq %d", link->irq.AssignedIRQ);
756 if (link->io.NumPorts1) 751 if (link->io.NumPorts1)
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index 545717b5e1e5..23d6b3376e6e 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -406,7 +406,6 @@ static int netwave_attach(struct pcmcia_device *p_dev)
406 406
407 /* General socket configuration */ 407 /* General socket configuration */
408 link->conf.Attributes = CONF_ENABLE_IRQ; 408 link->conf.Attributes = CONF_ENABLE_IRQ;
409 link->conf.Vcc = 50;
410 link->conf.IntType = INT_MEMORY_AND_IO; 409 link->conf.IntType = INT_MEMORY_AND_IO;
411 link->conf.ConfigIndex = 1; 410 link->conf.ConfigIndex = 1;
412 link->conf.Present = PRESENT_OPTION; 411 link->conf.Present = PRESENT_OPTION;
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 89e16cd1be8c..75981d88a1e2 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -218,8 +218,7 @@ orinoco_cs_config(dev_link_t *link)
218 218
219 /* Look up the current Vcc */ 219 /* Look up the current Vcc */
220 CS_CHECK(GetConfigurationInfo, 220 CS_CHECK(GetConfigurationInfo,
221 pcmcia_get_configuration_info(handle, &conf)); 221 pcmcia_get_configuration_info(link->handle, &conf));
222 link->conf.Vcc = conf.Vcc;
223 222
224 /* 223 /*
225 * In this loop, we scan the CIS for configuration table 224 * In this loop, we scan the CIS for configuration table
@@ -274,10 +273,10 @@ orinoco_cs_config(dev_link_t *link)
274 } 273 }
275 274
276 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) 275 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
277 link->conf.Vpp1 = link->conf.Vpp2 = 276 link->conf.Vpp =
278 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; 277 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
279 else if (dflt.vpp1.present & (1 << CISTPL_POWER_VNOM)) 278 else if (dflt.vpp1.present & (1 << CISTPL_POWER_VNOM))
280 link->conf.Vpp1 = link->conf.Vpp2 = 279 link->conf.Vpp =
281 dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000; 280 dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
282 281
283 /* Do we need to allocate an interrupt? */ 282 /* Do we need to allocate an interrupt? */
@@ -373,12 +372,11 @@ orinoco_cs_config(dev_link_t *link)
373 link->state &= ~DEV_CONFIG_PENDING; 372 link->state &= ~DEV_CONFIG_PENDING;
374 373
375 /* Finally, report what we've done */ 374 /* Finally, report what we've done */
376 printk(KERN_DEBUG "%s: index 0x%02x: Vcc %d.%d", 375 printk(KERN_DEBUG "%s: index 0x%02x: ",
377 dev->name, link->conf.ConfigIndex, 376 dev->name, link->conf.ConfigIndex);
378 link->conf.Vcc / 10, link->conf.Vcc % 10); 377 if (link->conf.Vpp)
379 if (link->conf.Vpp1) 378 printk(", Vpp %d.%d", link->conf.Vpp / 10,
380 printk(", Vpp %d.%d", link->conf.Vpp1 / 10, 379 link->conf.Vpp % 10);
381 link->conf.Vpp1 % 10);
382 printk(", irq %d", link->irq.AssignedIRQ); 380 printk(", irq %d", link->irq.AssignedIRQ);
383 if (link->io.NumPorts1) 381 if (link->io.NumPorts1)
384 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 382 printk(", io 0x%04x-0x%04x", link->io.BasePort1,
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index ed4bf5013f1a..7d95587d09db 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -342,7 +342,6 @@ static int ray_attach(struct pcmcia_device *p_dev)
342 342
343 /* General socket configuration */ 343 /* General socket configuration */
344 link->conf.Attributes = CONF_ENABLE_IRQ; 344 link->conf.Attributes = CONF_ENABLE_IRQ;
345 link->conf.Vcc = 50;
346 link->conf.IntType = INT_MEMORY_AND_IO; 345 link->conf.IntType = INT_MEMORY_AND_IO;
347 link->conf.ConfigIndex = 1; 346 link->conf.ConfigIndex = 1;
348 link->conf.Present = PRESENT_OPTION; 347 link->conf.Present = PRESENT_OPTION;
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index 0429f1dc7fad..7a4a80b01f9c 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -692,7 +692,6 @@ spectrum_cs_config(dev_link_t *link)
692 /* Look up the current Vcc */ 692 /* Look up the current Vcc */
693 CS_CHECK(GetConfigurationInfo, 693 CS_CHECK(GetConfigurationInfo,
694 pcmcia_get_configuration_info(handle, &conf)); 694 pcmcia_get_configuration_info(handle, &conf));
695 link->conf.Vcc = conf.Vcc;
696 695
697 /* 696 /*
698 * In this loop, we scan the CIS for configuration table 697 * In this loop, we scan the CIS for configuration table
@@ -747,10 +746,10 @@ spectrum_cs_config(dev_link_t *link)
747 } 746 }
748 747
749 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) 748 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
750 link->conf.Vpp1 = link->conf.Vpp2 = 749 link->conf.Vpp =
751 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; 750 cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
752 else if (dflt.vpp1.present & (1 << CISTPL_POWER_VNOM)) 751 else if (dflt.vpp1.present & (1 << CISTPL_POWER_VNOM))
753 link->conf.Vpp1 = link->conf.Vpp2 = 752 link->conf.Vpp =
754 dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000; 753 dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000;
755 754
756 /* Do we need to allocate an interrupt? */ 755 /* Do we need to allocate an interrupt? */
@@ -851,12 +850,11 @@ spectrum_cs_config(dev_link_t *link)
851 link->state &= ~DEV_CONFIG_PENDING; 850 link->state &= ~DEV_CONFIG_PENDING;
852 851
853 /* Finally, report what we've done */ 852 /* Finally, report what we've done */
854 printk(KERN_DEBUG "%s: index 0x%02x: Vcc %d.%d", 853 printk(KERN_DEBUG "%s: index 0x%02x: ",
855 dev->name, link->conf.ConfigIndex, 854 dev->name, link->conf.ConfigIndex);
856 link->conf.Vcc / 10, link->conf.Vcc % 10); 855 if (link->conf.Vpp)
857 if (link->conf.Vpp1) 856 printk(", Vpp %d.%d", link->conf.Vpp / 10,
858 printk(", Vpp %d.%d", link->conf.Vpp1 / 10, 857 link->conf.Vpp % 10);
859 link->conf.Vpp1 % 10);
860 printk(", irq %d", link->irq.AssignedIRQ); 858 printk(", irq %d", link->irq.AssignedIRQ);
861 if (link->io.NumPorts1) 859 if (link->io.NumPorts1)
862 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 860 printk(", io 0x%04x-0x%04x", link->io.BasePort1,
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 8cabcfe3a654..daa17dc34320 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4607,7 +4607,6 @@ wavelan_attach(struct pcmcia_device *p_dev)
4607 4607
4608 /* General socket configuration */ 4608 /* General socket configuration */
4609 link->conf.Attributes = CONF_ENABLE_IRQ; 4609 link->conf.Attributes = CONF_ENABLE_IRQ;
4610 link->conf.Vcc = 50;
4611 link->conf.IntType = INT_MEMORY_AND_IO; 4610 link->conf.IntType = INT_MEMORY_AND_IO;
4612 4611
4613 /* Chain drivers */ 4612 /* Chain drivers */
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 3a93a8bb2e1f..393b5cb7a52c 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1976,7 +1976,6 @@ static int wl3501_attach(struct pcmcia_device *p_dev)
1976 1976
1977 /* General socket configuration */ 1977 /* General socket configuration */
1978 link->conf.Attributes = CONF_ENABLE_IRQ; 1978 link->conf.Attributes = CONF_ENABLE_IRQ;
1979 link->conf.Vcc = 50;
1980 link->conf.IntType = INT_MEMORY_AND_IO; 1979 link->conf.IntType = INT_MEMORY_AND_IO;
1981 link->conf.ConfigIndex = 1; 1980 link->conf.ConfigIndex = 1;
1982 link->conf.Present = PRESENT_OPTION; 1981 link->conf.Present = PRESENT_OPTION;