Resync with broadcom drivers 5.100.138.20 and utilities.
[tomato.git] / release / src-rt / include / bcmenetrxh.h
blob4193b55f62045e73d00b458c33f29f6d171b4cd8
1 /*
2 * Hardware-specific Receive Data Header for the
3 * Broadcom Home Networking Division
4 * BCM44XX and BCM47XX 10/100 Mbps Ethernet cores.
6 * Copyright (C) 2010, 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 13.5 2005-06-21 18:01:46 Exp $
16 #ifndef _bcmenetrxh_h_
17 #define _bcmenetrxh_h_
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.
25 typedef volatile struct {
26 uint16 len;
27 uint16 flags;
28 uint16 pad[12];
29 } bcmenetrxh_t;
31 #define RXHDR_LEN 28 /* Header length */
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 */
43 #endif /* _bcmenetrxh_h_ */