| .. | .. |
|---|
| 294 | 294 | |
|---|
| 295 | 295 | /* read the card's PRI-SUP */ |
|---|
| 296 | 296 | memset(&getmsg, 0, sizeof(getmsg)); |
|---|
| 297 | | - getmsg.msgcode = DIDmsg_dot11req_mibget; |
|---|
| 297 | + getmsg.msgcode = DIDMSG_DOT11REQ_MIBGET; |
|---|
| 298 | 298 | getmsg.msglen = sizeof(getmsg); |
|---|
| 299 | 299 | strcpy(getmsg.devname, wlandev->name); |
|---|
| 300 | 300 | |
|---|
| 301 | | - getmsg.mibattribute.did = DIDmsg_dot11req_mibget_mibattribute; |
|---|
| 301 | + getmsg.mibattribute.did = DIDMSG_DOT11REQ_MIBGET_MIBATTRIBUTE; |
|---|
| 302 | 302 | getmsg.mibattribute.status = P80211ENUM_msgitem_status_data_ok; |
|---|
| 303 | | - getmsg.resultcode.did = DIDmsg_dot11req_mibget_resultcode; |
|---|
| 303 | + getmsg.resultcode.did = DIDMSG_DOT11REQ_MIBGET_RESULTCODE; |
|---|
| 304 | 304 | getmsg.resultcode.status = P80211ENUM_msgitem_status_no_value; |
|---|
| 305 | 305 | |
|---|
| 306 | 306 | item = (struct p80211itemd *)getmsg.mibattribute.data; |
|---|
| 307 | | - item->did = DIDmib_p2_p2NIC_p2PRISupRange; |
|---|
| 307 | + item->did = DIDMIB_P2_NIC_PRISUPRANGE; |
|---|
| 308 | 308 | item->status = P80211ENUM_msgitem_status_no_value; |
|---|
| 309 | 309 | |
|---|
| 310 | 310 | data = (u32 *)item->data; |
|---|
| .. | .. |
|---|
| 406 | 406 | int i; |
|---|
| 407 | 407 | int c; |
|---|
| 408 | 408 | u32 crcstart; |
|---|
| 409 | | - u32 crcend; |
|---|
| 410 | 409 | u32 cstart = 0; |
|---|
| 411 | 410 | u32 cend; |
|---|
| 412 | 411 | u8 *dest; |
|---|
| .. | .. |
|---|
| 416 | 415 | if (!s3crc[i].dowrite) |
|---|
| 417 | 416 | continue; |
|---|
| 418 | 417 | crcstart = s3crc[i].addr; |
|---|
| 419 | | - crcend = s3crc[i].addr + s3crc[i].len; |
|---|
| 420 | 418 | /* Find chunk */ |
|---|
| 421 | 419 | for (c = 0; c < nfchunks; c++) { |
|---|
| 422 | 420 | cstart = fchunk[c].addr; |
|---|
| .. | .. |
|---|
| 558 | 556 | /* Allocate buffer space for chunks */ |
|---|
| 559 | 557 | for (i = 0; i < *ccnt; i++) { |
|---|
| 560 | 558 | clist[i].data = kzalloc(clist[i].len, GFP_KERNEL); |
|---|
| 561 | | - if (!clist[i].data) { |
|---|
| 562 | | - pr_err("failed to allocate image space, exitting.\n"); |
|---|
| 559 | + if (!clist[i].data) |
|---|
| 563 | 560 | return 1; |
|---|
| 564 | | - } |
|---|
| 561 | + |
|---|
| 565 | 562 | pr_debug("chunk[%d]: addr=0x%06x len=%d\n", |
|---|
| 566 | 563 | i, clist[i].addr, clist[i].len); |
|---|
| 567 | 564 | } |
|---|
| .. | .. |
|---|
| 706 | 703 | pr_warn("warning: Failed to find PDR for plugrec 0x%04x.\n", |
|---|
| 707 | 704 | s3plug[i].itemcode); |
|---|
| 708 | 705 | continue; /* and move on to the next PDR */ |
|---|
| 709 | | -#if 0 |
|---|
| 706 | + |
|---|
| 710 | 707 | /* MSM: They swear that unless it's the MAC address, |
|---|
| 711 | 708 | * the serial number, or the TX calibration records, |
|---|
| 712 | 709 | * then there's reasonable defaults in the f/w |
|---|
| .. | .. |
|---|
| 714 | 711 | * should only be a warning, not fatal. |
|---|
| 715 | 712 | * TODO: add fatals for the PDRs mentioned above. |
|---|
| 716 | 713 | */ |
|---|
| 717 | | - result = 1; |
|---|
| 718 | | - continue; |
|---|
| 719 | | -#endif |
|---|
| 720 | 714 | } |
|---|
| 721 | 715 | |
|---|
| 722 | 716 | /* Validate plug len against PDR len */ |
|---|
| .. | .. |
|---|
| 790 | 784 | return -ENOMEM; |
|---|
| 791 | 785 | |
|---|
| 792 | 786 | /* set up the msg */ |
|---|
| 793 | | - msg->msgcode = DIDmsg_p2req_readpda; |
|---|
| 787 | + msg->msgcode = DIDMSG_P2REQ_READPDA; |
|---|
| 794 | 788 | msg->msglen = sizeof(msg); |
|---|
| 795 | 789 | strcpy(msg->devname, wlandev->name); |
|---|
| 796 | | - msg->pda.did = DIDmsg_p2req_readpda_pda; |
|---|
| 790 | + msg->pda.did = DIDMSG_P2REQ_READPDA_PDA; |
|---|
| 797 | 791 | msg->pda.len = HFA384x_PDA_LEN_MAX; |
|---|
| 798 | 792 | msg->pda.status = P80211ENUM_msgitem_status_no_value; |
|---|
| 799 | | - msg->resultcode.did = DIDmsg_p2req_readpda_resultcode; |
|---|
| 793 | + msg->resultcode.did = DIDMSG_P2REQ_READPDA_RESULTCODE; |
|---|
| 800 | 794 | msg->resultcode.len = sizeof(u32); |
|---|
| 801 | 795 | msg->resultcode.status = P80211ENUM_msgitem_status_no_value; |
|---|
| 802 | 796 | |
|---|
| .. | .. |
|---|
| 1024 | 1018 | |
|---|
| 1025 | 1019 | /* Initialize the messages */ |
|---|
| 1026 | 1020 | strcpy(rstmsg->devname, wlandev->name); |
|---|
| 1027 | | - rstmsg->msgcode = DIDmsg_p2req_ramdl_state; |
|---|
| 1021 | + rstmsg->msgcode = DIDMSG_P2REQ_RAMDL_STATE; |
|---|
| 1028 | 1022 | rstmsg->msglen = sizeof(*rstmsg); |
|---|
| 1029 | | - rstmsg->enable.did = DIDmsg_p2req_ramdl_state_enable; |
|---|
| 1030 | | - rstmsg->exeaddr.did = DIDmsg_p2req_ramdl_state_exeaddr; |
|---|
| 1031 | | - rstmsg->resultcode.did = DIDmsg_p2req_ramdl_state_resultcode; |
|---|
| 1023 | + rstmsg->enable.did = DIDMSG_P2REQ_RAMDL_STATE_ENABLE; |
|---|
| 1024 | + rstmsg->exeaddr.did = DIDMSG_P2REQ_RAMDL_STATE_EXEADDR; |
|---|
| 1025 | + rstmsg->resultcode.did = DIDMSG_P2REQ_RAMDL_STATE_RESULTCODE; |
|---|
| 1032 | 1026 | rstmsg->enable.status = P80211ENUM_msgitem_status_data_ok; |
|---|
| 1033 | 1027 | rstmsg->exeaddr.status = P80211ENUM_msgitem_status_data_ok; |
|---|
| 1034 | 1028 | rstmsg->resultcode.status = P80211ENUM_msgitem_status_no_value; |
|---|
| .. | .. |
|---|
| 1037 | 1031 | rstmsg->resultcode.len = sizeof(u32); |
|---|
| 1038 | 1032 | |
|---|
| 1039 | 1033 | strcpy(rwrmsg->devname, wlandev->name); |
|---|
| 1040 | | - rwrmsg->msgcode = DIDmsg_p2req_ramdl_write; |
|---|
| 1034 | + rwrmsg->msgcode = DIDMSG_P2REQ_RAMDL_WRITE; |
|---|
| 1041 | 1035 | rwrmsg->msglen = sizeof(*rwrmsg); |
|---|
| 1042 | | - rwrmsg->addr.did = DIDmsg_p2req_ramdl_write_addr; |
|---|
| 1043 | | - rwrmsg->len.did = DIDmsg_p2req_ramdl_write_len; |
|---|
| 1044 | | - rwrmsg->data.did = DIDmsg_p2req_ramdl_write_data; |
|---|
| 1045 | | - rwrmsg->resultcode.did = DIDmsg_p2req_ramdl_write_resultcode; |
|---|
| 1036 | + rwrmsg->addr.did = DIDMSG_P2REQ_RAMDL_WRITE_ADDR; |
|---|
| 1037 | + rwrmsg->len.did = DIDMSG_P2REQ_RAMDL_WRITE_LEN; |
|---|
| 1038 | + rwrmsg->data.did = DIDMSG_P2REQ_RAMDL_WRITE_DATA; |
|---|
| 1039 | + rwrmsg->resultcode.did = DIDMSG_P2REQ_RAMDL_WRITE_RESULTCODE; |
|---|
| 1046 | 1040 | rwrmsg->addr.status = P80211ENUM_msgitem_status_data_ok; |
|---|
| 1047 | 1041 | rwrmsg->len.status = P80211ENUM_msgitem_status_data_ok; |
|---|
| 1048 | 1042 | rwrmsg->data.status = P80211ENUM_msgitem_status_data_ok; |
|---|