
From: "Luis R. Rodriguez" <mcgrof@studorgs.rutgers.edu>

2004-03-20	Margit Schubert-While <margitsw@t-online.de>

- isl_38xx.[ch], isl_ioctl.c, islpci_dev.[ch], islpci_eth.c
  islpci_hotplug.c, islpci_mgt.[ch], oid_mgt.c: Adopt new prism54 kernel
  compatibility.

- prismcompat.h, prismcompat24.h: New compatibility work

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/net/wireless/prism54/isl_38xx.c       |   12 ---
 25-akpm/drivers/net/wireless/prism54/isl_38xx.h       |   10 --
 25-akpm/drivers/net/wireless/prism54/isl_ioctl.c      |    4 -
 25-akpm/drivers/net/wireless/prism54/islpci_dev.c     |   33 +--------
 25-akpm/drivers/net/wireless/prism54/islpci_dev.h     |   22 ------
 25-akpm/drivers/net/wireless/prism54/islpci_eth.c     |   35 +++++----
 25-akpm/drivers/net/wireless/prism54/islpci_hotplug.c |    3 
 25-akpm/drivers/net/wireless/prism54/islpci_mgt.c     |   23 +-----
 25-akpm/drivers/net/wireless/prism54/islpci_mgt.h     |   11 ---
 25-akpm/drivers/net/wireless/prism54/oid_mgt.c        |    1 
 25-akpm/drivers/net/wireless/prism54/prismcompat.h    |   47 +++++++++++++
 25-akpm/drivers/net/wireless/prism54/prismcompat24.h  |   64 ++++++++++++++++++
 12 files changed, 149 insertions(+), 116 deletions(-)

diff -puN drivers/net/wireless/prism54/isl_38xx.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/isl_38xx.c
--- 25/drivers/net/wireless/prism54/isl_38xx.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/isl_38xx.c	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/isl_38xx.c,v 1.22 2004/02/28 03:06:07 mcgrof Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/isl_38xx.c,v 1.26 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2003-2004 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>_
@@ -25,17 +25,11 @@
 #include <linux/types.h>
 #include <linux/delay.h>
 
-#include "isl_38xx.h"
-#include <linux/firmware.h>
-
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-#include <linux/config.h>
-#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
-#error No Firmware Loading configured in the kernel !
-#endif
-
+#include "prismcompat.h"
+#include "isl_38xx.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"
 
diff -puN drivers/net/wireless/prism54/isl_38xx.h~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/isl_38xx.h
--- 25/drivers/net/wireless/prism54/isl_38xx.h~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/isl_38xx.h	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/isl_38xx.h,v 1.22 2004/02/28 03:06:07 mcgrof Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/isl_38xx.h,v 1.25 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *
@@ -22,14 +22,6 @@
 
 #include <linux/version.h>
 #include <asm/io.h>
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75))
-#include <linux/device.h>
-# define _REQ_FW_DEV_T struct device *
-#else
-# define _REQ_FW_DEV_T char *
-#endif
-
 #include <asm/byteorder.h>
 
 #define ISL38XX_CB_RX_QSIZE                     8
diff -puN drivers/net/wireless/prism54/isl_ioctl.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/isl_ioctl.c
--- 25/drivers/net/wireless/prism54/isl_ioctl.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/isl_ioctl.c	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/isl_ioctl.c,v 1.148 2004/03/19 23:03:58 ajfa Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/isl_ioctl.c,v 1.149 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *            (C) 2003,2004 Aurelien Alleaume <slts@free.fr>
@@ -25,10 +25,10 @@
 #include <linux/kernel.h>
 #include <linux/if_arp.h>
 #include <linux/pci.h>
-#include <linux/moduleparam.h>
 
 #include <asm/uaccess.h>
 
+#include "prismcompat.h"
 #include "isl_ioctl.h"
 #include "islpci_mgt.h"
 #include "isl_oid.h"		/* additional types and defs for isl38xx fw */
diff -puN drivers/net/wireless/prism54/islpci_dev.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/islpci_dev.c
--- 25/drivers/net/wireless/prism54/islpci_dev.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_dev.c	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.c,v 1.72 2004/03/19 20:54:33 ajfa Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.c,v 1.73 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
@@ -30,6 +30,7 @@
 
 #include <asm/io.h>
 
+#include "prismcompat.h"
 #include "isl_38xx.h"
 #include "isl_ioctl.h"
 #include "islpci_dev.h"
@@ -37,12 +38,6 @@
 #include "islpci_eth.h"
 #include "oid_mgt.h"
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-#define prism54_synchronize_irq(irq) synchronize_irq()
-#else
-#define prism54_synchronize_irq(irq) synchronize_irq(irq)
-#endif
-
 #define ISL3877_IMAGE_FILE	"isl3877"
 #define ISL3890_IMAGE_FILE	"isl3890"
 
