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 
12 #ifndef SYNOP_GMAC_HOST_H
13 #define SYNOP_GMAC_HOST_H 1
14 
15 
16 #include "synopGMAC_plat.h"
17 #include "synopGMAC_Dev.h"
18 #include "mii.h"
19 
20 
21 
22 struct net_device_stats
23 {
24     unsigned long   rx_packets;     /* total packets received   */
25     unsigned long   tx_packets;     /* total packets transmitted    */
26     unsigned long   rx_bytes;       /* total bytes received     */
27     unsigned long   tx_bytes;       /* total bytes transmitted  */
28     unsigned long   rx_errors;      /* bad packets received     */
29     unsigned long   tx_errors;      /* packet transmit problems */
30     unsigned long   rx_dropped;     /* no space in linux buffers    */
31     unsigned long   tx_dropped;     /* no space available in linux  */
32     unsigned long   multicast;      /* multicast packets received   */
33     unsigned long   collisions;
34 
35     /* detailed rx_errors: */
36     unsigned long   rx_length_errors;
37     unsigned long   rx_over_errors;     /* receiver ring buff overflow  */
38     unsigned long   rx_crc_errors;      /* recved pkt with crc error    */
39     unsigned long   rx_frame_errors;    /* recv'd frame alignment error */
40     unsigned long   rx_fifo_errors;     /* recv'r fifo overrun      */
41     unsigned long   rx_missed_errors;   /* receiver missed packet   */
42 
43     /* detailed tx_errors */
44     unsigned long   tx_aborted_errors;
45     unsigned long   tx_carrier_errors;
46     unsigned long   tx_fifo_errors;
47     unsigned long   tx_heartbeat_errors;
48     unsigned long   tx_window_errors;
49 
50     /* for cslip etc */
51     unsigned long   rx_compressed;
52     unsigned long   tx_compressed;
53 };
54 
55 
56 
57 typedef struct synopGMACNetworkAdapter{
58 
59 /*Device Dependent Data structur*/
60 synopGMACdevice * synopGMACdev;
61 
62 
63 struct net_device_stats synopGMACNetStats;
64 
65 
66 struct mii_if_info mii;
67 } synopGMACPciNetworkAdapter;
68 
69 
70 
71 
72 
73 
74 #endif
75