[ltp] GPL driver for Cisco 350 MiniPCI WiFi card

Peter Johanson linux-thinkpad@linux-thinkpad.org
Tue, 29 Jul 2003 08:34:33 -0400


--V0207lvV8h4k8FAm
Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N"
Content-Disposition: inline


--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 29, 2003 at 11:55:38AM +0200, Alexis de Lattre wrote:
>=20
> * Get the file airo_mpi.c-20030719 from Fabrice's "Linux on T40" page
>  http://bellet.info/~bellet/laptop/t40.html#wireless
>  and copy it to /usr/src/linux/drivers/net/wireless/airo_mpi.c

For you development kernel junkies, attached is a patch to the above
driver to make it compile (and seeminly work, i haven't heavily stress
tested it) with 2.6.0-test2. It should in theory work with any recent
development kernels though. enjoy.


-pete

--=20
Peter Johanson
<latexer@gentoo.org>

Key ID =3D 0x6EFA3917
Key fingerprint =3D A90A 2518 57B1 9D20 9B71  A2FF 8649 439B 6EFA 3917

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="airo_mpi.c-20030719-linux-2.6.0-test2.diff"
Content-Transfer-Encoding: quoted-printable

--- src/airo_mpi.c-20030719	2003-07-29 08:20:49.000000000 -0400
+++ /usr/src/linux-beta/drivers/net/wireless/airo_mpi.c	2003-07-29 08:28:36=
=2E000000000 -0400
@@ -32,7 +32,7 @@
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 #include <linux/in.h>
-#include <linux/tqueue.h>
+#include <linux/workqueue.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/bitops.h>
@@ -1109,7 +1109,7 @@
 			int len );
 static int transmit_802_11_packet(struct airo_info*, int len, char *pPacke=
t);
=20
-static void airo_interrupt( int irq, void* dev_id, struct pt_regs
+irqreturn_t airo_interrupt( int irq, void* dev_id, struct pt_regs
 			    *regs);
 static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 #ifdef WIRELESS_EXT
@@ -1176,7 +1176,7 @@
 #ifdef WIRELESS_EXT
 	struct iw_statistics	wstats;		// wireless stats
 	unsigned long		scan_timestamp;	/* Time started to scan */
-	struct tq_struct	event_task;
+	struct work_struct	event_task;
 #ifdef WIRELESS_SPY
 	int			spy_number;
 	u_char			spy_address[IW_MAX_SPY][ETH_ALEN];
@@ -1186,7 +1186,7 @@
 	/* MIC stuff */
 	mic_module		mod[2];
 	mic_statistics		micstats;
-	struct tq_struct 	mic_task;
+	struct work_struct 	mic_task;
 	struct pci_dev          *pci;
 	unsigned char *pcimem;
 	unsigned char *pciaux;
@@ -2366,7 +2366,7 @@
 	struct airo_info *ai =3D dev->priv;
 	struct sk_buff *skb =3D 0;
=20
-	flush_scheduled_tasks();
+	flush_scheduled_work();
=20
 	disable_MAC(ai);
 	disable_interrupts(ai);
@@ -2978,7 +2978,7 @@
 #endif
 }
=20
-static void airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) {
+irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) {
 	struct net_device *dev =3D (struct net_device *)dev_id;
 	u16 status, i;
 	struct airo_info *apriv =3D dev->priv;
@@ -2987,7 +2987,7 @@
 #endif
=20
 	if (!netif_device_present(dev))
-		return;
+		return IRQ_NONE;
=20
 #ifdef DEBUG_LOCK
 	printk("%s: entering lock...\n", __FUNCTION__);
@@ -3156,7 +3156,7 @@
 #endif
=20
 	/* done.. */
-	return;
+	return IRQ_HANDLED;
 }
=20
 /*
@@ -4108,8 +4108,6 @@
 	StatusRid status_rid;
 	int i;
=20
-	MOD_INC_USE_COUNT;
-
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
 	memset(file->private_data, 0, sizeof(struct proc_data));
@@ -4189,8 +4187,6 @@
 	StatsRid stats;
 	int i, j;
 	int *vals =3D stats.vals;
-	MOD_INC_USE_COUNT;
-
=20
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
@@ -4467,8 +4463,6 @@
 	struct airo_info *ai =3D dev->priv;
 	int i;
=20
-	MOD_INC_USE_COUNT;
-
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
 	memset(file->private_data, 0, sizeof(struct proc_data));
@@ -4739,8 +4733,6 @@
 	int j=3D0;
 	int rc;
=20
-	MOD_INC_USE_COUNT;
-
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
 	memset(file->private_data, 0, sizeof(struct proc_data));
@@ -4789,8 +4781,6 @@
 	char *ptr;
 	SsidRid SSID_rid;
=20
-	MOD_INC_USE_COUNT;
-
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
 	memset(file->private_data, 0, sizeof(struct proc_data));
@@ -4835,8 +4825,6 @@
 	char *ptr;
 	APListRid APList_rid;
=20
-	MOD_INC_USE_COUNT;
-
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
 	memset(file->private_data, 0, sizeof(struct proc_data));
@@ -4887,8 +4875,6 @@
 	/* If doLoseSync is not 1, we won't do a Lose Sync */
 	int doLoseSync =3D -1;
=20
-	MOD_INC_USE_COUNT;
-
 	if ((file->private_data =3D kmalloc(sizeof(struct proc_data ), GFP_KERNEL=
)) =3D=3D NULL)
 		return -ENOMEM;
 	memset(file->private_data, 0, sizeof(struct proc_data));
@@ -4948,7 +4934,6 @@
 {
 	struct proc_data *data =3D (struct proc_data *)file->private_data;
 	if ( data->on_close !=3D NULL ) data->on_close( inode, file );
-	MOD_DEC_USE_COUNT;
 	if ( data->rbuffer ) kfree( data->rbuffer );
 	if ( data->wbuffer ) kfree( data->wbuffer );
 	kfree( data );

--fUYQa+Pmc3FrFX/N--

--V0207lvV8h4k8FAm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/JmnZhklDm276ORcRAhIrAJwJIGRe3CPuRjlkjb4gZdAy5eTbIgCgts1F
SwC0Lt6LSkmyfXa5EuCvTwI=
=+hxz
-----END PGP SIGNATURE-----

--V0207lvV8h4k8FAm--