diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-10-08 21:56:32 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:47:53 -0400 |
commit | 1fba49741dc50d13d2fe6cf04f5a547e6c5c81f6 (patch) | |
tree | 1d7909c9350478512c599f950116b0552a7c33f1 /drivers/net/wireless/wl12xx/wl1271_main.c | |
parent | c87dec9f189b884df215756e285b9281cf065206 (diff) | |
download | kernel_samsung_smdk4412-1fba49741dc50d13d2fe6cf04f5a547e6c5c81f6.tar.gz kernel_samsung_smdk4412-1fba49741dc50d13d2fe6cf04f5a547e6c5c81f6.tar.bz2 kernel_samsung_smdk4412-1fba49741dc50d13d2fe6cf04f5a547e6c5c81f6.zip |
wl1271: Use vmalloc to allocate memory for firmware
Use vmalloc to allocate memory for the firmware image, and use a smaller
linear buffer for the actual transfer of the firmware to the chipset.
This patch is an adaptation of a similar patch for wl1251 by Kalle Valo.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 09fe9686977..d22de23f0bc 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -30,6 +30,7 @@ #include <linux/spi/spi.h> #include <linux/crc32.h> #include <linux/etherdevice.h> +#include <linux/vmalloc.h> #include <linux/spi/wl12xx.h> #include "wl1271.h" @@ -231,7 +232,7 @@ static int wl1271_fetch_firmware(struct wl1271 *wl) } wl->fw_len = fw->size; - wl->fw = kmalloc(wl->fw_len, GFP_KERNEL); + wl->fw = vmalloc(wl->fw_len); if (!wl->fw) { wl1271_error("could not allocate memory for the firmware"); @@ -1484,7 +1485,7 @@ static int __devexit wl1271_remove(struct spi_device *spi) platform_device_unregister(&wl1271_device); free_irq(wl->irq, wl); kfree(wl->target_mem_map); - kfree(wl->fw); + vfree(wl->fw); wl->fw = NULL; kfree(wl->nvs); wl->nvs = NULL; |