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>
struct sk_buff *skb;
int result;
- DBFENTER;
-
skb = dev_alloc_skb(sizeof(hfa384x_usbin_t));
if (skb == NULL) {
result = -ENOMEM;
}
done:
-
- DBFEXIT;
return result;
}
struct net_device *netdev = hw->wlandev->netdev;
int result;
- DBFENTER;
-
result = -ENOLINK;
if ( netif_running(netdev) ) {
}
}
- DBFEXIT;
-
return result;
}
hfa384x_t *hw = container_of(data, struct hfa384x, usb_work);
struct net_device *netdev = hw->wlandev->netdev;
- DBFENTER;
-
/* Don't bother trying to reset anything if the plug
* has been pulled ...
*/
if ( hw->wlandev->hwremoved ) {
- DBFEXIT;
return;
}
if ( test_and_clear_bit(WORK_TX_RESUME, &hw->usb_flags) ) {
netif_wake_queue(hw->wlandev->netdev);
}
-
- DBFEXIT;
}
void
hfa384x_create( hfa384x_t *hw, struct usb_device *usb)
{
- DBFENTER;
-
memset(hw, 0, sizeof(hfa384x_t));
hw->usb = usb;
init_timer(&hw->commsqual_timer);
hw->commsqual_timer.data = (unsigned long) hw;
hw->commsqual_timer.function = prism2sta_commsqual_timer;
-
- DBFEXIT;
}
{
struct sk_buff *skb;
- DBFENTER;
-
if ( hw->state == HFA384x_STATE_RUNNING ) {
hfa384x_drvr_stop(hw);
}
while ( (skb = skb_dequeue(&hw->authq)) ) {
dev_kfree_skb(skb);
}
-
- DBFEXIT;
}
usbctlx_get_status(const hfa384x_usb_cmdresp_t *cmdresp,
hfa384x_cmdresult_t *result)
{
- DBFENTER;
-
result->status = hfa384x2host_16(cmdresp->status);
result->resp0 = hfa384x2host_16(cmdresp->resp0);
result->resp1 = hfa384x2host_16(cmdresp->resp1);
result->resp1,
result->resp2);
- DBFEXIT;
return (result->status & HFA384x_STATUS_RESULT);
}
usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp,
hfa384x_rridresult_t *result)
{
- DBFENTER;
-
result->rid = hfa384x2host_16(rridresp->rid);
result->riddata = rridresp->data;
result->riddata_len = ((hfa384x2host_16(rridresp->frmlen) - 1) * 2);
- DBFEXIT;
}
static void
hfa384x_cb_status(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{
- DBFENTER;
-
if ( ctlx->usercb != NULL ) {
hfa384x_cmdresult_t cmdresult;
ctlx->usercb(hw, &cmdresult, ctlx->usercb_data);
}
-
- DBFEXIT;
}
static void
hfa384x_cb_rrid(hfa384x_t *hw, const hfa384x_usbctlx_t *ctlx)
{
- DBFENTER;
-
if ( ctlx->usercb != NULL ) {
hfa384x_rridresult_t rridresult;
ctlx->usercb(hw, &rridresult, ctlx->usercb_data);
}
-
- DBFEXIT;
}
static inline int
int i;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
-
cmd.cmd = HFA384x_CMDCODE_INIT;
cmd.parm0 = 0;
cmd.parm1 = 0;
hw->link_status = HFA384x_LINK_NOTCONNECTED;
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
HFA384x_CMD_MACPORT_SET(macport);
cmd.parm0 = 0;
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
HFA384x_CMD_MACPORT_SET(macport);
cmd.parm0 = 0;
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
HFA384x_CMD_AINFO_SET(enable);
cmd.parm0 = 0;
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
int result = 0;
hfa384x_metacmd_t cmd;
- DBFENTER;
WLAN_LOG_DEBUG(5,
"mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
mode, lowaddr, highaddr, codelen);
result = hfa384x_docmd_wait(hw, &cmd);
- DBFEXIT;
return result;
}
hfa384x_copy_from_aux(
hfa384x_t *hw, u32 cardaddr, u32 auxctl, void *buf, unsigned int len)
{
- DBFENTER;
WLAN_LOG_ERROR("not used in USB.\n");
- DBFEXIT;
}
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;
}
{
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;
}
unsigned long flags;
int result;
- DBFENTER;
-
result = wait_for_completion_interruptible(&ctlx->done);
spin_lock_irqsave(&hw->ctlxq.lock, flags);
kfree(ctlx);
}
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
ctlx = usbctlx_alloc();
if ( ctlx == NULL ) {
result = -ENOMEM;
}
done:
- DBFEXIT;
return result;
}
int result;
hfa384x_usbctlx_t *ctlx;
- DBFENTER;
WLAN_LOG_DEBUG(5, "page=0x%04x offset=0x%04x len=%d\n",
page,offset,len);
}
done:
- DBFEXIT;
return result;
}
{
hfa384x_metacmd_t cmd;
- DBFENTER;
-
cmd.cmd = HFA384x_CMDCODE_INQ;
cmd.parm0 = HFA384x_IT_COMMTALLIES;
cmd.parm1 = 0;
hfa384x_docmd_async(hw, &cmd, NULL, NULL, NULL);
- DBFEXIT;
return 0;
}
{
int result = 0;
- DBFENTER;
if ((!hw->isap && macport != 0) ||
(hw->isap && !(macport <= HFA384x_PORTID_MAX)) ||
!(hw->port_enabled[macport]) ){
hw->port_enabled[macport] = 0;
}
}
- DBFEXIT;
return result;
}
{
int result = 0;
- DBFENTER;
if ((!hw->isap && macport != 0) ||
(hw->isap && !(macport <= HFA384x_PORTID_MAX)) ||
(hw->port_enabled[macport]) ){
hw->port_enabled[macport] = 1;
}
}
- DBFEXIT;
return result;
}
int result = 0;
int i;
- DBFENTER;
/* Check that a port isn't active */
for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
if ( hw->port_enabled[i] ) {
WLAN_LOG_DEBUG(1,"flashdl_enable\n");
hw->dlstate = HFA384x_DLSTATE_FLASHENABLED;
- DBFEXIT;
+
return result;
}
----------------------------------------------------------------*/
int hfa384x_drvr_flashdl_disable(hfa384x_t *hw)
{
- DBFENTER;
/* Check that we're already in the download state */
if ( hw->dlstate != HFA384x_DLSTATE_FLASHENABLED ) {
return -EINVAL;
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
hw->dlstate = HFA384x_DLSTATE_DISABLED;
- DBFEXIT;
return 0;
}
int i;
int j;
- DBFENTER;
WLAN_LOG_DEBUG(5,"daddr=0x%08x len=%d\n", daddr, len);
/* Check that we're in the flash download state */
/* actually disable programming mode. Remember, that will cause the */
/* the firmware to effectively reset itself. */
- DBFEXIT;
return result;
}
int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len)
{
int result;
- DBFENTER;
result = hfa384x_dorrid_wait(hw, rid, buf, len);
- DBFEXIT;
return result;
}
----------------------------------------------------------------*/
int hfa384x_drvr_handover( hfa384x_t *hw, u8 *addr)
{
- DBFENTER;
WLAN_LOG_ERROR("Not currently supported in USB!\n");
- DBFEXIT;
return -EIO;
}
int hfa384x_drvr_low_level(hfa384x_t *hw, hfa384x_metacmd_t *cmd)
{
int result;
- DBFENTER;
/* Do i need a host2hfa... conversion ? */
result = hfa384x_docmd_wait(hw, cmd);
- DBFEXIT;
return result;
}
int
hfa384x_drvr_ramdl_disable(hfa384x_t *hw)
{
- DBFENTER;
/* Check that we're already in the download state */
if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) {
return -EINVAL;
hfa384x_cmd_download(hw, HFA384x_PROGMODE_DISABLE, 0, 0 , 0);
hw->dlstate = HFA384x_DLSTATE_DISABLED;
- DBFEXIT;
return 0;
}
u16 lowaddr;
u16 hiaddr;
int i;
- DBFENTER;
+
/* Check that a port isn't active */
for ( i = 0; i < HFA384x_PORTID_MAX; i++) {
if ( hw->port_enabled[i] ) {
result);
}
- DBFEXIT;
return result;
}
u16 currpage;
u16 curroffset;
u16 currlen;
- DBFENTER;
+
/* Check that we're in the ram download state */
if ( hw->dlstate != HFA384x_DLSTATE_RAMENABLED ) {
return -EINVAL;
/* TODO: We really should have a readback. */
}
- DBFEXIT;
return result;
}
{ HFA3841_PDA_BOGUS_BASE, 0}
};
- DBFENTER;
-
/* Read the pda from each known address. */
for ( i = 0; i < ARRAY_SIZE(pdaloc); i++) {
/* Make address */
WLAN_LOG_DEBUG(3,"Failure: pda is not okay\n");
}
- DBFEXIT;
return result;
}
{
int result, result1, result2;
u16 status;
- DBFENTER;
might_sleep();
hw->state = HFA384x_STATE_RUNNING;
done:
- DBFEXIT;
return result;
}
{
int result = 0;
int i;
- DBFENTER;
might_sleep();
hw->port_enabled[i] = 0;
}
- DBFEXIT;
return result;
}
int ret;
char *ptr;
- DBFENTER;
-
if (hw->tx_urb.status == -EINPROGRESS) {
WLAN_LOG_WARNING("TX URB already in use\n");
result = 3;
}
exit:
- DBFEXIT;
return result;
}
hfa384x_t *hw = wlandev->priv;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
if ( !hw->wlandev->hwremoved &&
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
/*----------------------------------------------------------------
struct list_head *temp;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
/* This list is guaranteed to be empty if someone
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
- DBFEXIT;
}
/*----------------------------------------------------------------
int reap = 0;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
/* This list is guaranteed to be empty if someone
if (reap)
tasklet_schedule(&hw->reaper_bh);
-
- DBFEXIT;
}
/*----------------------------------------------------------------
{
int ret;
- DBFENTER;
-
/*
* Try to delete the URB containing our request packet.
* If we succeed, then its completion handler will be
ret = 0;
}
- DBFEXIT;
-
return ret;
}
----------------------------------------------------------------*/
static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx)
{
- DBFENTER;
-
/* Timers have been stopped, and ctlx should be in
* a terminal state. Retire it from the "active"
* queue.
ctlxstr(ctlx->state));
break;
} /* switch */
-
- DBFEXIT;
}
/*----------------------------------------------------------------
hfa384x_usbctlxq_run(hfa384x_t *hw)
{
unsigned long flags;
- DBFENTER;
/* acquire lock */
spin_lock_irqsave(&hw->ctlxq.lock, flags);
unlock:
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
ABORT
} action;
- DBFENTER;
-
if ( !wlandev ||
!wlandev->netdev ||
wlandev->hwremoved )
if (skb)
dev_kfree_skb(skb);
-
- DBFEXIT;
}
int run_queue = 0;
unsigned long flags;
- DBFENTER;
-
retry:
spin_lock_irqsave(&hw->ctlxq.lock, flags);
if (run_queue)
hfa384x_usbctlxq_run(hw);
-
- DBFEXIT;
}
static void hfa384x_usbin_txcompl(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
{
u16 status;
- DBFENTER;
status = hfa384x2host_16(usbin->type); /* yeah I know it says type...*/
prism2sta_ev_tx(wlandev, status);
}
// prism2sta_ev_alloc(wlandev);
-
- DBFEXIT;
}
u16 data_len;
u16 fc;
- DBFENTER;
-
/* Byte order convert once up front. */
usbin->rxfrm.desc.status =
hfa384x2host_16(usbin->rxfrm.desc.status);
}
done:
- DBFEXIT;
return;
}
struct sk_buff *skb;
hfa384x_t *hw = wlandev->priv;
-
- DBFENTER;
/* Don't forget the status, time, and data_len fields are in host order */
/* Figure out how big the frame is */
fc = ieee2host16(rxdesc->frame_control);
/* pass it back up */
prism2sta_ev_rx(wlandev, skb);
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
static void hfa384x_usbin_info(wlandevice_t *wlandev, hfa384x_usbin_t *usbin)
{
- DBFENTER;
-
usbin->infofrm.info.framelen = hfa384x2host_16(usbin->infofrm.info.framelen);
prism2sta_ev_info(wlandev, &usbin->infofrm.info);
-
- DBFEXIT;
}
{
wlandevice_t *wlandev = urb->context;
hfa384x_usbout_t *usbout = urb->transfer_buffer;
- DBFENTER;
#ifdef DEBUG_USB
dbprint_urb(urb);
break;
} /* switch */
}
-
- DBFEXIT;
}
hfa384x_usbctlx_t *ctlx;
unsigned long flags;
- DBFENTER;
-
WLAN_LOG_DEBUG(3,"urb->status=%d\n", urb->status);
#ifdef DEBUG_USB
dbprint_urb(urb);
hfa384x_usbctlxq_run(hw);
done:
- DBFEXIT;
+ ;
}
{
hfa384x_t *hw = (hfa384x_t*)data;
unsigned long flags;
- DBFENTER;
spin_lock_irqsave(&hw->ctlxq.lock, flags);
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
hfa384x_t *hw = (hfa384x_t*)data;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
hw->resp_timer_done = 1;
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
done:
- DBFEXIT;
+ ;
+
}
/*----------------------------------------------------------------
hfa384x_t *hw = (hfa384x_t*)data;
unsigned long flags;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
/*
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
-
- DBFEXIT;
}
unsigned long flags;
int ret;
- DBFENTER;
-
spin_lock_irqsave(&hw->ctlxq.lock, flags);
if (hw->wlandev->hwremoved) {
ret = 0;
}
- DBFEXIT;
return ret;
}
----------------------------------------------------------------*/
static void hfa384x_usbout_tx(wlandevice_t *wlandev, hfa384x_usbout_t *usbout)
{
- DBFENTER;
-
prism2sta_ev_alloc(wlandev);
-
- DBFEXIT;
}
/*----------------------------------------------------------------
wlan_snap_t *e_snap;
int foo;
- DBFENTER;
memcpy(&e_hdr, skb->data, sizeof(e_hdr));
if (skb->len <= 0) {
p80211_hdr->a3.dur = 0;
p80211_hdr->a3.seq = 0;
- DBFEXIT;
return 0;
}
int foo;
- DBFENTER;
-
payload_length = skb->len - WLAN_HDR_A3_LEN - WLAN_CRC_LEN;
payload_offset = WLAN_HDR_A3_LEN;
/* Free the metadata */
p80211skb_rxmeta_detach(skb);
- DBFEXIT;
return 0;
}
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");
/* Clear skb->cb */
memset(skb->cb, 0, sizeof(skb->cb));
exit:
- DBFEXIT;
return;
}
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",
frmmeta->magic = P80211_FRMMETA_MAGIC;
frmmeta->rx = rxmeta;
exit:
- DBFEXIT;
return result;
}
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);
}
dev_kfree_skb(skb);
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
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;
}
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);
}
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;
result = -EAGAIN;
}
- DBFEXIT;
return result;
}
int result = 0;
wlandevice_t *wlandev = netdev->ml_priv;
- DBFENTER;
-
if ( wlandev->close != NULL ) {
result = wlandev->close(wlandev);
}
netif_stop_queue(wlandev->netdev);
wlandev->state = WLAN_DEVICE_CLOSED;
- DBFEXIT;
return result;
}
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;
}
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) {
}
dev_kfree_skb(skb);
}
-
- DBFEXIT;
}
p80211_hdr_t p80211_hdr;
p80211_metawep_t p80211_wep;
- DBFENTER;
-
if (skb == NULL) {
return 0;
}
if (!result)
dev_kfree_skb(skb);
- DBFEXIT;
return result;
}
{
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
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);
result = -ENOMEM;
}
bail:
- DBFEXIT;
-
return result; /* If allocate,copyfrom or copyto fails, return errno */
}
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;
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)))
dev->mtu = new_mtu;
- DBFEXIT;
-
return 0;
}
int result = 0;
netdevice_t *dev;
- DBFENTER;
-
/* Set up the wlandev */
wlandev->state = WLAN_DEVICE_CLOSED;
wlandev->ethconv = WLAN_ETHCONV_8021h;
netif_carrier_off(dev);
}
- DBFEXIT;
return result;
}
{
int result = 0;
- DBFENTER;
-
tasklet_kill(&wlandev->rx_bh);
if (wlandev->netdev == NULL ) {
wlandev->netdev = NULL;
}
- DBFEXIT;
return 0;
}
{
int i = 0;
- DBFENTER;
-
i = register_netdev(wlandev->netdev);
if (i)
return i;
- DBFEXIT;
return 0;
}
{
struct sk_buff *skb;
- DBFENTER;
-
unregister_netdev(wlandev->netdev);
/* Now to clean out the rx queue */
dev_kfree_skb(skb);
}
- DBFEXIT;
return 0;
}
----------------------------------------------------------------*/
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;
}
static void p80211knetdev_tx_timeout( netdevice_t *netdev)
{
wlandevice_t *wlandev = netdev->ml_priv;
- DBFENTER;
if (wlandev->tx_timeout) {
wlandev->tx_timeout(wlandev);
wlandev->nsdname);
netif_wake_queue(wlandev->netdev);
}
-
- DBFEXIT;
}
int result = 0;
p80211msg_t *msg = (p80211msg_t*)msgbuf;
- DBFENTER;
-
/* Check to make sure the MSD is running */
if (
!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
wlandev->mlmerequest(wlandev, msg);
clear_bit( 1, &(wlandev->request_pending));
- DBFEXIT;
return result; /* if result==0, msg->status still may contain an err */
}
----------------------------------------------------------------*/
static void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg)
{
- DBFENTER;
-
switch (msg->msgcode) {
case DIDmsg_lnxreq_hostwep: {
;
} /* switch msg->msgcode */
- DBFEXIT;
-
return;
}
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)
;
}
- DBFEXIT;
return 0;
}
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;
}
int result;
int err = 0;
- DBFENTER;
-
/* Get ESSID */
result = p80211wext_giwessid(wlandev->netdev, NULL, &data, ssid);
exit:
- DBFEXIT;
return err;
}
struct iw_statistics* wstats = &wlandev->wstats;
int retval;
- DBFENTER;
/* Check */
if ( (wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING) )
return NULL;
wstats->discard.retries = 0; // tx retries.
wstats->miss.beacon = 0;
- DBFEXIT;
-
return wstats;
}
int result;
int err = 0;
- DBFENTER;
-
result = p80211wext_giwrate(dev, NULL, &rate, NULL);
if (result) {
break;
}
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
freq->m = p80211_channel_to_mhz(mibitem.data, 0) * 100000;
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
}
exit:
- DBFEXIT;
return err;
}
{
wlandevice_t *wlandev = dev->ml_priv;
- DBFENTER;
-
switch (wlandev->macmode) {
case WLAN_MACMODE_IBSS_STA:
*mode = IW_MODE_ADHOC;
*mode = IW_MODE_AUTO;
}
- DBFEXIT;
return 0;
}
int result;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
err = -EFAULT;
exit:
- DBFEXIT;
-
return err;
}
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));
// XXX need to cap it if we're running at ~2Mbps..
range->throughput = 5500000;
- DBFEXIT;
return 0;
}
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;
}
int err = 0;
int i;
- DBFENTER;
-
i = (erq->flags & IW_ENCODE_INDEX) - 1;
erq->flags = 0;
memcpy(key, wlandev->wep_keys[i], erq->length);
exit:
- DBFEXIT;
return err;
}
int result = 0;
int i;
- DBFENTER;
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
exit:
- DBFEXIT;
return err;
}
{
wlandevice_t *wlandev = dev->ml_priv;
- DBFENTER;
-
if (wlandev->ssid.len) {
data->length = wlandev->ssid.len;
data->flags = 1;
data->flags = 0;
}
- DBFEXIT;
return 0;
}
int err = 0;
int length = data->length;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
}
exit:
- DBFEXIT;
return err;
}
wlandevice_t *wlandev = dev->ml_priv;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
err = p80211wext_autojoin(wlandev);
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
err = -EINVAL;
}
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
rts->fixed = 1;
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
}
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
frag->fixed = 1;
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
}
exit:
- DBFEXIT;
return err;
}
int err = 0;
u16 shortretry, longretry, lifetime;
- DBFENTER;
-
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
}
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
}
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
if (!wlan_wext_write) {
err = (-EOPNOTSUPP);
goto exit;
}
exit:
- DBFEXIT;
return err;
}
int result;
int err = 0;
- DBFENTER;
-
msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
rrq->value = mibitem.data;
exit:
- DBFEXIT;
return err;
}
int number = srq->length;
int i;
- DBFENTER;
/* Copy the data from the input buffer */
memcpy(address, extra, sizeof(struct sockaddr)*number);
wlandev->spy_number = number;
}
- DBFEXIT;
return 0;
}
int number;
int i;
- DBFENTER;
-
number = wlandev->spy_number;
if (number > 0) {
memcpy(extra, address, sizeof(struct sockaddr)*number);
memcpy(extra+sizeof(struct sockaddr)*number, spy_stat, sizeof(struct iw_quality)*number);
- DBFEXIT;
return 0;
}
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);
err = prism2_result2err (msg.resultcode.data);
exit:
- DBFEXIT;
return err;
}
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.
if (result && !scan_good)
err = prism2_result2err (msg.resultcode.data);
- DBFEXIT;
return err;
}
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);
encoding->flags |= IW_ENCODE_ENABLED;
exit:
- DBFEXIT;
-
return result;
}
{
union iwreq_data data;
- DBFENTER;
-
/* Send the association state first */
data.ap_addr.sa_family = ARPHRD_ETHER;
if (assoc) {
// XXX send association data, like IEs, etc etc.
done:
- DBFEXIT;
return 0;
}
hfa384x_HostScanRequest_data_t scanreq;
- DBFENTER;
-
/* gatekeeper check */
if (HFA384x_FIRMWARE_VERSION(hw->ident_sta_fw.major,
hw->ident_sta_fw.minor,
exit:
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
- DBFEXIT;
return result;
}
int count;
- DBFENTER;
-
req = (p80211msg_dot11req_scan_results_t *) msgp;
req->resultcode.status = P80211ENUM_msgitem_status_data_ok;
req->resultcode.data = P80211ENUM_resultcode_success;
exit:
- DBFEXIT;
return result;
}
u8 bytebuf[80];
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
u16 word;
- DBFENTER;
wlandev->macmode = WLAN_MACMODE_NONE;
done:
result = 0;
- DBFEXIT;
return result;
}
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.
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status =
P80211ENUM_msgitem_status_data_ok;
- DBFEXIT;
return 0;
}
msg->pda.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
}
- DBFEXIT;
return 0;
}
{
hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_ramdl_state_t *msg = msgp;
- DBFENTER;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
WLAN_LOG_ERROR(
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
- DBFEXIT;
return 0;
}
msg->resultcode.data = P80211ENUM_resultcode_success;
}
- DBFEXIT;
return 0;
}
u32 addr;
u32 len;
u8 *buf;
- DBFENTER;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
WLAN_LOG_ERROR(
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
- DBFEXIT;
return 0;
}
}
msg->resultcode.data = P80211ENUM_resultcode_success;
- DBFEXIT;
return 0;
}
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(
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
- DBFEXIT;
return 0;
}
}
}
- DBFEXIT;
return 0;
}
u32 addr;
u32 len;
u8 *buf;
- DBFENTER;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
WLAN_LOG_ERROR(
msg->resultcode.data =
P80211ENUM_resultcode_implementation_failure;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
- DBFEXIT;
return 0;
}
}
msg->resultcode.data = P80211ENUM_resultcode_success;
- DBFEXIT;
return 0;
}
p80211pstrd_t *pstr;
u8 bytebuf[256];
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
- DBFENTER;
wlandev->macmode = WLAN_MACMODE_NONE;
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_success;
- DBFEXIT;
return result;
}
hfa384x_t *hw = wlandev->priv;
u16 word;
- DBFENTER;
-
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
switch (msg->enable.data)
{
msg->resultcode.data = P80211ENUM_resultcode_refused;
result = 0;
exit:
-
- DBFEXIT;
return result;
}
p80211msg_dot11req_mibset_t *msg = msgp;
p80211itemd_t *mibitem;
- DBFENTER;
-
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
msg->resultcode.data = P80211ENUM_resultcode_success;
}
done:
- DBFEXIT;
-
return(0);
}
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);
result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2);
}
- DBFEXIT;
return(result);
}
u8 bytebuf[MIB_TMP_MAXLEN];
u16 *wordbuf = (u16*) bytebuf;
- DBFENTER;
-
if (isget) {
result = hfa384x_drvr_getconfig16(hw, mib->parm1, wordbuf);
*uint32 = *wordbuf;
result = hfa384x_drvr_setconfig16(hw, mib->parm1, *wordbuf);
}
- DBFEXIT;
return(result);
}
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.
}
}
- DBFEXIT;
return(result);
}
u8 bytebuf[MIB_TMP_MAXLEN];
u16 len;
- DBFENTER;
-
if (isget) {
result = 0; /* Should never happen. */
} else {
result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len);
}
- DBFEXIT;
return(result);
}
{
int result;
- DBFENTER;
-
if (wlandev->hostwep & HOSTWEP_DECRYPT) {
if (wlandev->hostwep & HOSTWEP_DECRYPT)
mib->parm2 |= HFA384x_WEPFLAGS_DISABLE_RXCRYPT;
result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
- DBFEXIT;
return(result);
}
{
int result;
- DBFENTER;
-
result = prism2mib_flag(mib, isget, wlandev, hw, msg, data);
- DBFEXIT;
return(result);
}
int result;
u32 *uint32 = (u32*) data;
- DBFENTER;
-
if (!isget)
if ((*uint32) % 2) {
WLAN_LOG_WARNING("Attempt to set odd number "
result = prism2mib_uint32(mib, isget, wlandev, hw, msg, data);
- DBFEXIT;
return(result);
}
int result;
- DBFENTER;
-
switch (mib->did) {
case DIDmib_lnx_lnxConfigTable_lnxRSNAIE: {
hfa384x_WPAData_t wpa;
WLAN_LOG_ERROR("Unhandled DID 0x%08x\n", mib->did);
}
- DBFEXIT;
return(0);
}
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;
}
void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
{
- DBFENTER;
-
memcpy(bytearea, pstr->data, pstr->len);
- DBFEXIT;
}
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;
}
void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len)
{
- DBFENTER;
-
pstr->len = (u8)len;
memcpy(pstr->data, bytearea, len);
- DBFEXIT;
}
void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint)
{
- DBFENTER;
-
*wlanint = (u32)hfa384x2host_16(*prism2int);
- DBFEXIT;
}
void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint)
{
- DBFENTER;
-
*prism2int = host2hfa384x_16((u16)(*wlanint));
- DBFEXIT;
}
----------------------------------------------------------------*/
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;
}
----------------------------------------------------------------*/
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;
}
u8 len;
u8 *datarate;
- DBFENTER;
-
len = 0;
datarate = pstr->data;
pstr->len = len;
- DBFEXIT;
return;
}
u8 *datarate;
int i;
- DBFENTER;
-
*rate = 0;
datarate = pstr->data;
}
}
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
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.
* frames because of dev->flags&IFF_UP is true.
*/
- DBFEXIT;
return 0;
}
----------------------------------------------------------------*/
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;
}
----------------------------------------------------------------*/
static void prism2sta_reset(wlandevice_t *wlandev )
{
- DBFENTER;
- DBFEXIT;
return;
}
{
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) {
result = hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep);
- DBFEXIT;
return result;
}
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
int result = 0;
- DBFENTER;
switch( msg->msgcode )
{
break;
}
- DBFEXIT;
return result;
}
{
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
u32 result;
- DBFENTER;
result = P80211ENUM_resultcode_implementation_failure;
break;
}
- DBFEXIT;
return result;
}
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 */
failed:
WLAN_LOG_ERROR("Failed, result=%d\n", result);
done:
- DBFEXIT;
return result;
}
u16 promisc;
- DBFENTER;
-
/* If we're not ready, what's the point? */
if ( hw->state != HFA384x_STATE_RUNNING )
goto exit;
// }
exit:
- DBFEXIT;
return result;
}
----------------------------------------------------------------*/
static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
{
- DBFENTER;
WLAN_LOG_DEBUG(2,"received infoframe:HANDOVER (unhandled)\n");
- DBFEXIT;
return;
}
int i;
int cnt;
- DBFENTER;
-
/*
** Determine if these are 16-bit or 32-bit tallies, based on the
** record length of the info record.
*dst += hfa384x2host_16(*src16);
}
- DBFEXIT;
-
return;
}
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)) -
WLAN_LOG_ERROR("setconfig(joinreq) failed, result=%d\n", result);
}
- DBFEXIT;
return;
}
{
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);
/* Notify/wake the sleeping caller. */
hw->scanflag = nbss;
wake_up_interruptible(&hw->cmdq);
-
- DBFEXIT;
};
/*----------------------------------------------------------------
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
atomic_set(&hw->channel_info.done, 2);
hw->channel_info.count = n;
- DBFEXIT;
return;
}
hfa384x_bytestr32_t ssid;
int result;
- DBFENTER;
/* First let's process the auth frames */
{
struct sk_buff *skb;
#endif
failed:
- DBFEXIT;
+ return;
}
/*----------------------------------------------------------------
{
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;
}
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);
WLAN_LOG_WARNING("authfail assocstatus info frame received for authenticated station.\n");
}
- DBFEXIT;
-
return;
}
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));
skb_queue_tail(&hw->authq, skb);
schedule_work(&hw->link_bh);
}
-
- DBFEXIT;
}
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.
if (added) hw->authlist.cnt--;
WLAN_LOG_ERROR("setconfig(authenticatestation) failed, result=%d\n", result);
}
-
- DBFEXIT;
-
return;
}
{
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
- DBFENTER;
-
hw->psusercount = hfa384x2host_16(inf->info.psusercnt.usercnt);
- DBFEXIT;
-
return;
}
#if 0
hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
#endif
- DBFENTER;
WLAN_LOG_DEBUG(3, "DTIM event, currently unhandled.\n");
- DBFEXIT;
return;
}
#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;
}
----------------------------------------------------------------*/
void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
{
- DBFENTER;
inf->infotype = hfa384x2host_16(inf->infotype);
/* Dispatch */
switch ( inf->infotype ) {
"Unknown info type=0x%02x\n", inf->infotype);
break;
}
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status)
{
- DBFENTER;
-
WLAN_LOG_DEBUG(3, "TxExc status=0x%x.\n", status);
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
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;
}
----------------------------------------------------------------*/
void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb)
{
- DBFENTER;
-
p80211netdev_rx(wlandev, skb);
-
- DBFEXIT;
return;
}
----------------------------------------------------------------*/
void prism2sta_ev_alloc(wlandevice_t *wlandev)
{
- DBFENTER;
-
netif_wake_queue(wlandev->netdev);
-
- DBFEXIT;
return;
}
hfa384x_bytestr32_t ssid;
int result = 0;
- DBFENTER;
-
if (hw->wlandev->hwremoved)
goto done;
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;
}
+
+
hfa384x_t *hw = NULL;
int result = 0;
- DBFENTER;
-
dev = interface_to_usbdev(interface);
if ((wlandev = create_wlan()) == NULL) {
wlandev = NULL;
done:
- DBFEXIT;
-
usb_set_intfdata(interface, wlandev);
return result;
}
{
wlandevice_t *wlandev;
- DBFENTER;
-
wlandev = (wlandevice_t *) usb_get_intfdata(interface);
if ( wlandev != NULL ) {
}
exit:
-
usb_set_intfdata(interface, NULL);
- DBFEXIT;
}
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);
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