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

staging: vt6655: dead code tx path remove dma_unmap_single

When pTDInfo->skb_dma not equal to pTDInfo->buf_dma, pTDInfo->skb_dma
equals zero.

as mentioned in comment pre-allocated buf_dma can't be unmapped
so remove dead code.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd43585b
......@@ -754,10 +754,6 @@ static void device_free_td0_ring(struct vnt_private *pDevice)
PSTxDesc pDesc = &(pDevice->apTD0Rings[i]);
PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo;
if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma))
dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma,
pTDInfo->skb->len, DMA_TO_DEVICE);
dev_kfree_skb(pTDInfo->skb);
kfree(pDesc->pTDInfo);
}
......@@ -771,10 +767,6 @@ static void device_free_td1_ring(struct vnt_private *pDevice)
PSTxDesc pDesc = &(pDevice->apTD1Rings[i]);
PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo;
if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma))
dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma,
pTDInfo->skb->len, DMA_TO_DEVICE);
dev_kfree_skb(pTDInfo->skb);
kfree(pDesc->pTDInfo);
}
......@@ -975,12 +967,6 @@ static void device_free_tx_buf(struct vnt_private *pDevice, PSTxDesc pDesc)
PDEVICE_TD_INFO pTDInfo = pDesc->pTDInfo;
struct sk_buff *skb = pTDInfo->skb;
/* pre-allocated buf_dma can't be unmapped. */
if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma)) {
dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma,
skb->len, DMA_TO_DEVICE);
}
if (skb)
ieee80211_tx_status_irqsafe(pDevice->hw, skb);
......
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