diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 0bba96f95017..f1ed43e19b9c 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -289,8 +289,6 @@ struct vnt_private { struct usb_device *usb; struct net_device_stats stats; - struct work_struct read_work_item; - u64 tsf_time; u8 rx_rate; @@ -308,14 +306,8 @@ struct vnt_private { u32 int_interval; /* Variables to track resources for the BULK In Pipe */ - struct vnt_rcb *pRCBMem; struct vnt_rcb *apRCB[CB_MAX_RX_DESC]; u32 cbRD; - struct vnt_rcb *FirstRecvFreeList; - struct vnt_rcb *LastRecvFreeList; - u32 NumRecvFreeList; - - int bIsRxWorkItemQueued; /* Variables to track resources for the BULK Out Pipe */ struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC]; @@ -448,27 +440,6 @@ struct vnt_private { struct iw_statistics wstats; /* wireless stats */ }; -#define EnqueueRCB(_Head, _Tail, _RCB) \ -{ \ - if (!_Head) { \ - _Head = _RCB; \ - } \ - else { \ - _Tail->Next = _RCB; \ - } \ - _RCB->Next = NULL; \ - _Tail = _RCB; \ -} - -#define DequeueRCB(Head, Tail) \ -{ \ - struct vnt_rcb *RCB = Head; \ - if (!RCB->Next) { \ - Tail = NULL; \ - } \ - Head = RCB->Next; \ -} - #define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) { \ if ((uVar) >= ((uModulo) - 1)) \ (uVar) = 0; \ diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 5ac5bcde0458..ca5555482377 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -44,74 +44,6 @@ #include "rf.h" #include "usbpipe.h" -//static int msglevel =MSG_LEVEL_DEBUG; -static int msglevel =MSG_LEVEL_INFO; - -void RXvWorkItem(struct work_struct *work) -{ - struct vnt_private *priv = - container_of(work, struct vnt_private, read_work_item); - int status; - struct vnt_rcb *rcb = NULL; - unsigned long flags; - - if (priv->Flags & fMP_DISCONNECTED) - return; - - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n"); - - spin_lock_irqsave(&priv->lock, flags); - - while ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) && - (priv->NumRecvFreeList != 0)) { - rcb = priv->FirstRecvFreeList; - - priv->NumRecvFreeList--; - - DequeueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList); - - status = PIPEnsBulkInUsbRead(priv, rcb); - } - - priv->bIsRxWorkItemQueued = false; - - spin_unlock_irqrestore(&priv->lock, flags); -} - -void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb) -{ - struct vnt_private *priv = rcb->pDevice; - - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n"); - - if (re_alloc_skb == false) { - kfree_skb(rcb->skb); - re_alloc_skb = true; - } - - if (re_alloc_skb == true) { - rcb->skb = dev_alloc_skb(priv->rx_buf_sz); - /* TODO error handling */ - if (!rcb->skb) { - DBG_PRT(MSG_LEVEL_ERR, KERN_ERR - " Failed to re-alloc rx skb\n"); - } - } - - /* Insert the RCB back in the Recv free list */ - EnqueueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList, rcb); - priv->NumRecvFreeList++; - - if ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) && - (priv->bIsRxWorkItemQueued == false)) { - priv->bIsRxWorkItemQueued = true; - schedule_work(&priv->read_work_item); - } - - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d\n", - priv->NumRecvFreeList); -} - int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, unsigned long bytes_received) { diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 19d42ce82110..a1d0c983ccd0 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -1104,7 +1104,6 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id) mutex_init(&priv->usb_lock); INIT_DELAYED_WORK(&priv->run_command_work, vRunCommand); - INIT_WORK(&priv->read_work_item, RXvWorkItem); usb_set_intfdata(intf, priv);