hfa384x_copy_from_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{
- WLAN_LOG_ERROR("not used in USB.\n");
+ printk(KERN_ERR "not used in USB.\n");
}
hfa384x_copy_to_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{
- WLAN_LOG_ERROR("not used in USB.\n");
+ printk(KERN_ERR "not used in USB.\n");
}
result=usb_reset_device(hw->usb);
if(result<0) {
- WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result);
+ printk(KERN_ERR "usb_reset_device() failed, result=%d.\n",result);
}
return result;
result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV,
burnlo, burnhi, burnlen);
if ( result ) {
- WLAN_LOG_ERROR("download(NV,lo=%x,hi=%x,len=%x) "
+ printk(KERN_ERR "download(NV,lo=%x,hi=%x,len=%x) "
"cmd failed, result=%d. Aborting d/l\n",
burnlo, burnhi, burnlen, result);
goto exit_proc;
Comment out for debugging, assume the write was successful.
if (result) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Write to dl buffer failed, "
"result=0x%04x. Aborting.\n",
result);
HFA384x_PROGMODE_NVWRITE,
0,0,0);
if ( result ) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"download(NVWRITE,lo=%x,hi=%x,len=%x) "
"cmd failed, result=%d. Aborting d/l\n",
burnlo, burnhi, burnlen, result);
----------------------------------------------------------------*/
int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr)
{
- WLAN_LOG_ERROR("Not currently supported in USB!\n");
+ printk(KERN_ERR "Not currently supported in USB!\n");
return -EIO;
}
/* Check that a port isn't active */
for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
if ( hw->port_enabled[i] ) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Can't download with a macport enabled.\n");
return -EINVAL;
}
/* Check that we're not already in a download state */
if ( hw->dlstate != HFA384x_DLSTATE_DISABLED ) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Download state not disabled.\n");
return -EINVAL;
}
pdrcode = hfa384x2host_16(pda[currpdr+1]);
/* Test the record length */
if ( pdrlen > HFA384x_PDR_LEN_MAX || pdrlen == 0) {
- WLAN_LOG_ERROR("pdrlen invalid=%d\n",
+ printk(KERN_ERR "pdrlen invalid=%d\n",
pdrlen);
pdaok = 0;
break;
}
/* Test the code */
if ( !hfa384x_isgood_pdrcode(pdrcode) ) {
- WLAN_LOG_ERROR("pdrcode invalid=%d\n",
+ printk(KERN_ERR "pdrcode invalid=%d\n",
pdrcode);
pdaok = 0;
break;
*/
result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_in, &status);
if (result < 0) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Cannot get bulk in endpoint status.\n");
goto done;
}
if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_in)) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Failed to reset bulk in endpoint.\n");
}
result = usb_get_status(hw->usb, USB_RECIP_ENDPOINT, hw->endp_out, &status);
if (result < 0) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Cannot get bulk out endpoint status.\n");
goto done;
}
if ((status == 1) && usb_clear_halt(hw->usb, hw->endp_out)) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Failed to reset bulk out endpoint.\n");
}
/* Post the IN urb */
result = submit_rx_urb(hw, GFP_KERNEL);
if (result != 0) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Fatal, failed to submit RX URB, result=%d\n",
result);
goto done;
result = result2 = hfa384x_cmd_initialize(hw);
if (result1 != 0) {
if (result2 != 0) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"cmd_initialize() failed on two attempts, results %d and %d\n",
result1, result2);
usb_kill_urb(&hw->rx_urb);
result = 1;
ret = submit_tx_urb(hw, &hw->tx_urb, GFP_ATOMIC);
if ( ret != 0 ) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"submit_tx_urb() failed, error=%d\n", ret);
result = 3;
}
break;
default:
- WLAN_LOG_ERROR("CTLX[%d] not in a terminating state(%s)\n",
+ printk(KERN_ERR "CTLX[%d] not in a terminating state(%s)\n",
hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state));
break;
break;
}
- WLAN_LOG_ERROR("Failed to submit CTLX[%d]: error=%d\n",
+ printk(KERN_ERR "Failed to submit CTLX[%d]: error=%d\n",
hfa384x2host_16(head->outbuf.type), result);
unlocked_usbctlx_complete(hw, head);
} /* while */
result = submit_rx_urb(hw, GFP_ATOMIC);
if (result != 0) {
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Fatal, failed to resubmit rx_urb. error=%d\n",
result);
}
/*
* Throw this CTLX away ...
*/
- WLAN_LOG_ERROR("Matched IN URB, CTLX[%d] in invalid state(%s)."
+ printk(KERN_ERR "Matched IN URB, CTLX[%d] in invalid state(%s)."
" Discarded.\n",
hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state));
}
if ( (skb = dev_alloc_skb(skblen)) == NULL ) {
- WLAN_LOG_ERROR("alloc_skb failed trying to allocate %d bytes\n", skblen);
+ printk(KERN_ERR "alloc_skb failed trying to allocate %d bytes\n", skblen);
return;
}
default:
/* This is NOT a valid CTLX "success" state! */
- WLAN_LOG_ERROR(
+ printk(KERN_ERR
"Illegal CTLX[%d] success state(%s, %d) in OUT URB\n",
hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state), urb->status);