From: Udayan Kumar Date: Sun, 1 Jul 2007 22:05:58 +0000 (-0400) Subject: added netdev_tx_complete to natsemi.c X-Git-Tag: v0.9.3~200^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d4dafdc6e4973ab74e3f41e439decaf1b7eb722;p=thirdparty%2Fipxe.git added netdev_tx_complete to natsemi.c --- diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index f1a226051..5d3a0287e 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -45,6 +45,9 @@ struct natsemi_nic { * alternatively substracting sizeof(head) and sizeof(list_head) can also * give the same.*/ struct io_buffer *iobuf[NUM_RX_DESC]; + /*netdev_tx_complete needs pointer to the iobuf of the data so as to free + it form the memory.*/ + struct io_buffer *tx_iobuf[TX_RING_SIZE]; struct spi_bit_basher spibit; struct spi_device eeprom; struct nvo_block nvo; @@ -415,6 +418,8 @@ static int nat_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) { } //DBG_HD(iobuf->data,iob_len(iobuf)); + /* to be used in netdev_tx_complete*/ + nat->tx_iobuf[nat->tx_cur]=iobuf; /* Pad and align packet */ iob_pad ( iobuf, ETH_ZLEN ); @@ -473,6 +478,7 @@ static void nat_poll ( struct net_device *netdev, unsigned int rx_quota ) { DBG("Success in transmitting Packet with data\n"); // DBG_HD(&nat->tx[nat->tx_dirty].bufptr,130); } + netdev_tx_complete(netdev,nat->tx_iobuf[nat->tx_dirty]); /* setting cmdsts zero, indicating that it can be reused */ nat->tx[nat->tx_dirty].cmdsts=0; nat->tx_dirty=(nat->tx_dirty +1) % TX_RING_SIZE;