@@ -325,11 +320,7 @@ islpci_upload_fw(islpci_private *priv)
 	printk(KERN_DEBUG "%s: uploading firmware...\n", priv->ndev->name);
 
 	rc = isl38xx_upload_firmware(priv->firmware,
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,75))
-		&priv->pdev->dev,
-#else
-		pci_name(priv->pdev),
-#endif
+		PRISM_FW_PDEV,
 		priv->device_base,
 		priv->device_host_address);
 	if (rc) {
@@ -357,15 +348,7 @@ islpci_reset_if(islpci_private *priv)
 	int result = -ETIME;
 	int count;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	/* This is 2.6 specific, nicer, shorter, but not in 2.4 yet */
-	DEFINE_WAIT(wait);
-	prepare_to_wait(&priv->reset_done, &wait, TASK_UNINTERRUPTIBLE);
-#else
-	DECLARE_WAITQUEUE(wait, current);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	add_wait_queue(&priv->reset_done, &wait);
-#endif
+	PRISM_DEFWAITQ(priv->reset_done, wait);
 	
 	/* now the last step is to reset the interface */
 	isl38xx_interface_reset(priv->device_base, priv->device_host_address);
@@ -390,13 +373,7 @@ islpci_reset_if(islpci_private *priv)
 
 	}
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	/* 2.6 specific too */
-	finish_wait(&priv->reset_done, &wait);
-#else
-	remove_wait_queue(&priv->reset_done, &wait);
-	set_current_state(TASK_RUNNING);
-#endif
+	PRISM_ENDWAITQ(priv->reset_done, wait);
 
 	if(result)
 		return result;
diff -puN drivers/net/wireless/prism54/islpci_dev.h~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/islpci_dev.h
--- 25/drivers/net/wireless/prism54/islpci_dev.h~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_dev.h	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.h,v 1.58 2004/03/19 20:54:33 ajfa Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_dev.h,v 1.59 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc. 
  *  Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
@@ -29,20 +29,6 @@
 #include <net/iw_handler.h>
 #include <linux/list.h>
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
-# include <linux/workqueue.h>
-#else
-# include <linux/tqueue.h>
-# define work_struct tq_struct
-# define INIT_WORK INIT_TQUEUE
-# define schedule_work schedule_task
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
-#define free_netdev(x) kfree(x) 
-#define pci_name(x) x->slot_name 
-#endif
-
 #include "isl_38xx.h"
 #include "isl_oid.h"
 #include "islpci_mgt.h"
@@ -210,12 +196,6 @@ islpci_state_t islpci_set_state(islpci_p
 
 #define ISLPCI_TX_TIMEOUT               (2*HZ)
 
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,75))
-# define irqreturn_t void
-# define IRQ_HANDLED
-# define IRQ_NONE
-#endif
-
 irqreturn_t islpci_interrupt(int, void *, struct pt_regs *);
 
 int prism54_post_setup(islpci_private *, int);
diff -puN drivers/net/wireless/prism54/islpci_eth.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/islpci_eth.c
--- 25/drivers/net/wireless/prism54/islpci_eth.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_eth.c	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_eth.c,v 1.33 2004/03/19 23:03:58 ajfa Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_eth.c,v 1.35 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
@@ -26,6 +26,7 @@
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 
+#include "prismcompat.h"
 #include "isl_38xx.h"
 #include "islpci_eth.h"
 #include "islpci_mgt.h"
@@ -261,9 +262,9 @@ islpci_monitor_rx(islpci_private *priv, 
 	if (priv->ndev->type == ARPHRD_IEEE80211_PRISM) {
 		struct avs_80211_1_header *avs;
 		/* extract the relevant data from the header */
-		u32 clock = hdr->clock;
+		u32 clock = le32_to_cpu(hdr->clock);
 		u8 rate = hdr->rate;
-		u16 freq = be16_to_cpu(hdr->freq);
+		u16 freq = le16_to_cpu(hdr->freq);
 		u8 rssi = hdr->rssi;
 
 		skb_pull(*skb, sizeof (struct rfmon_header));
@@ -287,20 +288,20 @@ islpci_monitor_rx(islpci_private *priv, 
 							   sizeof (struct
 								   avs_80211_1_header));
 
-		avs->version = htonl(P80211CAPTURE_VERSION);
-		avs->length = htonl(sizeof (struct avs_80211_1_header));
-		avs->mactime = __cpu_to_be64(clock);
-		avs->hosttime = __cpu_to_be64(jiffies);
-		avs->phytype = htonl(6);	/*OFDM: 6 for (g), 8 for (a) */
-		avs->channel = htonl(channel_of_freq(freq));
-		avs->datarate = htonl(rate * 5);
-		avs->antenna = htonl(0);	/*unknown */
-		avs->priority = htonl(0);	/*unknown */
-		avs->ssi_type = htonl(2);	/*2: dBm, 3: raw RSSI */
-		avs->ssi_signal = htonl(rssi);
-		avs->ssi_noise = htonl(priv->local_iwstatistics.qual.noise);	/*better than 'undefined', I assume */
-		avs->preamble = htonl(0);	/*unknown */
-		avs->encoding = htonl(0);	/*unknown */
+		avs->version = cpu_to_be32(P80211CAPTURE_VERSION);
+		avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header));
+		avs->mactime = cpu_to_be64(le64_to_cpu(clock));
+		avs->hosttime = cpu_to_be64(jiffies);
+		avs->phytype = cpu_to_be32(6);	/*OFDM: 6 for (g), 8 for (a) */
+		avs->channel = cpu_to_be32(channel_of_freq(freq));
+		avs->datarate = cpu_to_be32(rate * 5);
+		avs->antenna = cpu_to_be32(0);	/*unknown */
+		avs->priority = cpu_to_be32(0);	/*unknown */
+		avs->ssi_type = cpu_to_be32(3);	/*2: dBm, 3: raw RSSI */
+		avs->ssi_signal = cpu_to_be32(rssi & 0x7f);
+		avs->ssi_noise = cpu_to_be32(priv->local_iwstatistics.qual.noise);	/*better than 'undefined', I assume */
+		avs->preamble = cpu_to_be32(0);	/*unknown */
+		avs->encoding = cpu_to_be32(0);	/*unknown */
 	} else
 		skb_pull(*skb, sizeof (struct rfmon_header));
 
diff -puN drivers/net/wireless/prism54/islpci_hotplug.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/islpci_hotplug.c
--- 25/drivers/net/wireless/prism54/islpci_hotplug.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_hotplug.c	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_hotplug.c,v 1.56 2004/02/26 23:33:02 mcgrof Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_hotplug.c,v 1.59 2004/03/20 16:58:36 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2003 Herbert Valerio Riedel <hvr@gnu.org>
@@ -24,6 +24,7 @@
 #include <linux/delay.h>
 #include <linux/init.h> /* For __init, __exit */
 
+#include "prismcompat.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"		/* for pc_debug */
 #include "isl_oid.h"
diff -puN drivers/net/wireless/prism54/islpci_mgt.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/islpci_mgt.c
--- 25/drivers/net/wireless/prism54/islpci_mgt.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_mgt.c	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.c,v 1.40 2004/02/01 10:57:23 mcgrof Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.c,v 1.43 2004/03/20 16:58:37 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright 2004 Jens Maurer <Jens.Maurer@gmx.net>
@@ -22,12 +22,12 @@
 #include <linux/netdevice.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/moduleparam.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
 #include <linux/if_arp.h>
 
+#include "prismcompat.h"
 #include "isl_38xx.h"
 #include "islpci_mgt.h"
 #include "isl_oid.h"		/* additional types and defs for isl38xx fw */
