1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-02 23:51:53 +02:00
openwrt-xburst/package/mac80211/patches/890-brcmfmac-fix-memory-allocation.patch
hauke 299f8d8147 mac80211: add brcmfmac driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31786 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-05-18 15:43:04 +00:00

29 lines
751 B
Diff

--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -28,6 +28,7 @@
#include <linux/uaccess.h>
#include <linux/firmware.h>
#include <linux/usb.h>
+#include <linux/vmalloc.h>
#include <net/cfg80211.h>
#include <defs.h>
@@ -1239,7 +1240,7 @@ static int brcmf_usb_get_fw(struct brcmf
return -EINVAL;
}
- devinfo->image = kmalloc(fw->size, GFP_ATOMIC); /* plus nvram */
+ devinfo->image = vmalloc(fw->size); /* plus nvram */
if (!devinfo->image)
return -ENOMEM;
@@ -1602,7 +1603,7 @@ static struct usb_driver brcmf_usbdrvr =
void brcmf_usb_exit(void)
{
usb_deregister(&brcmf_usbdrvr);
- kfree(g_image.data);
+ vfree(g_image.data);
g_image.data = NULL;
g_image.len = 0;
}