diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-06-18 23:21:28 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:45 -0400 |
commit | 5381956b780e82805247c2ec8e32c4c665309394 (patch) | |
tree | 04f0f203a5b89dfd48fb8821be2c4ebf9ce3ed9a /drivers/net/wireless/orinoco/spectrum_cs.c | |
parent | 35832c50d1d1552618f55aa5457a251df9e63b26 (diff) | |
download | linux-5381956b780e82805247c2ec8e32c4c665309394.tar.gz linux-5381956b780e82805247c2ec8e32c4c665309394.tar.bz2 linux-5381956b780e82805247c2ec8e32c4c665309394.zip |
orinoco: move netdev interface creation to main driver
With the move to cfg80211 it's nice to keep the hardware operations
distinct from the interface, even though we can only support a single
interface.
This also means the driver resembles other cfg80211 drivers.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/spectrum_cs.c')
-rw-r--r-- | drivers/net/wireless/orinoco/spectrum_cs.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c index 43e1aed4e4b2..7b4a7e428355 100644 --- a/drivers/net/wireless/orinoco/spectrum_cs.c +++ b/drivers/net/wireless/orinoco/spectrum_cs.c @@ -220,7 +220,7 @@ static void spectrum_cs_detach(struct pcmcia_device *link) struct orinoco_private *priv = link->priv; if (link->dev_node) - unregister_netdev(priv->ndev); + orinoco_if_del(priv); spectrum_cs_release(link); @@ -306,7 +306,6 @@ spectrum_cs_config(struct pcmcia_device *link) { struct orinoco_private *priv = link->priv; struct orinoco_pccard *card = priv->card; - struct net_device *dev = priv->ndev; hermes_t *hw = &priv->hw; int last_fn, last_ret; void __iomem *mem; @@ -360,8 +359,6 @@ spectrum_cs_config(struct pcmcia_device *link) pcmcia_request_configuration(link, &link->conf)); /* Ok, we have the configuration, prepare to register the netdev */ - dev->base_addr = link->io.BasePort1; - dev->irq = link->irq.AssignedIRQ; card->node.major = card->node.minor = 0; /* Reset card */ @@ -374,26 +371,19 @@ spectrum_cs_config(struct pcmcia_device *link) goto failed; } - SET_NETDEV_DEV(dev, &handle_to_dev(link)); - /* Tell the stack we exist */ - if (register_netdev(dev) != 0) { - printk(KERN_ERR PFX "register_netdev() failed\n"); + /* Register an interface with the stack */ + if (orinoco_if_add(priv, link->io.BasePort1, + link->irq.AssignedIRQ) != 0) { + printk(KERN_ERR PFX "orinoco_if_add() failed\n"); goto failed; } /* At this point, the dev_node_t structure(s) needs to be * initialized and arranged in a linked list at link->dev_node. */ - strcpy(card->node.dev_name, dev->name); + strcpy(card->node.dev_name, priv->ndev->name); link->dev_node = &card->node; /* link->dev_node being non-NULL is also * used to indicate that the * net_device has been registered */ - - /* Finally, report what we've done */ - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io " - "0x%04x-0x%04x\n", dev->name, dev_name(dev->dev.parent), - link->irq.AssignedIRQ, link->io.BasePort1, - link->io.BasePort1 + link->io.NumPorts1 - 1); - return 0; cs_failed: |