1/*
2 * Hardware-specific Receive Data Header for the
3 * Broadcom Home Networking Division
4 * BCM44XX and BCM47XX 10/100 Mbps Ethernet cores.
5 *
6 * Copyright 2007, Broadcom Corporation
7 * All Rights Reserved.
8 *
9 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
10 * the contents of this file may not be disclosed to third parties, copied
11 * or duplicated in any form, in whole or in part, without the prior
12 * written permission of Broadcom Corporation.
13 * $Id: bcmenetrxh.h,v 1.1.1.1 2008/10/15 03:25:54 james26_jang Exp $
14 */
15
16#ifndef _bcmenetrxh_h_
17#define	_bcmenetrxh_h_
18
19/*
20 * The Ethernet MAC core returns an 8-byte Receive Frame Data Header
21 * with every frame consisting of
22 * 16bits of frame length, followed by
23 * 16bits of EMAC rx descriptor info, followed by 32bits of undefined.
24 */
25typedef volatile struct {
26	uint16	len;
27	uint16	flags;
28	uint16	pad[12];
29} bcmenetrxh_t;
30
31#define	RXHDR_LEN	28	/* Header length */
32
33#define	RXF_L		((uint16)1 << 11)	/* last buffer in a frame */
34#define	RXF_MISS	((uint16)1 << 7)	/* received due to promisc mode */
35#define	RXF_BRDCAST	((uint16)1 << 6)	/* dest is broadcast address */
36#define	RXF_MULT	((uint16)1 << 5)	/* dest is multicast address */
37#define	RXF_LG		((uint16)1 << 4)	/* frame length > rxmaxlength */
38#define	RXF_NO		((uint16)1 << 3)	/* odd number of nibbles */
39#define	RXF_RXER	((uint16)1 << 2)	/* receive symbol error */
40#define	RXF_CRC		((uint16)1 << 1)	/* crc error */
41#define	RXF_OV		((uint16)1 << 0)	/* fifo overflow */
42
43#endif	/* _bcmenetrxh_h_ */
44