From: Jonas Bonn Date: Fri, 11 Jun 2010 02:47:36 +0000 (+0000) Subject: ethoc: write number of TX buffers in init_ring X-Git-Tag: MMI-PSA29.97-13-9~23092^2~612 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ee4f56b990391f0ea333121ebc0e9fba28619b52;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ethoc: write number of TX buffers in init_ring This moves the write of the TX_BD_NUM to init_ring together with the rest of the code setting up the transmission buffers. Signed-off-by: Jonas Bonn Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 5904ad284a01..afeb9938ff85 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -298,6 +298,8 @@ static int ethoc_init_ring(struct ethoc *dev, void* mem_start) dev->dty_tx = 0; dev->cur_rx = 0; + ethoc_write(dev, TX_BD_NUM, dev->num_tx); + /* setup transmission buffers */ bd.addr = mem_start; bd.stat = TX_BD_IRQ | TX_BD_CRC; @@ -676,8 +678,6 @@ static int ethoc_open(struct net_device *dev) if (ret) return ret; - ethoc_write(priv, TX_BD_NUM, priv->num_tx); - ethoc_init_ring(priv, (void*)dev->mem_start); ethoc_reset(priv);