/* Allocate buffers for the Rx ring For receive: rx_ring.to_clean is next received frame  */
static int c2_rx_fill(struct c2_port *c2_port)
/* Allocate buffers for the Rx ring For receive: rx_ring.to_clean is next received frame  */
static int c2_rx_fill(struct c2_port *c2_port)
{
	struct c2_ring *rx_ring = &c2_port->rx_ring;
	struct c2_element *elem;
	int ret = 0;
	elem = rx_ring->start;
	do {
		if (c2_rx_alloc(c2_port, elem)) {
			ret = 1;
			break;
		}
	} while ((elem = elem->next) != rx_ring->start);
	rx_ring->to_clean = rx_ring->start;
	return ret;
}