From: Andrey Borzenkov <[email protected]>
Date: Sun, 12 Oct 2008 20:15:43 +0400
Subject: [PATCH 1/2] orinoco: reload firmware on resume
On resume card state is likely lost so we have to reload firmware
again.
Signed-off-by: Andrey Borzenkov <[email protected]>
Acked-by: David Kilroy <[email protected]>
---
Resend against current wireless-testing
drivers/net/wireless/orinoco.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index e0512e4..860803e 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -2301,6 +2301,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);
@@ -2926,12 +2931,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",
--
1.6.0.2
On Wed, Oct 15, 2008 at 08:31:26PM +0100, Dave wrote:
> Andrey Borzenkov wrote:
>> On Saturday 11 October 2008, Dave wrote:
>>>> - int err;
>>>> + int err = 0;
>>
>> Fixed version attached.
>
> Acked-by: David Kilroy <[email protected]>
Please repost this series with the finalized patches, rebased on the
current wireless-testing. Also, please include the patches inline,
as your MIME encoding is confusing my tools.
John
--
John W. Linville Linux should be at the core
[email protected] of your literate lifestyle.
Andrey Borzenkov wrote:
> On Saturday 11 October 2008, Dave wrote:
>>> - int err;
>>> + int err = 0;
>
> Fixed version attached.
Acked-by: David Kilroy <[email protected]>
Note that if the firmware download fails the card won't work because we no longer allocate a fid. However even if we were to allocate a fid the driver flags would be inconsistent with the firmware capabilities, and the driver would just encounter a bunch of errors.
We should probably think about how we can fall back to the inbuilt firmware after a failed firmware download - but this can be done separately.
Regards,
Dave.