From: Michael Brown Date: Thu, 16 Oct 2014 13:09:27 +0000 (+0100) Subject: [efi] Free transmit ring entry before calling netdev_tx_complete() X-Git-Tag: v1.20.1~1044 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b71e93bb71ae83754e5d6b40b7b24bb31b5238de;p=thirdparty%2Fipxe.git [efi] Free transmit ring entry before calling netdev_tx_complete() The snpnet driver uses netdev_tx_defer() and so must ensure that space in the (single-entry) transmit descriptor ring is freed up before calling netdev_tx_complete(). Signed-off-by: Michael Brown --- diff --git a/src/drivers/net/efi/snpnet.c b/src/drivers/net/efi/snpnet.c index e54b52994..2c3b552e2 100644 --- a/src/drivers/net/efi/snpnet.c +++ b/src/drivers/net/efi/snpnet.c @@ -185,6 +185,7 @@ static int snpnet_transmit ( struct net_device *netdev, */ static void snpnet_poll_tx ( struct net_device *netdev ) { struct snp_nic *snp = netdev->priv; + struct io_buffer *iobuf; UINT32 irq; VOID *txbuf; EFI_STATUS efirc; @@ -212,8 +213,9 @@ static void snpnet_poll_tx ( struct net_device *netdev ) { } /* Complete transmission */ - netdev_tx_complete ( netdev, snp->txbuf ); + iobuf = snp->txbuf; snp->txbuf = NULL; + netdev_tx_complete ( netdev, iobuf ); } /**