@@ -456,21 +456,11 @@ islpci_mgt_transaction(struct net_device
 	const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000;
 	long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies;
 	int err;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	DEFINE_WAIT(wait);
-#else
-	DECLARE_WAITQUEUE(wait, current);
-#endif
 
 	if (down_interruptible(&priv->mgmt_sem))
 		return -ERESTARTSYS;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	prepare_to_wait(&priv->mgmt_wqueue, &wait, TASK_UNINTERRUPTIBLE);
-#else
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	add_wait_queue(&priv->mgmt_wqueue, &wait);
-#endif
+	PRISM_DEFWAITQ(priv->mgmt_wqueue, wait);
 	err = islpci_mgt_transmit(ndev, operation, oid, senddata, sendlen);
 	if(err)
 		goto out;
@@ -499,12 +489,7 @@ islpci_mgt_transaction(struct net_device
 
 	/* TODO: we should reset the device here */     
  out:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-	finish_wait(&priv->mgmt_wqueue, &wait);
-#else
-	remove_wait_queue(&priv->mgmt_wqueue, &wait);
-	set_current_state(TASK_RUNNING);
-#endif
+	PRISM_ENDWAITQ(priv->mgmt_wqueue, wait);
 	up(&priv->mgmt_sem);
 	return err;
 }
diff -puN drivers/net/wireless/prism54/islpci_mgt.h~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/islpci_mgt.h
--- 25/drivers/net/wireless/prism54/islpci_mgt.h~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/islpci_mgt.h	Wed May 26 16:16:59 2004
@@ -1,4 +1,4 @@
-/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.h,v 1.22 2004/01/30 16:24:00 ajfa Exp $
+/*  $Header: /var/lib/cvs/prism54-ng/ksrc/islpci_mgt.h,v 1.25 2004/03/20 16:58:37 mcgrof Exp $
  *  
  *  Copyright (C) 2002 Intersil Americas Inc.
  *  Copyright (C) 2003 Luis R. Rodriguez <mcgrof@ruslug.rutgers.edu>
@@ -24,15 +24,6 @@
 #include <linux/wireless.h>
 #include <linux/skbuff.h>
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,41)
-# include <linux/workqueue.h>
-#else
-# include <linux/tqueue.h>
-# define work_struct tq_struct
-# define INIT_WORK INIT_TQUEUE
-# define schedule_work schedule_task
-#endif
-
 /*
  *  Function definitions
  */
diff -puN drivers/net/wireless/prism54/oid_mgt.c~prism54-new-prism54-kernel-compatibility drivers/net/wireless/prism54/oid_mgt.c
--- 25/drivers/net/wireless/prism54/oid_mgt.c~prism54-new-prism54-kernel-compatibility	Wed May 26 16:16:59 2004
+++ 25-akpm/drivers/net/wireless/prism54/oid_mgt.c	Wed May 26 16:16:59 2004
@@ -16,6 +16,7 @@
  *
  */
 
+#include "prismcompat.h"
 #include "islpci_dev.h"
 #include "islpci_mgt.h"
 #include "isl_oid.h"
diff -puN /dev/null drivers/net/wireless/prism54/prismcompat24.h
--- /dev/null	Thu Apr 11 07:25:15 2002
+++ 25-akpm/drivers/net/wireless/prism54/prismcompat24.h	Wed May 26 16:16:59 2004
@@ -0,0 +1,64 @@
+/*
+ *  (C) 2004 Margit Schubert-While <margitsw@t-online.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*
+ *	Compatibility header file to aid support of different kernel versions
+ */
+
+#ifndef _PRISM_COMPAT_H
+#define _PRISM_COMPAT_H
+
+#include <linux/firmware.h>
+#include <linux/config.h>
+#include <linux/tqueue.h>
+
+#define work_struct		tq_struct
+#define INIT_WORK		INIT_TQUEUE
+#define schedule_work		schedule_task
+
+#define irqreturn_t		void
+#define IRQ_HANDLED
+#define IRQ_NONE
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)
+#define free_netdev(x)		kfree(x)
+#define pci_name(x)		x->slot_name
+#endif
+
+#define module_param(x, y, z)	MODULE_PARM(x, "i")
+
+#define netdev_priv(x)		x->priv
+
+#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
+#error Firmware Loading is not configured in the kernel !
+#endif
+
+#define prism54_synchronize_irq(irq) synchronize_irq()
+
+#define PRISM_DEFWAITQ(x, y)	DECLARE_WAITQUEUE(y, current); \
+	set_current_state(TASK_UNINTERRUPTIBLE); \
+	add_wait_queue(&(x), &(y))
+
+#define PRISM_ENDWAITQ(x, y)	remove_wait_queue(&(x), &(y)); \
+	set_current_state(TASK_RUNNING)
+
+#define _REQ_FW_DEV_T		char *
+
+#define PRISM_FW_PDEV		pci_name(priv->pdev)
+
+#endif				/* _PRISM_COMPAT_H */
diff -puN /dev/null drivers/net/wireless/prism54/prismcompat.h
--- /dev/null	Thu Apr 11 07:25:15 2002
+++ 25-akpm/drivers/net/wireless/prism54/prismcompat.h	Wed May 26 16:16:59 2004
@@ -0,0 +1,47 @@
+/*
+ *  (C) 2004 Margit Schubert-While <margitsw@t-online.de>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*
+ *	Compatibility header file to aid support of different kernel versions
+ */
+
+#ifndef _PRISM_COMPAT_H
+#define _PRISM_COMPAT_H
+
+#include <linux/device.h>
+#include <linux/firmware.h>
+#include <linux/config.h>
+#include <linux/moduleparam.h>
+#include <linux/workqueue.h>
+
+#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
+#error Firmware Loading is not configured in the kernel !
+#endif
+
+#define prism54_synchronize_irq(irq) synchronize_irq(irq)
+
+#define PRISM_DEFWAITQ(x, y)	DEFINE_WAIT(y); \
+	prepare_to_wait(&(x), &(y), TASK_UNINTERRUPTIBLE)
+
+#define PRISM_ENDWAITQ(x, y)	finish_wait(&(x), &(y))
+
+#define _REQ_FW_DEV_T		struct device *
+
+#define PRISM_FW_PDEV		&priv->pdev->dev
+
+#endif				/* _PRISM_COMPAT_H */
_
