45 "WRM Failed! status: %d", errno);
57 char *buff, *buff_readback;
60 int errno = 0,
len = 0, is_config_file = 0;
69 if (!buff || !buff_readback) {
105 if ((
len-
sizeof(
unsigned int)) < 4) {
116 if (*(
unsigned int *)&buff_readback[
len] != *(
unsigned int *)&buff[
len]) {
131 kfree(buff_readback);
208 static int bcm_compare_buff_contents(
unsigned char *readbackbuff,
unsigned char *buff,
unsigned int len)
212 if ((len-
sizeof(
unsigned int)) < 4) {
213 if (
memcmp(readbackbuff , buff, len))
219 if (*(
unsigned int *)&readbackbuff[len] != *(
unsigned int *)&buff[len]) {
250 retval = bcm_download_config_file(Adapter, psFwInfo);
283 unsigned int len = 0;
285 len = u32FirmwareLength;
287 while (u32FirmwareLength) {
289 retval =
wrm(Adapter, u32StartingAddress, mappedbuffer, len);
295 u32StartingAddress += len;
296 u32FirmwareLength -= len;
304 UINT len = u32FirmwareLength;
309 if (
NULL == readbackbuff) {
314 while (u32FirmwareLength && !retval) {
316 bytes =
rdm(Adapter, u32StartingAddress, readbackbuff, len);
324 retval = bcm_compare_buff_contents(readbackbuff, mappedbuffer, len);
328 u32StartingAddress += len;
329 u32FirmwareLength -= len;
341 status = buffDnld(Adapter, mappedbuffer, u32FirmwareLength, u32StartingAddress);
347 status = buffRdbkVerify(Adapter, mappedbuffer, u32FirmwareLength, u32StartingAddress);