aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2008-11-22 05:37:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-26 09:47:46 -0500
commitac7cafd72261857278dff9f737e600b30088653b (patch)
treed66756bd5b61acf54ca8890dcc664982d6348432
parent2cea7b261942009e90befbe41d998e2931547026 (diff)
orinoco: Resume spectrum_cs in the same way as orinoco_cs
Retrieval of external firmware has been resolved, and should work with the standard orinoco resume algorithm. This fixes an issue where priv->hw_unavailable indicates the card is ready when firmware has not been loaded. Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 0bae3dcf9d50..a2764764c1c0 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -450,10 +450,29 @@ spectrum_cs_resume(struct pcmcia_device *link)
450{ 450{
451 struct net_device *dev = link->priv; 451 struct net_device *dev = link->priv;
452 struct orinoco_private *priv = netdev_priv(dev); 452 struct orinoco_private *priv = netdev_priv(dev);
453 unsigned long flags;
454 int err;
455
456 err = orinoco_reinit_firmware(dev);
457 if (err) {
458 printk(KERN_ERR "%s: Error %d re-initializing firmware\n",
459 dev->name, err);
460 return -EIO;
461 }
462
463 spin_lock_irqsave(&priv->lock, flags);
453 464
454 netif_device_attach(dev); 465 netif_device_attach(dev);
455 priv->hw_unavailable--; 466 priv->hw_unavailable--;
456 schedule_work(&priv->reset_work); 467
468 if (priv->open && !priv->hw_unavailable) {
469 err = __orinoco_up(dev);
470 if (err)
471 printk(KERN_ERR "%s: Error %d restarting card\n",
472 dev->name, err);
473 }
474
475 spin_unlock_irqrestore(&priv->lock, flags);
457 476
458 return 0; 477 return 0;
459} 478}