Tormod Volden
2009-01-08 23:34:58 UTC
This is untested, but at least it compiles.
* pcmcia_get_configuration_info() was removed
(http://www.mail-archive.com/linux-***@lists.infradead.org/msg01909.html)
* dropped an unused argument from pcmcia_parse_tuple()
(http://www.mail-archive.com/linux-***@lists.infradead.org/msg01915.html)
* CS_SUCCESS was removed
(http://www.mail-archive.com/linux-***@lists.infradead.org/msg01890.html)
---
src/prism2/driver/prism2_cs.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/prism2/driver/prism2_cs.c b/src/prism2/driver/prism2_cs.c
index 2ba1176..aa05cca 100644
--- a/src/prism2/driver/prism2_cs.c
+++ b/src/prism2/driver/prism2_cs.c
@@ -4,6 +4,10 @@
#include "prism2mib.c"
#include "prism2sta.c"
+#if !defined(CS_SUCCESS)
+#define CS_SUCCESS 0x00
+#endif
+
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,21) )
#if (WLAN_CPU_FAMILY == WLAN_Ix86)
#ifndef CONFIG_ISA
@@ -357,7 +361,11 @@ static int prism2_cs_probe(struct pcmcia_device *pdev)
tuple.TupleOffset = 0;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(pdev, &tuple));
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(pdev, &tuple));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(pdev, &tuple, parse));
+#else
+ CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, parse));
+#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
pdev->conf.ConfigBase = parse->config.base;
pdev->conf.Present = parse->config.rmask[0];
@@ -367,8 +375,10 @@ static int prism2_cs_probe(struct pcmcia_device *pdev)
link->conf.Vcc = socketconf.Vcc;
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CS_CHECK(GetConfigurationInfo,
pcmcia_get_configuration_info(pdev, &socketconf));
+#endif
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(pdev, &tuple));
@@ -377,7 +387,11 @@ static int prism2_cs_probe(struct pcmcia_device *pdev)
CFG_CHECK(GetTupleData,
pcmcia_get_tuple_data(pdev, &tuple));
CFG_CHECK(ParseTuple,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
pcmcia_parse_tuple(pdev, &tuple, parse));
+#else
+ pcmcia_parse_tuple(&tuple, parse));
+#endif
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
dflt = *cfg;
@@ -908,7 +922,11 @@ void prism2sta_config(dev_link_t *link)
tuple.TupleOffset = 0;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
+#else
+ CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse));
+#endif
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
@@ -926,7 +944,11 @@ void prism2sta_config(dev_link_t *link)
while (1) {
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
CFG_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CFG_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
+#else
+ CFG_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse));
+#endif
if (cfg->index == 0) goto next_entry;
link->conf.ConfigIndex = cfg->index;
* pcmcia_get_configuration_info() was removed
(http://www.mail-archive.com/linux-***@lists.infradead.org/msg01909.html)
* dropped an unused argument from pcmcia_parse_tuple()
(http://www.mail-archive.com/linux-***@lists.infradead.org/msg01915.html)
* CS_SUCCESS was removed
(http://www.mail-archive.com/linux-***@lists.infradead.org/msg01890.html)
---
src/prism2/driver/prism2_cs.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/prism2/driver/prism2_cs.c b/src/prism2/driver/prism2_cs.c
index 2ba1176..aa05cca 100644
--- a/src/prism2/driver/prism2_cs.c
+++ b/src/prism2/driver/prism2_cs.c
@@ -4,6 +4,10 @@
#include "prism2mib.c"
#include "prism2sta.c"
+#if !defined(CS_SUCCESS)
+#define CS_SUCCESS 0x00
+#endif
+
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,21) )
#if (WLAN_CPU_FAMILY == WLAN_Ix86)
#ifndef CONFIG_ISA
@@ -357,7 +361,11 @@ static int prism2_cs_probe(struct pcmcia_device *pdev)
tuple.TupleOffset = 0;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(pdev, &tuple));
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(pdev, &tuple));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(pdev, &tuple, parse));
+#else
+ CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, parse));
+#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
pdev->conf.ConfigBase = parse->config.base;
pdev->conf.Present = parse->config.rmask[0];
@@ -367,8 +375,10 @@ static int prism2_cs_probe(struct pcmcia_device *pdev)
link->conf.Vcc = socketconf.Vcc;
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CS_CHECK(GetConfigurationInfo,
pcmcia_get_configuration_info(pdev, &socketconf));
+#endif
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(pdev, &tuple));
@@ -377,7 +387,11 @@ static int prism2_cs_probe(struct pcmcia_device *pdev)
CFG_CHECK(GetTupleData,
pcmcia_get_tuple_data(pdev, &tuple));
CFG_CHECK(ParseTuple,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
pcmcia_parse_tuple(pdev, &tuple, parse));
+#else
+ pcmcia_parse_tuple(&tuple, parse));
+#endif
if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
dflt = *cfg;
@@ -908,7 +922,11 @@ void prism2sta_config(dev_link_t *link)
tuple.TupleOffset = 0;
CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
+#else
+ CS_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse));
+#endif
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
@@ -926,7 +944,11 @@ void prism2sta_config(dev_link_t *link)
while (1) {
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
CFG_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
CFG_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
+#else
+ CFG_CHECK(ParseTuple, pcmcia_parse_tuple(&tuple, &parse));
+#endif
if (cfg->index == 0) goto next_entry;
link->conf.ConfigIndex = cfg->index;
--
1.5.6.3
1.5.6.3