orinoco: reload firmware on resume
authorAndrey Borzenkov <arvidjaar@mail.ru>
Sun, 12 Oct 2008 16:15:43 +0000 (20:15 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 31 Oct 2008 23:02:33 +0000 (19:02 -0400)
On resume card state is likely lost so we have to reload firmware
again.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/orinoco.c

index 366556fafaee1464f27568905fd0ca3ff6af5c5b..7bd1559e8711f0667cb58cf5dd70f99b09f5ab1d 100644 (file)
@@ -2300,6 +2300,11 @@ int orinoco_reinit_firmware(struct net_device *dev)
        int err;
 
        err = hermes_init(hw);
+       if (priv->do_fw_download && !err) {
+               err = orinoco_download(priv);
+               if (err)
+                       priv->do_fw_download = 0;
+       }
        if (!err)
                err = orinoco_allocate_fid(dev);
 
@@ -2925,12 +2930,6 @@ static void orinoco_reset(struct work_struct *work)
                }
        }
 
-       if (priv->do_fw_download) {
-               err = orinoco_download(priv);
-               if (err)
-                       priv->do_fw_download = 0;
-       }
-
        err = orinoco_reinit_firmware(dev);
        if (err) {
                printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n",