|
@@ -1578,10 +1578,10 @@ int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, u32 idx)
|
|
|
if (le32_to_cpu(hdr->idx) == idx) {
|
|
|
pdata = wl->fw.fw_bin[i]->data +
|
|
|
le32_to_cpu(hdr->offset);
|
|
|
- *pbuf = kmemdup(pdata, len, GFP_KERNEL);
|
|
|
+ *pbuf = kvmalloc(len, GFP_KERNEL);
|
|
|
if (*pbuf == NULL)
|
|
|
goto fail;
|
|
|
-
|
|
|
+ memcpy(*pbuf, pdata, len);
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1629,7 +1629,7 @@ int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes, u32 idx)
|
|
|
*/
|
|
|
void brcms_ucode_free_buf(void *p)
|
|
|
{
|
|
|
- kfree(p);
|
|
|
+ kvfree(p);
|
|
|
}
|
|
|
|
|
|
/*
|