Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee4f56b9 authored by Jonas Bonn's avatar Jonas Bonn Committed by David S. Miller
Browse files

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: default avatarJonas Bonn <jonas@southpole.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8555ad0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);