diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-01-30 15:25:59 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-01-30 15:25:59 +0000 |
commit | 8f1e2c9fdcd326a2aeadc65badbfea17d80d77d9 (patch) | |
tree | d36b647117ebeaee2a0369d250054a86e9e0cb9b /target/linux/ramips/files/drivers/net/ramips.c | |
parent | aed77575898959a533eeb7cb2e958fcbd53d025b (diff) | |
download | upstream-8f1e2c9fdcd326a2aeadc65badbfea17d80d77d9.tar.gz upstream-8f1e2c9fdcd326a2aeadc65badbfea17d80d77d9.tar.bz2 upstream-8f1e2c9fdcd326a2aeadc65badbfea17d80d77d9.zip |
ramips_eth: move memset call out from the loop
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19416 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers/net/ramips.c')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ramips.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c index 23a3fb6f03..c3cc029b9f 100644 --- a/target/linux/ramips/files/drivers/net/ramips.c +++ b/target/linux/ramips/files/drivers/net/ramips.c @@ -88,8 +88,8 @@ ramips_alloc_dma(struct net_device *dev) if (!priv->tx) goto err_cleanup; + memset(priv->tx, 0, NUM_TX_DESC * sizeof(struct ramips_tx_dma)); for (i = 0; i < NUM_TX_DESC; i++) { - memset(&priv->tx[i], 0, sizeof(struct ramips_tx_dma)); priv->tx[i].txd2 |= TX_DMA_LSO | TX_DMA_DONE; priv->tx[i].txd4 &= (TX_DMA_QN_MASK | TX_DMA_PN_MASK); priv->tx[i].txd4 |= TX_DMA_QN(3) | TX_DMA_PN(1); |