aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-01-30 15:25:59 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-01-30 15:25:59 +0000
commit43e1dd85c2199169f4ab615fbcf597127a4018da (patch)
tree4d2657c4e579b06354ccc8e35f96099870cf3104
parentea4ce3b6fd880dff5aab0afdaea25460ce83f9ea (diff)
downloadupstream-43e1dd85c2199169f4ab615fbcf597127a4018da.tar.gz
upstream-43e1dd85c2199169f4ab615fbcf597127a4018da.tar.bz2
upstream-43e1dd85c2199169f4ab615fbcf597127a4018da.zip
ramips_eth: move memset call out from the loop
SVN-Revision: 19416
-rw-r--r--target/linux/ramips/files/drivers/net/ramips.c2
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);