ret = _FAIL;
goto exit;
}
- if (fw->size > FW_8188E_SIZE) {
- ret = _FAIL;
- goto exit;
- }
- rtfw->data = kzalloc(FW_8188E_SIZE, GFP_KERNEL);
+ rtfw->data = kmemdup(fw->data, fw->size, GFP_KERNEL);
if (!rtfw->data) {
pr_err("Failed to allocate rtfw->data\n");
ret = _FAIL;
goto exit;
}
- memcpy(rtfw->data, fw->data, fw->size);
rtfw->size = fw->size;
dev_dbg(device, "!bUsedWoWLANFw, FmrmwareLen:%d+\n", rtfw->size);
#define PageNum_128(_Len) (u32)(((_Len)>>7) + ((_Len) & 0x7F ? 1 : 0))
/* download firmware related data structure */
-#define FW_8188E_SIZE 0x4000 /* 16384,16k */
#define FW_8188E_START_ADDRESS 0x1000
#define MAX_PAGE_SIZE 4096 /* @ page : 4k bytes */