|
|
|
@ -655,13 +655,13 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, UINT len) |
|
|
|
|
/* Check for aux available */ |
|
|
|
|
result = hfa384x_cmd_aux_enable(hw); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG1(1,"aux_enable() failed. result=%d\n", result); |
|
|
|
|
WLAN_LOG_DEBUG(1,"aux_enable() failed. result=%d\n", result); |
|
|
|
|
goto failed; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Read the pda from each known address. */ |
|
|
|
|
for ( i = 0; i < (sizeof(pdaloc)/sizeof(pdaloc[0])); i++) { |
|
|
|
|
WLAN_LOG_DEBUG2( 3, "Checking PDA@(0x%08lx,%s)\n", |
|
|
|
|
WLAN_LOG_DEBUG( 3, "Checking PDA@(0x%08lx,%s)\n", |
|
|
|
|
pdaloc[i].cardaddr, |
|
|
|
|
pdaloc[i].auxctl == HFA384x_AUX_CTL_NV ? |
|
|
|
|
"CTL_NV" : "CTL_EXTDS"); |
|
|
|
@ -695,7 +695,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, UINT len) |
|
|
|
|
(currpdr + 2) * sizeof(UINT16)); |
|
|
|
|
pdacrc =hfa384x2host_16(pda[currpdr+2]); |
|
|
|
|
if ( crc != pdacrc ) { |
|
|
|
|
WLAN_LOG_DEBUG2(3, |
|
|
|
|
WLAN_LOG_DEBUG(3, |
|
|
|
|
"PDA crc failed:" |
|
|
|
|
"calc_crc=0x%04x," |
|
|
|
|
"pdr_crc=0x%04x.\n", |
|
|
|
@ -703,7 +703,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, UINT len) |
|
|
|
|
pdaok = 0; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
WLAN_LOG_DEBUG1(3,
|
|
|
|
|
WLAN_LOG_DEBUG(3,
|
|
|
|
|
"END record detected w/ " |
|
|
|
|
"len(%d) != 2, assuming bad PDA\n", |
|
|
|
|
pdrlen); |
|
|
|
@ -715,12 +715,12 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, UINT len) |
|
|
|
|
|
|
|
|
|
/* Test the record length */ |
|
|
|
|
if ( pdrlen > HFA384x_PDR_LEN_MAX || pdrlen == 0) { |
|
|
|
|
WLAN_LOG_DEBUG4(3, |
|
|
|
|
WLAN_LOG_DEBUG(3, |
|
|
|
|
"pdrlen for address #%d " |
|
|
|
|
"at %#lx:%#x:%d\n", |
|
|
|
|
i, pdaloc[i].cardaddr,
|
|
|
|
|
pdaloc[i].auxctl, pdrlen); |
|
|
|
|
WLAN_LOG_DEBUG1(3,"pdrlen invalid=%d\n",
|
|
|
|
|
WLAN_LOG_DEBUG(3,"pdrlen invalid=%d\n",
|
|
|
|
|
pdrlen); |
|
|
|
|
pdaok = 0; |
|
|
|
|
break; |
|
|
|
@ -740,7 +740,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, UINT len) |
|
|
|
|
} |
|
|
|
|
}
|
|
|
|
|
if ( pdaok ) { |
|
|
|
|
WLAN_LOG_INFO2( |
|
|
|
|
WLAN_LOG_INFO( |
|
|
|
|
"PDA Read from 0x%08lx in %s space.\n", |
|
|
|
|
pdaloc[i].cardaddr,
|
|
|
|
|
pdaloc[i].auxctl == 0 ? "EXTDS" : |
|
|
|
@ -852,13 +852,13 @@ int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, UINT32 exeaddr) |
|
|
|
|
hw->dltimeout = hfa384x2host_16(hw->dltimeout); |
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
WLAN_LOG_DEBUG1(1,"ramdl_enable, exeaddr=0x%08x\n", exeaddr); |
|
|
|
|
WLAN_LOG_DEBUG(1,"ramdl_enable, exeaddr=0x%08x\n", exeaddr); |
|
|
|
|
hw->dlstate = HFA384x_DLSTATE_RAMENABLED; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/* Enable the aux port */ |
|
|
|
|
if ( (result = hfa384x_cmd_aux_enable(hw)) ) { |
|
|
|
|
WLAN_LOG_DEBUG1(1,"Aux enable failed, result=%d.\n", result); |
|
|
|
|
WLAN_LOG_DEBUG(1,"Aux enable failed, result=%d.\n", result); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -872,7 +872,7 @@ hw->dlstate = HFA384x_DLSTATE_RAMENABLED; |
|
|
|
|
/* Set the download state */ |
|
|
|
|
hw->dlstate = HFA384x_DLSTATE_RAMENABLED; |
|
|
|
|
} else { |
|
|
|
|
WLAN_LOG_DEBUG3(1,"cmd_download(0x%04x, 0x%04x) failed, result=%d.\n", |
|
|
|
|
WLAN_LOG_DEBUG(1,"cmd_download(0x%04x, 0x%04x) failed, result=%d.\n", |
|
|
|
|
lowaddr,hiaddr, result); |
|
|
|
|
/* Disable the aux port */ |
|
|
|
|
hfa384x_cmd_aux_disable(hw); |
|
|
|
@ -961,7 +961,7 @@ int hfa384x_drvr_ramdl_write(hfa384x_t *hw, UINT32 daddr, void* buf, UINT32 len) |
|
|
|
|
return -EINVAL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WLAN_LOG_INFO2("Writing %ld bytes to ram @0x%06lx\n", len, daddr); |
|
|
|
|
WLAN_LOG_INFO("Writing %ld bytes to ram @0x%06lx\n", len, daddr); |
|
|
|
|
#if 0 |
|
|
|
|
WLAN_HEX_DUMP(1, "dldata", buf, len); |
|
|
|
|
#endif |
|
|
|
@ -1146,7 +1146,7 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, UINT32 daddr, void* buf, UINT32 le |
|
|
|
|
return -EINVAL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
WLAN_LOG_INFO2("Download %ld bytes to flash @0x%06lx\n", len, daddr); |
|
|
|
|
WLAN_LOG_INFO("Download %ld bytes to flash @0x%06lx\n", len, daddr); |
|
|
|
|
|
|
|
|
|
/* Need a flat address for arithmetic */ |
|
|
|
|
dlbufaddr = HFA384x_ADDR_AUX_MKFLAT( |
|
|
|
@ -1155,7 +1155,7 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, UINT32 daddr, void* buf, UINT32 le |
|
|
|
|
verbuf = kmalloc(hw->bufinfo.len, GFP_KERNEL); |
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
WLAN_LOG_WARNING3("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout); |
|
|
|
|
WLAN_LOG_WARNING("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw->dltimeout); |
|
|
|
|
#endif |
|
|
|
|
/* Figure out how many times to to the flash prog */ |
|
|
|
|
nwrites = len / hw->bufinfo.len; |
|
|
|
@ -1174,7 +1174,7 @@ WLAN_LOG_WARNING3("dlbuf@0x%06lx len=%d to=%d\n", dlbufaddr, hw->bufinfo.len, hw |
|
|
|
|
currdaddr = daddr + (hw->bufinfo.len * i); |
|
|
|
|
destlo = HFA384x_ADDR_CMD_MKOFF(currdaddr); |
|
|
|
|
desthi = HFA384x_ADDR_CMD_MKPAGE(currdaddr); |
|
|
|
|
WLAN_LOG_INFO2("Writing %ld bytes to flash @0x%06lx\n", currlen, currdaddr); |
|
|
|
|
WLAN_LOG_INFO("Writing %ld bytes to flash @0x%06lx\n", currlen, currdaddr); |
|
|
|
|
#if 0 |
|
|
|
|
WLAN_HEX_DUMP(1, "dldata", buf+(hw->bufinfo.len*i), currlen); |
|
|
|
|
#endif |
|
|
|
@ -1182,7 +1182,7 @@ WLAN_HEX_DUMP(1, "dldata", buf+(hw->bufinfo.len*i), currlen); |
|
|
|
|
result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NV,
|
|
|
|
|
destlo, desthi, currlen); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_ERROR4("download(NV,lo=%x,hi=%x,len=%lx) " |
|
|
|
|
WLAN_LOG_ERROR("download(NV,lo=%x,hi=%x,len=%lx) " |
|
|
|
|
"cmd failed, result=%d. Aborting d/l\n", |
|
|
|
|
destlo, desthi, currlen, result); |
|
|
|
|
goto exit_proc; |
|
|
|
@ -1193,7 +1193,7 @@ WLAN_HEX_DUMP(1, "dldata", buf+(hw->bufinfo.len*i), currlen); |
|
|
|
|
/* set the download 'write flash' mode */ |
|
|
|
|
result = hfa384x_cmd_download(hw, HFA384x_PROGMODE_NVWRITE, 0,0,0); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_ERROR4( |
|
|
|
|
WLAN_LOG_ERROR( |
|
|
|
|
"download(NVWRITE,lo=%x,hi=%x,len=%lx) " |
|
|
|
|
"cmd failed, result=%d. Aborting d/l\n", |
|
|
|
|
destlo, desthi, currlen, result); |
|
|
|
@ -1708,7 +1708,7 @@ int hfa384x_cmd_notify(hfa384x_t *hw, UINT16 reclaim, UINT16 fid, |
|
|
|
|
/* Copy the record to FID */ |
|
|
|
|
result = hfa384x_copy_to_bap(hw, HFA384x_BAP_PROC, hw->infofid, 0, buf, len); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG3(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_to_bap(%04x, 0, %d) failed, result=0x%x\n", |
|
|
|
|
hw->infofid, len, result); |
|
|
|
|
result = -EIO; |
|
|
|
@ -1836,7 +1836,7 @@ int hfa384x_cmd_access(hfa384x_t *hw, UINT16 write, UINT16 rid, |
|
|
|
|
|
|
|
|
|
result = hfa384x_docmd_wait(hw, &cmd); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_ERROR2("Call to hfa384x_docmd_wait failed (%d %d)\n", |
|
|
|
|
WLAN_LOG_ERROR("Call to hfa384x_docmd_wait failed (%d %d)\n", |
|
|
|
|
result, cmd.resp0); |
|
|
|
|
goto fail; |
|
|
|
|
} |
|
|
|
@ -1850,7 +1850,7 @@ int hfa384x_cmd_access(hfa384x_t *hw, UINT16 write, UINT16 rid, |
|
|
|
|
|
|
|
|
|
/* Validate the record length */ |
|
|
|
|
if ( ((hfa384x2host_16(rec.reclen)-1)*2) != len ) { /* note body len calculation in bytes */ |
|
|
|
|
WLAN_LOG_DEBUG3(1, "RID len mismatch, rid=0x%04x hlen=%d fwlen=%d\n", |
|
|
|
|
WLAN_LOG_DEBUG(1, "RID len mismatch, rid=0x%04x hlen=%d fwlen=%d\n", |
|
|
|
|
rid, len, (hfa384x2host_16(rec.reclen)-1)*2); |
|
|
|
|
result = -ENODATA; |
|
|
|
|
goto fail; |
|
|
|
@ -2227,8 +2227,8 @@ hfa384x_drvr_mmi_write(hfa384x_t *hw, UINT32 addr, UINT32 data) |
|
|
|
|
cmd.parm1 = (UINT16) data; |
|
|
|
|
cmd.parm2 = 0; |
|
|
|
|
|
|
|
|
|
WLAN_LOG_DEBUG1(1,"mmi write : addr = 0x%08lx\n", addr); |
|
|
|
|
WLAN_LOG_DEBUG1(1,"mmi write : data = 0x%08lx\n", data); |
|
|
|
|
WLAN_LOG_DEBUG(1,"mmi write : addr = 0x%08lx\n", addr); |
|
|
|
|
WLAN_LOG_DEBUG(1,"mmi write : data = 0x%08lx\n", data); |
|
|
|
|
|
|
|
|
|
/* Do i need a host2hfa... conversion ? */ |
|
|
|
|
result = hfa384x_docmd_wait(hw, &cmd); |
|
|
|
@ -2380,7 +2380,7 @@ int hfa384x_copy_from_bap(hfa384x_t *hw, UINT16 bap, UINT16 id, UINT16 offset, |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
if (result) { |
|
|
|
|
WLAN_LOG_DEBUG3(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, 0, %d) failed, result=0x%x\n",
|
|
|
|
|
reg, len, result); |
|
|
|
|
} |
|
|
|
@ -2605,7 +2605,7 @@ hfa384x_copy_from_aux( |
|
|
|
|
DBFENTER; |
|
|
|
|
|
|
|
|
|
if ( !(hw->auxen) ) { |
|
|
|
|
WLAN_LOG_DEBUG1(1, |
|
|
|
|
WLAN_LOG_DEBUG(1, |
|
|
|
|
"Attempt to read 0x%04lx when aux not enabled\n", |
|
|
|
|
cardaddr); |
|
|
|
|
return; |
|
|
|
@ -2674,7 +2674,7 @@ hfa384x_copy_to_aux( |
|
|
|
|
DBFENTER; |
|
|
|
|
|
|
|
|
|
if ( !(hw->auxen) ) { |
|
|
|
|
WLAN_LOG_DEBUG1(1, |
|
|
|
|
WLAN_LOG_DEBUG(1, |
|
|
|
|
"Attempt to read 0x%04lx when aux not enabled\n", |
|
|
|
|
cardaddr); |
|
|
|
|
return; |
|
|
|
@ -2763,7 +2763,7 @@ int hfa384x_docmd_wait( hfa384x_t *hw, hfa384x_metacmd_t *cmd) |
|
|
|
|
printk("counter(1)=%d\n", counter); |
|
|
|
|
#endif |
|
|
|
|
if (HFA384x_CMD_ISBUSY(reg)) { |
|
|
|
|
WLAN_LOG_ERROR1("hfa384x_cmd timeout(1), reg=0x%0hx.\n", reg); |
|
|
|
|
WLAN_LOG_ERROR("hfa384x_cmd timeout(1), reg=0x%0hx.\n", reg); |
|
|
|
|
goto failed; |
|
|
|
|
} |
|
|
|
|
if (!HFA384x_CMD_ISBUSY(reg)) { |
|
|
|
@ -2809,7 +2809,7 @@ int hfa384x_docmd_wait( hfa384x_t *hw, hfa384x_metacmd_t *cmd) |
|
|
|
|
HFA384x_EVACK); |
|
|
|
|
result = HFA384x_STATUS_RESULT_GET(cmd->status); |
|
|
|
|
} else { |
|
|
|
|
WLAN_LOG_ERROR1("hfa384x_cmd timeout(2), reg=0x%0hx.\n", reg); |
|
|
|
|
WLAN_LOG_ERROR("hfa384x_cmd timeout(2), reg=0x%0hx.\n", reg); |
|
|
|
|
} |
|
|
|
|
#endif /* CMD_IRQ */ |
|
|
|
|
} |
|
|
|
@ -2958,7 +2958,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime) |
|
|
|
|
((dev_link_t*)hw->membase)->handle, |
|
|
|
|
®); |
|
|
|
|
if (result != CS_SUCCESS ) { |
|
|
|
|
WLAN_LOG_ERROR1( |
|
|
|
|
WLAN_LOG_ERROR( |
|
|
|
|
":0: AccessConfigurationRegister(CS_READ) failed," |
|
|
|
|
"result=%d.\n", result);
|
|
|
|
|
result = -EIO; |
|
|
|
@ -2973,7 +2973,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime) |
|
|
|
|
((dev_link_t*)hw->membase)->handle, |
|
|
|
|
®); |
|
|
|
|
if (result != CS_SUCCESS ) { |
|
|
|
|
WLAN_LOG_ERROR1( |
|
|
|
|
WLAN_LOG_ERROR( |
|
|
|
|
":1: AccessConfigurationRegister(CS_WRITE) failed," |
|
|
|
|
"result=%d.\n", result);
|
|
|
|
|
result = -EIO; |
|
|
|
@ -2990,7 +2990,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime) |
|
|
|
|
((dev_link_t*)hw->membase)->handle, |
|
|
|
|
®); |
|
|
|
|
if (result != CS_SUCCESS ) { |
|
|
|
|
WLAN_LOG_ERROR1( |
|
|
|
|
WLAN_LOG_ERROR( |
|
|
|
|
":2: AccessConfigurationRegister(CS_WRITE) failed," |
|
|
|
|
"result=%d.\n", result);
|
|
|
|
|
result = -EIO; |
|
|
|
@ -3008,7 +3008,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime) |
|
|
|
|
((dev_link_t*)hw->membase)->handle, |
|
|
|
|
®); |
|
|
|
|
if (result != CS_SUCCESS ) { |
|
|
|
|
WLAN_LOG_ERROR1( |
|
|
|
|
WLAN_LOG_ERROR( |
|
|
|
|
":2: AccessConfigurationRegister(CS_WRITE) failed," |
|
|
|
|
"result=%d.\n", result);
|
|
|
|
|
result = -EIO; |
|
|
|
@ -3144,7 +3144,7 @@ int hfa384x_drvr_start(hfa384x_t *hw) |
|
|
|
|
|
|
|
|
|
txfid_queue_add(hw, reg); |
|
|
|
|
|
|
|
|
|
WLAN_LOG_DEBUG2(4,"hw->txfid_queue[%d]=0x%04x\n",i,reg); |
|
|
|
|
WLAN_LOG_DEBUG(4,"hw->txfid_queue[%d]=0x%04x\n",i,reg); |
|
|
|
|
|
|
|
|
|
reg = HFA384x_EVACK_ALLOC_SET(1); |
|
|
|
|
hfa384x_setreg(hw, reg, HFA384x_EVACK); |
|
|
|
@ -3171,7 +3171,7 @@ int hfa384x_drvr_start(hfa384x_t *hw) |
|
|
|
|
hw->infofid = hfa384x_getreg(hw, HFA384x_ALLOCFID); |
|
|
|
|
reg = HFA384x_EVACK_ALLOC_SET(1); |
|
|
|
|
hfa384x_setreg(hw, reg, HFA384x_EVACK); |
|
|
|
|
WLAN_LOG_DEBUG1(4,"hw->infofid=0x%04x\n", hw->infofid); |
|
|
|
|
WLAN_LOG_DEBUG(4,"hw->infofid=0x%04x\n", hw->infofid); |
|
|
|
|
|
|
|
|
|
/* Set swsupport regs to magic # for card presence detection */ |
|
|
|
|
hfa384x_setreg(hw, HFA384x_DRVR_MAGIC, HFA384x_SWSUPPORT0); |
|
|
|
@ -3195,7 +3195,7 @@ int hfa384x_drvr_start(hfa384x_t *hw) |
|
|
|
|
|
|
|
|
|
goto done; |
|
|
|
|
failed: |
|
|
|
|
WLAN_LOG_ERROR1("Failed, result=%d\n", result); |
|
|
|
|
WLAN_LOG_ERROR("Failed, result=%d\n", result); |
|
|
|
|
done: |
|
|
|
|
DBFEXIT; |
|
|
|
|
return result; |
|
|
|
@ -3345,7 +3345,7 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG4(1, |
|
|
|
|
WLAN_LOG_DEBUG(1, |
|
|
|
|
"copy_to_bap(%04x, %d, %d) failed, result=0x%x\n",
|
|
|
|
|
fid, |
|
|
|
|
sizeof(txdesc),
|
|
|
|
@ -3365,7 +3365,7 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021 |
|
|
|
|
if ( result != 0 ) { |
|
|
|
|
txfid_queue_add(hw, fid); |
|
|
|
|
|
|
|
|
|
WLAN_LOG_DEBUG2(1,"cmd_tx(%04x) failed, result=%d\n",
|
|
|
|
|
WLAN_LOG_DEBUG(1,"cmd_tx(%04x) failed, result=%d\n",
|
|
|
|
|
fid, result); |
|
|
|
|
result = 3; |
|
|
|
|
goto failed; |
|
|
|
@ -3451,7 +3451,7 @@ void hfa384x_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
|
|
|
|
/* Check swsupport reg magic # for card presence */ |
|
|
|
|
reg = hfa384x_getreg(hw, HFA384x_SWSUPPORT0); |
|
|
|
|
if ( reg != HFA384x_DRVR_MAGIC) { |
|
|
|
|
WLAN_LOG_DEBUG1(2, "irq=%d, no magic. Card removed?.\n", irq); |
|
|
|
|
WLAN_LOG_DEBUG(2, "irq=%d, no magic. Card removed?.\n", irq); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3524,7 +3524,7 @@ void hfa384x_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
|
|
|
|
/* Check swsupport reg magic # for card presence */ |
|
|
|
|
reg = hfa384x_getreg(hw, HFA384x_SWSUPPORT0); |
|
|
|
|
if ( reg != HFA384x_DRVR_MAGIC) { |
|
|
|
|
WLAN_LOG_DEBUG1(2, "irq=%d, no magic. Card removed?.\n", irq); |
|
|
|
|
WLAN_LOG_DEBUG(2, "irq=%d, no magic. Card removed?.\n", irq); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3681,7 +3681,7 @@ void hfa384x_int_info(wlandevice_t *wlandev) |
|
|
|
|
result = hfa384x_copy_from_bap( hw,
|
|
|
|
|
HFA384x_BAP_INT, reg, 0, &inf.framelen, sizeof(UINT16)); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG3(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, 0, %d) failed, result=0x%x\n",
|
|
|
|
|
reg, sizeof(inf), result); |
|
|
|
|
goto failed; |
|
|
|
@ -3693,7 +3693,7 @@ void hfa384x_int_info(wlandevice_t *wlandev) |
|
|
|
|
HFA384x_BAP_INT, reg, sizeof(UINT16), |
|
|
|
|
&(inf.infotype), inf.framelen * sizeof(UINT16)); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG3(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, 0, %d) failed, result=0x%x\n",
|
|
|
|
|
reg, sizeof(inf), result); |
|
|
|
|
goto failed; |
|
|
|
@ -3736,7 +3736,7 @@ void hfa384x_int_txexc(wlandevice_t *wlandev) |
|
|
|
|
fid = hfa384x_getreg(hw, HFA384x_TXCOMPLFID); |
|
|
|
|
result = hfa384x_copy_from_bap(hw, HFA384x_BAP_INT, fid, 0, &status, sizeof(status)); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG3(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, 0, %d) failed, result=0x%x\n",
|
|
|
|
|
fid, sizeof(status), result); |
|
|
|
|
goto failed; |
|
|
|
@ -3776,7 +3776,7 @@ void hfa384x_int_tx(wlandevice_t *wlandev) |
|
|
|
|
fid = hfa384x_getreg(hw, HFA384x_TXCOMPLFID); |
|
|
|
|
result = hfa384x_copy_from_bap(hw, HFA384x_BAP_INT, fid, 0, &status, sizeof(status)); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG3(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, 0, %d) failed, result=0x%x\n",
|
|
|
|
|
fid, sizeof(status), result); |
|
|
|
|
goto failed; |
|
|
|
@ -3829,7 +3829,7 @@ void hfa384x_int_rx(wlandevice_t *wlandev) |
|
|
|
|
&rxdesc,
|
|
|
|
|
sizeof(rxdesc)); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG4(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, %d, %d) failed, result=0x%x\n",
|
|
|
|
|
rxfid,
|
|
|
|
|
0,
|
|
|
|
@ -3856,7 +3856,7 @@ void hfa384x_int_rx(wlandevice_t *wlandev) |
|
|
|
|
result = hfa384x_int_rx_typedrop(wlandev, ieee2host16(rxdesc.frame_control)); |
|
|
|
|
if (result) { |
|
|
|
|
if (result != 1)
|
|
|
|
|
WLAN_LOG_WARNING1("Invalid frame type, fc=%04x, dropped.\n",rxdesc.frame_control); |
|
|
|
|
WLAN_LOG_WARNING("Invalid frame type, fc=%04x, dropped.\n",rxdesc.frame_control); |
|
|
|
|
|
|
|
|
|
goto done; |
|
|
|
|
} |
|
|
|
@ -3921,7 +3921,7 @@ void hfa384x_int_rx(wlandevice_t *wlandev) |
|
|
|
|
HFA384x_BAP_INT, rxfid, HFA384x_RX_DATA_OFF,
|
|
|
|
|
datap, rxdesc.data_len); |
|
|
|
|
if ( result ) { |
|
|
|
|
WLAN_LOG_DEBUG4(1,
|
|
|
|
|
WLAN_LOG_DEBUG(1,
|
|
|
|
|
"copy_from_bap(0x%04x, %d, %d) failed, result=0x%x\n",
|
|
|
|
|
rxfid,
|
|
|
|
|
HFA384x_RX_DATA_OFF,
|
|
|
|
@ -3950,7 +3950,7 @@ void hfa384x_int_rx(wlandevice_t *wlandev) |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
WLAN_LOG_WARNING1("Received frame on unsupported port=%d\n", |
|
|
|
|
WLAN_LOG_WARNING("Received frame on unsupported port=%d\n", |
|
|
|
|
HFA384x_RXSTATUS_MACPORT_GET(rxdesc.status) ); |
|
|
|
|
goto done; |
|
|
|
|
break; |
|
|
|
@ -4034,7 +4034,7 @@ void hfa384x_int_rxmonitor( wlandevice_t *wlandev, UINT16 rxfid, hfa384x_rx_fram |
|
|
|
|
datalen = 0; |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
WLAN_LOG_DEBUG1(1, "unknown frm: fc=0x%04x\n", fc); |
|
|
|
|
WLAN_LOG_DEBUG(1, "unknown frm: fc=0x%04x\n", fc); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4046,12 +4046,12 @@ void hfa384x_int_rxmonitor( wlandevice_t *wlandev, UINT16 rxfid, hfa384x_rx_fram |
|
|
|
|
if ( skblen >
|
|
|
|
|
(sizeof(p80211msg_lnxind_wlansniffrm_t) +
|
|
|
|
|
WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) ) { |
|
|
|
|
WLAN_LOG_DEBUG1(1, "overlen frm: len=%d\n",
|
|
|
|
|
WLAN_LOG_DEBUG(1, "overlen frm: len=%d\n",
|
|
|
|
|
skblen - sizeof(p80211msg_lnxind_wlansniffrm_t)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( (skb = dev_alloc_skb(skblen)) == NULL ) { |
|
|
|
|
WLAN_LOG_ERROR1("alloc_skb failed trying to allocate %d bytes\n", skblen); |
|
|
|
|
WLAN_LOG_ERROR("alloc_skb failed trying to allocate %d bytes\n", skblen); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4215,7 +4215,7 @@ int hfa384x_int_rx_typedrop( wlandevice_t *wlandev, UINT16 fc) |
|
|
|
|
ftype = WLAN_GET_FC_FTYPE(fc); |
|
|
|
|
fstype = WLAN_GET_FC_FSTYPE(fc); |
|
|
|
|
#if 0 |
|
|
|
|
WLAN_LOG_DEBUG2(4,
|
|
|
|
|
WLAN_LOG_DEBUG(4,
|
|
|
|
|
"rx_typedrop : ftype=%d fstype=%d.\n", ftype, fstype); |
|
|
|
|
#endif |
|
|
|
|
switch ( ftype ) { |
|
|
|
@ -4396,7 +4396,7 @@ void hfa384x_int_alloc(wlandevice_t *wlandev) |
|
|
|
|
fid = hfa384x_getreg(hw, HFA384x_ALLOCFID); |
|
|
|
|
|
|
|
|
|
if ( fid != hw->infofid ) { /* It's a transmit fid */ |
|
|
|
|
WLAN_LOG_DEBUG1(5, "int_alloc(%#x)\n", fid); |
|
|
|
|
WLAN_LOG_DEBUG(5, "int_alloc(%#x)\n", fid); |
|
|
|
|
result = txfid_queue_add(hw, fid); |
|
|
|
|
if (result != -1) { |
|
|
|
|
prism2sta_ev_alloc(wlandev); |
|
|
|
@ -4456,7 +4456,7 @@ int hfa384x_drvr_handover( hfa384x_t *hw, UINT8 *addr) |
|
|
|
|
result = hfa384x_cmd_notify(hw, 1, hw->infofid, &rec, len); |
|
|
|
|
|
|
|
|
|
if ( result != 0 ) { |
|
|
|
|
WLAN_LOG_DEBUG2(1,"cmd_notify(%04x) failed, result=%d", |
|
|
|
|
WLAN_LOG_DEBUG(1,"cmd_notify(%04x) failed, result=%d", |
|
|
|
|
hw->infofid, result); |
|
|
|
|
result = -EIO; |
|
|
|
|
goto failed; |
|
|
|
|