Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248337 > unrolled thread
| Started by | Brent Taylor <motobud@gmail.com> |
|---|---|
| First post | 2015-10-16 07:20 +0200 |
| Last post | 2015-10-16 07:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] ath6kl: Use vmalloc for loading firmware using api1 method Brent Taylor <motobud@gmail.com> - 2015-10-16 07:20 +0200
| From | Brent Taylor <motobud@gmail.com> |
|---|---|
| Date | 2015-10-16 07:20 +0200 |
| Subject | [PATCH] ath6kl: Use vmalloc for loading firmware using api1 method |
| Message-ID | <qk5AR-4FE-3@gated-at.bofh.it> |
Signed-off-by: Brent Taylor <motobud@gmail.com>
---
drivers/net/wireless/ath/ath6kl/init.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 6e473fa..2155739 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -673,10 +673,17 @@ static int ath6kl_get_fw(struct ath6kl *ar, const char *filename,
return ret;
*fw_len = fw_entry->size;
- *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
-
- if (*fw == NULL)
- ret = -ENOMEM;
+ if (&ar->fw == fw) {
+ *fw = vmalloc(fw_entry->size);
+ if (*fw == NULL)
+ ret = -ENOMEM;
+ else
+ memcpy(*fw, fw_entry->data, fw_entry->size);
+ } else {
+ *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
+ if (*fw == NULL)
+ ret = -ENOMEM;
+ }
release_firmware(fw_entry);
--
2.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web