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

staging: vt6656: Replace dev_alloc_skb with netdev_alloc_skb.

Remove code that points to netdev (pDevice/priv->dev)
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a30e0b6
...@@ -1227,14 +1227,13 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, ...@@ -1227,14 +1227,13 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
if (is_multicast_ether_addr((u8 *)(skb->data+cbHeaderOffset))) { if (is_multicast_ether_addr((u8 *)(skb->data+cbHeaderOffset))) {
if (pMgmt->sNodeDBTable[0].bPSEnable) { if (pMgmt->sNodeDBTable[0].bPSEnable) {
skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz); skbcpy = netdev_alloc_skb(pDevice->dev, pDevice->rx_buf_sz);
// if any node in PS mode, buffer packet until DTIM. // if any node in PS mode, buffer packet until DTIM.
if (skbcpy == NULL) { if (skbcpy == NULL) {
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n"); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n");
} }
else { else {
skbcpy->dev = pDevice->dev;
skbcpy->len = FrameSize; skbcpy->len = FrameSize;
memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize); memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize);
skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy); skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy);
...@@ -1335,13 +1334,11 @@ void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb) ...@@ -1335,13 +1334,11 @@ void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb)
} }
if (re_alloc_skb == true) { if (re_alloc_skb == true) {
rcb->skb = dev_alloc_skb((int)priv->rx_buf_sz); rcb->skb = netdev_alloc_skb(priv->dev, priv->rx_buf_sz);
/* TODO error handling */ /* TODO error handling */
if (rcb->skb == NULL) { if (!rcb->skb) {
DBG_PRT(MSG_LEVEL_ERR, KERN_ERR DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
" Failed to re-alloc rx skb\n"); " Failed to re-alloc rx skb\n");
} else {
rcb->skb->dev = priv->dev;
} }
} }
......
...@@ -855,12 +855,11 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) ...@@ -855,12 +855,11 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR" Failed to alloc rx urb\n"); DBG_PRT(MSG_LEVEL_ERR,KERN_ERR" Failed to alloc rx urb\n");
goto free_rx_tx; goto free_rx_tx;
} }
pRCB->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pRCB->skb = netdev_alloc_skb(pDevice->dev, pDevice->rx_buf_sz);
if (pRCB->skb == NULL) { if (pRCB->skb == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR" Failed to alloc rx skb\n"); DBG_PRT(MSG_LEVEL_ERR,KERN_ERR" Failed to alloc rx skb\n");
goto free_rx_tx; goto free_rx_tx;
} }
pRCB->skb->dev = pDevice->dev;
pRCB->bBoolInUse = false; pRCB->bBoolInUse = false;
EnqueueRCB(pDevice->FirstRecvFreeList, pDevice->LastRecvFreeList, pRCB); EnqueueRCB(pDevice->FirstRecvFreeList, pDevice->LastRecvFreeList, pRCB);
pDevice->NumRecvFreeList++; pDevice->NumRecvFreeList++;
...@@ -931,11 +930,9 @@ static void device_free_frag_bufs(struct vnt_private *pDevice) ...@@ -931,11 +930,9 @@ static void device_free_frag_bufs(struct vnt_private *pDevice)
int device_alloc_frag_buf(struct vnt_private *pDevice, int device_alloc_frag_buf(struct vnt_private *pDevice,
PSDeFragControlBlock pDeF) PSDeFragControlBlock pDeF)
{ {
pDeF->skb = netdev_alloc_skb(pDevice->dev, pDevice->rx_buf_sz);
pDeF->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); if (!pDeF->skb)
if (pDeF->skb == NULL)
return false; return false;
pDeF->skb->dev = pDevice->dev;
return true; return true;
} }
......
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