/* Returns 0 on success and errno on failure (as defined in errno.h).  */
void et131x_tx_dma_memory_free(struct et131x_adapter *adapter)
/* Returns 0 on success and errno on failure (as defined in errno.h).  */
void et131x_tx_dma_memory_free(struct et131x_adapter *adapter)
{
	int desc_size = 0;
	if (adapter->tx_ring.tx_desc_ring) {
		desc_size = (sizeof(struct tx_desc) * NUM_DESC_PER_RING_TX)
								+ 4096 - 1;
		pci_free_consistent(adapter->pdev,
				    desc_size,
				    adapter->tx_ring.tx_desc_ring,
				    adapter->tx_ring.tx_desc_ring_pa);
		adapter->tx_ring.tx_desc_ring = NULL;
	}
	if (adapter->tx_ring.tx_status) {
		pci_free_consistent(adapter->pdev,
				    sizeof(u32),
				    adapter->tx_ring.tx_status,
				    adapter->tx_ring.tx_status_pa);
		adapter->tx_ring.tx_status = NULL;
	}
	kfree(adapter->tx_ring.tcb_ring);
}