Commit 73ae0302 authored by David Gibson's avatar David Gibson Committed by Linus Torvalds

[PATCH] Update orinoco driver to 0.11b

This patch updates the orinoco wireless driver to 0.11b.  This fixes
several kfree()-of-bad-address bugs.
parent 4af4c05c
...@@ -55,7 +55,6 @@ CONFIG_PLX_HERMES ...@@ -55,7 +55,6 @@ CONFIG_PLX_HERMES
Support for these adaptors is so far still incomplete and buggy. Support for these adaptors is so far still incomplete and buggy.
You have been warned. You have been warned.
Prism 2.5 PCI 802.11b adaptor support
CONFIG_PCI_HERMES CONFIG_PCI_HERMES
Enable support for PCI and mini-PCI 802.11b wireless NICs based on Enable support for PCI and mini-PCI 802.11b wireless NICs based on
the Prism 2.5 chipset. These are true PCI cards, not the 802.11b the Prism 2.5 chipset. These are true PCI cards, not the 802.11b
......
/* airport.c 0.11a /* airport.c 0.11b
* *
* A driver for "Hermes" chipset based Apple Airport wireless * A driver for "Hermes" chipset based Apple Airport wireless
* card. * card.
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "hermes.h" #include "hermes.h"
#include "orinoco.h" #include "orinoco.h"
static char version[] __initdata = "airport.c 0.11a (Benjamin Herrenschmidt <benh@kernel.crashing.org>)"; static char version[] __initdata = "airport.c 0.11b (Benjamin Herrenschmidt <benh@kernel.crashing.org>)";
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); MODULE_DESCRIPTION("Driver for the Apple Airport wireless card.");
MODULE_LICENSE("Dual MPL/GPL"); MODULE_LICENSE("Dual MPL/GPL");
...@@ -270,8 +270,8 @@ airport_attach(struct device_node* of_node) ...@@ -270,8 +270,8 @@ airport_attach(struct device_node* of_node)
static void static void
airport_detach(struct net_device *dev) airport_detach(struct net_device *dev)
{ {
struct orinoco_private *priv = (struct orinoco_private *)dev->priv; struct orinoco_private *priv = dev->priv;
struct airport *card = (struct airport *)priv->card; struct airport *card = priv->card;
/* Unregister proc entry */ /* Unregister proc entry */
orinoco_proc_dev_cleanup(priv); orinoco_proc_dev_cleanup(priv);
...@@ -299,7 +299,7 @@ airport_detach(struct net_device *dev) ...@@ -299,7 +299,7 @@ airport_detach(struct net_device *dev)
current->state = TASK_UNINTERRUPTIBLE; current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout(HZ); schedule_timeout(HZ);
kfree(card); kfree(dev);
} /* airport_detach */ } /* airport_detach */
static int __init static int __init
......
/* orinoco.c 0.11a - (formerly known as dldwd_cs.c and orinoco_cs.c) /* orinoco.c 0.11b - (formerly known as dldwd_cs.c and orinoco_cs.c)
* *
* A driver for Hermes or Prism 2 chipset based PCMCIA wireless * A driver for Hermes or Prism 2 chipset based PCMCIA wireless
* adaptors, with Lucent/Agere, Intersil or Symbol firmware. * adaptors, with Lucent/Agere, Intersil or Symbol firmware.
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
* o Fixes for recent Symbol firmwares which lack AP density * o Fixes for recent Symbol firmwares which lack AP density
* (Pavel Roskin). * (Pavel Roskin).
* *
* v0.11 -> v0.11a - 29 Apr 2002 - David Gibson * v0.11 -> v0.11b - 29 Apr 2002 - David Gibson
* o Handle different register spacing, necessary for Prism 2.5 * o Handle different register spacing, necessary for Prism 2.5
* PCI adaptors (Steve Hill). * PCI adaptors (Steve Hill).
* o Cleaned up initialization of card structures in orinoco_cs * o Cleaned up initialization of card structures in orinoco_cs
...@@ -274,15 +274,21 @@ ...@@ -274,15 +274,21 @@
* o Makefile changes for better integration into David Hinds * o Makefile changes for better integration into David Hinds
* pcmcia-cs package. * pcmcia-cs package.
* *
* v0.11a -> v0.11b - 1 May 2002 - David Gibson
* o Better error reporting in orinoco_plx_init_one()
* o Fixed multiple bad kfree() bugs introduced by the
* alloc_orinocodev() changes.
*
* TODO * TODO
* o Re-assess our encapsulation detection strategy * o New wireless extensions API
* o Handle de-encapsulation within network layer, provide 802.11 * o Handle de-encapsulation within network layer, provide 802.11
* headers * headers
* o Fix possible races in SPY handling. * o Fix possible races in SPY handling.
* o Disconnect wireless extensions from fundamental configuration. * o Disconnect wireless extensions from fundamental configuration.
* *
* o Convert /proc debugging stuff to seqfile * o Convert /proc debugging stuff to seqfile
* o Use multiple Tx buffers */ * o Use multiple Tx buffers
*/
/* Notes on locking: /* Notes on locking:
* *
* The basic principle of operation is that everything except the * The basic principle of operation is that everything except the
...@@ -351,7 +357,7 @@ ...@@ -351,7 +357,7 @@
#define SPY_NUMBER(priv) 0 #define SPY_NUMBER(priv) 0
#endif /* WIRELESS_SPY */ #endif /* WIRELESS_SPY */
static char version[] __initdata = "orinoco.c 0.11a (David Gibson <hermes@gibson.dropbear.id.au> and others)"; static char version[] __initdata = "orinoco.c 0.11b (David Gibson <hermes@gibson.dropbear.id.au> and others)";
MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>"); MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>");
MODULE_DESCRIPTION("Driver for Lucent Orinoco, Prism II based and similar wireless cards"); MODULE_DESCRIPTION("Driver for Lucent Orinoco, Prism II based and similar wireless cards");
#ifdef MODULE_LICENSE #ifdef MODULE_LICENSE
......
/* orinoco_cs.c 0.11a - (formerly known as dldwd_cs.c) /* orinoco_cs.c 0.11b - (formerly known as dldwd_cs.c)
* *
* A driver for "Hermes" chipset based PCMCIA wireless adaptors, such * A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
* as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/ * as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/*====================================================================*/ /*====================================================================*/
static char version[] __initdata = "orinoco_cs.c 0.11a (David Gibson <hermes@gibson.dropbear.id.au> and others)"; static char version[] __initdata = "orinoco_cs.c 0.11b (David Gibson <hermes@gibson.dropbear.id.au> and others)";
MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>"); MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>");
MODULE_DESCRIPTION("Driver for PCMCIA Lucent Orinoco, Prism II based and similar wireless cards"); MODULE_DESCRIPTION("Driver for PCMCIA Lucent Orinoco, Prism II based and similar wireless cards");
...@@ -373,6 +373,7 @@ orinoco_cs_detach(dev_link_t * link) ...@@ -373,6 +373,7 @@ orinoco_cs_detach(dev_link_t * link)
{ {
dev_link_t **linkp; dev_link_t **linkp;
struct orinoco_private *priv = link->priv; struct orinoco_private *priv = link->priv;
struct net_device *dev = priv->ndev;
TRACE_ENTER("orinoco"); TRACE_ENTER("orinoco");
...@@ -408,9 +409,9 @@ orinoco_cs_detach(dev_link_t * link) ...@@ -408,9 +409,9 @@ orinoco_cs_detach(dev_link_t * link)
if (link->dev) { if (link->dev) {
DEBUG(0, "orinoco_cs: About to unregister net device %p\n", DEBUG(0, "orinoco_cs: About to unregister net device %p\n",
priv->ndev); priv->ndev);
unregister_netdev(priv->ndev); unregister_netdev(dev);
} }
kfree(priv->card); kfree(dev);
out: out:
TRACE_EXIT("orinoco"); TRACE_EXIT("orinoco");
......
/* orinoco_plx.c 0.11a /* orinoco_plx.c 0.11b
* *
* Driver for Prism II devices which would usually be driven by orinoco_cs, * Driver for Prism II devices which would usually be driven by orinoco_cs,
* but are connected to the PCI bus by a PLX9052. * but are connected to the PCI bus by a PLX9052.
...@@ -134,7 +134,7 @@ not have time for a while.. ...@@ -134,7 +134,7 @@ not have time for a while..
#include "hermes.h" #include "hermes.h"
#include "orinoco.h" #include "orinoco.h"
static char version[] __initdata = "orinoco_plx.c 0.11a (Daniel Barlow <dan@telent.net>)"; static char version[] __initdata = "orinoco_plx.c 0.11b (Daniel Barlow <dan@telent.net>)";
MODULE_AUTHOR("Daniel Barlow <dan@telent.net>"); MODULE_AUTHOR("Daniel Barlow <dan@telent.net>");
MODULE_DESCRIPTION("Driver for wireless LAN cards using the PLX9052 PCI bridge"); MODULE_DESCRIPTION("Driver for wireless LAN cards using the PLX9052 PCI bridge");
#ifdef MODULE_LICENSE #ifdef MODULE_LICENSE
...@@ -284,7 +284,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, ...@@ -284,7 +284,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
hermes_struct_init(&(priv->hw), dev->base_addr, hermes_struct_init(&(priv->hw), dev->base_addr,
HERMES_IO, HERMES_16BIT_REGSPACING); HERMES_IO, HERMES_16BIT_REGSPACING);
pci_set_drvdata(pdev, priv); pci_set_drvdata(pdev, dev);
err = request_irq(pdev->irq, orinoco_plx_interrupt, SA_SHIRQ, dev->name, priv); err = request_irq(pdev->irq, orinoco_plx_interrupt, SA_SHIRQ, dev->name, priv);
if (err) { if (err) {
...@@ -337,12 +337,12 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, ...@@ -337,12 +337,12 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev) static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev)
{ {
struct orinoco_private *priv = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct net_device *dev = priv->ndev; struct orinoco_private *priv = dev->priv;
TRACE_ENTER("orinoco_plx"); TRACE_ENTER("orinoco_plx");
if (!priv) if (! dev)
BUG(); BUG();
orinoco_proc_dev_cleanup(priv); orinoco_proc_dev_cleanup(priv);
...@@ -352,7 +352,7 @@ static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev) ...@@ -352,7 +352,7 @@ static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev)
if (dev->irq) if (dev->irq)
free_irq(dev->irq, priv); free_irq(dev->irq, priv);
kfree(priv); kfree(dev);
release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3)); release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment