Update orinoco driver to 0.13e
PATCH 1/1 Update orinoco driver to 0.13e
Linus, please apply the patch below, which updates the orinoco driver to 0.13e. This fixes a whole slew of bugs, big and small, and addss a few minor features, such as support for TMD7160 based PCI/PCMCIA bridges. The patch is against 2.5.69.
drivers/net/wireless/Kconfig +13 -0
@@ -212,6 +212,19 @@ Support for these adaptors is so far still incomplete and buggy. You have been warned. +config TMD_HERMES + tristate "Hermes in TMD7160 based PCI adaptor support (EXPERIMENTAL)" + depends on PCI && HERMES && EXPERIMENTAL + help + Enable support for PCMCIA cards supported by the "Hermes" (aka + orinoco_cs) driver when used in TMD7160 based PCI adaptors. These + adaptors are not a full PCMCIA controller but act as a more limited + PCI <-> PCMCIA bridge. Several vendors sell such adaptors so that + 802.11b PCMCIA cards can be used in desktop machines. + + Support for these adaptors is so far still incomplete and buggy. + You have been warned. + config PCI_HERMES tristate "Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)" depends on PCI && HERMES && EXPERIMENTAL
drivers/net/wireless/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_PCMCIA_HERMES) += orinoco_cs.o obj-$(CONFIG_APPLE_AIRPORT) += airport.o obj-$(CONFIG_PLX_HERMES) += orinoco_plx.o +obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o obj-$(CONFIG_AIRO) += airo.o
drivers/net/wireless/airport.c +42 -23
163 lines not on this page · raw message
drivers/net/wireless/hermes.c +25 -17
117 lines not on this page · raw message
drivers/net/wireless/hermes.h +31 -13
98 lines not on this page · raw message
drivers/net/wireless/ieee802_11.h +9 -3
@@ -2,9 +2,15 @@#define _IEEE802_11_H#define IEEE802_11_DATA_LEN 2304 -/* Actually, the standard seems to be inconsistent about what the -maximum frame size really is. Section 6.2.1.1.2 says 2304 octets, -but the figure in Section 7.1.2 says 2312 octects. */ +/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section +6.2.1.1.2. + +The figure in section 7.1.2 suggests a body size of up to 2312 +bytes is allowed, which is a bit confusing, I suspect this +represents the 2304 bytes of real data, plus a possible 8 bytes of +WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */ + +#define IEEE802_11_HLEN 30#define IEEE802_11_FRAME_LEN (IEEE802_11_DATA_LEN + IEEE802_11_HLEN)
drivers/net/wireless/orinoco.c +450 -530
1,467 lines not on this page · raw message
drivers/net/wireless/orinoco.h +29 -9
@@ -11,9 +11,29 @@#include <linux/spinlock.h> #include <linux/netdevice.h> #include <linux/wireless.h> -#include <linux/workqueue.h> +#include <linux/version.h> #include "hermes.h" +/* Workqueue / task queue backwards compatibility stuff */ + +#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 + +/* Interrupt handler backwards compatibility stuff */ +#ifndef IRQ_NONE + +#define IRQ_NONE +#define IRQ_HANDLED +typedef void irqreturn_t ; + +#endif +/* To enable debug messages */ //#define ORINOCO_DEBUG 3
@@ -42,9 +62,12 @@/* Synchronisation stuff */ spinlock_t lock;int hw_unavailable; -struct work_struct timeout_task; +struct work_struct reset_work; +/* driver state */ int open; +u16 last_linkstatus; +int connected;/* Net device stuff */ struct net_device *ndev;
@@ -55,6 +78,7 @@hermes_t hw;u16 txfid; +/* Capabilities of the hardware/firmware */ int firmware_type;#define FIRMWARE_TYPE_AGERE 1
@@ -68,6 +92,7 @@int has_sensitivity;int nicbuf_size;u16 channel_mask; +int broken_disableport;/* Configuration paramaters */ u32 iw_mode;
@@ -91,9 +116,6 @@/* Configuration dependent variables */ int port_type, createibss;int promiscuous, mc_count; - -/* /proc based debugging stuff */ -struct proc_dir_entry *dir_dev; };#ifdef ORINOCO_DEBUG
@@ -110,10 +132,8 @@ int (*hard_reset)(struct orinoco_private *));extern int __orinoco_up (struct net_device *dev);extern int __orinoco_down (struct net_device *dev); -int orinoco_reinit_firmware (struct net_device *dev); - -extern int orinoco_proc_dev_init (struct net_device *dev); -extern void orinoco_proc_dev_cleanup (struct net_device *dev); +extern int orinoco_stop (struct net_device *dev); +extern int orinoco_reinit_firmware (struct net_device *dev);extern irqreturn_t orinoco_interrupt (int irq,void * dev_id,struct pt_regs *regs);/********************************************************************/
drivers/net/wireless/orinoco_cs.c +73 -90
289 lines not on this page · raw message
drivers/net/wireless/orinoco_pci.c +88 -34
220 lines not on this page · raw message
drivers/net/wireless/orinoco_plx.c +10 -23
@@ -1,4 +1,4 @@ -/* orinoco_plx.c 0.13a +/* orinoco_plx.c 0.13e * * Driver for Prism II devices which would usually be driven by orinoco_cs, * but are connected to the PCI bus by a PLX9052.
@@ -119,7 +119,6 @@#include <asm/uaccess.h> #include <asm/io.h> #include <asm/system.h> -#include <linux/proc_fs.h> #include <linux/netdevice.h> #include <linux/if_arp.h> #include <linux/etherdevice.h>
@@ -156,7 +155,6 @@unsigned long pccard_ioaddr =0 ;unsigned long pccard_iolen =0 ;struct net_device *dev =NULL ; -int netdev_registered =0 ;int i; err =pci_enable_device (pdev);
@@ -201,7 +199,7 @@ addr =pci_resource_start (pdev,1 ); reg =0 ; reg =inl (addr+PLX_INTCSR ); -if (reg &PLX_INTCSR_INTEN ) +if (reg &PLX_INTCSR_INTEN )printk (KERN_DEBUG "orinoco_plx: " "Local Interrupt already enabled\n" );else {
@@ -244,7 +242,7 @@ HERMES_IO, HERMES_16BIT_REGSPACING);pci_set_drvdata (pdev, dev); - err =request_irq (pdev->irq, orinoco_interrupt,SA_SHIRQ , dev->name, priv); + err =request_irq (pdev->irq, orinoco_interrupt,SA_SHIRQ , dev->name, dev);if (err) {printk (KERN_ERR "orinoco_plx: Error allocating IRQ %d.\n" , pdev->irq); err = -EBUSY ;
@@ -255,27 +253,17 @@ err =register_netdev (dev);if (err) goto fail; - netdev_registered =1 ; - - err =orinoco_proc_dev_init (dev); -if (err) - goto fail;return 0 ;/* succeeded */ fail:printk (KERN_DEBUG "orinoco_plx: init_one(), FAIL!\n" ); -if (priv) { -orinoco_proc_dev_cleanup (dev); - -if (netdev_registered) -unregister_netdev (dev); - +if (dev) {if (dev->irq) -free_irq (dev->irq, priv); +free_irq (dev->irq, dev); -kfree (priv); +kfree (dev); }if (pccard_ioaddr)
@@ -292,18 +280,17 @@ static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev) {struct net_device *dev =pci_get_drvdata (pdev); -struct orinoco_private *priv = dev->priv;if (! dev)BUG (); -orinoco_proc_dev_cleanup (dev); -unregister_netdev (dev);if (dev->irq) -free_irq (dev->irq, priv); +free_irq (dev->irq, dev); +pci_set_drvdata (pdev,NULL ); +kfree (dev);release_region (pci_resource_start (pdev,3 ),pci_resource_len (pdev,3 ));
@@ -341,7 +328,7 @@ .resume = 0, }; -static char version[]__initdata ="orinoco_plx.c 0.13a (Daniel Barlow <[email protected]>, David Gibson <[email protected]>)" ; +static char version[]__initdata ="orinoco_plx.c 0.13e (Daniel Barlow <[email protected]>, David Gibson <[email protected]>)" ;MODULE_AUTHOR ("Daniel Barlow <[email protected]>" );MODULE_DESCRIPTION ("Driver for wireless LAN cards using the PLX9052 PCI bridge" );#ifdef MODULE_LICENSE
drivers/net/wireless/orinoco_tmd.c +238 -0
238 lines not on this page · raw message
Signature · 4 lines
David Gibson | For every complex problem there is a [email protected] | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson