From: David Dillow <dave@thedillows.org>
Date: Mon, 02 Mar 2009 02:56:19 -0500
On Sun, 2009-03-01 at 20:29 -0800, David Miller wrote:
quoted
+
+ typhoon_fw_image = kmalloc(typhoon_fw->size, GFP_KERNEL);
+ if (!typhoon_fw_image) {
+ err = -ENOMEM;
+ goto out_err;
}
You never copied the image into the kmalloc'd memory, so you upload
garbage.
Fix that and I think it will be OK.
Good catch, I've checked in the following fix:
typhoon: Add missing firmware copy.
Noticed by David Dillow.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/typhoon.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index ec2541c..9bba787 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1377,6 +1377,7 @@ typhoon_request_firmware(struct typhoon *tp)
err = -ENOMEM;
goto out_err;
}
+ memcpy(typhoon_fw_image, typhoon_fw->data, typhoon_fw->size);
return 0;
--
1.6.1.2.253.ga34a