1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2017-08-24     chinesebear  first version
9  */
10 
11 #ifndef SYNOP_GMAC_HOST_H
12 #define SYNOP_GMAC_HOST_H 1
13 
14 #include "synopGMAC_plat.h"
15 #include "synopGMAC_Dev.h"
16 #include "mii.h"
17 
18 struct net_device_stats
19 {
20     unsigned long    rx_packets;        /* total packets received    */
21     unsigned long    tx_packets;        /* total packets transmitted    */
22     unsigned long    rx_bytes;        /* total bytes received     */
23     unsigned long    tx_bytes;        /* total bytes transmitted    */
24     unsigned long    rx_errors;        /* bad packets received        */
25     unsigned long    tx_errors;        /* packet transmit problems    */
26     unsigned long    rx_dropped;        /* no space in linux buffers    */
27     unsigned long    tx_dropped;        /* no space available in linux    */
28     unsigned long    multicast;        /* multicast packets received    */
29     unsigned long    collisions;
30 
31     /* detailed rx_errors: */
32     unsigned long    rx_length_errors;
33     unsigned long    rx_over_errors;        /* receiver ring buff overflow    */
34     unsigned long    rx_crc_errors;        /* recved pkt with crc error    */
35     unsigned long    rx_frame_errors;    /* recv'd frame alignment error */
36     unsigned long    rx_fifo_errors;        /* recv'r fifo overrun        */
37     unsigned long    rx_missed_errors;    /* receiver missed packet    */
38 
39     /* detailed tx_errors */
40     unsigned long    tx_aborted_errors;
41     unsigned long    tx_carrier_errors;
42     unsigned long    tx_fifo_errors;
43     unsigned long    tx_heartbeat_errors;
44     unsigned long    tx_window_errors;
45 
46     /* for cslip etc */
47     unsigned long    rx_compressed;
48     unsigned long    tx_compressed;
49 };
50 
51 typedef struct synopGMACNetworkAdapter{
52 /*Device Dependent Data structur*/
53 synopGMACdevice * synopGMACdev;
54 
55 struct net_device_stats synopGMACNetStats;
56 
57 struct mii_if_info mii;
58 } synopGMACPciNetworkAdapter;
59 
60 #endif
61