diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 27 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_cs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco/spectrum_cs.c | 24 |
6 files changed, 16 insertions, 101 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 5939d0c7a5c..63bf662e9c7 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c @@ -140,25 +140,11 @@ static void airo_detach(struct pcmcia_device *link) static int airo_cs_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { if (cfg->index == 0) return -ENODEV; - /* Does this card need audio output? */ - if (cfg->flags & CISTPL_CFTABLE_AUDIO) - p_dev->config_flags |= CONF_ENABLE_SPKR; - - /* Use power settings for Vcc and Vpp if present */ - /* Note that the CIS values need to be rescaled */ - if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) - p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM]/10000; - else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) - p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; - - p_dev->config_flags |= CONF_ENABLE_IRQ; - /* IO window settings */ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { @@ -193,6 +179,9 @@ static int airo_config(struct pcmcia_device *link) dev_dbg(&link->dev, "airo_config\n"); + link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | + CONF_AUTO_AUDIO; + /* * In this loop, we scan the CIS for configuration table * entries, each of which describes a valid card diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 080266eba98..812decd3fbe 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c @@ -157,25 +157,11 @@ static int card_present(void *arg) static int atmel_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { if (cfg->index == 0) return -ENODEV; - /* Does this card need audio output? */ - if (cfg->flags & CISTPL_CFTABLE_AUDIO) - p_dev->config_flags |= CONF_ENABLE_SPKR; - - /* Use power settings for Vcc and Vpp if present */ - /* Note that the CIS values need to be rescaled */ - if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) - p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM]/10000; - else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) - p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; - - p_dev->config_flags |= CONF_ENABLE_IRQ; - /* IO window settings */ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { @@ -207,6 +193,9 @@ static int atmel_config(struct pcmcia_device *link) dev_dbg(&link->dev, "atmel_config\n"); + link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | + CONF_AUTO_AUDIO; + /* In this loop, we scan the CIS for configuration table entries, each of which describes a valid card configuration, including diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 5b0b5828b3c..d4f19af1757 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -472,7 +472,6 @@ static void prism2_detach(struct pcmcia_device *link) static int prism2_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { if (cfg->index == 0) @@ -481,28 +480,6 @@ static int prism2_config_check(struct pcmcia_device *p_dev, PDEBUG(DEBUG_EXTRA, "Checking CFTABLE_ENTRY 0x%02X " "(default 0x%02X)\n", cfg->index, dflt->index); - /* Does this card need audio output? */ - if (cfg->flags & CISTPL_CFTABLE_AUDIO) - p_dev->config_flags |= CONF_ENABLE_SPKR; - - /* Use power settings for Vcc and Vpp if present */ - /* Note that the CIS values need to be rescaled */ - if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { - if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / - 10000 && !ignore_cis_vcc) { - PDEBUG(DEBUG_EXTRA, " Vcc mismatch - skipping" - " this entry\n"); - return -ENODEV; - } - } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { - if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / - 10000 && !ignore_cis_vcc) { - PDEBUG(DEBUG_EXTRA, " Vcc (default) mismatch " - "- skipping this entry\n"); - return -ENODEV; - } - } - if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) @@ -553,6 +530,10 @@ static int prism2_config(struct pcmcia_device *link) } /* Look for an appropriate configuration table entry in the CIS */ + link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO | + CONF_AUTO_CHECK_VCC; + if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC; ret = pcmcia_loop_config(link, prism2_config_check, NULL); if (ret) { if (!ignore_cis_vcc) diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 6020c19b1bd..031f3e6da3c 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c @@ -797,7 +797,6 @@ static void if_cs_release(struct pcmcia_device *p_dev) static int if_cs_ioprobe(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index 00316a1a109..b92173827b5 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c @@ -145,39 +145,11 @@ static void orinoco_cs_detach(struct pcmcia_device *link) static int orinoco_cs_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { if (cfg->index == 0) goto next_entry; - /* Use power settings for Vcc and Vpp if present */ - /* Note that the CIS values need to be rescaled */ - if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { - if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { - DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", - __func__, vcc, - cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); - if (!ignore_cis_vcc) - goto next_entry; - } - } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { - if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000) { - DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", - __func__, vcc, - dflt->vcc.param[CISTPL_POWER_VNOM] / 10000); - if (!ignore_cis_vcc) - goto next_entry; - } - } - - if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) - p_dev->vpp = - cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; - else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM)) - p_dev->vpp = - dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; - /* Do we need to allocate an interrupt? */ p_dev->config_flags |= CONF_ENABLE_IRQ; @@ -230,6 +202,9 @@ orinoco_cs_config(struct pcmcia_device *link) * and most client drivers will only use the CIS to fill in * implementation-defined details. */ + link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC; + if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC; ret = pcmcia_loop_config(link, orinoco_cs_config_check, NULL); if (ret) { if (!ignore_cis_vcc) diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index ca2c6c0c557..f462c78856e 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c @@ -207,32 +207,11 @@ static void spectrum_cs_detach(struct pcmcia_device *link) static int spectrum_cs_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cfg, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { if (cfg->index == 0) goto next_entry; - /* Use power settings for Vcc and Vpp if present */ - /* Note that the CIS values need to be rescaled */ - if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { - if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] / 10000) { - DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", - __func__, vcc, - cfg->vcc.param[CISTPL_POWER_VNOM] / 10000); - if (!ignore_cis_vcc) - goto next_entry; - } - } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) { - if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] / 10000) { - DEBUG(2, "%s: Vcc mismatch (vcc = %d, CIS = %d)\n", - __func__, vcc, - dflt->vcc.param[CISTPL_POWER_VNOM] / 10000); - if (!ignore_cis_vcc) - goto next_entry; - } - } - if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM)) p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000; @@ -292,6 +271,9 @@ spectrum_cs_config(struct pcmcia_device *link) * and most client drivers will only use the CIS to fill in * implementation-defined details. */ + link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC; + if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC; ret = pcmcia_loop_config(link, spectrum_cs_config_check, NULL); if (ret) { if (!ignore_cis_vcc) |