/* Calculate wrap around when reading beyond the end of the RX buffer  */
static u16 rx_packet_start(u16 ptr)
/* Calculate wrap around when reading beyond the end of the RX buffer  */
static u16 rx_packet_start(u16 ptr)
{
	if (ptr + RSV_SIZE > RXEND_INIT)
		return (ptr + RSV_SIZE) - (RXEND_INIT - RXSTART_INIT + 1);
	else
		return ptr + RSV_SIZE;
}