Commit 5a30e0b6 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: Clean up RXvFreeRCB.

Clean up white space, comments and camel case.

Camel case changes
pRCB -> rcb
bReAllocSkb -> re_alloc_skb
pDevice -> priv
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 49d73a98
...@@ -1323,39 +1323,40 @@ void RXvWorkItem(struct work_struct *work) ...@@ -1323,39 +1323,40 @@ void RXvWorkItem(struct work_struct *work)
spin_unlock_irq(&priv->lock); spin_unlock_irq(&priv->lock);
} }
void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb) void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb)
{ {
struct vnt_private *pDevice = pRCB->pDevice; struct vnt_private *priv = rcb->pDevice;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n");
if (bReAllocSkb == false) { if (re_alloc_skb == false) {
kfree_skb(pRCB->skb); kfree_skb(rcb->skb);
bReAllocSkb = true; re_alloc_skb = true;
} }
if (bReAllocSkb == true) { if (re_alloc_skb == true) {
pRCB->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); rcb->skb = dev_alloc_skb((int)priv->rx_buf_sz);
// todo error handling /* TODO error handling */
if (pRCB->skb == NULL) { if (rcb->skb == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR" Failed to re-alloc rx skb\n"); DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
}else { " Failed to re-alloc rx skb\n");
pRCB->skb->dev = pDevice->dev; } else {
} rcb->skb->dev = priv->dev;
} }
// }
// Insert the RCB back in the Recv free list
//
EnqueueRCB(pDevice->FirstRecvFreeList, pDevice->LastRecvFreeList, pRCB);
pDevice->NumRecvFreeList++;
if ((pDevice->Flags & fMP_POST_READS) && MP_IS_READY(pDevice) && /* Insert the RCB back in the Recv free list */
(pDevice->bIsRxWorkItemQueued == false) ) { EnqueueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList, rcb);
priv->NumRecvFreeList++;
pDevice->bIsRxWorkItemQueued = true; if ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) &&
schedule_work(&pDevice->read_work_item); (priv->bIsRxWorkItemQueued == false)) {
} priv->bIsRxWorkItemQueued = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList); schedule_work(&priv->read_work_item);
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",
priv->NumRecvFreeList, priv->NumRecvMngList);
} }
void RXvMngWorkItem(struct work_struct *work) void RXvMngWorkItem(struct work_struct *work)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment