summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.patch')
-rw-r--r--patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.patch163
1 files changed, 0 insertions, 163 deletions
diff --git a/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.patch b/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.patch
deleted file mode 100644
index 4b01d60b..00000000
--- a/patches/collateral-evolutions/network/24-pcmcia/drivers_net_wireless_libertas_if_cs.patch
+++ /dev/null
@@ -1,163 +0,0 @@
---- a/drivers/net/wireless/libertas/if_cs.c
-+++ b/drivers/net/wireless/libertas/if_cs.c
-@@ -757,7 +757,11 @@ static void if_cs_prog_firmware(struct l
- return;
-
- /* Now actually get the IRQ */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- ret = request_irq(card->p_dev->irq, if_cs_interrupt,
-+#else
-+ ret = request_irq(card->p_dev->irq.AssignedIRQ, if_cs_interrupt,
-+#endif
- IRQF_SHARED, DRV_NAME, card);
- if (ret) {
- pr_err("error in request_irq\n");
-@@ -775,7 +779,11 @@ static void if_cs_prog_firmware(struct l
- priv->fw_ready = 1;
- if (lbs_start_card(priv) != 0) {
- pr_err("could not activate card\n");
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- free_irq(card->p_dev->irq, card);
-+#else
-+ free_irq(card->p_dev->irq.AssignedIRQ, card);
-+#endif
- }
- }
-
-@@ -820,7 +828,11 @@ static void if_cs_release(struct pcmcia_
-
- lbs_deb_enter(LBS_DEB_CS);
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- free_irq(p_dev->irq, card);
-+#else
-+ free_irq(p_dev->irq.AssignedIRQ, card);
-+#endif
- pcmcia_disable_device(p_dev);
- if (card->iobase)
- ioport_unmap(card->iobase);
-@@ -828,7 +840,7 @@ static void if_cs_release(struct pcmcia_
- lbs_deb_leave(LBS_DEB_CS);
- }
-
--
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data)
- {
- p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
-@@ -838,9 +850,39 @@ static int if_cs_ioprobe(struct pcmcia_d
- pr_err("wrong CIS (check number of IO windows)\n");
- return -ENODEV;
- }
-+#else
-+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)
-+{
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
-+ p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
-+ p_dev->resource[0]->start = cfg->io.win[0].base;
-+ p_dev->resource[0]->end = cfg->io.win[0].len;
-+#else
-+ p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
-+ p_dev->io.BasePort1 = cfg->io.win[0].base;
-+ p_dev->io.NumPorts1 = cfg->io.win[0].len;
-+#endif
-+
-+ /* Do we need to allocate an interrupt? */
-+ p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
-+
-+ /* IO window settings */
-+ if (cfg->io.nwin != 1) {
-+ pr_err("wrong CIS (check number of IO windows)\n");
-+ return -ENODEV;
-+ }
-+#endif
-
- /* This reserves IO space but doesn't actually enable it */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- return pcmcia_request_io(p_dev);
-+#else
-+ return pcmcia_request_io(p_dev, &p_dev->io);
-+#endif
- }
-
- static int if_cs_probe(struct pcmcia_device *p_dev)
-@@ -859,7 +901,16 @@ static int if_cs_probe(struct pcmcia_dev
- card->p_dev = p_dev;
- p_dev->priv = card;
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
-+#else
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
-+ p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
-+ p_dev->irq.Handler = NULL;
-+#endif
-+ p_dev->conf.Attributes = 0;
-+ p_dev->conf.IntType = INT_MEMORY_AND_IO;
-+#endif
-
- if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) {
- pr_err("error in pcmcia_loop_config\n");
-@@ -871,12 +922,26 @@ static int if_cs_probe(struct pcmcia_dev
- * a handler to the interrupt, unless the 'Handler' member of
- * the irq structure is initialized.
- */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
- if (!p_dev->irq)
- goto out1;
-+#else
-+ if (p_dev->conf.Attributes & CONF_ENABLE_IRQ) {
-+ ret = pcmcia_request_irq(p_dev, &p_dev->irq);
-+ if (ret) {
-+ pr_err("error in pcmcia_request_irq\n");
-+ goto out1;
-+ }
-+ }
-+#endif
-
- /* Initialize io access */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- card->iobase = ioport_map(p_dev->resource[0]->start,
- resource_size(p_dev->resource[0]));
-+#else
-+ card->iobase = ioport_map(p_dev->io.BasePort1, p_dev->io.NumPorts1);
-+#endif
- if (!card->iobase) {
- pr_err("error in ioport_map\n");
- ret = -EIO;
-@@ -890,7 +955,17 @@ static int if_cs_probe(struct pcmcia_dev
- }
-
- /* Finally, report what we've done */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- lbs_deb_cs("irq %d, io %pR", p_dev->irq, p_dev->resource[0]);
-+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-+ lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n",
-+ p_dev->irq, p_dev->io.BasePort1,
-+ p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
-+#else
-+ lbs_deb_cs("irq %d, io 0x%04x-0x%04x\n",
-+ p_dev->irq.AssignedIRQ, p_dev->io.BasePort1,
-+ p_dev->io.BasePort1 + p_dev->io.NumPorts1 - 1);
-+#endif
-
- /*
- * Most of the libertas cards can do unaligned register access, but some
-@@ -998,7 +1073,13 @@ MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
-
- static struct pcmcia_driver lbs_driver = {
- .owner = THIS_MODULE,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- .name = DRV_NAME,
-+#else
-+ .drv = {
-+ .name = DRV_NAME,
-+ },
-+#endif
- .probe = if_cs_probe,
- .remove = if_cs_detach,
- .id_table = if_cs_ids,