aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.c3
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c
index 5c20a043a47..fdb3b1decc7 100644
--- a/drivers/net/wireless/ath/ath6kl/core.c
+++ b/drivers/net/wireless/ath/ath6kl/core.c
@@ -20,6 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/moduleparam.h> 21#include <linux/moduleparam.h>
22#include <linux/export.h> 22#include <linux/export.h>
23#include <linux/vmalloc.h>
23 24
24#include "debug.h" 25#include "debug.h"
25#include "hif-ops.h" 26#include "hif-ops.h"
@@ -305,7 +306,7 @@ void ath6kl_core_cleanup(struct ath6kl *ar)
305 306
306 kfree(ar->fw_board); 307 kfree(ar->fw_board);
307 kfree(ar->fw_otp); 308 kfree(ar->fw_otp);
308 kfree(ar->fw); 309 vfree(ar->fw);
309 kfree(ar->fw_patch); 310 kfree(ar->fw_patch);
310 kfree(ar->fw_testscript); 311 kfree(ar->fw_testscript);
311 312
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 092e4cddfed..5949ab5357f 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -21,6 +21,7 @@
21#include <linux/export.h> 21#include <linux/export.h>
22#include <linux/of.h> 22#include <linux/of.h>
23#include <linux/mmc/sdio_func.h> 23#include <linux/mmc/sdio_func.h>
24#include <linux/vmalloc.h>
24 25
25#include "core.h" 26#include "core.h"
26#include "cfg80211.h" 27#include "cfg80211.h"
@@ -928,13 +929,14 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name)
928 if (ar->fw != NULL) 929 if (ar->fw != NULL)
929 break; 930 break;
930 931
931 ar->fw = kmemdup(data, ie_len, GFP_KERNEL); 932 ar->fw = vmalloc(ie_len);
932 933
933 if (ar->fw == NULL) { 934 if (ar->fw == NULL) {
934 ret = -ENOMEM; 935 ret = -ENOMEM;
935 goto out; 936 goto out;
936 } 937 }
937 938
939 memcpy(ar->fw, data, ie_len);
938 ar->fw_len = ie_len; 940 ar->fw_len = ie_len;
939 break; 941 break;
940 case ATH6KL_FW_IE_PATCH_IMAGE: 942 case ATH6KL_FW_IE_PATCH_IMAGE: