#include <asm/bitops.h>
#include <linux/list.h>
#include <linux/usb.h>
+#include <linux/byteorder/generic.h>
#include "wlan_compat.h"
typedef enum cmd_mode CMD_MODE;
#define THROTTLE_JIFFIES (HZ/8)
+#define URB_ASYNC_UNLINK 0
+#define USB_QUEUE_BULK 0
/*================================================================*/
/* Local Macros */
struct sk_buff *skb;
int result;
- DBFENTER;
-
skb = dev_alloc_skb(sizeof(hfa384x_usbin_t));
if (skb == NULL) {
result = -ENOMEM;
/* Check whether we need to reset the RX pipe */
if (result == -EPIPE) {
- WLAN_LOG_WARNING("%s rx pipe stalled: requesting reset\n",
+ printk(KERN_WARNING "%s rx pipe stalled: requesting reset\n",
hw->wlandev->netdev->name);
if ( !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags) )
schedule_work(&hw->usb_work);
}
done:
-
- DBFEXIT;
return result;
}
struct net_device *netdev = hw->wlandev->netdev;
int result;
- DBFENTER;
-
result = -ENOLINK;
if ( netif_running(netdev) ) {
/* Test whether we need to reset the TX pipe */
if (result == -EPIPE) {
- WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n",
+ printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n",
netdev->name);
set_bit(WORK_TX_HALT, &hw->usb_flags);
schedule_work(&hw->usb_work);
}
}
- DBFEXIT;
-
return result;
}
hfa384x_t *hw = container_of(data, struct hfa384x, usb_work);
struct net_device *netdev = hw->wlandev->netdev;
- DBFENTER;
-
/* Don't bother trying to reset anything if the plug
* has been pulled ...
*/
if ( hw->wlandev->hwremoved ) {
- DBFEXIT;
return;
}
if ( test_and_clear_bit(WORK_TX_RESUME, &hw->usb_flags) ) {
netif_wake_queue(hw->wlandev->netdev);
}
-
- DBFEXIT;
}
void
hfa384x_create( hfa384x_t *hw, struct usb_device *usb)
{
- DBFENTER;
-
memset(hw, 0, sizeof(hfa384x_t));
hw->usb = usb;
init_timer(&hw->commsqual_timer);
hw->commsqual_timer.data = (unsigned long) hw;
hw->commsqual_timer.function = prism2sta_commsqual_timer;
-
- DBFEXIT;
}
{
struct sk_buff *skb;
- DBFENTER;
-
if ( hw->state == HFA384x_STATE_RUNNING ) {
hfa384x_drvr_stop(hw);
}
while ( (skb = skb_dequeue(&hw->authq)) ) {
dev_kfree_skb(skb);
}
-
- DBFEXIT;
}
usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp,
hfa384x_cmdresult_t *result)
{
- DBFENTER;
-
result->status = hfa384x2host_16(cmdresp->status);
result->resp0 = hfa384x2host_16(cmdresp->resp0);
result->resp1 = hfa384x2host_16(cmdresp->resp1);
result->resp1,
result->resp2);
- DBFEXIT;
return (result->status & HFA384x_STATUS_RESULT);
}
usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp,
hfa384x_rridresult_t *result)
{
- DBFENTER;
-
result->rid = hfa384x2host_16(rridresp->rid);
result->riddata = rridresp->data;
result->riddata_len = ((hfa384x2host_16(rridresp->frmlen) - 1) * 2);
- DBFEXIT;
}
/* Validate the length, note body len calculation in bytes */
if ( rridresult.riddata_len != complete->riddatalen ) {
- WLAN_LOG_WARNING(
+ printk(KERN_WARNING
"RID len mismatch, rid=0x%04x hlen=%d fwlen=%d\n",
rridresult.rid,
complete->riddatalen,
static void
hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{
- DBFENTER;
-
if ( ctlx->usercb != NULL ) {
hfa384x_cmdresult_t cmdresult;
ctlx->usercb(hw, &cmdresult, ctlx->usercb_data);
}
-
- DBFEXIT;
}
static void
hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{
- DBFENTER;
-
if ( ctlx->usercb != NULL ) {
hfa384x_rridresult_t rridresult;
ctlx->usercb(hw, &rridresult, ctlx->usercb_data);
}
-
- DBFEXIT;
}
static inline int
int i;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
-
cmd.cmd = HFA384x_CMDCODE_INIT;
cmd.parm0 = 0;
cmd.parm1 = 0;
hw->link_status = HFA384x_LINK_NOTCONNECTED;
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
HFA384x_CMD_MACPORT_SET(macport);
cmd.parm0 = 0;
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
HFA384x_CMD_MACPORT_SET(macport);
cmd.parm0 = 0;
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
HFA384x_CMD_AINFO_SET(enable);
cmd.parm0 = 0;
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
WLAN_LOG_DEBUG(5,
"mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
mode, lowaddr, highaddr, codelen);
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
hfa384x_copy_from_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{
- DBFENTER;
- WLAN_LOG_ERROR("not used in USB.\n");
- DBFEXIT;
+ printk(KERN_ERR "not used in USB.\n");
}
hfa384x_copy_to_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{
- DBFENTER;
- WLAN_LOG_ERROR("not used in USB.\n");
- DBFEXIT;
+ printk(KERN_ERR "not used in USB.\n");
}
{
int result = 0;
- DBFENTER;
-
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);
}
- DBFEXIT;
return result;
}
unsigned long flags;
int result;
- DBFENTER;
-
result = wait_for_completion_interruptible(&ctlx->done);
spin_lock_irqsave(&hw->ctlxq.lock, flags);
if (ctlx->state == CTLX_COMPLETE) {
result = completor->complete(completor);
} else {
- WLAN_LOG_WARNING("CTLX[%d] error: state(%s)\n",
+ printk(KERN_WARNING "CTLX[%d] error: state(%s)\n",
hfa384x2host_16(ctlx->outbuf.type),
ctlxstr(ctlx->state));
result = -EIO;
kfree(ctlx);
}
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
WLAN_LOG_DEBUG(5, "page=0x%04x offset=0x%04x len=%d\n",
page,offset,len);
}
done:
- DBFEXIT;
return result;
}
{
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMDCODE_INQ;
cmd.parm0 = HFA384x_IT_COMMTALLIES;
cmd.parm1 = 0;
hfa384x_docmd_async(hw, &cmd, NULL, NULL, NULL);
- DBFEXIT;
return 0;
}
{
int result = 0;
- DBFENTER;
if ((!hw->isap && macport != 0) ||
(hw->isap && !(macport <= HFA384x_PORTID_MAX)) ||
!(hw->port_enabled[macport]) ){
hw->port_enabled[macport] = 0;
}
}
- DBFEXIT;
return result;
}
{
int result = 0;
- DBFENTER;
if ((!hw->isap && macport != 0) ||
(hw->isap && !(macport <= HFA384x_PORTID_MAX)) ||
(hw->port_enabled[macport]) ){
hw->port_enabled[macport] = 1;
}
}
- DBFEXIT;
return result;
}
int result = 0;
int i;
- DBFENTER;
/* Check that a port isn't active */
for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
if ( hw->port_enabled[i] ) {
WLAN_LOG_DEBUG(1,"flashdl_enable\n");
hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;
- DBFEXIT;
+
return result;
}
----------------------------------------------------------------*/
int hfa384x_drvr_flashdl_disable(hfa384x_t *hw)
{
- DBFENTER;
/* Check that we're already in the download state */
if ( hw->dlstate != HFA384x_DLSTATE_FLASHENABLED ) {
return -EINVAL;
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
hw->dlstate = HFA384x_DLSTATE_DISABLED;
- DBFEXIT;
return 0;
}
int i;
int j;
- DBFENTER;
WLAN_LOG_DEBUG(5,"daddr=0x%08x len=%d\n", daddr, len);
/* Check that we're in the flash download state */
return -EINVAL;
}
- WLAN_LOG_INFO("Download %d bytes to flash @0x%06x\n", len, daddr);
+ printk(KERN_INFO "Download %d bytes to flash @0x%06x\n", len, daddr);
/* Convert to flat address for arithmetic */
/* NOTE: dlbuffer RID stores the address in AUX format */
hw->bufinfo.page, hw->bufinfo.offset, dlbufaddr);
#if 0
-WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout);
+printk(KERN_WARNING "dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout);
#endif
/* Calculations to determine how many fills of the dlbuffer to do
* and how many USB wmemreq's to do for each fill. At this point
burnlo = HFA384x_ADDR_CMD_MKOFF(burndaddr);
burnhi = HFA384x_ADDR_CMD_MKPAGE(burndaddr);
- WLAN_LOG_INFO("Writing %d bytes to flash @0x%06x\n",
+ printk(KERN_INFO "Writing %d bytes to flash @0x%06x\n",
burnlen, burndaddr);
/* Set the download mode */
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);
/* actually disable programming mode. Remember, that will cause the */
/* the firmware to effectively reset itself. */
- DBFEXIT;
return result;
}
int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len)
{
int result;
- DBFENTER;
result = hfa384x_dorrid_wait(hw, rid, buf, len);
- DBFEXIT;
return result;
}
----------------------------------------------------------------*/
int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr)
{
- DBFENTER;
- WLAN_LOG_ERROR("Not currently supported in USB!\n");
- DBFEXIT;
+ printk(KERN_ERR "Not currently supported in USB!\n");
return -EIO;
}
int hfa384x_drvr_low_level(hfa384x_t *hw, hfa384x_metacmd_t *cmd)
{
int result;
- DBFENTER;
/* Do i need a host2hfa... conversion ? */
result = hfa384x_docmd_wait(hw, cmd);
- DBFEXIT;
return result;
}
int
hfa384x_drvr_ramdl_disable(hfa384x_t *hw)
{
- DBFENTER;
/* Check that we're already in the download state */
if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) {
return -EINVAL;
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
hw->dlstate = HFA384x_DLSTATE_DISABLED;
- DBFEXIT;
return 0;
}
u16 lowaddr;
u16 hiaddr;
int i;
- DBFENTER;
+
/* 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;
}
result);
}
- DBFEXIT;
return result;
}
u16 currpage;
u16 curroffset;
u16 currlen;
- DBFENTER;
+
/* Check that we're in the ram download state */
if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) {
return -EINVAL;
}
- WLAN_LOG_INFO("Writing %d bytes to ram @0x%06x\n", len, daddr);
+ printk(KERN_INFO "Writing %d bytes to ram @0x%06x\n", len, daddr);
/* How many dowmem calls? */
nwrites = len / HFA384x_USB_RWMEM_MAXLEN;
/* TODO: We really should have a readback. */
}
- DBFEXIT;
return result;
}
{ HFA3841_PDA_BOGUS_BASE, 0}
};
- DBFENTER;
-
/* Read the pda from each known address. */
for ( i = 0; i < ARRAY_SIZE(pdaloc); i++) {
/* Make address */
len); /* units of bytes */
if (result) {
- WLAN_LOG_WARNING(
+ printk(KERN_WARNING
"Read from index %zd failed, continuing\n",
i );
continue;
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;
}
}
if ( pdaok ) {
- WLAN_LOG_INFO(
+ printk(KERN_INFO
"PDA Read from 0x%08x in %s space.\n",
pdaloc[i].cardaddr,
pdaloc[i].auxctl == 0 ? "EXTDS" :
WLAN_LOG_DEBUG(3,"Failure: pda is not okay\n");
}
- DBFEXIT;
return result;
}
{
int result, result1, result2;
u16 status;
- DBFENTER;
might_sleep();
*/
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);
WLAN_LOG_DEBUG(0, "but second attempt succeeded. All should be ok\n");
}
} else if (result2 != 0) {
- WLAN_LOG_WARNING(
+ printk(KERN_WARNING
"First cmd_initialize() succeeded, but second attempt failed (result=%d)\n",
result2);
- WLAN_LOG_WARNING("Most likely the card will be functional\n");
+ printk(KERN_WARNING "Most likely the card will be functional\n");
goto done;
}
hw->state = HFA384x_STATE_RUNNING;
done:
- DBFEXIT;
return result;
}
{
int result = 0;
int i;
- DBFENTER;
might_sleep();
hw->port_enabled[i] = 0;
}
- DBFEXIT;
return result;
}
int ret;
char *ptr;
- DBFENTER;
-
if (hw->tx_urb.status == -EINPROGRESS) {
- WLAN_LOG_WARNING("TX URB already in use\n");
+ printk(KERN_WARNING "TX URB already in use\n");
result = 3;
goto exit;
}
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;
}
exit:
- DBFEXIT;
return result;
}
hfa384x_t *hw = wlandev->priv;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
if ( !hw->wlandev->hwremoved &&
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
/*----------------------------------------------------------------
struct list_head *temp;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
/* This list is guaranteed to be empty if someone
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
- DBFEXIT;
}
/*----------------------------------------------------------------
int reap = 0;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
/* This list is guaranteed to be empty if someone
if (reap)
tasklet_schedule(&hw->reaper_bh);
-
- DBFEXIT;
}
/*----------------------------------------------------------------
{
int ret;
- DBFENTER;
-
/*
* Try to delete the URB containing our request packet.
* If we succeed, then its completion handler will be
ret = 0;
}
- DBFEXIT;
-
return ret;
}
----------------------------------------------------------------*/
static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
{
- DBFENTER;
-
/* Timers have been stopped, and ctlx should be in
* a terminal state. Retire it from the "active"
* queue.
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;
} /* switch */
-
- DBFEXIT;
}
/*----------------------------------------------------------------
hfa384x_usbctlxq_run(hfa384x_t *hw)
{
unsigned long flags;
- DBFENTER;
/* acquire lock */
spin_lock_irqsave(&hw->ctlxq.lock, flags);
* this CTLX back in the "pending" queue
* and schedule a reset ...
*/
- WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n",
+ printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n",
hw->wlandev->netdev->name);
list_move(&head->list, &hw->ctlxq.pending);
set_bit(WORK_TX_HALT, &hw->usb_flags);
}
if (result == -ESHUTDOWN) {
- WLAN_LOG_WARNING("%s urb shutdown!\n",
+ printk(KERN_WARNING "%s urb shutdown!\n",
hw->wlandev->netdev->name);
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 */
unlock:
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
ABORT
} action;
- DBFENTER;
-
if ( !wlandev ||
!wlandev->netdev ||
wlandev->hwremoved )
break;
case -EPIPE:
- WLAN_LOG_WARNING("%s rx pipe stalled: requesting reset\n",
+ printk(KERN_WARNING "%s rx pipe stalled: requesting reset\n",
wlandev->netdev->name);
if ( !test_and_set_bit(WORK_RX_HALT, &hw->usb_flags) )
schedule_work(&hw->usb_work);
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);
}
if (skb)
dev_kfree_skb(skb);
-
- DBFEXIT;
}
int run_queue = 0;
unsigned long flags;
- DBFENTER;
-
retry:
spin_lock_irqsave(&hw->ctlxq.lock, flags);
* Check that our message is what we're expecting ...
*/
if (ctlx->outbuf.type != intype) {
- WLAN_LOG_WARNING("Expected IN[%d], received IN[%d] - ignored.\n",
+ printk(KERN_WARNING "Expected IN[%d], received IN[%d] - ignored.\n",
hfa384x2host_16(ctlx->outbuf.type),
hfa384x2host_16(intype));
goto unlock;
/*
* 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 (run_queue)
hfa384x_usbctlxq_run(hw);
-
- DBFEXIT;
}
static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
{
u16 status;
- DBFENTER;
status = hfa384x2host_16(usbin->type); /* yeah I know it says type...*/
prism2sta_ev_tx(wlandev, status);
}
// prism2sta_ev_alloc(wlandev);
-
- DBFEXIT;
}
u16 data_len;
u16 fc;
- DBFENTER;
-
/* Byte order convert once up front. */
usbin->rxfrm.desc.status =
hfa384x2host_16(usbin->rxfrm.desc.status);
switch( HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status) )
{
case 0:
- fc = ieee2host16(usbin->rxfrm.desc.frame_control);
+ fc = le16_to_cpu(usbin->rxfrm.desc.frame_control);
/* If exclude and we receive an unencrypted, drop it */
if ( (wlandev->hostwep & HOSTWEP_EXCLUDEUNENCRYPTED) &&
break;
default:
- WLAN_LOG_WARNING("Received frame on unsupported port=%d\n",
+ printk(KERN_WARNING "Received frame on unsupported port=%d\n",
HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status) );
goto done;
break;
}
done:
- DBFEXIT;
return;
}
struct sk_buff *skb;
hfa384x_t *hw = wlandev->priv;
-
- DBFENTER;
/* Don't forget the status, time, and data_len fields are in host order */
/* Figure out how big the frame is */
- fc = ieee2host16(rxdesc->frame_control);
+ fc = le16_to_cpu(rxdesc->frame_control);
hdrlen = p80211_headerlen(fc);
datalen = hfa384x2host_16(rxdesc->data_len);
}
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;
}
/* pass it back up */
prism2sta_ev_rx(wlandev, skb);
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
{
- DBFENTER;
-
usbin->infofrm.info.framelen = hfa384x2host_16(usbin->infofrm.info.framelen);
prism2sta_ev_info(wlandev, &usbin->infofrm.info);
-
- DBFEXIT;
}
{
wlandevice_t *wlandev = urb->context;
hfa384x_usbout_t *usbout = urb->transfer_buffer;
- DBFENTER;
#ifdef DEBUG_USB
dbprint_urb(urb);
case -EPIPE:
{
hfa384x_t *hw = wlandev->priv;
- WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n",
+ printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n",
wlandev->netdev->name);
if ( !test_and_set_bit(WORK_TX_HALT, &hw->usb_flags) )
schedule_work(&hw->usb_work);
break;
default:
- WLAN_LOG_INFO("unknown urb->status=%d\n", urb->status);
+ printk(KERN_INFO "unknown urb->status=%d\n", urb->status);
++(wlandev->linux_stats.tx_errors);
break;
} /* switch */
}
-
- DBFEXIT;
}
hfa384x_usbctlx_t *ctlx;
unsigned long flags;
- DBFENTER;
-
WLAN_LOG_DEBUG(3,"urb->status=%d\n", urb->status);
#ifdef DEBUG_USB
dbprint_urb(urb);
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);
/* If the pipe has stalled then we need to reset it */
if ( (urb->status == -EPIPE) &&
!test_and_set_bit(WORK_TX_HALT, &hw->usb_flags) ) {
- WLAN_LOG_WARNING("%s tx pipe stalled: requesting reset\n",
+ printk(KERN_WARNING "%s tx pipe stalled: requesting reset\n",
hw->wlandev->netdev->name);
schedule_work(&hw->usb_work);
}
hfa384x_usbctlxq_run(hw);
done:
- DBFEXIT;
+ ;
}
{
hfa384x_t *hw = (hfa384x_t*)data;
unsigned long flags;
- DBFENTER;
spin_lock_irqsave(&hw->ctlxq.lock, flags);
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
hfa384x_t *hw = (hfa384x_t*)data;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
hw->resp_timer_done = 1;
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
done:
- DBFEXIT;
+ ;
+
}
/*----------------------------------------------------------------
hfa384x_t *hw = (hfa384x_t*)data;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
/*
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
unsigned long flags;
int ret;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
if (hw->wlandev->hwremoved) {
ret = 0;
}
- DBFEXIT;
return ret;
}
----------------------------------------------------------------*/
static void hfa384x_usbout_tx(wlandevice_t *wlandev, hfa384x_usbout_t *usbout)
{
- DBFENTER;
-
prism2sta_ev_alloc(wlandev);
-
- DBFEXIT;
}
/*----------------------------------------------------------------