aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/drivers/net
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-02-11 15:11:56 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-02-11 15:11:56 +0000
commitdf5892d1f1909ea347d8c6b2a74f28b4757656e1 (patch)
tree1aa93faec5ae4fefd566c83ab847a8ef31353214 /target/linux/ramips/files/drivers/net
parent617954ca5df08ac025b3a3c5d84b698a049b202d (diff)
downloadupstream-df5892d1f1909ea347d8c6b2a74f28b4757656e1.tar.gz
upstream-df5892d1f1909ea347d8c6b2a74f28b4757656e1.tar.bz2
upstream-df5892d1f1909ea347d8c6b2a74f28b4757656e1.zip
ramips: raeth: unmap DMA memory when a packet is received
SVN-Revision: 30443
Diffstat (limited to 'target/linux/ramips/files/drivers/net')
-rw-r--r--target/linux/ramips/files/drivers/net/ramips.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c
index 338d200bd7..17ef00bdcd 100644
--- a/target/linux/ramips/files/drivers/net/ramips.c
+++ b/target/linux/ramips/files/drivers/net/ramips.c
@@ -282,6 +282,10 @@ ramips_eth_rx_hw(unsigned long ptr)
new_skb = netdev_alloc_skb(dev, MAX_RX_LENGTH + NET_IP_ALIGN);
/* Reuse the buffer on allocation failures */
if (new_skb) {
+ /* TODO: convert to use dma_address_t */
+ dma_unmap_single(NULL, priv->rx[rx].rxd1, MAX_RX_LENGTH,
+ DMA_FROM_DEVICE);
+
skb_put(rx_skb, pktlen);
rx_skb->dev = dev;
rx_skb->protocol = eth_type_trans(rx_skb, dev);