memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN);
break;
default:
- printk(KERN_ERR
- "Error: Converting eth to wlan in unknown mode.\n");
+ netdev_err(wlandev->netdev,
+ "Error: Converting eth to wlan in unknown mode.\n");
return 1;
break;
}
(wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK),
p80211_wep->iv, p80211_wep->icv);
if (foo) {
- printk(KERN_WARNING
+ netdev_warn(wlandev->netdev,
"Host en-WEP failed, dropping frame (%d).\n",
foo);
return 2;
} else {
payload_offset = WLAN_HDR_A4_LEN;
if (payload_length < WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN) {
- printk(KERN_ERR "A4 frame too short!\n");
+ netdev_err(netdev, "A4 frame too short!\n");
return 1;
}
payload_length -= (WLAN_HDR_A4_LEN - WLAN_HDR_A3_LEN);
if ((wlandev->hostwep & HOSTWEP_PRIVACYINVOKED) && WLAN_GET_FC_ISWEP(fc)
&& (wlandev->hostwep & HOSTWEP_DECRYPT)) {
if (payload_length <= 8) {
- printk(KERN_ERR "WEP frame too short (%u).\n",
- skb->len);
+ netdev_err(netdev,
+ "WEP frame too short (%u).\n", skb->len);
return 1;
}
foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
if (payload_length > (netdev->mtu + WLAN_ETHHDR_LEN)) {
/* A bogus length ethfrm has been encap'd. */
/* Is someone trying an oflow attack? */
- printk(KERN_ERR "ENCAP frame too large (%d > %d)\n",
+ netdev_err(netdev, "ENCAP frame too large (%d > %d)\n",
payload_length, netdev->mtu + WLAN_ETHHDR_LEN);
return 1;
}
if (payload_length > netdev->mtu) {
/* A bogus length ethfrm has been sent. */
/* Is someone trying an oflow attack? */
- printk(KERN_ERR "SNAP frame too large (%d > %d)\n",
+ netdev_err(netdev, "SNAP frame too large (%d > %d)\n",
payload_length, netdev->mtu);
return 1;
}
> netdev->mtu) {
/* A bogus length ethfrm has been sent. */
/* Is someone trying an oflow attack? */
- printk(KERN_ERR "DIXII frame too large (%ld > %d)\n",
+ netdev_err(netdev, "DIXII frame too large (%ld > %d)\n",
(long int)(payload_length -
sizeof(struct wlan_llc) -
sizeof(struct wlan_snap)), netdev->mtu);
if (payload_length > netdev->mtu) {
/* A bogus length ethfrm has been sent. */
/* Is someone trying an oflow attack? */
- printk(KERN_ERR "OTHER frame too large (%d > %d)\n",
+ netdev_err(netdev, "OTHER frame too large (%d > %d)\n",
payload_length, netdev->mtu);
return 1;
}
/* If these already have metadata, we error out! */
if (P80211SKB_RXMETA(skb) != NULL) {
- printk(KERN_ERR "%s: RXmeta already attached!\n",
- wlandev->name);
+ netdev_err(wlandev->netdev,
+ "%s: RXmeta already attached!\n", wlandev->name);
result = 0;
goto exit;
}
rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
if (rxmeta == NULL) {
- printk(KERN_ERR "%s: Failed to allocate rxmeta.\n",
- wlandev->name);
+ netdev_err(wlandev->netdev,
+ "%s: Failed to allocate rxmeta.\n", wlandev->name);
result = 1;
goto exit;
}
if (meta && meta->rx)
p80211skb_rxmeta_detach(skb);
else
- printk(KERN_ERR "Freeing an skb (%p) w/ no frmmeta.\n", skb);
+ netdev_err(wlandev->netdev,
+ "Freeing an skb (%p) w/ no frmmeta.\n", skb);
dev_kfree_skb(skb);
}
/* Check Permissions */
if (!capable(CAP_NET_ADMIN) &&
(msg->msgcode != DIDmsg_dot11req_mibget)) {
- printk(KERN_ERR
- "%s: only dot11req_mibget allowed for non-root.\n",
- wlandev->name);
+ netdev_err(wlandev->netdev,
+ "%s: only dot11req_mibget allowed for non-root.\n",
+ wlandev->name);
return -EPERM;
}
{
const struct firmware *fw_entry = NULL;
- printk(KERN_INFO "prism2_usb: Checking for firmware %s\n",
+ netdev_info(wlandev->netdev, "prism2_usb: Checking for firmware %s\n",
PRISM2_USB_FWFILE);
if (request_ihex_firmware(&fw_entry,
PRISM2_USB_FWFILE, &udev->dev) != 0) {
- printk(KERN_INFO
+ netdev_info(wlandev->netdev,
"prism2_usb: Firmware not available, but not essential\n");
- printk(KERN_INFO
+ netdev_info(wlandev->netdev,
"prism2_usb: can continue to use card anyway.\n");
return 1;
}
- printk(KERN_INFO "prism2_usb: %s will be processed, size %zu\n",
- PRISM2_USB_FWFILE, fw_entry->size);
+ netdev_info(wlandev->netdev,
+ "prism2_usb: %s will be processed, size %zu\n",
+ PRISM2_USB_FWFILE, fw_entry->size);
prism2_fwapply((const struct ihex_binrec *)fw_entry->data, wlandev);
release_firmware(fw_entry);
/* Build the PDA we're going to use. */
if (read_cardpda(&pda, wlandev)) {
- printk(KERN_ERR "load_cardpda failed, exiting.\n");
+ netdev_err(wlandev->netdev, "load_cardpda failed, exiting.\n");
return 1;
}
/* DIDmsg_dot11req_mibget */
prism2mgmt_mibset_mibget(wlandev, &getmsg);
if (getmsg.resultcode.data != P80211ENUM_resultcode_success)
- printk(KERN_ERR "Couldn't fetch PRI-SUP info\n");
+ netdev_err(wlandev->netdev, "Couldn't fetch PRI-SUP info\n");
/* Already in host order */
priid.role = *data++;
/* Read the S3 file */
result = read_fwfile(rfptr);
if (result) {
- printk(KERN_ERR "Failed to read the data exiting.\n");
+ netdev_err(wlandev->netdev,
+ "Failed to read the data exiting.\n");
return 1;
}
result = validate_identity();
if (result) {
- printk(KERN_ERR "Incompatible firmware image.\n");
+ netdev_err(wlandev->netdev, "Incompatible firmware image.\n");
return 1;
}
if (startaddr == 0x00000000) {
- printk(KERN_ERR "Can't RAM download a Flash image!\n");
+ netdev_err(wlandev->netdev,
+ "Can't RAM download a Flash image!\n");
return 1;
}
/* Do any plugging */
result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);
if (result) {
- printk(KERN_ERR "Failed to plug data.\n");
+ netdev_err(wlandev->netdev, "Failed to plug data.\n");
return 1;
}
/* Insert any CRCs */
if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) {
- printk(KERN_ERR "Failed to insert all CRCs\n");
+ netdev_err(wlandev->netdev, "Failed to insert all CRCs\n");
return 1;
}
/* Write the image */
result = writeimage(wlandev, fchunk, nfchunks);
if (result) {
- printk(KERN_ERR "Failed to ramwrite image data.\n");
+ netdev_err(wlandev->netdev, "Failed to ramwrite image data.\n");
return 1;
}
free_chunks(fchunk, &nfchunks);
free_srecs();
- printk(KERN_INFO "prism2_usb: firmware loading finished.\n");
+ netdev_info(wlandev->netdev, "prism2_usb: firmware loading finished.\n");
return result;
}
break;
}
if (c >= nfchunks) {
- printk(KERN_ERR
- "Failed to find chunk for "
+ pr_err("Failed to find chunk for "
"crcrec[%d], addr=0x%06x len=%d , "
"aborting crc.\n",
i, s3crc[i].addr, s3crc[i].len);
for (i = 0; i < *ccnt; i++) {
clist[i].data = kzalloc(clist[i].len, GFP_KERNEL);
if (clist[i].data == NULL) {
- printk(KERN_ERR
- "failed to allocate image space, exitting.\n");
+ pr_err("failed to allocate image space, exitting.\n");
return 1;
}
pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
break;
}
if (((unsigned int)j) >= (*ccnt)) {
- printk(KERN_ERR
- "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
+ pr_err("s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
s3start, s3data[i].len);
return 1;
}
}
if (curroff >= (HFA384x_PDA_LEN_MAX / 2)) {
- printk(KERN_ERR
- "no end record found or invalid lengths in "
+ pr_err("no end record found or invalid lengths in "
"PDR data, exiting. %x %d\n", curroff, pda->nrec);
return 1;
}
j = -1;
}
if (j >= pda->nrec && j != -1) { /* if no matching PDR, fail */
- printk(KERN_WARNING
- "warning: Failed to find PDR for "
+ pr_warn("warning: Failed to find PDR for "
"plugrec 0x%04x.\n", s3plug[i].itemcode);
continue; /* and move on to the next PDR */
#if 0
/* Validate plug len against PDR len */
if (j != -1 && s3plug[i].len < le16_to_cpu(pda->rec[j]->len)) {
- printk(KERN_ERR
- "error: Plug vs. PDR len mismatch for "
+ pr_err("error: Plug vs. PDR len mismatch for "
"plugrec 0x%04x, abort plugging.\n",
s3plug[i].itemcode);
result = 1;
break;
}
if (c >= nfchunks) {
- printk(KERN_ERR
- "error: Failed to find image chunk for "
+ pr_err("error: Failed to find image chunk for "
"plugrec 0x%04x.\n", s3plug[i].itemcode);
result = 1;
continue;
ns3plug++;
if (ns3plug == S3PLUG_MAX) {
- printk(KERN_ERR "S3 plugrec limit reached - aborting\n");
+ pr_err("S3 plugrec limit reached - aborting\n");
return 1;
}
break;
s3crc[ns3crc].dowrite);
ns3crc++;
if (ns3crc == S3CRC_MAX) {
- printk(KERN_ERR "S3 crcrec limit reached - aborting\n");
+ pr_err("S3 crcrec limit reached - aborting\n");
return 1;
}
break;
s3info[ns3info].len,
s3info[ns3info].type);
if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) {
- printk(KERN_ERR " S3 inforec length too long - aborting\n");
+ pr_err("S3 inforec length too long - aborting\n");
return 1;
}
ns3info++;
if (ns3info == S3INFO_MAX) {
- printk(KERN_ERR "S3 inforec limit reached - aborting\n");
+ pr_err("S3 inforec limit reached - aborting\n");
return 1;
}
break;
s3data[ns3data].data = (uint8_t *) record->data;
ns3data++;
if (ns3data == S3DATA_MAX) {
- printk(KERN_ERR "S3 datarec limit reached - aborting\n");
+ pr_err("S3 datarec limit reached - aborting\n");
return 1;
}
break;
if (!rstmsg || !rwrmsg) {
kfree(rstmsg);
kfree(rwrmsg);
- printk(KERN_ERR
- "writeimage: no memory for firmware download, "
- "aborting download\n");
+ netdev_err(wlandev->netdev,
+ "writeimage: no memory for firmware download, "
+ "aborting download\n");
return -ENOMEM;
}
result = prism2mgmt_ramdl_state(wlandev, rstmsg);
if (result) {
- printk(KERN_ERR
- "writeimage state enable failed w/ result=%d, "
- "aborting download\n", result);
+ netdev_err(wlandev->netdev,
+ "writeimage state enable failed w/ result=%d, "
+ "aborting download\n", result);
goto free_result;
}
resultcode = rstmsg->resultcode.data;
if (resultcode != P80211ENUM_resultcode_success) {
- printk(KERN_ERR
- "writeimage()->xxxdl_state msg indicates failure, "
- "w/ resultcode=%d, aborting download.\n", resultcode);
+ netdev_err(wlandev->netdev,
+ "writeimage()->xxxdl_state msg indicates failure, "
+ "w/ resultcode=%d, aborting download.\n", resultcode);
result = 1;
goto free_result;
}
/* Check the results */
if (result) {
- printk(KERN_ERR
- "writeimage chunk write failed w/ result=%d, "
- "aborting download\n", result);
+ netdev_err(wlandev->netdev,
+ "writeimage chunk write failed w/ "
+ "result=%d, aborting download\n", result);
goto free_result;
}
resultcode = rstmsg->resultcode.data;
if (resultcode != P80211ENUM_resultcode_success) {
- printk(KERN_ERR
- "writeimage()->xxxdl_write msg indicates failure, "
+ pr_err("writeimage()->xxxdl_write msg indicates failure, "
"w/ resultcode=%d, aborting download.\n",
resultcode);
result = 1;
result = prism2mgmt_ramdl_state(wlandev, rstmsg);
if (result) {
- printk(KERN_ERR
- "writeimage state disable failed w/ result=%d, "
- "aborting download\n", result);
+ netdev_err(wlandev->netdev,
+ "writeimage state disable failed w/ result=%d, "
+ "aborting download\n", result);
goto free_result;
}
resultcode = rstmsg->resultcode.data;
if (resultcode != P80211ENUM_resultcode_success) {
- printk(KERN_ERR
- "writeimage()->xxxdl_state msg indicates failure, "
- "w/ resultcode=%d, aborting download.\n", resultcode);
+ netdev_err(wlandev->netdev,
+ "writeimage()->xxxdl_state msg indicates failure, "
+ "w/ resultcode=%d, aborting download.\n", resultcode);
result = 1;
goto free_result;
}
hw->ident_sta_fw.minor,
hw->ident_sta_fw.variant) <
HFA384x_FIRMWARE_VERSION(1, 3, 2)) {
- printk(KERN_ERR
- "HostScan not supported with current firmware (<1.3.2).\n");
+ netdev_err(wlandev->netdev,
+ "HostScan not supported with current firmware (<1.3.2).\n");
result = 1;
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
goto exit;
HFA384x_RID_CNFROAMINGMODE,
&roamingmode);
if (result) {
- printk(KERN_ERR "getconfig(ROAMMODE) failed. result=%d\n",
- result);
+ netdev_err(wlandev->netdev,
+ "getconfig(ROAMMODE) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
HFA384x_RID_CNFROAMINGMODE,
HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM);
if (result) {
- printk(KERN_ERR "setconfig(ROAMINGMODE) failed. result=%d\n",
- result);
+ netdev_err(wlandev->netdev,
+ "setconfig(ROAMINGMODE) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFPASSIVESCANCTRL,
word);
if (result) {
- printk(KERN_WARNING "Passive scan not supported with "
- "current firmware. (<1.5.1)\n");
+ netdev_warn(wlandev->netdev,
+ "Passive scan not supported with "
+ "current firmware. (<1.5.1)\n");
}
}
/* Enable the MAC port if it's not already enabled */
result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_PORTSTATUS, &word);
if (result) {
- printk(KERN_ERR "getconfig(PORTSTATUS) failed. "
- "result=%d\n", result);
+ netdev_err(wlandev->netdev,
+ "getconfig(PORTSTATUS) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
HFA384x_RID_CNFROAMINGMODE,
HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM);
if (result) {
- printk(KERN_ERR
- "setconfig(ROAMINGMODE) failed. result=%d\n",
- result);
+ netdev_err(wlandev->netdev,
+ "setconfig(ROAMINGMODE) failed. result=%d\n",
+ result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
wordbuf,
HFA384x_RID_CNFOWNSSID_LEN);
if (result) {
- printk(KERN_ERR "Failed to set OwnSSID.\n");
+ netdev_err(wlandev->netdev, "Failed to set OwnSSID.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
wordbuf,
HFA384x_RID_CNFDESIREDSSID_LEN);
if (result) {
- printk(KERN_ERR "Failed to set DesiredSSID.\n");
+ netdev_err(wlandev->netdev,
+ "Failed to set DesiredSSID.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
HFA384x_RID_CNFPORTTYPE,
HFA384x_PORTTYPE_IBSS);
if (result) {
- printk(KERN_ERR "Failed to set CNFPORTTYPE.\n");
+ netdev_err(wlandev->netdev,
+ "Failed to set CNFPORTTYPE.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
HFA384x_RID_CREATEIBSS,
HFA384x_CREATEIBSS_JOINCREATEIBSS);
if (result) {
- printk(KERN_ERR "Failed to set CREATEIBSS.\n");
+ netdev_err(wlandev->netdev,
+ "Failed to set CREATEIBSS.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
}
result = hfa384x_drvr_enable(hw, 0);
if (result) {
- printk(KERN_ERR "drvr_enable(0) failed. "
- "result=%d\n", result);
+ netdev_err(wlandev->netdev,
+ "drvr_enable(0) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
HFA384x_RID_HOSTSCAN, &scanreq,
sizeof(hfa384x_HostScanRequest_data_t));
if (result) {
- printk(KERN_ERR "setconfig(SCANREQUEST) failed. result=%d\n",
- result);
+ netdev_err(wlandev->netdev,
+ "setconfig(SCANREQUEST) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
if (istmpenable) {
result = hfa384x_drvr_disable(hw, 0);
if (result) {
- printk(KERN_ERR "drvr_disable(0) failed. "
- "result=%d\n", result);
+ netdev_err(wlandev->netdev,
+ "drvr_disable(0) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFROAMINGMODE,
roamingmode);
if (result) {
- printk(KERN_ERR "setconfig(ROAMMODE) failed. result=%d\n",
- result);
+ netdev_err(wlandev->netdev,
+ "setconfig(ROAMMODE) failed. result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
goto exit;
req->resultcode.status = P80211ENUM_msgitem_status_data_ok;
if (!hw->scanresults) {
- printk(KERN_ERR
- "dot11req_scan_results can only be used after a successful dot11req_scan.\n");
+ netdev_err(wlandev->netdev,
+ "dot11req_scan_results can only be used after "
+ "a successful dot11req_scan.\n");
result = 2;
req->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
goto exit;
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID,
bytebuf, HFA384x_RID_CNFOWNSSID_LEN);
if (result) {
- printk(KERN_ERR "Failed to set CnfOwnSSID\n");
+ netdev_err(wlandev->netdev, "Failed to set CnfOwnSSID\n");
goto failed;
}
result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID,
bytebuf,
HFA384x_RID_CNFDESIREDSSID_LEN);
if (result) {
- printk(KERN_ERR "Failed to set CnfDesiredSSID\n");
+ netdev_err(wlandev->netdev, "Failed to set CnfDesiredSSID\n");
goto failed;
}
word = msg->beaconperiod.data;
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNint, word);
if (result) {
- printk(KERN_ERR "Failed to set beacon period=%d.\n", word);
+ netdev_err(wlandev->netdev,
+ "Failed to set beacon period=%d.\n", word);
goto failed;
}
word = msg->dschannel.data;
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFOWNCHANNEL, word);
if (result) {
- printk(KERN_ERR "Failed to set channel=%d.\n", word);
+ netdev_err(wlandev->netdev,
+ "Failed to set channel=%d.\n", word);
goto failed;
}
/* Basic rates */
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFBASICRATES, word);
if (result) {
- printk(KERN_ERR "Failed to set basicrates=%d.\n", word);
+ netdev_err(wlandev->netdev,
+ "Failed to set basicrates=%d.\n", word);
goto failed;
}
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFSUPPRATES, word);
if (result) {
- printk(KERN_ERR "Failed to set supprates=%d.\n", word);
+ netdev_err(wlandev->netdev,
+ "Failed to set supprates=%d.\n", word);
goto failed;
}
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_TXRATECNTL, word);
if (result) {
- printk(KERN_ERR "Failed to set txrates=%d.\n", word);
+ netdev_err(wlandev->netdev, "Failed to set txrates=%d.\n", word);
goto failed;
}
/* Enable the Port */
result = hfa384x_drvr_enable(hw, 0);
if (result) {
- printk(KERN_ERR "Enable macport failed, result=%d.\n", result);
+ netdev_err(wlandev->netdev,
+ "Enable macport failed, result=%d.\n", result);
goto failed;
}
* state.
*/
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
- printk(KERN_ERR
- "PDA may only be read " "in the fwload state.\n");
+ netdev_err(wlandev->netdev,
+ "PDA may only be read in the fwload state.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->pda.data,
HFA384x_PDA_LEN_MAX);
if (result) {
- printk(KERN_ERR
- "hfa384x_drvr_readpda() failed, "
- "result=%d\n", result);
+ netdev_err(wlandev->netdev,
+ "hfa384x_drvr_readpda() failed, "
+ "result=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
struct p80211msg_p2req_ramdl_state *msg = msgp;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
- printk(KERN_ERR
- "ramdl_state(): may only be called "
- "in the fwload state.\n");
+ netdev_err(wlandev->netdev,
+ "ramdl_state(): may only be called "
+ "in the fwload state.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
u8 *buf;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
- printk(KERN_ERR
- "ramdl_write(): may only be called "
- "in the fwload state.\n");
+ netdev_err(wlandev->netdev,
+ "ramdl_write(): may only be called "
+ "in the fwload state.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
struct p80211msg_p2req_flashdl_state *msg = msgp;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
- printk(KERN_ERR
- "flashdl_state(): may only be called "
- "in the fwload state.\n");
+ netdev_err(wlandev->netdev,
+ "flashdl_state(): may only be called "
+ "in the fwload state.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
wlandev->msdstate = WLAN_MSD_HWPRESENT;
result = prism2sta_ifstate(wlandev, P80211ENUM_ifstate_fwload);
if (result != P80211ENUM_resultcode_success) {
- printk(KERN_ERR "prism2sta_ifstate(fwload) failed,"
- "P80211ENUM_resultcode=%d\n", result);
+ netdev_err(wlandev->netdev,
+ "prism2sta_ifstate(fwload) failed,"
+ "P80211ENUM_resultcode=%d\n", result);
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
result = -1;
u8 *buf;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
- printk(KERN_ERR
- "flashdl_write(): may only be called "
- "in the fwload state.\n");
+ netdev_err(wlandev->netdev,
+ "flashdl_write(): may only be called "
+ "in the fwload state.\n");
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
}
- printk(KERN_INFO "monitor mode disabled\n");
+ netdev_info(wlandev->netdev, "monitor mode disabled\n");
msg->resultcode.data = P80211ENUM_resultcode_success;
result = 0;
goto exit;
}
if (wlandev->netdev->type == ARPHRD_ETHER)
- printk(KERN_INFO "monitor mode enabled\n");
+ netdev_info(wlandev->netdev, "monitor mode enabled\n");
/* Set the driver state */
/* Do we want the prism2 header? */
if (!isget)
if ((*uint32) % 2) {
- printk(KERN_WARNING "Attempt to set odd number "
+ netdev_warn(wlandev->netdev, "Attempt to set odd number "
"FragmentationThreshold\n");
msg->resultcode.data =
P80211ENUM_resultcode_not_supported;
break;
}
default:
- printk(KERN_ERR "Unhandled DID 0x%08x\n", mib->did);
+ netdev_err(wlandev->netdev, "Unhandled DID 0x%08x\n", mib->did);
}
return 0;
break;
}
default:
- printk(KERN_WARNING "Unknown mgmt request message 0x%08x",
- msg->msgcode);
+ netdev_warn(wlandev->netdev,
+ "Unknown mgmt request message 0x%08x",
+ msg->msgcode);
break;
}
result = P80211ENUM_resultcode_success;
break;
case WLAN_MSD_RUNNING:
- printk(KERN_WARNING
+ netdev_warn(wlandev->netdev,
"Cannot enter fwload state from enable state,"
"you must disable first.\n");
result = P80211ENUM_resultcode_invalid_parameters;
default:
/* This is bad, IO port problems? */
- printk(KERN_WARNING
+ netdev_warn(wlandev->netdev,
"unknown linkstatus=0x%02x\n", hw->link_status);
return;
}
if (i >= hw->authlist.cnt) {
if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL)
- printk(KERN_WARNING
+ netdev_warn(wlandev->netdev,
"assocstatus info frame received for non-authenticated station.\n");
} else {
hw->authlist.assoc[i] =
rec.assocstatus == HFA384x_ASSOCSTATUS_REASSOC);
if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL)
- printk(KERN_WARNING
+ netdev_warn(wlandev->netdev,
"authfail assocstatus info frame received for authenticated station.\n");
}
}
prism2sta_inf_psusercnt(wlandev, inf);
break;
case HFA384x_IT_KEYIDCHANGED:
- printk(KERN_WARNING "Unhandled IT_KEYIDCHANGED\n");
+ netdev_warn(wlandev->netdev, "Unhandled IT_KEYIDCHANGED\n");
break;
case HFA384x_IT_ASSOCREQ:
- printk(KERN_WARNING "Unhandled IT_ASSOCREQ\n");
+ netdev_warn(wlandev->netdev, "Unhandled IT_ASSOCREQ\n");
break;
case HFA384x_IT_MICFAILURE:
- printk(KERN_WARNING "Unhandled IT_MICFAILURE\n");
+ netdev_warn(wlandev->netdev, "Unhandled IT_MICFAILURE\n");
break;
default:
- printk(KERN_WARNING
+ netdev_warn(wlandev->netdev,
"Unknown info type=0x%02x\n", inf->infotype);
break;
}