aboutsummaryrefslogtreecommitdiffstats
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
commit527df10ce9657efe7c7de53fad0cd70512953a21 (patch)
treeff49f16fbdbcae99e09b3772d704abdbbf938bab
parent4ab419384e1f53e24dfa18c957103c92511087aa (diff)
downloadupstream-527df10ce9657efe7c7de53fad0cd70512953a21.tar.gz
upstream-527df10ce9657efe7c7de53fad0cd70512953a21.tar.bz2
upstream-527df10ce9657efe7c7de53fad0cd70512953a21.zip
ramips: raeth: unmap DMA memory when a packet is received
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30443 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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);