/* returns the address of the next descriptor, or NULL if not available.  */
static struct gelic_descr* gelic_card_get_next_tx_descr(struct gelic_card *card)
/* returns the address of the next descriptor, or NULL if not available.  */
static struct gelic_descr* gelic_card_get_next_tx_descr(struct gelic_card *card)
{
	if (!card->tx_chain.head)
		return NULL;
	if (card->tx_chain.tail != card->tx_chain.head->next &&
	    gelic_descr_get_status(card->tx_chain.head) ==
	    GELIC_DESCR_DMA_NOT_IN_USE)
		return card->tx_chain.head;
	else
		return NULL;
}