aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_main.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-10-08 14:56:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:47:53 -0400
commit1fba49741dc50d13d2fe6cf04f5a547e6c5c81f6 (patch)
tree1d7909c9350478512c599f950116b0552a7c33f1 /drivers/net/wireless/wl12xx/wl1271_main.c
parentc87dec9f189b884df215756e285b9281cf065206 (diff)
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.c5
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 09fe9686977a..d22de23f0bce 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -30,6 +30,7 @@
30#include <linux/spi/spi.h> 30#include <linux/spi/spi.h>
31#include <linux/crc32.h> 31#include <linux/crc32.h>
32#include <linux/etherdevice.h> 32#include <linux/etherdevice.h>
33#include <linux/vmalloc.h>
33#include <linux/spi/wl12xx.h> 34#include <linux/spi/wl12xx.h>
34 35
35#include "wl1271.h" 36#include "wl1271.h"
@@ -231,7 +232,7 @@ static int wl1271_fetch_firmware(struct wl1271 *wl)
231 } 232 }
232 233
233 wl->fw_len = fw->size; 234 wl->fw_len = fw->size;
234 wl->fw = kmalloc(wl->fw_len, GFP_KERNEL); 235 wl->fw = vmalloc(wl->fw_len);
235 236
236 if (!wl->fw) { 237 if (!wl->fw) {
237 wl1271_error("could not allocate memory for the firmware"); 238 wl1271_error("could not allocate memory for the firmware");
@@ -1484,7 +1485,7 @@ static int __devexit wl1271_remove(struct spi_device *spi)
1484 platform_device_unregister(&wl1271_device); 1485 platform_device_unregister(&wl1271_device);
1485 free_irq(wl->irq, wl); 1486 free_irq(wl->irq, wl);
1486 kfree(wl->target_mem_map); 1487 kfree(wl->target_mem_map);
1487 kfree(wl->fw); 1488 vfree(wl->fw);
1488 wl->fw = NULL; 1489 wl->fw = NULL;
1489 kfree(wl->nvs); 1490 kfree(wl->nvs);
1490 wl->nvs = NULL; 1491 wl->nvs = NULL;