mirror of https://gitee.com/openkylin/linux.git
Staging: wlan-ng: Remove DBFENTER/DBFEXIT macros
Remove the ugly DBFENTER/DBFEXIT macros, which are only inserted to add "<---" and "--->" at the function start/end at higher debug levels and which make the code a lot less readable. Signed-off-by: Moritz Muehlenhoff <jmm@debian.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
1f61379e82
commit
8a251b55ef
|
@ -404,8 +404,6 @@ submit_rx_urb(hfa384x_t *hw, gfp_t memflags)
|
|||
struct sk_buff *skb;
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
skb = dev_alloc_skb(sizeof(hfa384x_usbin_t));
|
||||
if (skb == NULL) {
|
||||
result = -ENOMEM;
|
||||
|
@ -440,8 +438,6 @@ submit_rx_urb(hfa384x_t *hw, gfp_t memflags)
|
|||
}
|
||||
|
||||
done:
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -469,8 +465,6 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags)
|
|||
struct net_device *netdev = hw->wlandev->netdev;
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
result = -ENOLINK;
|
||||
if ( netif_running(netdev) ) {
|
||||
|
||||
|
@ -489,8 +483,6 @@ submit_tx_urb(hfa384x_t *hw, struct urb *tx_urb, gfp_t memflags)
|
|||
}
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -516,13 +508,10 @@ hfa384x_usb_defer(struct work_struct *data)
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -586,8 +575,6 @@ hfa384x_usb_defer(struct work_struct *data)
|
|||
if ( test_and_clear_bit(WORK_TX_RESUME, &hw->usb_flags) ) {
|
||||
netif_wake_queue(hw->wlandev->netdev);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -615,8 +602,6 @@ hfa384x_usb_defer(struct work_struct *data)
|
|||
void
|
||||
hfa384x_create( hfa384x_t *hw, struct usb_device *usb)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
memset(hw, 0, sizeof(hfa384x_t));
|
||||
hw->usb = usb;
|
||||
|
||||
|
@ -669,8 +654,6 @@ hfa384x_create( hfa384x_t *hw, struct usb_device *usb)
|
|||
init_timer(&hw->commsqual_timer);
|
||||
hw->commsqual_timer.data = (unsigned long) hw;
|
||||
hw->commsqual_timer.function = prism2sta_commsqual_timer;
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -701,8 +684,6 @@ hfa384x_destroy( hfa384x_t *hw)
|
|||
{
|
||||
struct sk_buff *skb;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if ( hw->state == HFA384x_STATE_RUNNING ) {
|
||||
hfa384x_drvr_stop(hw);
|
||||
}
|
||||
|
@ -717,8 +698,6 @@ hfa384x_destroy( hfa384x_t *hw)
|
|||
while ( (skb = skb_dequeue(&hw->authq)) ) {
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -746,8 +725,6 @@ static int
|
|||
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);
|
||||
|
@ -760,7 +737,6 @@ usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp,
|
|||
result->resp1,
|
||||
result->resp2);
|
||||
|
||||
DBFEXIT;
|
||||
return (result->status & HFA384x_STATUS_RESULT);
|
||||
}
|
||||
|
||||
|
@ -768,13 +744,10 @@ static void
|
|||
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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -934,8 +907,6 @@ init_rmem_completor(usbctlx_rmem_completor_t *completor,
|
|||
static void
|
||||
hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
if ( ctlx->usercb != NULL ) {
|
||||
hfa384x_cmdresult_t cmdresult;
|
||||
|
||||
|
@ -948,8 +919,6 @@ hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
|
|||
|
||||
ctlx->usercb(hw, &cmdresult, ctlx->usercb_data);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -976,8 +945,6 @@ hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
|
|||
static void
|
||||
hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
if ( ctlx->usercb != NULL ) {
|
||||
hfa384x_rridresult_t rridresult;
|
||||
|
||||
|
@ -990,8 +957,6 @@ hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
|
|||
|
||||
ctlx->usercb(hw, &rridresult, ctlx->usercb_data);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
@ -1127,9 +1092,6 @@ hfa384x_cmd_initialize(hfa384x_t *hw)
|
|||
int i;
|
||||
hfa384x_metacmd_t cmd;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
|
||||
cmd.cmd = HFA384x_CMDCODE_INIT;
|
||||
cmd.parm0 = 0;
|
||||
cmd.parm1 = 0;
|
||||
|
@ -1153,7 +1115,6 @@ hfa384x_cmd_initialize(hfa384x_t *hw)
|
|||
|
||||
hw->link_status = HFA384x_LINK_NOTCONNECTED;
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1183,8 +1144,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
|
|||
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;
|
||||
|
@ -1193,7 +1152,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
|
|||
|
||||
result = hfa384x_docmd_wait(hw, &cmd);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1223,8 +1181,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
|
|||
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;
|
||||
|
@ -1233,7 +1189,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
|
|||
|
||||
result = hfa384x_docmd_wait(hw, &cmd);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1271,8 +1226,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
|
|||
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;
|
||||
|
@ -1281,7 +1234,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
|
|||
|
||||
result = hfa384x_docmd_wait(hw, &cmd);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1330,7 +1282,6 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
|
|||
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);
|
||||
|
@ -1344,7 +1295,6 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
|
|||
|
||||
result = hfa384x_docmd_wait(hw, &cmd);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1377,9 +1327,7 @@ void
|
|||
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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1411,9 +1359,7 @@ void
|
|||
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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1444,14 +1390,11 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis)
|
|||
{
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
result=usb_reset_device(hw->usb);
|
||||
if(result<0) {
|
||||
WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1487,8 +1430,6 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
|
|||
unsigned long flags;
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
result = wait_for_completion_interruptible(&ctlx->done);
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
@ -1566,7 +1507,6 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
|
|||
kfree(ctlx);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1614,7 +1554,6 @@ hfa384x_docmd(
|
|||
int result;
|
||||
hfa384x_usbctlx_t *ctlx;
|
||||
|
||||
DBFENTER;
|
||||
ctlx = usbctlx_alloc();
|
||||
if ( ctlx == NULL ) {
|
||||
result = -ENOMEM;
|
||||
|
@ -1655,7 +1594,6 @@ hfa384x_docmd(
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1710,7 +1648,6 @@ hfa384x_dorrid(
|
|||
int result;
|
||||
hfa384x_usbctlx_t *ctlx;
|
||||
|
||||
DBFENTER;
|
||||
ctlx = usbctlx_alloc();
|
||||
if ( ctlx == NULL ) {
|
||||
result = -ENOMEM;
|
||||
|
@ -1745,7 +1682,6 @@ hfa384x_dorrid(
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1796,7 +1732,6 @@ hfa384x_dowrid(
|
|||
int result;
|
||||
hfa384x_usbctlx_t *ctlx;
|
||||
|
||||
DBFENTER;
|
||||
ctlx = usbctlx_alloc();
|
||||
if ( ctlx == NULL ) {
|
||||
result = -ENOMEM;
|
||||
|
@ -1838,7 +1773,6 @@ hfa384x_dowrid(
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1890,7 +1824,6 @@ hfa384x_dormem(
|
|||
int result;
|
||||
hfa384x_usbctlx_t *ctlx;
|
||||
|
||||
DBFENTER;
|
||||
ctlx = usbctlx_alloc();
|
||||
if ( ctlx == NULL ) {
|
||||
result = -ENOMEM;
|
||||
|
@ -1937,7 +1870,6 @@ hfa384x_dormem(
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1991,7 +1923,6 @@ hfa384x_dowmem(
|
|||
int result;
|
||||
hfa384x_usbctlx_t *ctlx;
|
||||
|
||||
DBFENTER;
|
||||
WLAN_LOG_DEBUG(5, "page=0x%04x offset=0x%04x len=%d\n",
|
||||
page,offset,len);
|
||||
|
||||
|
@ -2038,7 +1969,6 @@ hfa384x_dowmem(
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2064,8 +1994,6 @@ int hfa384x_drvr_commtallies( hfa384x_t *hw )
|
|||
{
|
||||
hfa384x_metacmd_t cmd;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
cmd.cmd = HFA384x_CMDCODE_INQ;
|
||||
cmd.parm0 = HFA384x_IT_COMMTALLIES;
|
||||
cmd.parm1 = 0;
|
||||
|
@ -2073,7 +2001,6 @@ int hfa384x_drvr_commtallies( hfa384x_t *hw )
|
|||
|
||||
hfa384x_docmd_async(hw, &cmd, NULL, NULL, NULL);
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2104,7 +2031,6 @@ int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport)
|
|||
{
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
if ((!hw->isap && macport != 0) ||
|
||||
(hw->isap && !(macport <= HFA384x_PORTID_MAX)) ||
|
||||
!(hw->port_enabled[macport]) ){
|
||||
|
@ -2115,7 +2041,6 @@ int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport)
|
|||
hw->port_enabled[macport] = 0;
|
||||
}
|
||||
}
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2146,7 +2071,6 @@ int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport)
|
|||
{
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
if ((!hw->isap && macport != 0) ||
|
||||
(hw->isap && !(macport <= HFA384x_PORTID_MAX)) ||
|
||||
(hw->port_enabled[macport]) ){
|
||||
|
@ -2157,7 +2081,6 @@ int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport)
|
|||
hw->port_enabled[macport] = 1;
|
||||
}
|
||||
}
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2188,7 +2111,6 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
|
|||
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] ) {
|
||||
|
@ -2219,7 +2141,7 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
|
|||
WLAN_LOG_DEBUG(1,"flashdl_enable\n");
|
||||
|
||||
hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;
|
||||
DBFEXIT;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2245,7 +2167,6 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
|
|||
----------------------------------------------------------------*/
|
||||
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;
|
||||
|
@ -2258,7 +2179,6 @@ int hfa384x_drvr_flashdl_disable(hfa384x_t *hw)
|
|||
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
|
||||
hw->dlstate = HFA384x_DLSTATE_DISABLED;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2314,7 +2234,6 @@ hfa384x_drvr_flashdl_write(
|
|||
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 */
|
||||
|
@ -2431,7 +2350,6 @@ Comment out for debugging, assume the write was successful.
|
|||
/* actually disable programming mode. Remember, that will cause the */
|
||||
/* the firmware to effectively reset itself. */
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2464,11 +2382,9 @@ Comment out for debugging, assume the write was successful.
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -2567,9 +2483,7 @@ hfa384x_drvr_setconfig_async(
|
|||
----------------------------------------------------------------*/
|
||||
int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr)
|
||||
{
|
||||
DBFENTER;
|
||||
WLAN_LOG_ERROR("Not currently supported in USB!\n");
|
||||
DBFEXIT;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -2588,13 +2502,11 @@ int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr)
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -2619,7 +2531,6 @@ int hfa384x_drvr_low_level(hfa384x_t *hw, hfa384x_metacmd_t *cmd)
|
|||
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;
|
||||
|
@ -2632,7 +2543,6 @@ hfa384x_drvr_ramdl_disable(hfa384x_t *hw)
|
|||
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
|
||||
hw->dlstate = HFA384x_DLSTATE_DISABLED;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2668,7 +2578,7 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
|
|||
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] ) {
|
||||
|
@ -2705,7 +2615,6 @@ hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr)
|
|||
result);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2747,7 +2656,7 @@ hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len)
|
|||
u16 currpage;
|
||||
u16 curroffset;
|
||||
u16 currlen;
|
||||
DBFENTER;
|
||||
|
||||
/* Check that we're in the ram download state */
|
||||
if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) {
|
||||
return -EINVAL;
|
||||
|
@ -2782,7 +2691,6 @@ hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void* buf, u32 len)
|
|||
/* TODO: We really should have a readback. */
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2840,8 +2748,6 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
|
|||
{ HFA3841_PDA_BOGUS_BASE, 0}
|
||||
};
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Read the pda from each known address. */
|
||||
for ( i = 0; i < ARRAY_SIZE(pdaloc); i++) {
|
||||
/* Make address */
|
||||
|
@ -2910,7 +2816,6 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
|
|||
WLAN_LOG_DEBUG(3,"Failure: pda is not okay\n");
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2965,7 +2870,6 @@ int hfa384x_drvr_start(hfa384x_t *hw)
|
|||
{
|
||||
int result, result1, result2;
|
||||
u16 status;
|
||||
DBFENTER;
|
||||
|
||||
might_sleep();
|
||||
|
||||
|
@ -3044,7 +2948,6 @@ int hfa384x_drvr_start(hfa384x_t *hw)
|
|||
hw->state = HFA384x_STATE_RUNNING;
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -3073,7 +2976,6 @@ hfa384x_drvr_stop(hfa384x_t *hw)
|
|||
{
|
||||
int result = 0;
|
||||
int i;
|
||||
DBFENTER;
|
||||
|
||||
might_sleep();
|
||||
|
||||
|
@ -3098,7 +3000,6 @@ hfa384x_drvr_stop(hfa384x_t *hw)
|
|||
hw->port_enabled[i] = 0;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -3131,8 +3032,6 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021
|
|||
int ret;
|
||||
char *ptr;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (hw->tx_urb.status == -EINPROGRESS) {
|
||||
WLAN_LOG_WARNING("TX URB already in use\n");
|
||||
result = 3;
|
||||
|
@ -3216,7 +3115,6 @@ int hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, p80211_hdr_t *p8021
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -3225,8 +3123,6 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev)
|
|||
hfa384x_t *hw = wlandev->priv;
|
||||
unsigned long flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
if ( !hw->wlandev->hwremoved &&
|
||||
|
@ -3238,8 +3134,6 @@ void hfa384x_tx_timeout(wlandevice_t *wlandev)
|
|||
}
|
||||
|
||||
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -3262,8 +3156,6 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data)
|
|||
struct list_head *temp;
|
||||
unsigned long flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
/* This list is guaranteed to be empty if someone
|
||||
|
@ -3279,7 +3171,6 @@ static void hfa384x_usbctlx_reaper_task(unsigned long data)
|
|||
|
||||
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -3305,8 +3196,6 @@ static void hfa384x_usbctlx_completion_task(unsigned long data)
|
|||
|
||||
int reap = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
/* This list is guaranteed to be empty if someone
|
||||
|
@ -3361,8 +3250,6 @@ static void hfa384x_usbctlx_completion_task(unsigned long data)
|
|||
|
||||
if (reap)
|
||||
tasklet_schedule(&hw->reaper_bh);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -3386,8 +3273,6 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
|
|||
{
|
||||
int ret;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/*
|
||||
* Try to delete the URB containing our request packet.
|
||||
* If we succeed, then its completion handler will be
|
||||
|
@ -3408,8 +3293,6 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
|
|||
ret = 0;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -3437,8 +3320,6 @@ static int unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
|
|||
----------------------------------------------------------------*/
|
||||
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.
|
||||
|
@ -3458,8 +3339,6 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
|
|||
ctlxstr(ctlx->state));
|
||||
break;
|
||||
} /* switch */
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -3482,7 +3361,6 @@ static void
|
|||
hfa384x_usbctlxq_run(hfa384x_t *hw)
|
||||
{
|
||||
unsigned long flags;
|
||||
DBFENTER;
|
||||
|
||||
/* acquire lock */
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
@ -3563,8 +3441,6 @@ hfa384x_usbctlxq_run(hfa384x_t *hw)
|
|||
|
||||
unlock:
|
||||
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3600,8 +3476,6 @@ static void hfa384x_usbin_callback(struct urb *urb)
|
|||
ABORT
|
||||
} action;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if ( !wlandev ||
|
||||
!wlandev->netdev ||
|
||||
wlandev->hwremoved )
|
||||
|
@ -3747,8 +3621,6 @@ static void hfa384x_usbin_callback(struct urb *urb)
|
|||
|
||||
if (skb)
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3779,8 +3651,6 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
|
|||
int run_queue = 0;
|
||||
unsigned long flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
retry:
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
|
@ -3875,8 +3745,6 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
|
|||
|
||||
if (run_queue)
|
||||
hfa384x_usbctlxq_run(hw);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3900,7 +3768,6 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
|
|||
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...*/
|
||||
|
||||
|
@ -3911,8 +3778,6 @@ static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
|
|||
prism2sta_ev_tx(wlandev, status);
|
||||
}
|
||||
// prism2sta_ev_alloc(wlandev);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3942,8 +3807,6 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb)
|
|||
u16 data_len;
|
||||
u16 fc;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Byte order convert once up front. */
|
||||
usbin->rxfrm.desc.status =
|
||||
hfa384x2host_16(usbin->rxfrm.desc.status);
|
||||
|
@ -4018,7 +3881,6 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb)
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4054,8 +3916,6 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r
|
|||
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);
|
||||
|
@ -4128,7 +3988,6 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r
|
|||
/* pass it back up */
|
||||
prism2sta_ev_rx(wlandev, skb);
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4153,12 +4012,8 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r
|
|||
----------------------------------------------------------------*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4183,7 +4038,6 @@ static void hfa384x_usbout_callback(struct urb *urb)
|
|||
{
|
||||
wlandevice_t *wlandev = urb->context;
|
||||
hfa384x_usbout_t *usbout = urb->transfer_buffer;
|
||||
DBFENTER;
|
||||
|
||||
#ifdef DEBUG_USB
|
||||
dbprint_urb(urb);
|
||||
|
@ -4235,8 +4089,6 @@ static void hfa384x_usbout_callback(struct urb *urb)
|
|||
break;
|
||||
} /* switch */
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4265,8 +4117,6 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
|
|||
hfa384x_usbctlx_t *ctlx;
|
||||
unsigned long flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
WLAN_LOG_DEBUG(3,"urb->status=%d\n", urb->status);
|
||||
#ifdef DEBUG_USB
|
||||
dbprint_urb(urb);
|
||||
|
@ -4372,7 +4222,7 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
|
|||
hfa384x_usbctlxq_run(hw);
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4399,7 +4249,6 @@ hfa384x_usbctlx_reqtimerfn(unsigned long data)
|
|||
{
|
||||
hfa384x_t *hw = (hfa384x_t*)data;
|
||||
unsigned long flags;
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
|
@ -4436,8 +4285,6 @@ hfa384x_usbctlx_reqtimerfn(unsigned long data)
|
|||
}
|
||||
|
||||
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4465,8 +4312,6 @@ hfa384x_usbctlx_resptimerfn(unsigned long data)
|
|||
hfa384x_t *hw = (hfa384x_t*)data;
|
||||
unsigned long flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
hw->resp_timer_done = 1;
|
||||
|
@ -4489,7 +4334,8 @@ hfa384x_usbctlx_resptimerfn(unsigned long data)
|
|||
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -4513,8 +4359,6 @@ hfa384x_usb_throttlefn(unsigned long data)
|
|||
hfa384x_t *hw = (hfa384x_t*)data;
|
||||
unsigned long flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
/*
|
||||
|
@ -4535,8 +4379,6 @@ hfa384x_usb_throttlefn(unsigned long data)
|
|||
}
|
||||
|
||||
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4566,8 +4408,6 @@ hfa384x_usbctlx_submit(
|
|||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
spin_lock_irqsave(&hw->ctlxq.lock, flags);
|
||||
|
||||
if (hw->wlandev->hwremoved) {
|
||||
|
@ -4582,7 +4422,6 @@ hfa384x_usbctlx_submit(
|
|||
ret = 0;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -4608,11 +4447,7 @@ hfa384x_usbctlx_submit(
|
|||
----------------------------------------------------------------*/
|
||||
static void hfa384x_usbout_tx(wlandevice_t *wlandev, hfa384x_usbout_t *usbout)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
prism2sta_ev_alloc(wlandev);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
|
|
@ -140,7 +140,6 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
|
|||
wlan_snap_t *e_snap;
|
||||
int foo;
|
||||
|
||||
DBFENTER;
|
||||
memcpy(&e_hdr, skb->data, sizeof(e_hdr));
|
||||
|
||||
if (skb->len <= 0) {
|
||||
|
@ -248,7 +247,6 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
|
|||
p80211_hdr->a3.dur = 0;
|
||||
p80211_hdr->a3.seq = 0;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -308,8 +306,6 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
|
|||
|
||||
int foo;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
payload_length = skb->len - WLAN_HDR_A3_LEN - WLAN_CRC_LEN;
|
||||
payload_offset = WLAN_HDR_A3_LEN;
|
||||
|
||||
|
@ -511,7 +507,6 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb
|
|||
/* Free the metadata */
|
||||
p80211skb_rxmeta_detach(skb);
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -567,7 +562,6 @@ p80211skb_rxmeta_detach(struct sk_buff *skb)
|
|||
p80211_rxmeta_t *rxmeta;
|
||||
p80211_frmmeta_t *frmmeta;
|
||||
|
||||
DBFENTER;
|
||||
/* Sanity checks */
|
||||
if ( skb==NULL ) { /* bad skb */
|
||||
WLAN_LOG_DEBUG(1, "Called w/ null skb.\n");
|
||||
|
@ -590,7 +584,6 @@ p80211skb_rxmeta_detach(struct sk_buff *skb)
|
|||
/* Clear skb->cb */
|
||||
memset(skb->cb, 0, sizeof(skb->cb));
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -617,8 +610,6 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
|
|||
p80211_rxmeta_t *rxmeta;
|
||||
p80211_frmmeta_t *frmmeta;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* If these already have metadata, we error out! */
|
||||
if (P80211SKB_RXMETA(skb) != NULL) {
|
||||
WLAN_LOG_ERROR("%s: RXmeta already attached!\n",
|
||||
|
@ -648,7 +639,6 @@ p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
|
|||
frmmeta->magic = P80211_FRMMETA_MAGIC;
|
||||
frmmeta->rx = rxmeta;
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -672,7 +662,7 @@ void
|
|||
p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb)
|
||||
{
|
||||
p80211_frmmeta_t *meta;
|
||||
DBFENTER;
|
||||
|
||||
meta = P80211SKB_FRMMETA(skb);
|
||||
if ( meta && meta->rx) {
|
||||
p80211skb_rxmeta_detach(skb);
|
||||
|
@ -681,6 +671,5 @@ p80211skb_free(struct wlandevice *wlandev, struct sk_buff *skb)
|
|||
}
|
||||
|
||||
dev_kfree_skb(skb);
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -157,12 +157,10 @@ MODULE_PARM_DESC(wlan_debug, "p80211 debug level");
|
|||
----------------------------------------------------------------*/
|
||||
static int p80211knetdev_init( netdevice_t *netdev)
|
||||
{
|
||||
DBFENTER;
|
||||
/* Called in response to register_netdev */
|
||||
/* This is usually the probe function, but the probe has */
|
||||
/* already been done by the MSD and the create_kdev */
|
||||
/* function. All we do here is return success */
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -185,12 +183,10 @@ static struct net_device_stats*
|
|||
p80211knetdev_get_stats(netdevice_t *netdev)
|
||||
{
|
||||
wlandevice_t *wlandev = netdev->ml_priv;
|
||||
DBFENTER;
|
||||
|
||||
/* TODO: review the MIB stats for items that correspond to
|
||||
linux stats */
|
||||
|
||||
DBFEXIT;
|
||||
return &(wlandev->linux_stats);
|
||||
}
|
||||
|
||||
|
@ -214,8 +210,6 @@ static int p80211knetdev_open( netdevice_t *netdev )
|
|||
int result = 0; /* success */
|
||||
wlandevice_t *wlandev = netdev->ml_priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Check to make sure the MSD is running */
|
||||
if ( wlandev->msdstate != WLAN_MSD_RUNNING ) {
|
||||
return -ENODEV;
|
||||
|
@ -232,7 +226,6 @@ static int p80211knetdev_open( netdevice_t *netdev )
|
|||
result = -EAGAIN;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -254,8 +247,6 @@ static int p80211knetdev_stop( netdevice_t *netdev )
|
|||
int result = 0;
|
||||
wlandevice_t *wlandev = netdev->ml_priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if ( wlandev->close != NULL ) {
|
||||
result = wlandev->close(wlandev);
|
||||
}
|
||||
|
@ -263,7 +254,6 @@ static int p80211knetdev_stop( netdevice_t *netdev )
|
|||
netif_stop_queue(wlandev->netdev);
|
||||
wlandev->state = WLAN_DEVICE_CLOSED;
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -283,14 +273,11 @@ static int p80211knetdev_stop( netdevice_t *netdev )
|
|||
void
|
||||
p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb )
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
/* Enqueue for post-irq processing */
|
||||
skb_queue_tail(&wlandev->nsd_rxq, skb);
|
||||
|
||||
tasklet_schedule(&wlandev->rx_bh);
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -315,8 +302,6 @@ static void p80211netdev_rx_bh(unsigned long arg)
|
|||
p80211_hdr_a3_t *hdr;
|
||||
u16 fc;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Let's empty our our queue */
|
||||
while ( (skb = skb_dequeue(&wlandev->nsd_rxq)) ) {
|
||||
if (wlandev->state == WLAN_DEVICE_OPEN) {
|
||||
|
@ -369,8 +354,6 @@ static void p80211netdev_rx_bh(unsigned long arg)
|
|||
}
|
||||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -401,8 +384,6 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd
|
|||
p80211_hdr_t p80211_hdr;
|
||||
p80211_metawep_t p80211_wep;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (skb == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -506,7 +487,6 @@ static int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netd
|
|||
if (!result)
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -527,14 +507,11 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev)
|
|||
{
|
||||
wlandevice_t *wlandev = dev->ml_priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* TODO: real multicast support as well */
|
||||
|
||||
if (wlandev->set_multicast_list)
|
||||
wlandev->set_multicast_list(wlandev, dev);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
#ifdef SIOCETHTOOL
|
||||
|
@ -620,7 +597,6 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
|||
p80211ioctl_req_t *req = (p80211ioctl_req_t*)ifr;
|
||||
wlandevice_t *wlandev = dev->ml_priv;
|
||||
u8 *msgbuf;
|
||||
DBFENTER;
|
||||
|
||||
WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);
|
||||
|
||||
|
@ -663,8 +639,6 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
|||
result = -ENOMEM;
|
||||
}
|
||||
bail:
|
||||
DBFEXIT;
|
||||
|
||||
return result; /* If allocate,copyfrom or copyto fails, return errno */
|
||||
}
|
||||
|
||||
|
@ -702,7 +676,6 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
|
|||
p80211item_uint32_t *resultcode;
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
/* If we're running, we don't allow MAC address changes */
|
||||
if (netif_running(dev)) {
|
||||
return -EBUSY;
|
||||
|
@ -753,13 +726,11 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
|
|||
memcpy(dev->dev_addr, new_addr->sa_data, dev->addr_len);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
static int wlan_change_mtu(netdevice_t *dev, int new_mtu)
|
||||
{
|
||||
DBFENTER;
|
||||
// 2312 is max 802.11 payload, 20 is overhead, (ether + llc +snap)
|
||||
// and another 8 for wep.
|
||||
if ( (new_mtu < 68) || (new_mtu > (2312 - 20 - 8)))
|
||||
|
@ -767,8 +738,6 @@ static int wlan_change_mtu(netdevice_t *dev, int new_mtu)
|
|||
|
||||
dev->mtu = new_mtu;
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -801,8 +770,6 @@ int wlan_setup(wlandevice_t *wlandev)
|
|||
int result = 0;
|
||||
netdevice_t *dev;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Set up the wlandev */
|
||||
wlandev->state = WLAN_DEVICE_CLOSED;
|
||||
wlandev->ethconv = WLAN_ETHCONV_8021h;
|
||||
|
@ -853,7 +820,6 @@ int wlan_setup(wlandevice_t *wlandev)
|
|||
netif_carrier_off(dev);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -882,8 +848,6 @@ int wlan_unsetup(wlandevice_t *wlandev)
|
|||
{
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
tasklet_kill(&wlandev->rx_bh);
|
||||
|
||||
if (wlandev->netdev == NULL ) {
|
||||
|
@ -894,7 +858,6 @@ int wlan_unsetup(wlandevice_t *wlandev)
|
|||
wlandev->netdev = NULL;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -923,13 +886,10 @@ int register_wlandev(wlandevice_t *wlandev)
|
|||
{
|
||||
int i = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
i = register_netdev(wlandev->netdev);
|
||||
if (i)
|
||||
return i;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -955,8 +915,6 @@ int unregister_wlandev(wlandevice_t *wlandev)
|
|||
{
|
||||
struct sk_buff *skb;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
unregister_netdev(wlandev->netdev);
|
||||
|
||||
/* Now to clean out the rx queue */
|
||||
|
@ -964,7 +922,6 @@ int unregister_wlandev(wlandevice_t *wlandev)
|
|||
dev_kfree_skb(skb);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1001,15 +958,12 @@ int unregister_wlandev(wlandevice_t *wlandev)
|
|||
----------------------------------------------------------------*/
|
||||
void p80211netdev_hwremoved(wlandevice_t *wlandev)
|
||||
{
|
||||
DBFENTER;
|
||||
wlandev->hwremoved = 1;
|
||||
if ( wlandev->state == WLAN_DEVICE_OPEN) {
|
||||
netif_stop_queue(wlandev->netdev);
|
||||
}
|
||||
|
||||
netif_device_detach(wlandev->netdev);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1196,7 +1150,6 @@ static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc)
|
|||
static void p80211knetdev_tx_timeout( netdevice_t *netdev)
|
||||
{
|
||||
wlandevice_t *wlandev = netdev->ml_priv;
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->tx_timeout) {
|
||||
wlandev->tx_timeout(wlandev);
|
||||
|
@ -1205,6 +1158,4 @@ static void p80211knetdev_tx_timeout( netdevice_t *netdev)
|
|||
wlandev->nsdname);
|
||||
netif_wake_queue(wlandev->netdev);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
|
|
@ -129,8 +129,6 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf)
|
|||
int result = 0;
|
||||
p80211msg_t *msg = (p80211msg_t*)msgbuf;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Check to make sure the MSD is running */
|
||||
if (
|
||||
!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
|
||||
|
@ -162,7 +160,6 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf)
|
|||
wlandev->mlmerequest(wlandev, msg);
|
||||
|
||||
clear_bit( 1, &(wlandev->request_pending));
|
||||
DBFEXIT;
|
||||
return result; /* if result==0, msg->status still may contain an err */
|
||||
}
|
||||
|
||||
|
@ -186,8 +183,6 @@ int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf)
|
|||
----------------------------------------------------------------*/
|
||||
static void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
switch (msg->msgcode) {
|
||||
|
||||
case DIDmsg_lnxreq_hostwep: {
|
||||
|
@ -211,8 +206,6 @@ static void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg)
|
|||
;
|
||||
} /* switch msg->msgcode */
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -224,8 +217,6 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
|
|||
p80211pstrd_t *pstr = (p80211pstrd_t*) mibitem->data;
|
||||
u8 *key = mibitem->data + sizeof(p80211pstrd_t);
|
||||
|
||||
DBFENTER;
|
||||
|
||||
switch (mibitem->did) {
|
||||
case DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0: {
|
||||
if (!isget)
|
||||
|
@ -294,7 +285,6 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
|
|||
;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,15 +148,12 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
|
|||
p80211item_uint32_t mibitem;
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibset;
|
||||
mibitem.did = did;
|
||||
mibitem.data = data;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
result = p80211req_dorequest(wlandev, (u8*)&msg);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -169,8 +166,6 @@ static int p80211wext_autojoin(wlandevice_t *wlandev)
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Get ESSID */
|
||||
result = p80211wext_giwessid(wlandev->netdev, NULL, &data, ssid);
|
||||
|
||||
|
@ -204,7 +199,6 @@ static int p80211wext_autojoin(wlandevice_t *wlandev)
|
|||
|
||||
exit:
|
||||
|
||||
DBFEXIT;
|
||||
return err;
|
||||
|
||||
}
|
||||
|
@ -217,7 +211,6 @@ struct iw_statistics* p80211wext_get_wireless_stats (netdevice_t *dev)
|
|||
struct iw_statistics* wstats = &wlandev->wstats;
|
||||
int retval;
|
||||
|
||||
DBFENTER;
|
||||
/* Check */
|
||||
if ( (wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING) )
|
||||
return NULL;
|
||||
|
@ -249,8 +242,6 @@ struct iw_statistics* p80211wext_get_wireless_stats (netdevice_t *dev)
|
|||
wstats->discard.retries = 0; // tx retries.
|
||||
wstats->miss.beacon = 0;
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return wstats;
|
||||
}
|
||||
|
||||
|
@ -262,8 +253,6 @@ static int p80211wext_giwname(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
result = p80211wext_giwrate(dev, NULL, &rate, NULL);
|
||||
|
||||
if (result) {
|
||||
|
@ -282,7 +271,6 @@ static int p80211wext_giwname(netdevice_t *dev,
|
|||
break;
|
||||
}
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -296,8 +284,6 @@ static int p80211wext_giwfreq(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -320,7 +306,6 @@ static int p80211wext_giwfreq(netdevice_t *dev,
|
|||
freq->m = p80211_channel_to_mhz(mibitem.data, 0) * 100000;
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -334,8 +319,6 @@ static int p80211wext_siwfreq(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -359,7 +342,6 @@ static int p80211wext_siwfreq(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -369,8 +351,6 @@ static int p80211wext_giwmode(netdevice_t *dev,
|
|||
{
|
||||
wlandevice_t *wlandev = dev->ml_priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
switch (wlandev->macmode) {
|
||||
case WLAN_MACMODE_IBSS_STA:
|
||||
*mode = IW_MODE_ADHOC;
|
||||
|
@ -386,7 +366,6 @@ static int p80211wext_giwmode(netdevice_t *dev,
|
|||
*mode = IW_MODE_AUTO;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -400,8 +379,6 @@ static int p80211wext_siwmode(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -444,8 +421,6 @@ static int p80211wext_siwmode(netdevice_t *dev,
|
|||
err = -EFAULT;
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -457,8 +432,6 @@ static int p80211wext_giwrange(netdevice_t *dev,
|
|||
struct iw_range *range = (struct iw_range *) extra;
|
||||
int i, val;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
// for backward compatability set size & zero everything we don't understand
|
||||
data->length = sizeof(*range);
|
||||
memset(range,0,sizeof(*range));
|
||||
|
@ -518,7 +491,6 @@ static int p80211wext_giwrange(netdevice_t *dev,
|
|||
// XXX need to cap it if we're running at ~2Mbps..
|
||||
range->throughput = 5500000;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -529,12 +501,9 @@ static int p80211wext_giwap(netdevice_t *dev,
|
|||
|
||||
wlandevice_t *wlandev = dev->ml_priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
memcpy(ap_addr->sa_data, wlandev->bssid, WLAN_BSSID_LEN);
|
||||
ap_addr->sa_family = ARPHRD_ETHER;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -546,8 +515,6 @@ static int p80211wext_giwencode(netdevice_t *dev,
|
|||
int err = 0;
|
||||
int i;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
i = (erq->flags & IW_ENCODE_INDEX) - 1;
|
||||
erq->flags = 0;
|
||||
|
||||
|
@ -578,7 +545,6 @@ static int p80211wext_giwencode(netdevice_t *dev,
|
|||
memcpy(key, wlandev->wep_keys[i], erq->length);
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -594,7 +560,6 @@ static int p80211wext_siwencode(netdevice_t *dev,
|
|||
int result = 0;
|
||||
int i;
|
||||
|
||||
DBFENTER;
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -711,7 +676,6 @@ static int p80211wext_siwencode(netdevice_t *dev,
|
|||
|
||||
exit:
|
||||
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -721,8 +685,6 @@ static int p80211wext_giwessid(netdevice_t *dev,
|
|||
{
|
||||
wlandevice_t *wlandev = dev->ml_priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->ssid.len) {
|
||||
data->length = wlandev->ssid.len;
|
||||
data->flags = 1;
|
||||
|
@ -737,7 +699,6 @@ static int p80211wext_giwessid(netdevice_t *dev,
|
|||
data->flags = 0;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -752,8 +713,6 @@ static int p80211wext_siwessid(netdevice_t *dev,
|
|||
int err = 0;
|
||||
int length = data->length;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -790,7 +749,6 @@ static int p80211wext_siwessid(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -802,8 +760,6 @@ static int p80211wext_siwcommit(netdevice_t *dev,
|
|||
wlandevice_t *wlandev = dev->ml_priv;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -813,7 +769,6 @@ static int p80211wext_siwcommit(netdevice_t *dev,
|
|||
err = p80211wext_autojoin(wlandev);
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -828,8 +783,6 @@ static int p80211wext_giwrate(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -868,7 +821,6 @@ static int p80211wext_giwrate(netdevice_t *dev,
|
|||
err = -EINVAL;
|
||||
}
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -882,8 +834,6 @@ static int p80211wext_giwrts(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -901,7 +851,6 @@ static int p80211wext_giwrts(netdevice_t *dev,
|
|||
rts->fixed = 1;
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -916,8 +865,6 @@ static int p80211wext_siwrts(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -939,7 +886,6 @@ static int p80211wext_siwrts(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -953,8 +899,6 @@ static int p80211wext_giwfrag(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -972,7 +916,6 @@ static int p80211wext_giwfrag(netdevice_t *dev,
|
|||
frag->fixed = 1;
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -986,8 +929,6 @@ static int p80211wext_siwfrag(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -1010,7 +951,6 @@ static int p80211wext_siwfrag(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1033,8 +973,6 @@ static int p80211wext_giwretry(netdevice_t *dev,
|
|||
int err = 0;
|
||||
u16 shortretry, longretry, lifetime;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
|
||||
|
||||
|
@ -1096,7 +1034,6 @@ static int p80211wext_giwretry(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
|
||||
}
|
||||
|
@ -1111,8 +1048,6 @@ static int p80211wext_siwretry(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -1165,7 +1100,6 @@ static int p80211wext_siwretry(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
|
||||
}
|
||||
|
@ -1180,8 +1114,6 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -1202,7 +1134,6 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
|
|||
}
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1216,8 +1147,6 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
|
||||
|
||||
|
@ -1239,7 +1168,6 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
|
|||
rrq->value = mibitem.data;
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1252,7 +1180,6 @@ static int p80211wext_siwspy(netdevice_t *dev,
|
|||
int number = srq->length;
|
||||
int i;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Copy the data from the input buffer */
|
||||
memcpy(address, extra, sizeof(struct sockaddr)*number);
|
||||
|
@ -1274,7 +1201,6 @@ static int p80211wext_siwspy(netdevice_t *dev,
|
|||
wlandev->spy_number = number;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1290,8 +1216,6 @@ static int p80211wext_giwspy(netdevice_t *dev,
|
|||
int number;
|
||||
int i;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
number = wlandev->spy_number;
|
||||
|
||||
if (number > 0) {
|
||||
|
@ -1313,7 +1237,6 @@ static int p80211wext_giwspy(netdevice_t *dev,
|
|||
memcpy(extra, address, sizeof(struct sockaddr)*number);
|
||||
memcpy(extra+sizeof(struct sockaddr)*number, spy_stat, sizeof(struct iw_quality)*number);
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1349,8 +1272,6 @@ static int p80211wext_siwscan(netdevice_t *dev,
|
|||
int err = 0;
|
||||
int i = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->macmode == WLAN_MACMODE_ESS_AP) {
|
||||
WLAN_LOG_ERROR("Can't scan in AP mode\n");
|
||||
err = (-EOPNOTSUPP);
|
||||
|
@ -1379,7 +1300,6 @@ static int p80211wext_siwscan(netdevice_t *dev,
|
|||
err = prism2_result2err (msg.resultcode.data);
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1474,8 +1394,6 @@ static int p80211wext_giwscan(netdevice_t *dev,
|
|||
int scan_good = 0;
|
||||
char *current_ev = extra;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Since wireless tools doesn't really have a way of passing how
|
||||
* many scan results results there were back here, keep grabbing them
|
||||
* until we fail.
|
||||
|
@ -1502,7 +1420,6 @@ static int p80211wext_giwscan(netdevice_t *dev,
|
|||
if (result && !scan_good)
|
||||
err = prism2_result2err (msg.resultcode.data);
|
||||
|
||||
DBFEXIT;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1598,8 +1515,6 @@ static int p80211wext_get_encodeext(struct net_device *dev,
|
|||
int max_len;
|
||||
int idx;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
WLAN_LOG_DEBUG(1,"get_encode_ext flags[%d] alg[%d] keylen[%d]\n",ext->ext_flags,(int)ext->alg,(int)ext->key_len);
|
||||
|
||||
|
||||
|
@ -1634,8 +1549,6 @@ static int p80211wext_get_encodeext(struct net_device *dev,
|
|||
|
||||
encoding->flags |= IW_ENCODE_ENABLED;
|
||||
exit:
|
||||
DBFEXIT;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1801,8 +1714,6 @@ int p80211wext_event_associated(wlandevice_t *wlandev, int assoc)
|
|||
{
|
||||
union iwreq_data data;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Send the association state first */
|
||||
data.ap_addr.sa_family = ARPHRD_ETHER;
|
||||
if (assoc) {
|
||||
|
@ -1819,7 +1730,6 @@ int p80211wext_event_associated(wlandevice_t *wlandev, int assoc)
|
|||
// XXX send association data, like IEs, etc etc.
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,8 +134,6 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
|
|||
|
||||
hfa384x_HostScanRequest_data_t scanreq;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* gatekeeper check */
|
||||
if (HFA384x_FIRMWARE_VERSION(hw->ident_sta_fw.major,
|
||||
hw->ident_sta_fw.minor,
|
||||
|
@ -340,7 +338,6 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
|
|||
exit:
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -374,8 +371,6 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
|
|||
|
||||
int count;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
req = (p80211msg_dot11req_scan_results_t *) msgp;
|
||||
|
||||
req->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
|
@ -502,7 +497,6 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
|
|||
req->resultcode.data = P80211ENUM_resultcode_success;
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -535,7 +529,6 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
|
|||
u8 bytebuf[80];
|
||||
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
|
||||
u16 word;
|
||||
DBFENTER;
|
||||
|
||||
wlandev->macmode = WLAN_MACMODE_NONE;
|
||||
|
||||
|
@ -681,7 +674,6 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
|
|||
done:
|
||||
result = 0;
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -708,7 +700,6 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
|
|||
hfa384x_t *hw = wlandev->priv;
|
||||
p80211msg_p2req_readpda_t *msg = msgp;
|
||||
int result;
|
||||
DBFENTER;
|
||||
|
||||
/* We only support collecting the PDA when in the FWLOAD
|
||||
* state.
|
||||
|
@ -738,7 +729,6 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
|
|||
P80211ENUM_resultcode_implementation_failure;
|
||||
msg->resultcode.status =
|
||||
P80211ENUM_msgitem_status_data_ok;
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
msg->pda.status = P80211ENUM_msgitem_status_data_ok;
|
||||
|
@ -746,7 +736,6 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -779,7 +768,6 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)
|
|||
{
|
||||
hfa384x_t *hw = wlandev->priv;
|
||||
p80211msg_p2req_ramdl_state_t *msg = msgp;
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
|
||||
WLAN_LOG_ERROR(
|
||||
|
@ -788,7 +776,6 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_implementation_failure;
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -809,7 +796,6 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.data = P80211ENUM_resultcode_success;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -841,7 +827,6 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
|
|||
u32 addr;
|
||||
u32 len;
|
||||
u8 *buf;
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
|
||||
WLAN_LOG_ERROR(
|
||||
|
@ -850,7 +835,6 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_implementation_failure;
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -870,7 +854,6 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
|
|||
}
|
||||
msg->resultcode.data = P80211ENUM_resultcode_success;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -905,7 +888,6 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
|
|||
int result = 0;
|
||||
hfa384x_t *hw = wlandev->priv;
|
||||
p80211msg_p2req_flashdl_state_t *msg = msgp;
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
|
||||
WLAN_LOG_ERROR(
|
||||
|
@ -914,7 +896,6 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_implementation_failure;
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -951,7 +932,6 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
|
|||
}
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -981,7 +961,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
|
|||
u32 addr;
|
||||
u32 len;
|
||||
u8 *buf;
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
|
||||
WLAN_LOG_ERROR(
|
||||
|
@ -990,7 +969,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_implementation_failure;
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1016,7 +994,6 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
|
|||
}
|
||||
msg->resultcode.data = P80211ENUM_resultcode_success;
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1049,7 +1026,6 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
|
|||
p80211pstrd_t *pstr;
|
||||
u8 bytebuf[256];
|
||||
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
|
||||
DBFENTER;
|
||||
|
||||
wlandev->macmode = WLAN_MACMODE_NONE;
|
||||
|
||||
|
@ -1107,7 +1083,6 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
msg->resultcode.data = P80211ENUM_resultcode_success;
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1139,8 +1114,6 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
|
|||
hfa384x_t *hw = wlandev->priv;
|
||||
u16 word;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
switch (msg->enable.data)
|
||||
{
|
||||
|
@ -1357,7 +1330,5 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
|
|||
msg->resultcode.data = P80211ENUM_resultcode_refused;
|
||||
result = 0;
|
||||
exit:
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -304,8 +304,6 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
p80211msg_dot11req_mibset_t *msg = msgp;
|
||||
p80211itemd_t *mibitem;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
msg->resultcode.data = P80211ENUM_resultcode_success;
|
||||
|
||||
|
@ -383,8 +381,6 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
}
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -425,8 +421,6 @@ void *data)
|
|||
p80211pstrd_t *pstr = (p80211pstrd_t*) data;
|
||||
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (isget) {
|
||||
result = hfa384x_drvr_getconfig(hw, mib->parm1, bytebuf, mib->parm2);
|
||||
prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2);
|
||||
|
@ -436,7 +430,6 @@ void *data)
|
|||
result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -478,8 +471,6 @@ void *data)
|
|||
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||
u16 *wordbuf = (u16*) bytebuf;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (isget) {
|
||||
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
|
||||
*uint32 = *wordbuf;
|
||||
|
@ -494,7 +485,6 @@ void *data)
|
|||
result = hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -537,8 +527,6 @@ void *data)
|
|||
u16 *wordbuf = (u16*) bytebuf;
|
||||
u32 flags;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
|
||||
if (result == 0) {
|
||||
/* [MSM] Removed, getconfig16 returns the value in host order.
|
||||
|
@ -561,7 +549,6 @@ void *data)
|
|||
}
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -603,8 +590,6 @@ void *data)
|
|||
u8 bytebuf[MIB_TMP_MAXLEN];
|
||||
u16 len;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (isget) {
|
||||
result = 0; /* Should never happen. */
|
||||
} else {
|
||||
|
@ -615,7 +600,6 @@ void *data)
|
|||
result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -654,8 +638,6 @@ void *data)
|
|||
{
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (wlandev->hostwep & HOSTWEP_DECRYPT) {
|
||||
if (wlandev->hostwep & HOSTWEP_DECRYPT)
|
||||
mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_RXCRYPT;
|
||||
|
@ -665,7 +647,6 @@ void *data)
|
|||
|
||||
result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -704,11 +685,8 @@ void *data)
|
|||
{
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -748,8 +726,6 @@ void *data)
|
|||
int result;
|
||||
u32 *uint32 = (u32*) data;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (!isget)
|
||||
if ((*uint32) % 2) {
|
||||
WLAN_LOG_WARNING("Attempt to set odd number "
|
||||
|
@ -760,7 +736,6 @@ void *data)
|
|||
|
||||
result = prism2mib_uint32(mib, isget, wlandev, hw, msg, data);
|
||||
|
||||
DBFEXIT;
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
@ -801,8 +776,6 @@ void *data)
|
|||
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
switch (mib->did) {
|
||||
case DIDmib_lnx_lnxConfigTable_lnxRSNAIE: {
|
||||
hfa384x_WPAData_t wpa;
|
||||
|
@ -824,7 +797,6 @@ void *data)
|
|||
WLAN_LOG_ERROR("Unhandled DID 0x%08x\n", mib->did);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -845,11 +817,8 @@ void *data)
|
|||
|
||||
void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
bytestr->len = host2hfa384x_16((u16)(pstr->len));
|
||||
memcpy(bytestr->data, pstr->data, pstr->len);
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -870,10 +839,7 @@ void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
|
|||
|
||||
void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
memcpy(bytearea, pstr->data, pstr->len);
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -894,11 +860,8 @@ void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
|
|||
|
||||
void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
pstr->len = (u8)(hfa384x2host_16((u16)(bytestr->len)));
|
||||
memcpy(pstr->data, bytestr->data, pstr->len);
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -919,11 +882,8 @@ void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr)
|
|||
|
||||
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
pstr->len = (u8)len;
|
||||
memcpy(pstr->data, bytearea, len);
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -943,10 +903,7 @@ void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
|
|||
|
||||
void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
*wlanint = (u32)hfa384x2host_16(*prism2int);
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -966,10 +923,7 @@ void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint)
|
|||
|
||||
void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
*prism2int = host2hfa384x_16((u16)(*wlanint));
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -989,12 +943,9 @@ void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
/* At the moment, the need for this functionality hasn't
|
||||
presented itself. All the wlan enumerated values are
|
||||
a 1-to-1 match against the Prism2 enumerated values*/
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1015,12 +966,9 @@ void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2mgmt_p80211enum2prism2enum(u16 *prism2enum, u32 *wlanenum, u16 rid)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
/* At the moment, the need for this functionality hasn't
|
||||
presented itself. All the wlan enumerated values are
|
||||
a 1-to-1 match against the Prism2 enumerated values*/
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1044,8 +992,6 @@ void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr)
|
|||
u8 len;
|
||||
u8 *datarate;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
len = 0;
|
||||
datarate = pstr->data;
|
||||
|
||||
|
@ -1079,7 +1025,6 @@ void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr)
|
|||
|
||||
pstr->len = len;
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1103,8 +1048,6 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr)
|
|||
u8 *datarate;
|
||||
int i;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
*rate = 0;
|
||||
|
||||
datarate = pstr->data;
|
||||
|
@ -1130,6 +1073,5 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr)
|
|||
}
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -218,8 +218,6 @@ inline void dmpmem(void *buf, int n)
|
|||
----------------------------------------------------------------*/
|
||||
static int prism2sta_open(wlandevice_t *wlandev)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
/* We don't currently have to do anything else.
|
||||
* The setup of the MAC should be subsequently completed via
|
||||
* the mlme commands.
|
||||
|
@ -228,7 +226,6 @@ static int prism2sta_open(wlandevice_t *wlandev)
|
|||
* frames because of dev->flags&IFF_UP is true.
|
||||
*/
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -256,15 +253,12 @@ static int prism2sta_open(wlandevice_t *wlandev)
|
|||
----------------------------------------------------------------*/
|
||||
static int prism2sta_close(wlandevice_t *wlandev)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
/* We don't currently have to do anything else.
|
||||
* Higher layers know we're not ready from dev->start==0 and
|
||||
* dev->tbusy==1. Our rx path knows to not pass up received
|
||||
* frames because of dev->flags&IFF_UP is false.
|
||||
*/
|
||||
|
||||
DBFEXIT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -288,8 +282,6 @@ static int prism2sta_close(wlandevice_t *wlandev)
|
|||
----------------------------------------------------------------*/
|
||||
static void prism2sta_reset(wlandevice_t *wlandev )
|
||||
{
|
||||
DBFENTER;
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -321,7 +313,6 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb,
|
|||
{
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
int result;
|
||||
DBFENTER;
|
||||
|
||||
/* If necessary, set the 802.11 WEP bit */
|
||||
if ((wlandev->hostwep & (HOSTWEP_PRIVACYINVOKED | HOSTWEP_ENCRYPT)) == HOSTWEP_PRIVACYINVOKED) {
|
||||
|
@ -330,7 +321,6 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb,
|
|||
|
||||
result = hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep);
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -364,7 +354,6 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
|
|||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
|
||||
int result = 0;
|
||||
DBFENTER;
|
||||
|
||||
switch( msg->msgcode )
|
||||
{
|
||||
|
@ -459,7 +448,6 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
|
|||
break;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -489,7 +477,6 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
|
|||
{
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
u32 result;
|
||||
DBFENTER;
|
||||
|
||||
result = P80211ENUM_resultcode_implementation_failure;
|
||||
|
||||
|
@ -635,7 +622,6 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
|
|||
break;
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -667,8 +653,6 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
|
|||
u8 snum[HFA384x_RID_NICSERIALNUMBER_LEN];
|
||||
char pstr[(HFA384x_RID_NICSERIALNUMBER_LEN * 4) + 1];
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Collect version and compatibility info */
|
||||
/* Some are critical, some are not */
|
||||
/* NIC identity */
|
||||
|
@ -953,7 +937,6 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
|
|||
failed:
|
||||
WLAN_LOG_ERROR("Failed, result=%d\n", result);
|
||||
done:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -992,8 +975,6 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev)
|
|||
|
||||
u16 promisc;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* If we're not ready, what's the point? */
|
||||
if ( hw->state != HFA384x_STATE_RUNNING )
|
||||
goto exit;
|
||||
|
@ -1014,7 +995,6 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev)
|
|||
// }
|
||||
|
||||
exit:
|
||||
DBFEXIT;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1038,9 +1018,7 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev)
|
|||
----------------------------------------------------------------*/
|
||||
static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
|
||||
{
|
||||
DBFENTER;
|
||||
WLAN_LOG_DEBUG(2,"received infoframe:HANDOVER (unhandled)\n");
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1071,8 +1049,6 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf
|
|||
int i;
|
||||
int cnt;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/*
|
||||
** Determine if these are 16-bit or 32-bit tallies, based on the
|
||||
** record length of the info record.
|
||||
|
@ -1091,8 +1067,6 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf
|
|||
*dst += hfa384x2host_16(*src16);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1097,6 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
|
|||
int i;
|
||||
hfa384x_JoinRequest_data_t joinreq;
|
||||
int result;
|
||||
DBFENTER;
|
||||
|
||||
/* Get the number of results, first in bytes, then in results */
|
||||
nbss = (inf->framelen * sizeof(u16)) -
|
||||
|
@ -1154,7 +1127,6 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
|
|||
WLAN_LOG_ERROR("setconfig(joinreq) failed, result=%d\n", result);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1180,7 +1152,6 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev,
|
|||
{
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
int nbss;
|
||||
DBFENTER;
|
||||
|
||||
nbss = (inf->framelen - 3) / 32;
|
||||
WLAN_LOG_DEBUG(1, "Received %d hostscan results\n", nbss);
|
||||
|
@ -1200,8 +1171,6 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev,
|
|||
/* Notify/wake the sleeping caller. */
|
||||
hw->scanflag = nbss;
|
||||
wake_up_interruptible(&hw->cmdq);
|
||||
|
||||
DBFEXIT;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -1227,7 +1196,6 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev,
|
|||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
unsigned int i, n;
|
||||
|
||||
DBFENTER;
|
||||
hw->channel_info.results.scanchannels =
|
||||
hfa384x2host_16(inf->info.chinforesult.scanchannels);
|
||||
#if 0
|
||||
|
@ -1255,7 +1223,6 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev,
|
|||
atomic_set(&hw->channel_info.done, 2);
|
||||
|
||||
hw->channel_info.count = n;
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1266,7 +1233,6 @@ void prism2sta_processing_defer(struct work_struct *data)
|
|||
hfa384x_bytestr32_t ssid;
|
||||
int result;
|
||||
|
||||
DBFENTER;
|
||||
/* First let's process the auth frames */
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
|
@ -1511,7 +1477,7 @@ void prism2sta_processing_defer(struct work_struct *data)
|
|||
#endif
|
||||
|
||||
failed:
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------
|
||||
|
@ -1536,13 +1502,10 @@ static void prism2sta_inf_linkstatus(wlandevice_t *wlandev,
|
|||
{
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
hw->link_status_new = hfa384x2host_16(inf->info.linkstatus.linkstatus);
|
||||
|
||||
schedule_work(&hw->link_bh);
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1571,8 +1534,6 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
|
|||
hfa384x_AssocStatus_t rec;
|
||||
int i;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
memcpy(&rec, &inf->info.assocstatus, sizeof(rec));
|
||||
rec.assocstatus = hfa384x2host_16(rec.assocstatus);
|
||||
rec.reason = hfa384x2host_16(rec.reason);
|
||||
|
@ -1604,8 +1565,6 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
|
|||
WLAN_LOG_WARNING("authfail assocstatus info frame received for authenticated station.\n");
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1634,8 +1593,6 @@ static void prism2sta_inf_authreq(wlandevice_t *wlandev,
|
|||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
struct sk_buff *skb;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
skb = dev_alloc_skb(sizeof(*inf));
|
||||
if (skb) {
|
||||
skb_put(skb, sizeof(*inf));
|
||||
|
@ -1643,8 +1600,6 @@ static void prism2sta_inf_authreq(wlandevice_t *wlandev,
|
|||
skb_queue_tail(&hw->authq, skb);
|
||||
schedule_work(&hw->link_bh);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
|
||||
|
@ -1656,8 +1611,6 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
|
|||
int i, added, result, cnt;
|
||||
u8 *addr;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/*
|
||||
** Build the AuthenticateStation record. Initialize it for denying
|
||||
** authentication.
|
||||
|
@ -1798,9 +1751,6 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
|
|||
if (added) hw->authlist.cnt--;
|
||||
WLAN_LOG_ERROR("setconfig(authenticatestation) failed, result=%d\n", result);
|
||||
}
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1828,12 +1778,8 @@ static void prism2sta_inf_psusercnt(wlandevice_t *wlandev,
|
|||
{
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
hw->psusercount = hfa384x2host_16(inf->info.psusercnt.usercnt);
|
||||
|
||||
DBFEXIT;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1858,9 +1804,7 @@ void prism2sta_ev_dtim(wlandevice_t *wlandev)
|
|||
#if 0
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
#endif
|
||||
DBFENTER;
|
||||
WLAN_LOG_DEBUG(3, "DTIM event, currently unhandled.\n");
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1886,9 +1830,7 @@ void prism2sta_ev_infdrop(wlandevice_t *wlandev)
|
|||
#if 0
|
||||
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
|
||||
#endif
|
||||
DBFENTER;
|
||||
WLAN_LOG_DEBUG(3, "Info frame dropped due to card mem low.\n");
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1912,7 +1854,6 @@ void prism2sta_ev_infdrop(wlandevice_t *wlandev)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
|
||||
{
|
||||
DBFENTER;
|
||||
inf->infotype = hfa384x2host_16(inf->infotype);
|
||||
/* Dispatch */
|
||||
switch ( inf->infotype ) {
|
||||
|
@ -1957,7 +1898,6 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
|
|||
"Unknown info type=0x%02x\n", inf->infotype);
|
||||
break;
|
||||
}
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1983,11 +1923,8 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
WLAN_LOG_DEBUG(3, "TxExc status=0x%x.\n", status);
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2010,11 +1947,9 @@ void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status)
|
||||
{
|
||||
DBFENTER;
|
||||
WLAN_LOG_DEBUG(4, "Tx Complete, status=0x%04x\n", status);
|
||||
/* update linux network stats */
|
||||
wlandev->linux_stats.tx_packets++;
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2037,11 +1972,7 @@ void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
p80211netdev_rx(wlandev, skb);
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2063,11 +1994,7 @@ void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb)
|
|||
----------------------------------------------------------------*/
|
||||
void prism2sta_ev_alloc(wlandevice_t *wlandev)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
netif_wake_queue(wlandev->netdev);
|
||||
|
||||
DBFEXIT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2138,8 +2065,6 @@ void prism2sta_commsqual_defer(struct work_struct *data)
|
|||
hfa384x_bytestr32_t ssid;
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if (hw->wlandev->hwremoved)
|
||||
goto done;
|
||||
|
||||
|
@ -2198,16 +2123,14 @@ void prism2sta_commsqual_defer(struct work_struct *data)
|
|||
mod_timer(&hw->commsqual_timer, jiffies + HZ);
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
;
|
||||
}
|
||||
|
||||
void prism2sta_commsqual_timer(unsigned long data)
|
||||
{
|
||||
hfa384x_t *hw = (hfa384x_t *) data;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
schedule_work(&hw->commsqual_bh);
|
||||
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -85,8 +85,6 @@ static int prism2sta_probe_usb(
|
|||
hfa384x_t *hw = NULL;
|
||||
int result = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
dev = interface_to_usbdev(interface);
|
||||
|
||||
if ((wlandev = create_wlan()) == NULL) {
|
||||
|
@ -148,8 +146,6 @@ static int prism2sta_probe_usb(
|
|||
wlandev = NULL;
|
||||
|
||||
done:
|
||||
DBFEXIT;
|
||||
|
||||
usb_set_intfdata(interface, wlandev);
|
||||
return result;
|
||||
}
|
||||
|
@ -179,8 +175,6 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
|
|||
{
|
||||
wlandevice_t *wlandev;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
wlandev = (wlandevice_t *) usb_get_intfdata(interface);
|
||||
|
||||
if ( wlandev != NULL ) {
|
||||
|
@ -265,9 +259,7 @@ prism2sta_disconnect_usb(struct usb_interface *interface)
|
|||
}
|
||||
|
||||
exit:
|
||||
|
||||
usb_set_intfdata(interface, NULL);
|
||||
DBFEXIT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -281,21 +273,13 @@ static struct usb_driver prism2_usb_driver = {
|
|||
|
||||
static int __init prism2usb_init(void)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
/* This call will result in calls to prism2sta_probe_usb. */
|
||||
return usb_register(&prism2_usb_driver);
|
||||
|
||||
DBFEXIT;
|
||||
};
|
||||
|
||||
static void __exit prism2usb_cleanup(void)
|
||||
{
|
||||
DBFENTER;
|
||||
|
||||
usb_deregister(&prism2_usb_driver);
|
||||
|
||||
DBFEXIT;
|
||||
};
|
||||
|
||||
module_init(prism2usb_init);
|
||||
|
|
|
@ -110,14 +110,10 @@
|
|||
for( __i__=0; __i__ < (n); __i__++) \
|
||||
printk( " %02x", ((u8*)(p))[__i__]); \
|
||||
printk("\n"); }
|
||||
#define DBFENTER { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"---->\n"); } }
|
||||
#define DBFEXIT { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"<----\n"); } }
|
||||
|
||||
#define WLAN_LOG_DEBUG(l,x,args...) if ( WLAN_DBVAR >= (l)) printk(KERN_DEBUG "%s(%lu): " x , __func__, (preempt_count() & PREEMPT_MASK), ##args );
|
||||
#else
|
||||
#define WLAN_HEX_DUMP( l, s, p, n)
|
||||
#define DBFENTER
|
||||
#define DBFEXIT
|
||||
|
||||
#define WLAN_LOG_DEBUG(l, s, args...)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue