: update to wavelan_cs.c driver
Subsystems (2)
PATCH 1/1 : update to wavelan_cs.c driver
Hi Linus,
I would like to update the version of the wavelan_cs.c driver
in kernel 2.5.X to the latest release. The main reason is that the driver included in the kernel work neither on my laptop nor on my SMP desktop. Moreover, the driver was not updated to the new network API.
For some strange reasons, all my previous patches of the
driver have been dropped. The patch attached bring the wavelan_cs driver in sync with the version in the Pcmcia package (so it's easier for me to keep them in sync). The patch was done for kernel 2.5.2 but applies also to 2.4.18-pre3.
This new version has survived my usual torture tests (SMP and
non-SMP), so could you please apply this patch ?
The Changelog is as follows :
----------------------------------------------
- reworked wv_82593_cmd to avoid using the IRQ handler and doing ugly things with interrupts.
- Add IRQ protection in 82593_config/ru_start/ru_stop/watchdog
- Update to new network API (softnet - 2.3.43) :
o replace dev->tbusy (David + me)
o replace dev->tstart (David + me)
o remove dev->interrupt (David)
o add SMP locking via spinlock in splxx (me)
o add spinlock in interrupt handler (me)
o use kernel watchdog instead of ours (me)
o verify that all the changes make sense and work (me)
- Re-sync kernel/pcmcia versions (not much actually)
o Fix kmalloc in wavelan_attach differently
- A few other cleanups (David & me)...
- Check that SMP works, remove annoying log message
- Fix unfrequent card lockup when watchdog was reseting the hardware :
o control first busy loop in wv_82593_cmd()
o Extend spinlock protection in wv_hw_config()
----------------------------------------------
On a related topic : I need to move 3 drivers that I maintain
(wavelan.c, wavelan_cs.c and netwave.c) into the directory drivers/net/wireless.
Do you prefer a *huge* patch, or do you prefer (a small shell
script + a small patch) ?
Regards,
Jean
--------------------------------------------------------------------------
drivers/net/pcmcia/wavelan.h renamed from drivers/net/pcmcia-buggy/wavelan.h +3 -0
@@ -88,6 +88,7 @@ const short channel_bands[] = { 0x30, 0x*/ const int fixed_bands[] = {915e6 ,2.425e8 ,2.46e8 ,2.484e8 ,2.4305e8 }; +/*************************** PC INTERFACE ****************************/ /* WaveLAN host interface definitions */
@@ -316,6 +317,7 @@ struct mmw_t/* Calculate offset of a field in the above structure */ #define mmwoff (p,f) (unsigned short)((void *)(&((mmw_t *)((void *)0 + (p)))->f) - (void *)0) +/* * Modem Management Controller (MMC) read structure. */
@@ -372,6 +374,7 @@ struct mmr_t/* Calculate offset of a field in the above structure */ #define mmroff (p,f) (unsigned short)((void *)(&((mmr_t *)((void *)0 + (p)))->f) - (void *)0) +/* Make the two above structures one */ typedef union mm_t
drivers/net/pcmcia/wavelan_cs.c renamed from drivers/net/pcmcia-buggy/wavelan_cs.c +369 -373
1,362 lines not on this page · raw message
drivers/net/pcmcia/wavelan_cs.h renamed from drivers/net/pcmcia-buggy/wavelan_cs.h +71 -24
201 lines not on this page · raw message
[SCRIPT+PATCH] : wavelan driver move for 2.5.3-pre2
Quoted 9 lines · Linus Torvalds
Quoted 6 lines · Jean Tourrilhes
On a related topic : I need to move 3 drivers that I maintain
(wavelan.c,wavelan_cs.candnetwave.c) into the directorydrivers/net/wireless.
Do you prefer a *huge* patch, or do you prefer (a small shell
script + a small patch) ?
Quoted 3 lines
I'd prefer just the script + small patch, thanks.
Linus
Hi, This shell script and small patch move the 3 driver mentionned
above into the drivers/net/wireless directory (where they will logically be with their other friends). It is supposed to operate like this :
1) First, run the shell script from /usr/src/linux
2) Second, apply the patch
One of the "trick" of the operation is that two headers have
to be renamed because of conflicts between the Wavelan ISA and Pcmcia drivers. Tested on 2.5.3-pre2.
Would you mind adding that in your kernel ? Thanks... Jean
P.S. : One more driver to move and I will be able to get rid of CONFIG_NET_PCMCIA_RADIO from various places...
P.S.2 : Jeff : the trigraph patch will be next.
-----------------------------------------------------------------
#!/bin/sh
# Go in the proper directory. Modify as needed
#cd /usr/src/linux/
# Wavelan ISA driver
mv drivers/net/i82586.h drivers/net/wireless/ mv drivers/net/wavelan.h drivers/net/wireless/ mv drivers/net/wavelan.p.h drivers/net/wireless/ mv drivers/net/wavelan.c drivers/net/wireless/
# Wavelan Pcmcia driver
# Warning : Rename headers because of conflict with ISA driver
# We use the same conventions as the ISA driver, xxx.p.h is the private header
mv drivers/net/pcmcia/i82593.h drivers/net/wireless/ mv drivers/net/pcmcia/wavelan.h drivers/net/wireless/wavelan_cs.h mv drivers/net/pcmcia/wavelan_cs.h drivers/net/wireless/wavelan_cs.p.h mv drivers/net/pcmcia/wavelan_cs.c drivers/net/wireless/
# Netwave Pcmcia driver
mv drivers/net/pcmcia/netwave_cs.c drivers/net/wireless/
-----------------------------------------------------------------
drivers/net/Config.in renamed from drivers/net-moved/Config.in +0 -1
@@ -292,7 +292,6 @@ comment 'Wireless LAN (non-hamradio)' bool 'Wireless LAN (non-hamradio)' CONFIG_NET_RADIO if [ "$CONFIG_NET_RADIO" = "y" ]; then dep_tristate ' STRIP (Metricom starmode radio IP)' CONFIG_STRIP $CONFIG_INET - tristate ' AT&T WaveLAN & DEC RoamAbout DS support' CONFIG_WAVELAN tristate ' Aironet Arlan 655 & IC2200 DS support' CONFIG_ARLAN tristate ' Aironet 4500/4800 series adapters' CONFIG_AIRONET4500 dep_tristate ' Aironet 4500/4800 ISA/PCI/PNP/365 support ' CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
drivers/net/Makefile renamed from drivers/net-moved/Makefile +0 -1
@@ -166,7 +166,6 @@ obj-$(CONFIG_EEXPRESS) += eexpress.o obj-$(CONFIG_EEXPRESS_PRO) += eepro.o obj-$(CONFIG_8139CP) += 8139cp.o obj-$(CONFIG_8139TOO) += 8139too.o -obj-$(CONFIG_WAVELAN) += wavelan.o obj-$(CONFIG_ARLAN) += arlan.o arlan-proc.o obj-$(CONFIG_ZNET) += znet.o obj-$(CONFIG_LAN_SAA9730) += saa9730.o
drivers/net/pcmcia/Config.in renamed from drivers/net-moved/pcmcia/Config.in +0 -2
@@ -28,8 +28,6 @@ if [ "$CONFIG_NET_PCMCIA" = "y" ]; then bool ' Pcmcia Wireless LAN' CONFIG_NET_PCMCIA_RADIO if [ "$CONFIG_NET_PCMCIA_RADIO" = "y" ]; then dep_tristate ' Aviator/Raytheon 2.4MHz wireless support' CONFIG_PCMCIA_RAYCS $CONFIG_PCMCIA - dep_tristate ' Xircom Netwave AirSurfer wireless support' CONFIG_PCMCIA_NETWAVE $CONFIG_PCMCIA - dep_tristate ' AT&T/Lucent Wavelan wireless support' CONFIG_PCMCIA_WAVELAN $CONFIG_PCMCIA dep_tristate ' Aironet 4500/4800 PCMCIA support' CONFIG_AIRONET4500_CS $CONFIG_AIRONET4500 $CONFIG_PCMCIA fi fi
drivers/net/pcmcia/Makefile renamed from drivers/net-moved/pcmcia/Makefile +0 -2
@@ -27,8 +27,6 @@ obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o # 16-bit wireless client drivers obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o -obj-$(CONFIG_PCMCIA_NETWAVE) += netwave_cs.o -obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan_cs.o obj-$(CONFIG_AIRONET4500_CS) += aironet4500_cs.o # Cardbus client drivers
drivers/net/wireless/Config.in renamed from drivers/net-moved/wireless/Config.in +12 -1
@@ -2,6 +2,12 @@ # Wireless LAN device configuration # +comment 'Wireless ISA/PCI cards support' + +# Good old obsolete Wavelan. +tristate ' AT&T/Lucent old WaveLAN & DEC RoamAbout DS ISA support' CONFIG_WAVELAN + +# 802.11b cards if [ "$CONFIG_ISA" = "y" -o "$CONFIG_PCI" = "y" ]; then tristate ' Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards' CONFIG_AIRO fi
@@ -18,8 +24,13 @@ fi # If Pcmcia is compiled in, offer Pcmcia cards... if [ "$CONFIG_PCMCIA" != "n" ]; then - comment 'Wireless Pcmcia cards support' + comment 'Wireless Pcmcia/Cardbus cards support' + +# Obsolete cards + dep_tristate ' Xircom Netwave AirSurfer Pcmcia wireless support' CONFIG_PCMCIA_NETWAVE $CONFIG_PCMCIA + dep_tristate ' AT&T/Lucent old Wavelan Pcmcia wireless support' CONFIG_PCMCIA_WAVELAN $CONFIG_PCMCIA +# 802.11b cards dep_tristate ' Hermes PCMCIA card support' CONFIG_PCMCIA_HERMES $CONFIG_HERMES tristate ' Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards' CONFIG_AIRO_CS fi
drivers/net/wireless/Makefile renamed from drivers/net-moved/wireless/Makefile +5 -0
@@ -14,6 +14,11 @@ obj- := # Things that need to export symbols export-objs := airo.o orinoco.o hermes.o +# Obsolete cards +obj-$(CONFIG_WAVELAN) += wavelan.o +obj-$(CONFIG_PCMCIA_NETWAVE) += netwave_cs.o +obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan_cs.o + obj-$(CONFIG_HERMES) += orinoco.o hermes.o obj-$(CONFIG_PCMCIA_HERMES) += orinoco_cs.o obj-$(CONFIG_APPLE_AIRPORT) += airport.o
drivers/net/wireless/netwave_cs.c renamed from drivers/net-moved/wireless/netwave_cs.c +1 -1
@@ -61,7 +61,7 @@#include <linux/etherdevice.h> #include <linux/skbuff.h> -#ifdef CONFIG_NET_PCMCIA_RADIO +#ifdef CONFIG_NET_RADIO #include <linux/wireless.h> #endif
drivers/net/wireless/todo.txt renamed from drivers/net-moved/wireless/todo.txt +8 -3
@@ -4,21 +4,26 @@ 1) Bring other kernel Wireless LAN drivers here Already done : o hermes.c/orinoco.c -> Wavelan IEEE driver + Airport driver - Drivers I have control over : + o airo.c/airo_cs.c -> Ben's Aironet driver o wavelan.c -> old Wavelan ISA driver - o wavelan_cs.c -> old Wavelan Pcmcia driver (warning : header) + o wavelan_cs.c -> old Wavelan Pcmcia driver o netwave_cs.c -> Netwave Pcmcia driver Drivers likely to go : o ray_cs.c -> Raytheon/Aviator driver (maintainer MIA) Drivers I have absolutely no control over : o arlan.c -> old Aironet Arlan 655 (need to ask Elmer) o aironet4500_xxx.c -> Elmer's Aironet driver (need to ask Elmer) - o airo.c/airo_cs.c -> Ben's Aironet driver (not yet in kernel) o strip.c -> Metricom's stuff. Not a wlan. Hum... ETA : Kernel 2.5.X 2) Bring new Wireless LAN driver not yet in the kernel there See my web page for details + +3) Misc + o Mark wavelan, wavelan_cs, netwave_cs drivers as obsolete + o Maybe arlan.c, ray_cs.c and strip.c also deserve to be obsolete + o Use new Probe/module stuff in wavelan.c + o New Wireless Extension API (pending) Jean II
drivers/net/wireless/wavelan_cs.c renamed from drivers/net-moved/wireless/wavelan_cs.c +2 -2
@@ -4,7 +4,7 @@* Jean II - HPLB '96 * * Reorganisation and extension of the driver. -* Original copyright follow. See wavelan_cs.h for details. +* Original copyright follow. See wavelan_cs.p.h for details. * * This code is derived from Anthony D. Joseph's code and all the changes here * are also under the original copyright below.
@@ -56,7 +56,7 @@* */ -#include "wavelan_cs.h" /* Private header */ +#include "wavelan_cs.p.h" /* Private header */ /************************* MISC SUBROUTINES **************************/ /*
drivers/net/wireless/wavelan_cs.h renamed from drivers/net-moved/wireless/wavelan_cs.h +3 -3
@@ -52,8 +52,8 @@* Robert Morris' BSDI driver for the PCMCIA WaveLAN adapter */ -#ifndef _WAVELAN_H -#define _WAVELAN_H +#ifndef _WAVELAN_CS_H +#define _WAVELAN_CS_H/************************** MAGIC NUMBERS ***************************/
@@ -383,4 +383,4 @@ typedef union mm_t struct mmr_t r; /* Read from the mmc */ } mm_t; -#endif /* _WAVELAN_H */ +#endif /* _WAVELAN_CS_H */
drivers/net/wireless/wavelan_cs.p.h renamed from drivers/net-moved/wireless/wavelan_cs.p.h +9 -9
@@ -10,8 +10,8 @@* be included only on wavelan_cs.c !!! */ -#ifndef WAVELAN_CS_H -#define WAVELAN_CS_H +#ifndef WAVELAN_CS_P_H +#define WAVELAN_CS_P_H /************************** DOCUMENTATION **************************/ /*
@@ -76,7 +76,7 @@* The detection code of the wavelan chech that the first 3 * octets of the MAC address fit the company code. This type of * detection work well for AT&T cards (because the AT&T code is -* hardcoded in wavelan.h), but of course will fail for other +* hardcoded in wavelan_cs.h), but of course will fail for other * manufacturer. * * If you are sure that your card is derived from the wavelan,
@@ -86,7 +86,7 @@* b) With the driver : * o compile the kernel with DEBUG_CONFIG_INFO enabled * o Boot and look the card messages -* 2) Set your MAC code (3 octets) in MAC_ADDRESSES[][3] (wavelan.h) +* 2) Set your MAC code (3 octets) in MAC_ADDRESSES[][3] (wavelan_cs.h) * 3) Compile & verify * 4) Send me the MAC code - I will include it in the next version... *
@@ -111,9 +111,9 @@/* * wavelan_cs.c : The actual code for the driver - C functions * -* wavelan_cs.h : Private header : local types / vars for the driver +* wavelan_cs.p.h : Private header : local types / vars for the driver * -* wavelan.h : Description of the hardware interface & structs +* wavelan_cs.h : Description of the hardware interface & structs * * i82593.h : Description if the Ethernet controller */
@@ -428,7 +428,7 @@#include <linux/ioport.h> #include <linux/fcntl.h> -#ifdef CONFIG_NET_PCMCIA_RADIO +#ifdef CONFIG_NET_RADIO #include <linux/wireless.h> /* Wireless extensions */ #endif
@@ -443,7 +443,7 @@/* Wavelan declarations */ #include "i82593.h" /* Definitions for the Intel chip */ -#include "wavelan.h" /* Others bits of the hardware */ +#include "wavelan_cs.h" /* Others bits of the hardware */ /************************** DRIVER OPTIONS **************************/ /*
@@ -821,5 +821,5 @@ MODULE_PARM(do_roaming, "i");MODULE_LICENSE ("GPL" ); -#endif /* WAVELAN_CS_H */ +#endif /* WAVELAN_CS_P_H */
Re: [SCRIPT+PATCH] : wavelan driver move for 2.5.3-pre2
In reply to Jean Tourrilheslooks ok to me
Signature · 3 lines
Jeff Garzik | "If you notice the scheduler, Building 1024 | you need more processors." MandrakeSoft | - me